Skip to content

Commit

Permalink
Update kernel compilation template
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Nov 22, 2021
1 parent ec301bd commit 89ba5f8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compile-kernel/README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sudo apt-get install -y $(curl -fsSL git.io/armbian-kernel-server)

2. 克隆仓库到本地 `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`

3. 如采用 [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) 的源码进行编译,请下载对应的内核并解压到 `compile-kernel/kernle` 目录下;如采用 [flippy](https://github.com/unifreq) 的源码进行编译,请克隆指定内核系列的源码如 `git clone --depth 1 https://github.com/unifreq/linux-5.4.y compile-kernel/kernle/linux-5.4.y` 到对应的目录下。完成后进入对应的内核如 `compile-kernel/kernle/linux-5.4.160` 的目录下,运行个性化配置选择命令 `make menuconfig` 进行选择,完成后保存,会在内核目录下生成自定义的内核 `.config` 配置文件。
3. 首先在 `compile-kernel` 目录下创建 `kernle` 目录,用于存放编译的内核源码。如采用 [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) 的源码进行编译,请下载对应的内核如 `linux-5.4.160.tar.xz` 并解压到 `compile-kernel/kernle/linux-5.4.160` 目录下;如采用 [flippy](https://github.com/unifreq) 的源码进行编译,请克隆指定内核系列的源码如 `git clone --depth 1 https://github.com/unifreq/linux-5.4.y compile-kernel/kernle/linux-5.4.y` 到对应的目录下。完成后进入对应的内核如 `compile-kernel/kernle/linux-5.4.160` 的目录下,运行个性化配置选择命令 `make menuconfig` 进行选择,完成后保存,会在内核目录下生成自定义的内核 `.config` 配置文件。

4. 进入 `~/amlogic-s9xxx-armbian` 根目录,然后运行 `sudo ./recompile -k 5.4.160` 命令即可编译内核。打包好的内核文件保存在 `compile-kernel/output` 目录里。

Expand Down
2 changes: 1 addition & 1 deletion compile-kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sudo apt-get install -y $(curl -fsSL git.io/armbian-kernel-server)

2. Clone the repository to local: `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`

3. For example, use the source code of [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) to compile, Please download the corresponding kernel and unzip it to the directory `compile-kernel/kernle`; If you use the source code of [flippy](https://github.com/unifreq) to compile, Please clone the source code of the specified kernel series such as `git clone --depth 1 https://github.com/unifreq/linux-5.4.y compile-kernel/kernle/linux-5.4.y` to the corresponding directory. After completion, enter the corresponding kernel such as `compile-kernel/kernle/linux-5.4.160` directory, Run the personalized configuration selection command `make menuconfig` to make a selection, save it after completion, A custom kernel `.config` configuration file will be generated in the kernel directory.
3. First create a `kernle` directory under the `compile-kernel` directory to store the compiled kernel source code. For example, use the source code of [kernel.org](https://cdn.kernel.org/pub/linux/kernel/v5.x/) to compile, Please download the corresponding kernel such as `linux-5.4.160.tar.xz` and unzip it to the `compile-kernel/kernle/linux-5.4.160` directory; If you use the source code of [flippy](https://github.com/unifreq) to compile, Please clone the source code of the specified kernel series such as `git clone --depth 1 https://github.com/unifreq/linux-5.4.y compile-kernel/kernle/linux-5.4.y` to the corresponding directory. After completion, enter the corresponding kernel such as `compile-kernel/kernle/linux-5.4.160` directory, Run the personalized configuration selection command `make menuconfig` to make a selection, save it after completion, A custom kernel `.config` configuration file will be generated in the kernel directory.

4. Enter the root directory of `~/amlogic-s9xxx-armbian`, and then run the `sudo ./recompile -k 5.4.160` command to compile the kernel. The packaged kernel file is stored in the `compile-kernel/output` directory.

Expand Down
1 change: 0 additions & 1 deletion compile-kernel/kernel/.gitkeep

This file was deleted.

1 change: 1 addition & 0 deletions recompile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ local_kernel_check() {
download_kernel() {
# kernel_folder > kernel_.tar.xz_file > download_from_kernel.org
echo -e "${STEPS} Start query and download the kernel."
[ -d "${kernel_path}" ] || mkdir -p ${kernel_path}
if [ ! -d "${kernel_path}/${linux_kernel_dirname}" ]; then
if [ "${repo_url}" == "flippy" ]; then
echo -e "${INFO} Start cloning from [ https://github.com/${kernel_flippy_repo}/${linux_kernel_dirname} ]"
Expand Down

0 comments on commit 89ba5f8

Please sign in to comment.