Rebuild Armbian and Kernel
ActionsTags
(1)View Chinese description | 查看中文说明
Armbian is a lightweight Linux distribution built specifically for ARM chips, based on Debian/Ubuntu. The Armbian system is lean, clean, and 100% compatible with Debian/Ubuntu, inheriting its functionality and rich software ecosystem. It runs securely and stably on TF/SD/USB storage and the device's eMMC. This project preserves the integrity of the official Armbian system while extending support for unofficially supported devices such as TV boxes, and adds a set of convenient management commands. You can now replace the Android TV system on your TV box with Armbian, transforming it into a powerful server.
This project relies on many contributors to build the Armbian system for Amlogic, Rockchip, and Allwinner devices. It supports writing to eMMC, kernel updates, and other features. For detailed usage, see the Armbian User Documentation. The latest Armbian system can be downloaded from Releases. Welcome to Fork and customize. If this project is helpful, please click the Star button in the upper right corner to show your support.
| System Name | Default Username | Default Password | SSH Port | IP Address |
|---|---|---|---|---|
| 🐧 Armbian.OS | root | 1234 | 22 | Obtain from router |
| 🐋 Armbian.Docker | root | 1234 | 22 | Static MacVLAN IP |
⬆️ Models from each platform (Amlogic/Rockchip/Allwinner) are ranked by SoC performance from high to low.
Tip
At present, the s905 box can only be used with TF/SD/USB; other box models support writing to EMMC. For more information, refer to the ✅ Supported Device List. To add new device support, see Section 12.15 of the documentation: Adding New Supported Devices. Please read the Armbian User Documentation before use, as it provides solutions to common issues.
Choose the Armbian system that matches your device model. Refer to the corresponding documentation for device-specific usage instructions.
-
For
Rockchipplatform devices, refer to Chapter 8 of the documentation. -
For
AmlogicandAllwinnerplatform devices, use tools such as Rufus or balenaEtcher to write the system to a USB stick, then insert the USB stick into the device. Log in to the Armbian system (default user: root, default password: 1234) and enter the command:
armbian-install| Optional | Default | Options | Description |
|---|---|---|---|
| -m | no | yes/no | Use mainline u-boot |
| -a | yes | yes/no | Use ampart partition adjustment tool |
| -l | no | yes/no | Show full device list |
Example: armbian-install -m yes -a no
Log in to the Armbian system and enter the command:
# Run as root user (sudo -i)
# If no parameter is specified, it will be updated to the latest version.
armbian-update| Optional | Default | Options | Description |
|---|---|---|---|
| -r | ophub/kernel | <owner>/<repo> |
Set the repository for downloading kernels from github.com |
| -u | Automation | stable/flippy/beta/rk3588/rk35xx/h6 | Set the kernel tags suffix |
| -k | Latest version | Kernel version | Set the kernel version |
| -b | yes | yes/no | Automatically back up the currently used kernel when updating |
| -d | deb | tar/deb | Set the preferred kernel package format. If unavailable, the script will automatically try the alternative format. The deb format is recommended for compiling custom drivers. |
| -m | no | yes/no | Use mainline u-boot |
| -s | None | None/DiskName | [SOS] Restore the system kernel on eMMC/NVMe/sdX or other disks |
| -h | None | None | View help information |
Example: armbian-update -k 5.15 -u stable -d deb
When specifying the kernel version via the -k parameter, you can provide an exact version number (e.g., armbian-update -k 5.15.50) or specify only the kernel series (e.g., armbian-update -k 5.15). When a series is specified, the latest version within that series will be used automatically.
During kernel updates, the currently running kernel is automatically backed up to the /ddbr/backup directory, retaining the 3 most recent versions. If the newly installed kernel proves unstable, you can restore a backup kernel at any time. If a kernel update renders the system unbootable, use armbian-update -s to restore the system kernel. For more details, see the Help Document.
Log in to the Armbian system and enter the command:
armbian-aptChoosing the appropriate software source for your country or region can significantly improve download speeds. For more details, see the Help Document.
Log in to the Armbian system and enter the command:
armbian-softwareThe command armbian-software -u updates the local software center list. Based on user feedback in Issues, commonly used software has been gradually integrated with one-click install/update/uninstall support. This includes Docker images, desktop software, application services, and more. See the detailed instructions.
Log in to the Armbian system and enter the command:
armbian-configIf you find the device's memory insufficient when running memory-intensive applications such as Docker, you can create a swap virtual memory partition to use a portion of disk space as additional memory. The parameter unit is GB, with a default value of 1.
Log in to the Armbian system and enter the command:
armbian-swap 1Log in to the Armbian system and enter the command:
armbian-openvfdDebug according to the LED Screen Display Control Instructions.
Supports backing up and restoring the device's EMMC partition via TF/SD/USB. Before installing Armbian on a new device, it is recommended to back up the original Android TV system for future restoration if needed.
Boot the Armbian system from TF/SD/USB and enter the command:
armbian-ddbrEnter b at the prompt to back up the system, or r to restore.
Important
Alternatively, the Android system can be flashed directly into eMMC via USB cable. Android system images are available in Tools.
For kernel compilation instructions, see the Compile Kernel documentation. Log in to the Armbian system and enter the command:
armbian-kernel -u
armbian-kernel -k 6.6.12To update all service scripts in the system to the latest version, log in to the Armbian system and enter the command:
armbian-syncFor common issues and their solutions when using Armbian, see documents.
-
Clone the repository to local
git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git -
Install the necessary software packages (using Ubuntu 24.04 as an example)
Enter the ~/amlogic-s9xxx-armbian root directory, then run the installation command:
sudo apt-get update -y
sudo apt-get full-upgrade -y
# For Ubuntu-24.04
sudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2404-build-armbian-depends)-
Enter the
~/amlogic-s9xxx-armbianroot directory, create thebuild/output/imagesfolder, and upload the Armbian image file (e.g.,Armbian_21.11.0-trunk_Odroidn2_current_5.15.50.img) to the~/amlogic-s9xxx-armbian/build/output/imagesdirectory. Retain the release version number (e.g.,21.11.0) and kernel version number (e.g.,5.15.50) in the original filename, as they will be used for naming the rebuilt Armbian system. -
Enter the
~/amlogic-s9xxx-armbianroot directory and runsudo ./rebuild -b s905x3 -k 6.6.12to generate the Armbian image for the specified board. Output files are saved in thebuild/output/imagesdirectory.
| Parameter | Meaning | Description |
|---|---|---|
| -b | Board | Specifies the device code(s) to build. For example, -b s905x3 builds the s905x3 device. Multiple devices can be joined with underscores, e.g., -b s905x3_s905d. Special values: all builds all devices; first50 builds the first 50; range50_100 builds devices 51–100; range100_150 builds devices 101–150; last20 builds the last 20. See the BOARD entries in model_database.conf for the full list. Default: all |
| -r | KernelRepo | Specify the <owner>/<repo> of the github.com kernel repository. Default value: ophub/kernel |
| -u | kernelUsage | Set the tags suffix of the kernel used, such as stable, flippy, beta. Default value: stable |
| -k | Kernel | Specify kernel name, such as -k 6.6.12. Connect multiple kernels with _, such as -k 6.6.12_5.15.50. The kernel version freely specified by the -k parameter is only valid for kernels using stable/flippy/beta. Other kernel series such as rk3588 / rk35xx / h6 can only use specific kernels. |
| -a | AutoKernel | Set whether to automatically use the latest kernel within the same series. When true, the kernel repository is checked for newer versions within the series specified by -k (e.g., 6.6.12), and if found, the latest version is used automatically. When false, the exact specified version is used. Default: true |
| -t | RootfsType | Set the file system type of the ROOTFS partition. Options: ext4 or btrfs. Example: -t btrfs. Default: ext4 |
| -s | Size | Set the image partition sizes. To set only the ROOTFS partition, specify a single value (e.g., -s 2560). To set both BOOTFS and ROOTFS, join them with / (e.g., -s 512/2560). Default: 512/2560 |
| -n | BuilderName | Set the Armbian system builder signature. Do not include spaces. Default: None |
sudo ./rebuild: Use default configuration to package all device models.sudo ./rebuild -b s905x3 -k 6.6.12: Recommended. Build with default configuration for the specified kernel.sudo ./rebuild -b s905x3 -k 6.1.y: Build with default configuration, using the latest kernel in the 6.1.y series.sudo ./rebuild -b s905x3_s905d -k 6.6.12_5.15.50: Build with default configuration for multiple kernels simultaneously. Use_to join multiple kernels.sudo ./rebuild -b s905x3 -k 6.6.12 -s 2560: Build a single kernel and model with default configuration; ROOTFS partition size set to 2560 MiB.sudo ./rebuild -b s905x3_s905d: Build all kernels for multiple models with default configuration. Use_to join multiple models.sudo ./rebuild -k 6.6.12_5.15.50: Build all models with default configuration and multiple specified kernels. Use_to join kernels.sudo ./rebuild -k 6.6.12_5.15.50 -a true: Same as above, with automatic upgrade to the latest kernel within each series.sudo ./rebuild -t btrfs -s 2560 -k 6.6.12: Build all models with btrfs filesystem, 2560 MiB ROOTFS, and kernel 6.6.12.
-
Workflow configuration files are located in the .github/workflows/ directory.
-
Fresh Build: On the Actions page, select
Build Armbian server imageto use the build-armbian-arm64-server-image.yml workflow. You can choose from Ubuntu series (e.g.,jammy) or Debian series (e.g.,bullseye). ClickRun workflowto start the build. -
Rebuild: If Releases already contains compiled
Armbian_.*-trunk_.*.img.gzfiles and you only need to repackage for other boards, skip the source compilation step and use build-armbian-using-releases-files.yml for secondary builds. -
To use other Armbian systems (e.g., the odroidn2 image from the official armbian.tnahosting.net download site), simply reference this repository's script in the workflow file build-armbian-using-official-image.yml for Armbian restructuring to support other devices. Example:
- name: Build Armbian
uses: ophub/amlogic-s9xxx-armbian@main
with:
build_target: armbian
armbian_path: build/output/images/*.img
armbian_board: s905d_s905x3_s922x_s905x
armbian_kernel: 6.12.y_6.18.yThese parameters correspond to the local packaging command options described above.
| Parameter | Default | Description |
|---|---|---|
| armbian_path | None | Set the path of the original Armbian file. Supports workflow file paths (e.g., build/output/images/*.img) and network download URLs (e.g., https://dl.armbian.com/*/Armbian_*.img.xz). |
| armbian_board | all | Set the board of the package box, refer to -b |
| kernel_repo | ophub/kernel | Specify <owner>/<repo> of the github.com kernel repository, refer to -r |
| kernel_usage | stable | Set the tags suffix of the used kernel. Refer to -u |
| armbian_kernel | 6.12.y_6.18.y | Set the version of the kernel, refer to -k |
| auto_kernel | true | Set whether to automatically adopt the latest version of the same series kernel, refer to -a |
| armbian_fstype | ext4 | Set the file system type of the system's ROOTFS partition, refer to -t |
| armbian_size | 512/2560 | Set the size of the system BOOTFS and ROOTFS partitions, function reference -s |
| armbian_files | false | Add custom Armbian files. When set, all files in this directory will be copied to common-files. The directory structure must mirror the Armbian root directory to ensure files are correctly overlaid (e.g., default configuration files should be placed under etc/default/). |
| builder_name | None | Set the Armbian system builder signature, refer to -n |
Uploading to Releases requires Workflow read and write permissions for the repository. See the usage instructions for details.
| Parameter | Default | Description |
|---|---|---|
| ${{ env.PACKAGED_OUTPUTPATH }} | out | Armbian system files output path |
| ${{ env.PACKAGED_OUTPUTDATE }} | 04.13.1058 | Packaging date (month.day.hourminute) |
| ${{ env.PACKAGED_STATUS }} | success | Packaging status: success / failure |
For creating Docker images of the Armbian system, refer to the armbian_docker build script.
For kernel compilation instructions, see compile-kernel.
- name: Compile the kernel
uses: ophub/amlogic-s9xxx-armbian@main
with:
build_target: kernel
kernel_version: 6.12.y_6.18.y
kernel_auto: true
kernel_sign: -yournameFirst and foremost, thanks to 150balbes for the outstanding contributions and the solid foundation laid for running Armbian on Amlogic TV boxes. The Armbian system compiled here uses the latest official source code for real-time builds. The development approach is inspired by tutorials from authors such as ebkso. Thanks to everyone's dedication and sharing, enabling Armbian to run on an ever-growing range of devices.
The u-boot, kernel, and other resources used in this system are primarily sourced from the unifreq/openwrt_packit project. Some files have been contributed by users through Pull Requests and Issues in projects such as amlogic-s9xxx-openwrt, amlogic-s9xxx-armbian, luci-app-amlogic, u-boot, and kernel. To acknowledge these pioneers and contributors, all contributions since the repository's creation (2021-09-19) are recorded in CONTRIBUTORS.md. Thanks again to everyone for breathing new life and purpose into these devices.
- The amlogic-s9xxx-openwrt project provides the
OpenWrtsystem for TV boxes, also applicable to Armbian-supported devices. - The fnnas project provides the
FnNASsystem for TV boxes, also applicable to Armbian-supported devices. - unifreq has created
OpenWrtsystems for a wide range of Amlogic, Rockchip, and Allwinner devices, serving as a benchmark project in the community. Highly recommended. - Scirese has tested the build, installation, and usage of
Arch Linux ARM/Manjarosystems on Android TV boxes. See his repository for details. - 7Ji has published articles on reverse engineering and development for the Amlogic platform, covering topics such as installing ArchLinux ARM and analyzing the Amlogic boot mechanism. His ampart project provides a partition tool for reading and editing Amlogic eMMC partition tables and DTB partitions, enabling 100% utilization of eMMC space. The amlogic-s9xxx-archlinuxarm project provides build and usage instructions for
Arch Linux ARM. The YAopenvfD project offers an alternative openvfd daemon implementation. - 13584452567 is the pioneer for
Rockchipdevice support in this repository. Through his contributions, support was expanded for numerousRockchipdevices including EAIDK-610, King3399, TN3399, Kylin3399, ZCube1-Max, tvi3315a, xiaobao, and more. He also maintains specialized kernels forAllwinnerdevices such as TQC-A01, and has provided extensive technical support and solutions in Discussions and Issues, making significant contributions to the community. - cooip-jm shares many guides on Armbian, LXC, Docker, AdGuard, and other applications in his wiki. Recommended reading.
The amlogic-s9xxx-armbian © OPHUB is licensed under GPL-2.0
Rebuild Armbian and Kernel is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.
