Skip to content

Commit

Permalink
Improve the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Jan 23, 2022
1 parent 2a4c1d4 commit 03d16a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions compile-kernel/README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
- `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.15.13_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/) 编译。也可以使用其他优秀的内核源代码仓库,如 [chewitt/linux@amlogic-5.4.y](https://github.com/chewitt/linux/tree/amlogic-5.4.y)
💡提示:推荐使用 `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.15](https://github.com/unifreq/linux-5.15.y) 等内核的 `最新版本``其他系列或历史版本` 可以使用 [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) 编译。你也可以使用其他内核源代码仓库

- ### 本地编译

Expand Down
3 changes: 1 addition & 2 deletions compile-kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ Compile a custom kernel as needed. This kernel can be used in [Armbian](https://
- `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.15.13_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/). 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.
💡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.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 kernel source code repositories.

- ### Local compilation

Expand Down
10 changes: 5 additions & 5 deletions rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ copy_files() {
cd ${tmp_armbian}

#Check if writing to EMMC is supported
VERSION_NOW=$(ls usr/lib/modules/ 2>/dev/null | sort -rV | head -n 1 | grep -oE '^[1-9].[0-9]{1,3}.[0-9]+')
[ -z "${VERSION_NOW}" ] && error_msg "Failed to query the current version."
#echo -e "This Kernel [ ${VERSION_NOW} ]"
KERNEL_VERSION=$(ls usr/lib/modules/ 2>/dev/null | sort -rV | head -n 1 | grep -oE '^[1-9].[0-9]{1,3}.[0-9]+')
[ -z "${KERNEL_VERSION}" ] && error_msg "Failed to query the current kernel version."
#echo -e "This Kernel version [ ${KERNEL_VERSION} ]"

k510_ver=$(echo "${VERSION_NOW}" | cut -d '.' -f1)
k510_maj=$(echo "${VERSION_NOW}" | cut -d '.' -f2)
k510_ver=$(echo "${KERNEL_VERSION}" | cut -d '.' -f1)
k510_maj=$(echo "${KERNEL_VERSION}" | cut -d '.' -f2)
if [ "${k510_ver}" -eq "5" ]; then
if [ "${k510_maj}" -ge "10" ]; then
K510="1"
Expand Down

0 comments on commit 03d16a0

Please sign in to comment.