Skip to content

05. Compile the system | 编译系统

ophub edited this page Dec 7, 2023 · 1 revision

There are many ways to compile the system. You can set up timed compilation, manual compilation, or set some specific events to trigger the compilation. Let's start with simple operations.

5.1 Manual Compilation

In your repository's navigation bar, click the Actions button, then sequentially click on Build armbian > Run workflow > Run workflow to start the compilation. Wait for approximately 3 hours. The compilation is completed once all processes have ended. The illustration is as follows:

5.2 Scheduled Compilation

In the .github/workflows/build-armbian.yml file, use Cron to set scheduled compilation. The five different positions respectively represent minutes (0 - 59) / hours (0 - 23) / date (1 - 31) / month (1 - 12) / day of the week (0 - 6)(Sunday - Saturday). Set the time by modifying the value at different positions. The system uses UTC standard time by default, please convert according to the time zone of your country.

schedule:
  - cron: '0 17 * * *'

5.3 Customizing Default System Configuration

The default system configuration information is recorded in the model_database.conf file, in which the BOARD name must be unique.

For those with BUILD value as yes, they are part of the default packaged systems for the box, these boxes can be used directly. Those with the default value as no are not packaged. To use the unpackaged boxes, you need to download the same FAMILY packaged system (recommend downloading 5.15/5.4 kernel system), after writing to USB, you can open USB's boot partition on the computer, modify FDT's dtb name in /boot/uEnv.txt file, to adapt to other boxes in the list.

When compiling locally, specify with the -b parameter. When compiling in Actions on github.com, specify with the armbian_board parameter. Using -b all means to package all devices where BUILD is yes. When packaging with a specified BOARD parameter, it can be packaged whether BUILD is yes or no. For example: -b r68s_s905x3-tx3_s905l3a-cm311.

5.1 手动编译

在自己仓库的导航栏中,点击 Actions 按钮,再依次点击 Build armbian > Run workflow > Run workflow ,开始编译,等待大约 3 个小时,全部流程都结束后就完成编译了。图示如下:

5.2 定时编译

.github/workflows/build-armbian.yml 文件里,使用 Cron 设置定时编译,5 个不同位置分别代表的意思为 分钟 (0 - 59) / 小时 (0 - 23) / 日期 (1 - 31) / 月份 (1 - 12) / 星期几 (0 - 6)(星期日 - 星期六)。通过修改不同位置的数值来设定时间。系统默认使用 UTC 标准时间,请根据你所在国家时区的不同进行换算。

schedule:
  - cron: '0 17 * * *'

5.3 自定义默认系统配置

默认系统的配置信息记录在 model_database.conf 文件里,其中的 BOARD 名字要求唯一。

其中 BUILD 的值是 yes 的是默认打包的部分盒子的系统,这些盒子可以直接使用。默认值是 no 的没有打包,这些没有打包的盒子使用时需要下载相同 FAMILY 的打包好的系统(推荐下载 5.15/5.4 内核的系统),在写入 USB 后,可以在电脑上打开 USB 中的 boot 分区,修改 /boot/uEnv.txt 文件中 FDT 的 dtb 名称,适配列表中的其他盒子。

在本地编译时通过 -b 参数指定,在 github.com 的 Actions 里编译时通过 armbian_board 参数指定。使用 -b all 代表打包 BUILDyes 的全部设备。使用指定 BOARD 参数打包时,无论 BUILDyes 或者 no 均可打包,例如:-b r68s_s905x3-tx3_s905l3a-cm311