Skip to content

Commit

Permalink
Add BOARD_NAME parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Sep 21, 2021
1 parent 462fc15 commit ff5ead8
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 33 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/build-armbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:

env:
ARMBIAN_BOARD: lepotato
ARMBIAN_BOARD_NAME: 'Aml S9xxx'
ARMBIAN_HOST: armbian
ARMBIAN_NAMESERVER: '192.168.1.1'
UPLOAD_FIRMWARE: false
UPLOAD_RELEASE: true
DELETE_RELEASE: true
Expand Down Expand Up @@ -61,21 +64,22 @@ jobs:
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}

- name: Build Armbian with ${{ env.ARMBIAN_BOARD }}
- name: Build Armbian
id: build
run: |
cd build/
sudo chmod +x compile.sh
sudo ./compile.sh BOARD=${{ env.ARMBIAN_BOARD }} BRANCH=current RELEASE=buster BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,img
[ -e ./.config ] && cp -f ./.config ./output/images/.config
sudo ./compile.sh BOARD="${{ env.ARMBIAN_BOARD }}" BOARD_NAME="${{ env.ARMBIAN_BOARD_NAME }}" HOST="${{ env.ARMBIAN_HOST }}" \
NAMESERVER="${{ env.ARMBIAN_NAMESERVER }}" 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: Build Armbian for amlogic s9xxx STB
id: kernel
- name: Make Armbian for amlogic s9xxx
id: make
if: steps.build.outputs.status == 'success'
run: |
sudo chmod +x make
sudo ./make s905x3_s905d_s922x_s905x2_s912
sudo ./make s922x_s905x3_s905x2_s912_s905d_s905x_s905w
cd ./build/output/images && sudo gzip *.img
echo "FILEPATH=$PWD" >> $GITHUB_ENV
echo "FILE_DATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
Expand All @@ -88,13 +92,14 @@ jobs:
path: ${{ env.FILEPATH }}/

- name: Upload Armbian image to Release
uses: softprops/action-gh-release@v1
if: steps.build.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: release
uses: ncipollo/release-action@v1
if: steps.make.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
tag_name: armbian_aml_buster_${{ env.FILE_DATE }}
files: ${{ env.FILEPATH }}/*
tag: Armbian_Aml_buster_${{ env.FILE_DATE }}
artifacts: ${{ env.FILEPATH }}/*
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
This is Armbian image for amlogic s9xxx STB
* Firmware information
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/use-releases-file-to-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ jobs:
sudo timedatectl set-timezone "$TZ"
echo "COMPILE_STARTINGTIME=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
- name: Build Armbian for amlogic s9xxx STB
id: build
- name: Make Armbian for amlogic s9xxx
id: make
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_.*_Lepotato_.*.img.gz" | head -n 1 > DOWNLOAD_ARMBIAN
curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "Armbian_Aml_buster_.*/Armbian_.*_Lepotato_.*.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 s905x3_s905d_s922x_s905x2_s912
sudo ./make s922x_s905x3_s905x2_s912_s905d_s905x_s905w
cd ./build/output/images && sudo gzip *.img
echo "FILEPATH=$PWD" >> $GITHUB_ENV
echo "FILE_DATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
Expand All @@ -71,14 +71,15 @@ jobs:
with:
path: ${{ env.FILEPATH }}/

- name: Upload Armbian Firmware to Release
uses: softprops/action-gh-release@v1
if: steps.build.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Armbian image to Release
id: release
uses: ncipollo/release-action@v1
if: steps.make.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
tag_name: armbian_aml_buster_${{ env.FILE_DATE }}
files: ${{ env.FILEPATH }}/*
tag: Armbian_Aml_buster_${{ env.FILE_DATE }}
artifacts: ${{ env.FILEPATH }}/*
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
This is Armbian image for amlogic s9xxx STB
* Firmware information
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Armbian for Amlogic S9xxx STB

Compile the Armbian for Amlogic S9xxx STB. including install to EMMC and update related functions. Support Amlogic S9xxx STB are ***`s905x3, s905x2, s905x, s905w, s905d, s922x, s912`***, etc. such as ***`Phicomm-N1, Octopus-Planet, X96-Max+, HK1-Box, H96-Max-X3, Belink GT-King, Belink GT-King Pro, UGOOS AM6 Plus, Fiberhome HG680P, ZTE B860H`***, etc.
Compile the Armbian for Amlogic S9xxx STB. including install to EMMC and update related functions. Support Amlogic S9xxx STB are ***`s922x, s905x3, s905x2, s912, s905d, s905x, s905w`***, etc. such as ***`Belink GT-King, Belink GT-King Pro, UGOOS AM6 Plus, X96-Max+, HK1-Box, H96-Max-X3, Phicomm-N1, Octopus-Planet, Fiberhome HG680P, ZTE B860H`***, etc.

The latest version of the Armbian firmware can be downloaded in [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases).

## Armbian Firmware instructions

| Model | STB | Armbian Firmware |
| ---- | ---- | ---- |
| s922x | [Belink](https://tokopedia.link/RAgZmOM41db), [Belink-Pro](https://tokopedia.link/sfTHlfS41db), [Ugoos-AM6-Plus](https://tokopedia.link/pHGKXuV41db) | armbian_aml_s922x_buster_*.img |
| s905x3 | [X96-Max+](https://tokopedia.link/uMaH09s41db), [HK1-Box](https://tokopedia.link/xhWeQgTuwfb), [H96-Max-X3](https://tokopedia.link/KuWvwoYuwfb), [Ugoos-X3](https://tokopedia.link/duoIXZpdGgb), [X96-Air](https://tokopedia.link/5WHiETbdGgb), [A95XF3-Air](https://tokopedia.link/ByBL45jdGgb) | armbian_aml_s905x3_buster_*.img |
| s905x2 | [X96Max-4G](https://tokopedia.link/HcfLaRzjqeb), [X96Max-2G](https://tokopedia.link/HcfLaRzjqeb) | armbian_aml_s905x2_buster_*.img |
| s905x | [HG680P](https://tokopedia.link/HbrIbqQcGgb), [B860H](https://tokopedia.link/LC4DiTXtEib) | armbian_aml_s905x_buster_*.img |
| s905w | [X96-Mini](https://tokopedia.link/ro207Hsjqeb), [TX3-Mini](https://www.tokopedia.com/beststereo/tanix-tx3-mini-2gb-16gb-android-7-1-kodi-17-3-amlogic-s905w-4k-tv-box) | armbian_aml_s905w_buster_*.img |
| s922x | [Belink](https://tokopedia.link/RAgZmOM41db), [Belink-Pro](https://tokopedia.link/sfTHlfS41db), [Ugoos-AM6-Plus](https://tokopedia.link/pHGKXuV41db) | armbian_aml_s922x_buster_*.img |
| s912 | [H96-Pro-Plus](https://tokopedia.link/jb42fsBdGgb), Octopus-Planet | armbian_aml_s912_buster_*.img |
| s905d | Phicomm-N1 | armbian_aml_s905d_buster_*.img |
| s905x | [HG680P](https://tokopedia.link/HbrIbqQcGgb), [B860H](https://tokopedia.link/LC4DiTXtEib) | armbian_aml_s905x_buster_*.img |
| s905w | [X96-Mini](https://tokopedia.link/ro207Hsjqeb), [TX3-Mini](https://www.tokopedia.com/beststereo/tanix-tx3-mini-2gb-16gb-android-7-1-kodi-17-3-amlogic-s905w-4k-tv-box) | armbian_aml_s905w_buster_*.img |

## Install to EMMC and update instructions

Expand All @@ -30,10 +30,11 @@ armbian-install

- ### Update Armbian

Login in to armbian → input command:
Query the available [kernel_version](https://github.com/ophub/flippy-kernel/tree/main/library). Login in to armbian → input command:

```yaml
armbian-update
# Run as root user (sudo -i), input command: armbian-update <kernel_version>
armbian-update 5.10.66
```
## Armbian firmware compilation method

Expand All @@ -48,7 +49,7 @@ armbian-update
3. If there is an `Armbian_.*_Lepotato_.*.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.

```yaml
sudo ./make s905x3_s905x2_s905x_s905w_s905d_s922x_s912
sudo ./make s922x_s905x3_s905x2_s912_s905d_s905x_s905w
```

## Acknowledgments
Expand Down
11 changes: 8 additions & 3 deletions make
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#=========================================================================
# Description: Build armbian for amlogic s9xxx
# Copyright (C) 2021 https://github.com/ophub/build-armbian
# Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian
#=========================================================================

#===== Do not modify the following parameter settings, Start =====
Expand Down Expand Up @@ -48,11 +48,15 @@ make_image() {

# Get kernel version
armbian_version=$(ls ${armbian_outputpath}/*.img 2>/dev/null | awk -F_ '{print $NF}')
KERNEL_VERSION=$(echo ${armbian_version} | grep -oE '^[1-9].[0-9]{1,3}.[0-9]{1,3}' 2>/dev/null)
KERNEL_VERSION=$(echo ${armbian_version} | grep -oE '[1-9].[0-9]{1,3}.[0-9]{1,3}' 2>/dev/null)
#echo -e "Kernel version: [ ${KERNEL_VERSION} ]"

# Get armbian release
armbian_release=$(ls ${armbian_outputpath}/*.img 2>/dev/null | awk -F- '{print $1}')
RELEASE_VERSION=$(echo ${armbian_release} | grep -oE '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' 2>/dev/null)

# Make Amlogic s9xxx armbian
build_image_file="${tmp_outpath}/armbian_aml_${build_soc}_buster_${KERNEL_VERSION}_$(date +"%Y.%m.%d.%H%M").img"
build_image_file="${tmp_outpath}/Armbian_${RELEASE_VERSION}_Aml_${build_soc}_buster_${KERNEL_VERSION}_$(date +"%Y.%m.%d.%H%M").img"
rm -f ${build_image_file}
sync

Expand Down Expand Up @@ -323,3 +327,4 @@ for b in ${build_armbian[*]}; do
done

echo -e "Server space usage after compilation: \n$(df -hT ${PWD}) \n"

0 comments on commit ff5ead8

Please sign in to comment.