Skip to content

Commit

Permalink
Improve the kernel usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Feb 14, 2022
1 parent 620cc5f commit 19f3aff
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 24 deletions.
16 changes: 8 additions & 8 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ armbian-install
armbian-update
```

如果当前目录下有成套的内核文件,将使用当前目录的内核进行更新。如果当前目录没有内核文件,将从服务器查询并下载同系列的最新内核进行更新。你也可以查询[可选内核](https://github.com/ophub/kernel/tree/main/pub/stable)版本,进行指定版本更新:`armbian-update 5.4.180`。在设备支持的可选内核里可以自由更新,如从 5.4.180 内核更新为 5.10.100 内核。内核更新脚本会在开发中不断更新,可使用此命令同步更新本地的脚本:`wget -O /usr/sbin/armbian-update git.io/armbian-update` 。或者直接使用服务器端最新脚本进行内核更新:`bash <(curl -fsSL git.io/armbian-update) 5.4.180`
如果当前目录下有成套的内核文件,将使用当前目录的内核进行更新(更新需要的 4 个内核文件是 `header-xxx.tar.gz`, `boot-xxx.tar.gz`, `dtb-amlogic-xxx.tar.gz`, `modules-xxx.tar.gz`。其他内核文件不需要,如果同时存在也不影响更新,系统可以准确识别需要的内核文件)。如果当前目录没有内核文件,将从服务器查询并下载同系列的最新内核进行更新。你也可以查询[可选内核](https://github.com/ophub/kernel/tree/main/pub/stable)版本,进行指定版本更新:`armbian-update 5.4.180`。在设备支持的可选内核里可以自由更新,如从 5.4.180 内核更新为 5.10.100 内核。内核更新脚本会在开发中不断更新,可使用此命令同步更新本地的脚本:`wget -O /usr/sbin/armbian-update git.io/armbian-update` 。或者直接使用服务器端最新脚本进行内核更新:`bash <(curl -fsSL git.io/armbian-update) 5.4.180`

内核更新时,默认从 [stable](https://github.com/ophub/kernel/tree/main/pub/stable) 内核版本分支下载,如果下载其他 [版本分支](https://github.com/ophub/kernel/tree/main/pub) 的内核,请在第 `2` 个参数中根据分支文件夹名称指定,如 `armbian-update 5.7.19 dev` 。默认会自动安装主线 u-boot,这对使用 5.10 以上版本的内核有更好的支持,如果选择不安装,请在第 `3` 个输入参数中指定,如 `armbian-update 5.4.180 stable no`

Expand Down Expand Up @@ -180,17 +180,17 @@ sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server)

5. 进入 `~/amlogic-s9xxx-armbian` 根目录,然后运行 `sudo ./rebuild -d -b s905x3 -k 5.4.180` 命令即可生成指定 soc 的 Armbian 镜像文件。生成的文件保存在 `build/output/images` 目录里。

- ### 使用 GitHub Action 进行编译
- ### 使用 GitHub Actions 进行编译

1. 关于 Workflows 文件的配置在 [.yml](.github/workflows/build-armbian.yml) 文件里。可以设置需要编译的盒子的 `SOC` 等参数,具体详见 `Rebuild Armbian for amlogic s9xxx` 节点。

2. 全新编译:在 [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面里选择 ***`Build armbian`*** ,根据 Armbian 官方支持的 OS 版本,可在 [RELEASE](https://docs.armbian.com/Developer-Guide_Build-Options/) 里选择 Ubuntu 系列:`focal`,或者 Debian 系列:`bullseye` / `buster` 。在 `BOARD` 里可选 `lepotato` / `odroidn2` 等。可根据需要在 `More build options` 里为 `compile.sh` 添加更多设置选项。点击 ***`Run workflow`*** 按钮即可编译。
2. 全新编译:在 [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面里选择 ***`Build armbian`*** ,根据 Armbian 官方支持的 OS 版本,可在 [RELEASE](https://docs.armbian.com/Developer-Guide_Build-Options/) 里选择 Ubuntu 系列:`focal`,或者 Debian 系列:`bullseye` / `buster` 。在 `BOARD` 里可选 `lepotato` / `odroidn2` 等。可根据需要在 `More build options` 里为 `compile.sh` 添加更多设置选项。点击 ***`Run workflow`*** 按钮即可编译。

3. 再次编译:如果 [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 中有已经编译好的 `Armbian_.*-trunk_.*.img.gz` 文件,你只是想再次制作其他不同 soc 的盒子,可以跳过 Armbian 源文件的编译,直接进行二次制作。在 [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面中选择 ***`Use Releases file to build armbian`*** ,点击 ***`Run workflow`*** 按钮即可二次编译。
3. 再次编译:如果 [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 中有已经编译好的 `Armbian_.*-trunk_.*.img.gz` 文件,你只是想再次制作其他不同 soc 的盒子,可以跳过 Armbian 源文件的编译,直接进行二次制作。在 [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面中选择 ***`Use Releases file to build armbian`*** ,点击 ***`Run workflow`*** 按钮即可二次编译。

- ### 仅单独引入 GitHub Action 进行 Armbian 重构
- ### 仅单独引入 GitHub Actions 进行 Armbian 重构

你可以使用其他方式构建 Armbian 固件。或者使用 [Armbian](https://armbian.tnahosting.net/dl/) 官方提供的 [lepotato](https://armbian.tnahosting.net/dl/lepotato/archive/) 等分支的固件,仅在流程控制文件 [.yml](.github/workflows/rebuild-armbian.yml) 中引入本仓库的脚本进行 Armbian 重构,适配 Amlogic S9xxx 系列盒子的使用。在 [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面里选择 ***`Rebuild armbian`*** ,输入 Armbian 的网络下载地址如 `https://dl.armbian.com/*/Armbian_*.img.xz` ,或者在流程控制文件 [.yml](.github/workflows/rebuild-armbian.yml) 中通过 `armbian_path` 参数设定重构文件的加载路径。代码如下:
你可以使用其他方式构建 Armbian 固件。或者使用 [Armbian](https://armbian.tnahosting.net/dl/) 官方提供的 [lepotato](https://armbian.tnahosting.net/dl/lepotato/archive/) 等分支的固件,仅在流程控制文件 [.yml](.github/workflows/rebuild-armbian.yml) 中引入本仓库的脚本进行 Armbian 重构,适配 Amlogic S9xxx 系列盒子的使用。在 [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面里选择 ***`Rebuild armbian`*** ,输入 Armbian 的网络下载地址如 `https://dl.armbian.com/*/Armbian_*.img.xz` ,或者在流程控制文件 [.yml](.github/workflows/rebuild-armbian.yml) 中通过 `armbian_path` 参数设定重构文件的加载路径。代码如下:

```yaml
- name: Rebuild the Armbian for Amlogic s9xxx
Expand All @@ -202,7 +202,7 @@ sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server)
armbian_kernel: 5.10.100_5.4.180
```
- GitHub Action 输入参数说明
- GitHub Actions 输入参数说明
相关参数与`本地打包命令`相对应,请参考上面的说明。

Expand All @@ -215,7 +215,7 @@ sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server)
| auto_kernel | true | 设置是否自动采用同系列最新版本内核,功能参考 `-a` |
| armbian_size | 2748 | 设置固件 ROOTFS 分区的大小,功能参考 `-s` |

- GitHub Action 输出变量说明
- GitHub Actions 输出变量说明

| 参数 | 默认值 | 说明 |
|------------------------------------------|-------------------|---------------------------|
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Login in to armbian → input command:
armbian-update
```

If there is a set of kernel files in the current directory, it will be updated with the kernel in the current directory. If there is no kernel file in the current directory, it will query and download the latest kernel of the same series from the server for update. You can also query the [optional kernel](https://github.com/ophub/kernel/tree/main/pub/stable) version and update the specified version: `armbian-update 5.4.180`. The optional kernel supported by the device can be freely updated, such as from 5.4.180 kernel to 5.10.100 kernel. The kernel update script will be continuously updated during development. You can use this command to update the local script synchronously: `wget -O /usr/sbin/armbian-update git.io/armbian-update` . Or directly use the latest script on the server side to update the kernel: `bash <(curl -fsSL git.io/armbian-update) 5.4.180`
If there is a set of kernel files in the current directory, it will be updated with the kernel in the current directory (The 4 kernel files required for the update are `header-xxx.tar.gz`, `boot-xxx.tar.gz`, `dtb-amlogic-xxx.tar.gz`, `modules-xxx.tar.gz`. Other kernel files are not required. If they exist at the same time, it will not affect the update. The system can accurately identify the required kernel files). If there is no kernel file in the current directory, it will query and download the latest kernel of the same series from the server for update. You can also query the [optional kernel](https://github.com/ophub/kernel/tree/main/pub/stable) version and update the specified version: `armbian-update 5.4.180`. The optional kernel supported by the device can be freely updated, such as from 5.4.180 kernel to 5.10.100 kernel. The kernel update script will be continuously updated during development. You can use this command to update the local script synchronously: `wget -O /usr/sbin/armbian-update git.io/armbian-update` . Or directly use the latest script on the server side to update the kernel: `bash <(curl -fsSL git.io/armbian-update) 5.4.180`

When the kernel is updated, By default, download from [stable](https://github.com/ophub/kernel/tree/main/pub/stable) kernel version branch, if you download other [version branch](https://github.com/ophub/kernel/tree/main/pub), please specify according to the branch folder name in the `2` parameter, such as `armbian-update 5.7.19 dev` . The mainline u-boot will be installed automatically by default, which has better support for kernels using versions above 5.10. If you choose not to install, please specify it in the `3` input parameter, such as `armbian-update 5.4.180 stable no `

Expand Down Expand Up @@ -180,17 +180,17 @@ sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server)

5. Enter the `~/amlogic-s9xxx-armbian` root directory. And run Eg: `sudo ./rebuild -d -b s905x3 -k 5.4.180` to build armbian for `amlogic s9xxx`. The generated Armbian image is in the `build/output/images` directory under the root directory.

- ### Use GitHub Action to build
- ### Use GitHub Actions to build

1. Workflows configuration in [.yml](.github/workflows/build-armbian.yml) files. Set the armbian `SOC` you want to build in `Rebuild Armbian for amlogic s9xxx`.

2. New compilation: Select ***`Build armbian`*** on the [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page, According to the OS version officially supported by Armbian, In [RELEASE](https://docs.armbian.com/Developer-Guide_Build-Options/), you can choose Ubuntu series: `focal`, or Debian series: `bullseye` / `buster`, and in `BOARD`, you can choose `lepotato` / `odroidn2`, etc., You can add more setting options for `compile.sh` in `More build options` as needed. Click the ***`Run workflow`*** button.
2. New compilation: Select ***`Build armbian`*** on the [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page, According to the OS version officially supported by Armbian, In [RELEASE](https://docs.armbian.com/Developer-Guide_Build-Options/), you can choose Ubuntu series: `focal`, or Debian series: `bullseye` / `buster`, and in `BOARD`, you can choose `lepotato` / `odroidn2`, etc., You can add more setting options for `compile.sh` in `More build options` as needed. Click the ***`Run workflow`*** button.

3. Compile again: If there is an `Armbian_.*-trunk_.*.img.gz` file in [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases), you do not need to compile it completely, you can directly use this file to `build armbian` of different soc. Select ***`Use Releases file to build armbian`*** on the [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page. Click the ***`Run workflow`*** button.
3. Compile again: If there is an `Armbian_.*-trunk_.*.img.gz` file in [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases), you do not need to compile it completely, you can directly use this file to `build armbian` of different soc. Select ***`Use Releases file to build armbian`*** on the [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page. Click the ***`Run workflow`*** button.

- ### Only import GitHub Action for Armbian rebuild
- ### Only import GitHub Actions for Armbian rebuild

You can use other methods to build the Armbian system. Or use [Armbian](https://armbian.tnahosting.net/dl/) officially provided [lepotato](https://armbian.tnahosting.net/dl/lepotato/archive/) and other branch firmware. and only import the Action from this repository in the process control file [.yml](.github/workflows/rebuild-armbian.yml) to rebuild Armbian to adapt to the use of Amlogic S9xxx series boxes. In the [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page, select ***`Rebuild armbian`***, and enter the Armbian network download url such as `https://dl.armbian.com/*/Armbian_*.img.xz`, or in the process control file [.yml](.github/workflows/rebuild-armbian.yml), set the load path of the rebuild file through the `armbian_path` parameter. code show as below:
You can use other methods to build the Armbian system. Or use [Armbian](https://armbian.tnahosting.net/dl/) officially provided [lepotato](https://armbian.tnahosting.net/dl/lepotato/archive/) and other branch firmware. and only import the Actions from this repository in the process control file [.yml](.github/workflows/rebuild-armbian.yml) to rebuild Armbian to adapt to the use of Amlogic S9xxx series boxes. In the [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page, select ***`Rebuild armbian`***, and enter the Armbian network download url such as `https://dl.armbian.com/*/Armbian_*.img.xz`, or in the process control file [.yml](.github/workflows/rebuild-armbian.yml), set the load path of the rebuild file through the `armbian_path` parameter. code show as below:

```yaml
- name: Rebuild the Armbian for Amlogic s9xxx
Expand All @@ -202,7 +202,7 @@ You can use other methods to build the Armbian system. Or use [Armbian](https://
armbian_kernel: 5.10.100_5.4.180
```
- GitHub Action Input parameter description
- GitHub Actions Input parameter description
The relevant parameters correspond to the `local packaging command`, please refer to the above description.

Expand All @@ -215,7 +215,7 @@ The relevant parameters correspond to the `local packaging command`, please refe
| auto_kernel | true | Set whether to automatically use the latest version of the same series of kernels, function reference `-a` |
| armbian_size | 2748 | Set the size of the firmware ROOTFS partition, function reference `-s` |

- GitHub Action Output variable description
- GitHub Actions Output variable description

| Parameter | For example | Description |
|------------------------------------------|-------------------|-----------------------------------|
Expand Down
37 changes: 33 additions & 4 deletions compile-kernel/README.cn.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 编译内核
# 内核编译和使用说明

查看英文说明 | [View English description](README.md)

- 此内核可用于 [Armbian](https://github.com/ophub/amlogic-s9xxx-armbian)[OpenWrt](https://github.com/ophub/amlogic-s9xxx-openwrt) 系统,在以 [unifreq](https://github.com/unifreq) 标准制作的同类系统中可通用
此内核可用于 `Armbian``OpenWrt` 系统。例如 [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian), [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt), [flippy-openwrt-actions](https://github.com/ophub/flippy-openwrt-actions)[unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) 等项目。可以在编译固件时集成,也可以安装到已有的系统中使用

- 你可以根据需要对内核的配置进行调整,如添加驱动和补丁。也可以根据心情编译具有特殊意义的个性化签名内核,如 `5.10.95-happy-new-year`, `5.10.96-beijing-winter-olympics`, `5.10.99-valentines-day` 等等。
## 内核编译说明

## 本地编译命令说明
你可以根据需要对内核的配置进行调整,如添加驱动和补丁。也可以根据心情编译具有特殊意义的个性化签名内核,如 `5.10.95-happy-new-year`, `5.10.96-beijing-winter-olympics`, `5.10.99-valentines-day` 等等。

| 参数 | 含义 | 说明 |
| ---- | ---- | ---- |
Expand Down Expand Up @@ -81,3 +81,32 @@ sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server)
| ${{ env.PACKAGED_OUTPUTDATE }} | 2021.04.13.1058 | 编译日期 |
| ${{ env.PACKAGED_STATUS }} | success | 编译状态:success / failure |

## 内核使用说明

此内核可用于 `Armbian` 和 `OpenWrt` 系统。以 ophub 的项目进行举例说明。

- ### 在 Armbian 系统中使用

下面分别对在编译 Armbian 固件时集成,以及如何安装到已有的系统中使用进行说明。

- #### 使用内核编译 Armbian 固件

编译 Armbian 固件支持本地化操作,也支持使用 github.com 的 Actions 在线编译。其中本地化编译时的使用方法详见:[本地化打包](../README.cn.md#本地化打包), 使用 Actions 在线编译的方法详见:[Actions 编译](../README.cn.md#使用-github-actions-进行编译)

- #### 将内核安装到已有的 Armbian 系统

可以使用 `armbian-update` 命令将编译好的内核安装到已有的 Armbian 系统中,具体操作方法详见:[更新 Armbian 内核](../README.cn.md#更新-armbian-内核)


- ### 在 OpenWrt 系统中使用

下面分别对在 OpenWrt 系统中编译固件时集成和安装到已有的系统中使用进行介绍。

- #### 使用内核编译 OpenWrt 固件

编译 OpenWrt 固件支持本地化操作,也支持使用 github.com 的 Actions 在线编译。其中本地化编译时的使用方法详见:[本地化打包](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#本地化打包), 使用 Actions 在线编译的方法详见:[Actions 编译](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#githubcom-一站式编译和打包)

- #### 将内核安装到已有的 OpenWrt 系统

可以使用 [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic/blob/main/README.cn.md) 插件将编译好的内核安装到已有的 OpenWrt 系统中,具体操作方法详见:[升级 OpenWrt](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#升级-openwrt)

Loading

0 comments on commit 19f3aff

Please sign in to comment.