View Chinese description | 查看中文说明
GitHub Actions
is a service launched by Microsoft
. It provides a virtual server environment with very good performance configuration. Based on it, projects can be built, tested, packaged, and deployed. The public repository can be used for free without time limit, and the single compilation time is up to 6 hours
, which is enough for compiling Armbian
(we can usually complete a compilation in about 3 hours
). Sharing is only for the exchange of experience. Please understand the deficiencies. Please do not initiate various bad attacks on the Internet, and do not maliciously use it.
- How to build and use Armbian
- Tutorial directory
- 1. Register your own GitHub account
- 2. Set the privacy variable GitHub_TOKEN
- 3. Fork repository and set GH_TOKEN
- 4. Personalized Armbian firmware customization file description
- 5. Compile the firmware
- 6. Save the firmware
- 7. Download the firmware
- 8. Install Armbian to EMMC
- 9. Compile the Armbian kernel
- 10. Update Armbian Kernel
- 11. common problem
Register your own account, so that you can continue to customize the firmware. Click the Sign up
button in the upper right corner of the github.com
website and follow the prompts to register your account
.
Set the GitHub privacy variable GitHub_TOKEN
. After the firmware is compiled, we need to upload the firmware to GitHub Releases
. We set this variable according to the official requirements of GitHub. The method is as follows:
Personal center
: Settings
> Developer settings
> Personal access tokens
> Generate new token
( Name: GitHub_TOKEN
, Select: public_repo
). Other options
can be selected according to your needs. Submit and save, copy the Encrypted KEY Value
generated by the system, and save it
to your computer's notepad first. This value will be used in the next step. The icons are as follows:
Now you can Fork
the repository
, open the repository https://github.com/ophub/amlogic-s9xxx-armbian, click the Fork
button on the upper right
, Will copy a copy of the repository code to your account, wait a few seconds
, and prompt the Fork to complete Later, go to your account to access amlogic-s9xxx-armbian
in your repository
. In the upper right corner of Settings
> Secrets
> Actions
> New repostiory secret
(Name: GH_TOKEN
, Value: Fill in the value of GitHub_TOKEN
just now), save it
. And select Read and write permissions
under Actions
> General
> Workflow permissions
in the left nav and save. The icons are as follows:
The firmware compilation process is controlled in the .github/workflows/build-armbian.yml file. There are other yml files
in the workflows
directory to achieve other different functions. When compiling the firmware, the Armbian official current code is used for real-time compilation, and the relevant parameters can be found in the official documentation.
- name: Compile Armbian [ ${{ env.ARMBIAN_BOARD }} ]
id: compile
run: |
cd build/
sudo chmod +x compile.sh
sudo ./compile.sh BRANCH=${{ env.ARMBIAN_BRANCH }} RELEASE=${{ env.ARMBIAN_RELEASE }} BOARD=${{ env.ARMBIAN_BOARD }} \
BUILD_MINIMAL=no BUILD_DESKTOP=no HOST=armbian KERNEL_ONLY=no KERNEL_CONFIGURE=no \
CLEAN_LEVEL=make,debs COMPRESS_OUTPUTIMAGE=sha
echo "::set-output name=status::success"
There are many ways to compile firmware, you can set timed compilation, manual compilation, or set some specific events to trigger compilation. Let's start with simple operations.
In the navigation bar of your repository
, click the Actions
button, and then click Build armbian
> Run workflow
> Run workflow
to start the compilation, wait about 3 hours
, and complete the compilation after all the processes are over. The icons are as follows:
In the .github/workflows/build-armbian.yml file, use cron
to set the timing compilation. The 5 different positions represent min (0 - 59) / hour (0 - 23) / day of month (1 - 31) / month (1 - 12) / day of week (0 - 6)(Sunday - Saturday). Set the time by modifying the values of different positions. The system uses UTC standard time
by default, please convert it according to the time zone of your country.
schedule:
- cron: '0 17 * * *'
The settings saved by the firmware are also controlled in the .github/workflows/build-armbian.yml file. We will automatically upload the compiled firmware to the Releases
officially provided by GitHub
through scripts.
- name: Upload Armbian Firmware to Release
uses: ncipollo/release-action@main
if: steps.build.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
tag: Armbian_${{ env.FILE_DATE }}
artifacts: ${{ env.FILEPATH }}/*
allowUpdates: true
token: ${{ secrets.GH_TOKEN }}
body: |
This is Armbian firmware for Amlogic s9xxx TV Boxes
* Firmware information
Default username: root
Default password: 1234
Enter from the GitHub Releases
section at the bottom right corner of the Repository homepage
, and select the firmware corresponding to the model of your Amlogic s9xxx TV Boxes
. The icons are as follows:
Login in to armbian (default user: root, default password: 1234) → input command:
armbian-install
The mainline u-boot is installed by default, In order to support the use of 5.10 and above kernels. If you choose not to install, specify it in the 1
input parameter, e.g. armbian-install no
Supports compiling the kernel in Ubuntu20.04/22.04 or Armbian system. It supports local compilation and cloud compilation using GitHub Actions. For details, see Kernel Compilation Instructions.
Login in to armbian → input command:
# Run as root user (sudo -i)
# If no other parameters are specified, the following update command will update to the latest version of the current kernel of the same series.
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 (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 version and update the specified version: armbian-update 5.10.100
. The optional kernel supported by the device can be freely updated, such as from 5.10.100 kernel to 5.15.25 kernel. 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 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.10.100 stable no
The headers
files in the kernel is installed in the /use/local/include
directory.
In the use of Armbian, some common problems that may be encountered are summarized below.
Please refer to Description
Please refer to Description
Usually use armbian-ddbr backup to restore, or use Amlogic usb burning tool to restore the original Android TV system.
It is recommended that you make a backup of the original Android TV system that comes with the current box before installing the Armbian system in a new box, so that you can use it when you need to restore the system. Please boot the Armbian system from TF/SD/USB
, enter the armbian-ddbr
command, and then enter b
according to the prompts to backup the system. The backup file is stored in the path /ddbr/BACKUP-arm-64-emmc. img.gz
, please download and save. When you need to restore the Android TV system, upload the previously backed up files to the same path of the TF/SD/USB
device, enter the armbian-ddbr
command, and then enter r
according to the prompt to restore the system.
-
Under normal circumstances, re-insert the USB hard disk and install it again.
-
If you cannot start the Armbian system from the USB hard disk again, connect the Amlogic s9xxx TV Boxes to the computer monitor. If the screen is completely black and there is nothing, you need to restore the Amlogic s9xxx TV Boxes to factory settings first, and then reinstall it. First download the amlogic_usb_burning_tool system recovery tool and install it. Prepare a USB dual male data cable, Prepare a paper clip.
-
Take x96max+ as an example. Find the two short-circuit points on the motherboard, Download the Android TV firmware. The Android TV system firmware of other common devices and the corresponding short circuit diagrams can also be downloaded and viewed here.
Operation method:
1. Open the USB Burning Tool:
[ File → Import image ]: X96Max_Plus2_20191213-1457_ATV9_davietPDA_v1.5.img
[ Check ]:Erase flash
[ Check ]:Erase bootloader
Click the [ Start ] button
2. Use a [ paper clip ] to connect the [ two shorting points ] on the main board of the box,
and use a [ USB dual male data cable ] to connect the [ box ] to the [ computer ] at the same time.
3. Loosen the short contact after seeing the [ progress bar moving ].
4. After the [ progress bar is 100% ], the restoration of the original Android TV system is completed.
Click [ stop ], unplug the [ USB male-to-male data cable ] and [ power ].
5. If the progress bar is interrupted, repeat the above steps until it succeeds.
If the progress bar does not respond after the short-circuit, plug in the [ power ] supply after the short-circuit.
Generally, there is no need to plug in the power supply.
When the factory reset is completed, the box has been restored to the Android TV system, and other operations to install the Armbian system are the same as the requirements when you installed the system for the first time before, just do it again.
- Write the firmware to USB/TF/SD, insert it into the box after writing.
- Open the developer mode: Settings → About this machine → Version number (for example: X96max plus...), click on the version number for 5 times in quick succession, See the prompt of
Enable Developer Mode
displayed by the system. - Turn on USB debugging: System → Advanced options → Developer options again (after entering, confirm that the status is on, and the
USB debugging
status in the list is also on). EnableADB
debugging. - Install ADB tools: Download adb and unzip it, copy the three files
adb.exe
,AdbWinApi.dll
, andAdbWinUsbApi.dll
to the two filessystem32
andsyswow64
under the directory ofc://windows/
Folder, then open thecmd
command panel, useadb --version
command, if it is displayed, it is ready to use. - Enter the
cmd
command mode. Enter theadb connect 192.168.1.137
command (the ip is modified according to your box, and you can check it in the router device connected to the box), If the link is successful, it will displayconnected to 192.168.1.137:5555
- Enter the
adb shell reboot update
command, the box will restart and boot from the USB/TF/SD you inserted, access the firmware IP address from a browser, or SSH to enter the firmware.
Support for the infrared receiver is enabled by default but if you are using your TV box as a server then you may wish to disable the IR kernel module to prevent switching your TV box off by mistake. To completely disable IR, add the line:
blacklist meson_ir
to /etc/modprobe.d/blacklist.conf
and reboot.
In general, just use /boot/uEnv.txt
. The /boot/extlinux/extlinux.conf
file is required for individual devices, such as T95 (s905x) / T95Z-Plus (s912) etc. If necessary, delete the .bak
in the /boot/extlinux/extlinux.conf.bak
file name that comes with the firmware to use it. armbian-install
automatically checks when writing to eMMC and creates an extlinux.conf
file if it exists.