View Chinese description | 查看中文说明
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. Welcome to Fork
and personalize it. If it is useful to you, you can click on the Star
in the upper right corner of the warehouse to show your support.
Model | STB | Optional kernel | Armbian Firmware |
---|---|---|---|
s922x | Belink, Belink-Pro, Ugoos-AM6-Plus, ODROID-N2 | All | armbian_aml_s922x_*.img |
s905x3 | X96-Max+, HK1-Box, H96-Max-X3, Ugoos-X3, X96-Air, A95XF3-Air | All | armbian_aml_s905x3_*.img |
s905x2 | X96Max-4G, X96Max-2G | All | armbian_aml_s905x2_*.img |
s912 | H96-Pro-Plus, T95Z-Plus, Octopus-Planet | All | armbian_aml_s912_*.img |
s905d | Phicomm-N1 | All | armbian_aml_s905d_*.img |
s905x | HG680P, B860H | 5.4.* | armbian_aml_s905x_*.img |
s905w | X96-Mini, TX3-Mini | 5.4.* | armbian_aml_s905w_*.img |
Choose the corresponding firmware according to your STB. Then write the IMG file to the USB hard disk through software such as Rufus or balenaEtcher. Insert the USB hard disk into the STB. Common for all Amlogic S9xxx STB
.
Login in to armbian (default user: root, default password: 1234) → input command:
armbian-install
Query the available kernel_version. Login in to armbian → input command:
# Run as root user (sudo -i), input command: armbian-update <kernel_version>
armbian-update 5.4.160
If there is a complete set of kernel files in the current directory, you can run the armbian-update
command to install this 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.160
When the kernel is updated, By default, download from stable kernel version branch, if you download other version branch, please specify according to the branch folder name in the second
parameter, such as armbian-update 5.7.19 beta
. The mainline u-boot is automatically installed by default, which can better support the use of kernel series 5.10 and above. If you choose not to install, please specify in the third
input parameter, such as armbian-update 5.4.160 stable no
The headers
files in the kernel is installed in the /use/local/include
directory. When compiling the application, add -I /usr/local/include
to the CFLAG
parameter of GCC
to find the headers files.
Login in to armbian → input command:
armbian-docker
After installing docker, you can choose whether to install the portainer
visual management panel. Users who intend to use the LAN IP
for management can choose (h
) to install the http://ip:9000
version; Users who intend to use the domain name
for remote management can choose (s
) to install the https://domain:9000
domain name certificate version (Please name the domain name SSL
certificate as portainer.crt
and portainer.key
and upload it to the /etc/ssl/
directory); Users who do not need
to install can choose (n
) to end the installation.
Login in to armbian → input command:
armbian-config
If you feel that the memory of the current box is not enough when you are using applications with a large memory footprint such as docker
, you can create a swap
virtual memory partition, Change the disk space a certain capacity is virtualized into memory for use. The unit of the input parameter of the following command is GB
, and the default is 1
.
Login in to armbian → input command:
armbian-swap 1
To activate the remaining space of TF/USB, please login in to armbian → input command:
armbian-tf
According to the prompt, enter e
to expand the remaining space to the current system partition and file system, and enter c
to create a new third partition.
Or manually allocate the remaining space
View Operation screenshot
# 1. Confirm the name of the TF/USB according to the size of the space. The TF is [ `mmcblk` ], USB is [ `sd` ]
Command: Enter [ fdisk -l | grep "sd" ]
# 2. Get the starting value of the remaining space, Copy and save, used below (E.g: 5382144)
Command: Enter [ fdisk -l | grep "sd" | sed -n '$p' | awk '{print $3}' | xargs -i expr {} + 1 ]
# 3. Start allocating unused space (E.g: sda, mmcblk0 or mmcblk1)
Command: Enter [ fdisk /dev/sda ] Start allocating the remaining space
Command: Select [ n ] to create a partition
Command: Select [ p ] to specify the partition type as primary partition
Command: Set the partition number to [ 3 ]
Command: The start value of the partition, enter the value obtained in the second step, E.g: [ 5382144 ]
Command: End value, press [ Enter ] to use the default value
Command: If there is a hint: Do you want to remove the signature? [Y]es/[N]o: Enter [ Y ]
Command: Enter [ t ] to specify the partition type
Command: Enter Partition number [ 3 ]
Command: Enter Hex code (type L to list all codes): [ 83 ]
Command: Enter [ w ] to save
Command: Enter [ reboot ] to restart
# 4. After restarting, format the new partition
Command: Enter [ mkfs.ext4 -F -L SHARED /dev/sda3 ] to format the new partition
# 5. Set the mount directory for the new partition
Command: Enter [ mkdir -p /mnt/share ] to Create mount directory
Command: Enter [ mount -t ext4 /dev/sda3 /mnt/share ] to Mount the newly created partition to the directory
# 6. Add automatic mount at boot
Command: Enter [ vi /etc/fstab ]
# Press [ i ] to enter the input mode, copy the following values to the end of the file
/dev/sda3 /mnt/share ext4 defaults 0 0
# Press [ esc ] to exit, Input [ :wq! ] and [ Enter ] to Save, Finish.
Supports backup/restore of the box's EMMC
partition in TF/SD/USB
. It is recommended that you back up the Android TV system that comes with the current box before installing the Armbian system in a brand new box, so that you can use it in the future when restoring the TV system.
Please login in to armbian → input command:
ddbr
According to the prompt, enter b
to perform system backup, and enter r
to perform system recovery.
Parameter | Meaning | Description |
---|---|---|
-d | Defaults | Compile all cores and all firmware types. |
-b | Build | Specify the Build firmware type. Write the build firmware name individually, such as -b s905x3 . Multiple firmware use _ connect such as -b s905x3_s905d . You can use these codes: s905x3 , s905x2 , s905x , s905w , s905d , s922x , s922x-n2 , s912 , s912-t95z . Note: s922x-n2 is s922x-odroid-n2 , s912-t95z is s912-t95z-plus . |
-v | Version | Specify the name of the kernel version branch, Such as -v stable . The specified name must be the same as the branch directory name. The stable branch version is used by default. |
-k | Kernel | Specify the kernel name. Write the kernel name individually such as -k 5.4.160 . Multiple kernel use _ connection such as -k 5.10.80_5.4.160 |
-a | AutoKernel | Set whether to automatically adopt the latest version of the kernel of the same series. When it is true , it will automatically find in the kernel library whether there is an updated version of the kernel specified in -k such as 5.4.160 version. If there is the latest version of 5.4 same series, it will automatically Replace with the latest version. When set to false , the specified version of the kernel will be compiled. Default value: true |
-s | Size | Specify the size of the root partition in MB. The default is 1024, and the specified size must be greater than 256. Such as -s 1024 |
sudo ./rebuild -d -b s905x3 -k 5.4.160
: recommend. Use the default configuration, specify a kernel and a firmware for compilation.sudo ./rebuild -d -b s905x3_s905d -k 5.10.80_5.4.160
: 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.160 -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.19
: 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.80_5.4.160
: Use the default configuration. Specify multiple cores, use_
to connect.sudo ./rebuild -d -k 5.10.80_5.4.160 -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.160
: Use the default configuration and set the partition size to 1024m, and only compile the armbian firmware with the kernel version 5.4.160.
💡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.
- Install the necessary packages (E.g Ubuntu 20.04 LTS user)
sudo apt-get update -y
sudo apt-get full-upgrade -y
sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server)
-
Clone the repository to the local.
git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git
-
Create the
build/output/images
folder, and upload the Armbian image ( Eg:Armbian_21.11.0-trunk_Lepotato_current_5.10.80.img
) to this~/amlogic-s9xxx-armbian/build/output/images
directory. Please keep the release version number (e.g.21.11.0
) and kernel version number (e.g.5.10.80
) in the name of the original Armbian image file, It will be used as the name of the armbian firmware after rebuilding. -
Enter the
~/amlogic-s9xxx-armbian
root directory. And run Eg:sudo ./rebuild -d -b s905x3 -k 5.4.160
to build armbian foramlogic s9xxx
. The generated Armbian image is in thebuild/output/images
directory under the root directory.
-
Workflows configuration in .yml files. Set the armbian
SOC
you want to build inRebuild Armbian for amlogic s9xxx
. -
New compilation: Select
Build armbian
on the Action page, According to the OS version officially supported by Armbian, In RELEASE, you can choose Ubuntu series:bionic
/focal
/hirsute
, or Debian series:bullseye
/buster
/stretch
, and in BOARD, you can chooselepotato
/odroidn2
, etc., Click theRun workflow
button. -
Compile again: If there is an
Armbian_.*-trunk_.*.img.gz
file in Releases, you do not need to compile it completely, you can directly use this file tobuild armbian
of different soc. SelectUse Releases file to build armbian
on the Action page. Click theRun workflow
button.
You can use other methods to build the Armbian system. Or use Armbian officially provided lepotato and other branch firmware. and only import the Action from this repository in the process control file .yml to rebuild Armbian to adapt to the use of Amlogic S9xxx series boxes. In the Action 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, set the load path of the rebuild file through the armbian_path
parameter. code show as below:
- name: Rebuild Armbian for Amlogic s9xxx
uses: ophub/amlogic-s9xxx-armbian@main
with:
armbian_path: build/output/images/*.img
armbian_soc: s905d_s905x3_s922x_s905x
armbian_kernel: 5.10.80_5.4.160
- GitHub Action Input parameter description
parameter | Defaults | Description |
---|---|---|
armbian_path | no | Set the path of the original Armbian file, support the file path in the current workflow such as build/output/images/*.img , and also support the use of the network download address such as: https://dl.armbian.com/*/Armbian_*.img.xz |
armbian_soc | s905d_s905x3 | Set the SoC of the packaging box, you can specify a single box such as s905x3 , you can choose multiple boxes to use _ connection such as s905x3_s905d . SOC code of each box is: s905x3 , s905x2 , s905x , s905w , s905d , s922x , s922x-n2 , s912 . Note: s922x-n2 is s922x-odroid-n2 |
version_branch | stable | Specify the name of the kernel version branch, Such as stable . The specified name must be the same as the branch directory name. The stable branch version is used by default. |
armbian_kernel | 5.10.80_5.4.160 | Set the kernel version,The kernel library contains many original kernels of Flippy , you can view and choose to specify. |
auto_kernel | true | Set whether to automatically adopt the latest version of the kernel of the same series. When it is true , it will automatically find in the kernel library whether there is an updated version of the kernel specified in amlogic_kernel . such as 5.4.160 version. If there is the latest version of 5.4 same series, it will automatically Replace with the latest version. When set to false , the specified version of the kernel will be compiled. Default value: true |
armbian_size | 2748 | Set the size of the firmware ROOTFS partition. |
- GitHub Action Output variable description
parameter | For example | Description |
---|---|---|
${{ env.PACKAGED_OUTPUTPATH }} | ${PWD}/out | OpenWrt firmware storage path |
${{ env.PACKAGED_OUTPUTDATE }} | 2021.04.21.1058 | Packing date |
${{ env.PACKAGED_STATUS }} | success / failure | Package status |
For the compilation method of the custom kernel, see compile-kernel
The armbian directly calls the official source code for compilation, When making dedicated Armbian systems for different boxes, the kernel, scripts, u-boot and other resources made by flippy for Amlogic s9xxx openwrt
are used. The development idea of the program comes from the tutorials of authors such as ebkso. Thank you for your dedication and sharing, so that we can use the Armbian system in the Amlogic s9xxx box.
Because of these innovations and contributors, we can have the company of the box in the long river of years. We have grown up many years later, but this beautiful memory will always stay deep in the memory for a long time. From now on, record the achievements of these pioneers and leave them to the new friends who have joined the box circle.
LICENSE © OPHUB