Skip to content

Commit

Permalink
Auto sync upstream kernel source code
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Jan 21, 2022
1 parent bc378cc commit 41fc6ef
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 52 deletions.
13 changes: 7 additions & 6 deletions compile-kernel/README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
| -k | Kernel | 指定 [kernel](https://cdn.kernel.org/pub/linux/kernel/v5.x/) 名称,如 `-k 5.4.170` . 多个内核使用 `_` 进行连接,如 `-k 5.10.90_5.4.170` |
| -a | AutoKernel | 设置是否自动采用同系列最新版本内核。当为 `true` 时,将自动查找在 `-k` 中指定的内核如 `5.4.170``5.4` 同系列是否有更新的版本,如有 `5.4.170` 之后的最新版本时,将自动更换为最新版。设置为 `false` 时将编译指定版本内核。默认值:`true` |
| -n | CustomName | 设置内核自定义签名。默认值为 `-meson64-dev` ,生成的内核名称为 `5.4.170-meson64-dev` 。设置自定义签名时请勿包含空格。 |
| -r | Repo | 指定编译内核的源代码仓库。默认为 `unifreq` 。可选择 [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) 的源码和 [github.com](https://github.com/) 的内核源代码仓库。例如 `-r kernel.org``-r unifreq` 。当使用 github.com 的内核源代码仓库时,可设置参数格式为 `owner/repo@branch` 三项组合,参数中的所有者名称 `owner` 为必选参数,内核源代码仓库名称 `/repo` 和 仓库的分支名称 `@branch` 为可选参数。当仅指定所有者名称 `owner` 参数时,将自动匹配所有者的名称为 `linux-5.x.y` 格式且分支为 `main` 的内核源代码仓库。如果仓库名称或分支名称不同,请使用组合方式指定,如 `owner@branch``owner/repo``owner/repo@branch` |
| -r | Repo | 指定编译内核的源代码仓库。默认为 `unifreq` 。可选择 `kernel.org` 的源码和 `github.com` 的内核源代码仓库。例如 `-r kernel.org``-r unifreq` `-r chewitt/linux@amlogic-5.4.y` 。当使用 `github.com` 的内核源代码仓库时,可设置参数格式为 `owner/repo@branch` 三项组合,参数中的所有者名称 `owner` 为必选参数,内核源代码仓库名称 `/repo` 和 仓库的分支名称 `@branch` 为可选参数。当仅指定所有者名称 `owner` 参数时,将自动匹配所有者的名称为 `linux-5.x.y` 格式且分支为 `main` 的内核源代码仓库。如果仓库名称或分支名称不同,请使用组合方式指定,如 `owner@branch``owner/repo``owner/repo@branch` |

- `sudo ./recompile -d -k 5.4.170` : 使用默认配置,并通过 -k 进行指定需要编译的内核版本,多个版本同时编译时使用 `_` 进行连接。
- `sudo ./recompile -d -k 5.4.170 -a true` : 使用默认配置,并通过 -a 参数设置编译内核时,是否自动升级到同系列最新内核。
- `sudo ./recompile -d -k 5.4.170 -n -leifeng` : 使用默认配置,并通过 -n 参数设置内核自定义签名。
- `sudo ./recompile -d -k 5.4.170 -r kernel.org` : 使用默认配置,并通过 -r 参数设置内核源代码仓库。
- `sudo ./recompile -d -k 5.4.170` : 使用默认配置,并通过 `-k` 进行指定需要编译的内核版本,多个版本同时编译时使用 `_` 进行连接。
- `sudo ./recompile -d -k 5.4.170 -a true` : 使用默认配置,并通过 `-a` 参数设置编译内核时,是否自动升级到同系列最新内核。
- `sudo ./recompile -d -k 5.4.170 -n -leifeng` : 使用默认配置,并通过 `-n` 参数设置内核自定义签名。
- `sudo ./recompile -d -k 5.4.170 -r kernel.org` : 使用默认配置,并通过 `-r` 参数设置内核源代码仓库。
- `sudo ./recompile -d -k 5.10.90_5.4.170 -a true -n -leifeng -r kernel.org` : 使用默认配置,并通过多个参数进行设置。
- `sudo ./recompile -d -k 5.4.170 -r chewitt/linux@amlogic-5.4.y` : 使用默认配置,并通过 `-r` 参数指定内核源代码仓库及分支。

💡提示:推荐使用 `unifreq`[.config](https://github.com/unifreq/arm64-kernel-configs) 模板和源码编译 [5.4](https://github.com/unifreq/linux-5.4.y) / [5.10](https://github.com/unifreq/linux-5.10.y) / [5.12](https://github.com/unifreq/linux-5.12.y) / [5.13](https://github.com/unifreq/linux-5.13.y) / [5.14](https://github.com/unifreq/linux-5.14.y) / [5.15](https://github.com/unifreq/linux-5.15.y) 等内核的 `最新版本``其他系列或历史版本` 可以使用 [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) 编译。
💡提示:推荐使用 `unifreq`[.config](https://github.com/unifreq/arm64-kernel-configs) 模板和源码编译 [5.4](https://github.com/unifreq/linux-5.4.y) / [5.10](https://github.com/unifreq/linux-5.10.y) / [5.12](https://github.com/unifreq/linux-5.12.y) / [5.13](https://github.com/unifreq/linux-5.13.y) / [5.14](https://github.com/unifreq/linux-5.14.y) / [5.15](https://github.com/unifreq/linux-5.15.y) 等内核的 `最新版本``其他系列或历史版本` 可以使用 [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) 编译。也可以使用其他优秀的内核源代码仓库,如 [chewitt/linux@amlogic-5.4.y](https://github.com/chewitt/linux/tree/amlogic-5.4.y) 等。

- ### 本地编译

Expand Down
5 changes: 3 additions & 2 deletions compile-kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ Compile a custom kernel as needed. This kernel can be used in [Armbian](https://
| -k | Kernel | Specify [kernel](https://cdn.kernel.org/pub/linux/kernel/v5.x/) name, such as `-k 5.4.170`. Multiple kernels use `_` to connect, such as `- k 5.10.90_5.4.170` |
| -a | AutoKernel | Set whether to automatically adopt the latest version of the kernel of the same series. When it is `true`, it will automatically find whether there is a newer version of the kernel specified in `-k` such as `5.4.170` of the `5.4` series. If there is the latest version after `5.4.170`, it will be automatically replaced with the latest version . When set to `false`, the specified version of the kernel will be compiled. Default value: `true` |
| -n | CustomName | Set the kernel custom signature. The default value is `-meson64-dev` and the generated kernel is `5.4.170-meson64-dev`. Do not include spaces when setting a custom signature. |
| -r | Repo | Specifies the source code repository for the compiled kernel. Defaults to `unifreq` . You can choose the source code of [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) and the kernel source of [github.com](https://github.com/) code repository. For example `-r kernel.org` or `-r unifreq` . When using the kernel source code repository of github.com, the parameter format can be set to the three-item combination of `owner/repo@branch` , The owner name `owner` in the parameters is a required parameter, the kernel source code repository name `/repo` and the repository branch name `@branch` are optional parameters. When only the owner name `owner` parameter is specified, it will automatically match kernel source code repositories whose owner's name is in `linux-5.x.y` format and branch is `main`. If the repository name or branch name is different, use a combination, such as `owner@branch` or `owner/repo` or `owner/repo@branch` |
| -r | Repo | Specifies the source code repository for the compiled kernel. Defaults to `unifreq` . You can choose the source code of `kernel.org` and the kernel source of `github.com` code repository. For example `-r kernel.org` or `-r unifreq` or `-r chewitt/linux@amlogic-5.4.y` . When using the kernel source code repository of `github.com`, the parameter format can be set to the three-item combination of `owner/repo@branch` , The owner name `owner` in the parameters is a required parameter, the kernel source code repository name `/repo` and the repository branch name `@branch` are optional parameters. When only the owner name `owner` parameter is specified, it will automatically match kernel source code repositories whose owner's name is in `linux-5.x.y` format and branch is `main`. If the repository name or branch name is different, use a combination, such as `owner@branch` or `owner/repo` or `owner/repo@branch` |

- `sudo ./recompile -d -k 5.4.170`: Use the default configuration, and use the `-k` parameter to specify the kernel version to be compiled, and use `_` to link when multiple versions are compiled at the same time.
- `sudo ./recompile -d -k 5.4.170 -a true`: Use the default configuration, and use the `-a` parameter to set whether to automatically upgrade to the latest kernel of the same series when compiling the kernel.
- `sudo ./recompile -d -k 5.4.170 -n -leifeng`: Use the default configuration, and use the `-n` parameter to set the kernel custom signature.
- `sudo ./recompile -d -k 5.4.170 -r kernel.org`: Use the default configuration, and set the kernel source code repository through the `-r` parameter.
- `sudo ./recompile -d -k 5.10.90_5.4.170 -a true -n -leifeng -r kernel.org`: Use the default configuration, and set through multiple parameters.
- `sudo ./recompile -d -k 5.4.170 -r chewitt/linux@amlogic-5.4.y`: Use the default configuration, and specify the kernel source code repository and branch with the `-r` parameter.

💡Tip: Recommended Use the [.config](https://github.com/unifreq/arm64-kernel-configs) template and source code of `unifreq` to compile the `latest version` of [5.4](https://github.com/unifreq/linux-5.4.y) / [5.10](https://github.com/unifreq/linux-5.10.y) / [5.12](https://github.com/unifreq/linux-5.12.y) / [5.13](https://github.com/unifreq/linux-5.13.y) / [5.14](https://github.com/unifreq/linux-5.14.y) / [5.15](https://github.com/unifreq/linux-5.15.y), etc. `Other series or historical versions` can be compiled with [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/).
💡Tip: Recommended Use the [.config](https://github.com/unifreq/arm64-kernel-configs) template and source code of `unifreq` to compile the `latest version` of [5.4](https://github.com/unifreq/linux-5.4.y) / [5.10](https://github.com/unifreq/linux-5.10.y) / [5.12](https://github.com/unifreq/linux-5.12.y) / [5.13](https://github.com/unifreq/linux-5.13.y) / [5.14](https://github.com/unifreq/linux-5.14.y) / [5.15](https://github.com/unifreq/linux-5.15.y), etc. `Other series or historical versions` can be compiled with [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/). You can also use other excellent kernel source code repositories, such as [chewitt/linux@amlogic-5.4.y](https://github.com/chewitt/linux/tree/amlogic-5.4.y) etc.

- ### Local compilation

Expand Down
Loading

0 comments on commit 41fc6ef

Please sign in to comment.