Skip to content

Commit

Permalink
Adjust the armbian build command
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Nov 17, 2021
1 parent bed1646 commit a366dbd
Show file tree
Hide file tree
Showing 6 changed files with 584 additions and 587 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build-armbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,37 +61,37 @@ jobs:
run: |
git clone --depth 1 https://github.com/armbian/build.git
- name: Build Armbian [ ${{ env.ARMBIAN_BOARD }} ]
id: build
- name: Compile Armbian [ ${{ env.ARMBIAN_BOARD }} ]
id: compile
run: |
cd build/
sudo chmod +x compile.sh
sudo ./compile.sh BOARD="${{ env.ARMBIAN_BOARD }}" HOST=armbian BRANCH=current RELEASE=buster BUILD_MINIMAL=no \
BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,img
echo "::set-output name=status::success"
- name: Make Armbian for amlogic s9xxx
id: make
if: steps.build.outputs.status == 'success'
- name: Rebuild Armbian for amlogic s9xxx
id: rebuild
if: steps.compile.outputs.status == 'success'
run: |
sudo chmod +x make
sudo ./make -d -b s922x_s922x-n2_s905x3_s905x2_s905d_s912_s912-t95z -k 5.10.70_5.4.150
sudo ./make -d -b s905x_s905w -k 5.4.150
cd ./build/output/images && sudo gzip *.img && sync
sudo chmod +x rebuild
sudo ./rebuild -d -b s922x_s922x-n2_s905x3_s905x2_s905d_s912_s912-t95z -k 5.10.70_5.4.150
sudo ./rebuild -d -b s905x_s905w -k 5.4.150
cd build/output/images/ && sudo gzip *.img && sync
echo "FILEPATH=$PWD" >> $GITHUB_ENV
echo "FILE_DATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
echo "::set-output name=status::success"
- name: Upload Armbian image to Actions
uses: kittaakos/upload-artifact-as-is@master
if: steps.build.outputs.status == 'success' && env.UPLOAD_FIRMWARE == 'true' && !cancelled()
if: steps.rebuild.outputs.status == 'success' && env.UPLOAD_FIRMWARE == 'true' && !cancelled()
with:
path: ${{ env.FILEPATH }}/

- name: Upload Armbian image to Release
id: release
uses: ncipollo/release-action@v1
if: steps.make.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
if: steps.rebuild.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
tag: Armbian_Aml_buster_${{ env.FILE_DATE }}
artifacts: ${{ env.FILEPATH }}/*
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/use-releases-file-to-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,32 @@ jobs:
sudo timedatectl set-timezone "$TZ"
echo "COMPILE_STARTINGTIME=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
- name: Make Armbian for amlogic s9xxx
id: make
- name: Rebuild Armbian for amlogic s9xxx
id: rebuild
if: (!cancelled())
run: |
[ -d build/output/images ] || mkdir -p build/output/images
curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "Armbian_Aml_buster_.*/Armbian_.*-trunk_.*.img.gz" | head -n 1 > DOWNLOAD_ARMBIAN
[ -s DOWNLOAD_ARMBIAN ] && wget -q -P build/output/images https://github.com/${GITHUB_REPOSITORY}/releases/download/$(cat DOWNLOAD_ARMBIAN)
cd ./build/output/images && gzip -df *.img.gz && sync && cd ../../../
sudo chmod +x make
sudo ./make -d -b s922x_s922x-n2_s905x3_s905x2_s905d_s912_s912-t95z -k 5.10.70_5.4.150
sudo ./make -d -b s905x_s905w -k 5.4.150
cd build/output/images/ && gzip -df *.img.gz && sync && cd ../../../
sudo chmod +x rebuild
sudo ./rebuild -d -b s922x_s922x-n2_s905x3_s905x2_s905d_s912_s912-t95z -k 5.10.70_5.4.150
sudo ./rebuild -d -b s905x_s905w -k 5.4.150
cd ./build/output/images && sudo gzip *.img && sync
echo "FILEPATH=$PWD" >> $GITHUB_ENV
echo "FILE_DATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
echo "::set-output name=status::success"
- name: Upload artifact to Actions
uses: kittaakos/upload-artifact-as-is@master
if: steps.build.outputs.status == 'success' && env.UPLOAD_FIRMWARE == 'true' && !cancelled()
if: steps.rebuild.outputs.status == 'success' && env.UPLOAD_FIRMWARE == 'true' && !cancelled()
with:
path: ${{ env.FILEPATH }}/

- name: Upload Armbian image to Release
id: release
uses: ncipollo/release-action@v1
if: steps.make.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
if: steps.rebuild.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
tag: Armbian_Aml_buster_${{ env.FILE_DATE }}
artifacts: ${{ env.FILEPATH }}/*
Expand Down
20 changes: 10 additions & 10 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ armbian-tf

## 打包命令的相关参数说明

- `sudo ./make -d -b s905x3 -k 5.4.150` : 推荐使用. 使用默认配置进行相关内核打包。
- `sudo ./make -d -b s905x3_s905d -k 5.10.70_5.4.150` : 使用默认配置,进行多个内核同时打包。使用 `_` 进行多内核参数连接。
- `sudo ./make -d` : 使用默认配置,对全部型号的机顶盒进行打包。
- `sudo ./make -d -b s905x3 -k 5.4.150 -s 1024` : 使用默认配置,指定一个内核,一个型号进行打包,固件大小设定为1024M。
- `sudo ./make -d -b s905x3 -v beta -k 5.7.2` : 使用默认配置,指定型号,指定版本分支,指定内核进行打包。
- `sudo ./make -d -b s905x3_s905d` 使用默认配置,对多个型号的机顶盒进行全部内核打包, 使用 `_` 进行多型号连接。
- `sudo ./make -d -k 5.10.70_5.4.150` : 使用默认配置,指定多个内核,进行全部型号机顶盒进行打包, 内核包使用 `_` 进行连接。
- `sudo ./make -d -k 5.10.70_5.4.150 -a true` : 使用默认配置,指定多个内核,进行全部型号机顶盒进行打包, 内核包使用 `_` 进行连接。自动升级到同系列最新内核。
- `sudo ./make -d -s 1024 -k 5.4.150` : 使用默认配置,设置固件大小为 1024M, 并指定内核为 5.4.150 ,对全部型号机顶盒进行打包。
- `sudo ./rebuild -d -b s905x3 -k 5.4.150` : 推荐使用. 使用默认配置进行相关内核打包。
- `sudo ./rebuild -d -b s905x3_s905d -k 5.10.70_5.4.150` : 使用默认配置,进行多个内核同时打包。使用 `_` 进行多内核参数连接。
- `sudo ./rebuild -d` : 使用默认配置,对全部型号的机顶盒进行打包。
- `sudo ./rebuild -d -b s905x3 -k 5.4.150 -s 1024` : 使用默认配置,指定一个内核,一个型号进行打包,固件大小设定为1024M。
- `sudo ./rebuild -d -b s905x3 -v beta -k 5.7.2` : 使用默认配置,指定型号,指定版本分支,指定内核进行打包。
- `sudo ./rebuild -d -b s905x3_s905d` 使用默认配置,对多个型号的机顶盒进行全部内核打包, 使用 `_` 进行多型号连接。
- `sudo ./rebuild -d -k 5.10.70_5.4.150` : 使用默认配置,指定多个内核,进行全部型号机顶盒进行打包, 内核包使用 `_` 进行连接。
- `sudo ./rebuild -d -k 5.10.70_5.4.150 -a true` : 使用默认配置,指定多个内核,进行全部型号机顶盒进行打包, 内核包使用 `_` 进行连接。自动升级到同系列最新内核。
- `sudo ./rebuild -d -s 1024 -k 5.4.150` : 使用默认配置,设置固件大小为 1024M, 并指定内核为 5.4.150 ,对全部型号机顶盒进行打包。

| 参数 | 含义 | 说明 |
| ---- | ---- | ---- |
Expand Down Expand Up @@ -161,7 +161,7 @@ sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server)

2. 克隆仓库到本地 `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`
3. 在根目录下创建文件夹 `build/output/images` ,并上传采用 `lepotato` 分支生成的 Armbian 镜像文件 ( 如:`Armbian_21.11.0-trunk_Lepotato_buster_current_5.10.67.img` ) 到 `~/amlogic-s9xxx-armbian/build/output/images` 目录里。
4. 进入 `~/amlogic-s9xxx-armbian` 根目录,然后运行 `sudo ./make s905x3` 命令即可生成指定 soc 的 Armbian 镜像文件。生成的文件保存在 `build/output/images` 目录里。
4. 进入 `~/amlogic-s9xxx-armbian` 根目录,然后运行 `sudo ./rebuild s905x3` 命令即可生成指定 soc 的 Armbian 镜像文件。生成的文件保存在 `build/output/images` 目录里。

## 编译自定义内核

Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ Command: Enter [ vi /etc/fstab ]
```
</details>

## Detailed make compile command

- `sudo ./make -d -b s905x3 -k 5.4.150`: recommend. Use the default configuration, specify a kernel and a firmware for compilation.
- `sudo ./make -d -b s905x3_s905d -k 5.10.70_5.4.150`: Use the default configuration, specify multiple cores, and multiple firmware for compilation. use `_` to connect.
- `sudo ./make -d`: Use the default configuration to pack all boxes.
- `sudo ./make -d -b s905x3 -k 5.4.150 -s 1024`: Use the default configuration, specify a kernel, a firmware, and set the partition size for compilation.
- `sudo ./make -d -b s905x3 -v beta -k 5.7.2`: Use the default configuration, specify the model, specify the version branch, and specify the kernel for packaging.
- `sudo ./make -d -b s905x3_s905d`: Use the default configuration, specify multiple firmware, use `_` to connect. compile all kernels.
- `sudo ./make -d -k 5.10.70_5.4.150`: Use the default configuration. Specify multiple cores, use `_` to connect.
- `sudo ./make -d -k 5.10.70_5.4.150 -a true`: Use the default configuration. Specify multiple cores, use `_` to connect. Auto update to the latest kernel of the same series.
- `sudo ./make -d -s 1024 -k 5.4.150`: Use the default configuration and set the partition size to 1024m, and only compile the armbian firmware with the kernel version 5.4.150.
## Detailed build compile command

- `sudo ./rebuild -d -b s905x3 -k 5.4.150`: recommend. Use the default configuration, specify a kernel and a firmware for compilation.
- `sudo ./rebuild -d -b s905x3_s905d -k 5.10.70_5.4.150`: Use the default configuration, specify multiple cores, and multiple firmware for compilation. use `_` to connect.
- `sudo ./rebuild -d`: Use the default configuration to pack all boxes.
- `sudo ./rebuild -d -b s905x3 -k 5.4.150 -s 1024`: Use the default configuration, specify a kernel, a firmware, and set the partition size for compilation.
- `sudo ./rebuild -d -b s905x3 -v beta -k 5.7.2`: Use the default configuration, specify the model, specify the version branch, and specify the kernel for packaging.
- `sudo ./rebuild -d -b s905x3_s905d`: Use the default configuration, specify multiple firmware, use `_` to connect. compile all kernels.
- `sudo ./rebuild -d -k 5.10.70_5.4.150`: Use the default configuration. Specify multiple cores, use `_` to connect.
- `sudo ./rebuild -d -k 5.10.70_5.4.150 -a true`: Use the default configuration. Specify multiple cores, use `_` to connect. Auto update to the latest kernel of the same series.
- `sudo ./rebuild -d -s 1024 -k 5.4.150`: Use the default configuration and set the partition size to 1024m, and only compile the armbian firmware with the kernel version 5.4.150.

| Parameter | Meaning | Description |
| ---- | ---- | ---- |
Expand All @@ -141,15 +141,15 @@ Command: Enter [ vi /etc/fstab ]

💡Tips: The ***`s905x`*** and ***`s905w`*** boxs currently only support `5.4.*` kernels, Cannot use kernel version 5.10 and above. Please add kernel substitution variables when compiling these two models of devices. Other devices can be freely selected.

- ### Use GitHub Action to make instructions
- ### Use GitHub Action to build instructions

1. Workflows configuration in [.yml](.github/workflows) files. Set the armbian `soc` you want to make in `Make Armbian for amlogic s9xxx`.
1. Workflows configuration in [.yml](.github/workflows) files. Set the armbian `soc` you want to build in `Build Armbian for amlogic s9xxx`.

2. New compilation: Select ***`Build Armbian For Amlogic`*** 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`*** on the [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page. Click the ***`Run workflow`*** button.

- ### Local make instructions
- ### Local build instructions

1. Install the necessary packages (E.g Ubuntu 20.04 LTS user)
```yaml
Expand All @@ -159,7 +159,7 @@ sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server)
```
2. Clone the repository to the local. `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git`
3. Create the `build/output/images` folder, and upload the Armbian image of the `lepotato` board ( Eg: `Armbian_21.11.0-trunk_Lepotato_buster_current_5.10.67.img` ) to this `~/amlogic-s9xxx-armbian/build/output/images` directory.
4. Enter the `~/amlogic-s9xxx-armbian` root directory. And run Eg: `sudo ./make s905x3` to make armbian for `amlogic s9xxx`. The generated Armbian image is in the `build/output/images` directory under the root directory.
4. Enter the `~/amlogic-s9xxx-armbian` root directory. And run Eg: `sudo ./rebuild s905x3` to build armbian for `amlogic s9xxx`. The generated Armbian image is in the `build/output/images` directory under the root directory.

## Compile a custom kernel

Expand Down
Loading

0 comments on commit a366dbd

Please sign in to comment.