View Chinese description | 查看中文说明
The OpenWrt project is a Linux router operating system for embedded devices. OpenWrt is not a single and immutable firmware, but rather provides a fully writable filesystem with package management capabilities, allowing you to freely select the required software packages to customize the router system. For developers, OpenWrt is a framework that allows application development without having to build a complete firmware around it; for ordinary users, it means having the capability for complete customization, and the ability to use the device in unexpected ways. It has over 3000+ standardized application software packages and extensive third-party plugin support, allowing you to easily apply them to various supported devices. Now you can replace the Android TV system on your TV box with the OpenWrt system, turning it into a powerful router.
This project, thanks to numerous contributors, builds the OpenWrt system for Amlogic
, Rockchip
, and Allwinner
boxes. It supports writing to eMMC for use, supports updating the kernel, and more. For detailed usage instructions, see the OpenWrt User Guide. The latest firmware can be downloaded from Releases. You are welcome to Fork
and customize the software packages. If you find it useful, you can click the Star
in the upper right corner of the repository to show your support.
Tip
At present, the s905 box can only be used in TF/SD/USB
, other models of boxes support writing to EMMC
for use. For more information, please refer to the Supported Device List Description. You can refer to the method in Section 12.15 of the instruction manual to add new supported devices. Please read the OpenWrt User Guide before use. It provides solutions to common issues.
Choose the OpenWrt firmware corresponding to your TV box model, and refer to the corresponding instructions for the use of different devices.
-
For the
Rockchip
platform, please refer to the Chapter 8 of the instruction manual, the installation method is the same as that of Armbian. -
For the
Amlogic
andAllwinner
platforms, use tools like Rufus or balenaEtcher to write the firmware to USB, then insert the USB with the written firmware into the box. From the browser, access the default IP of OpenWrt: 192.168.1.1 →Log in to OpenWrt with the default account
→System Menu
→Amlogic Treasure Box
→Install OpenWrt
, select your box from the dropdown list of supported devices, clickInstall OpenWrt
button to install.
From your browser, access OpenWrt's IP, e.g.: 192.168.1.1 → Log in to OpenWrt with your account
→ System Menu
→ Amlogic Treasure Box
→ Manually Upload Update / Online Download Update
If you select Manually Upload Update
OpenWrt Firmware, you can upload the compressed package of the compiled OpenWrt firmware, such as openwrt_xxx_k5.15.50.img.gz (recommended to upload the compressed package, the system will automatically decompress. If you upload the decompressed xxx.img format file, it may fail due to the large file size). After the upload is complete, the interface will display the operation button of Update Firmware
, click to update.
If you select Manually Upload Update
OpenWrt Kernel, you can upload the three kernel files: boot-xxx.tar.gz
, dtb-xxx.tar.gz
, modules-xxx.tar.gz
(other kernel files are not needed, if uploaded simultaneously, it does not affect the update, the system can accurately identify the needed kernel files). After the upload is complete, the interface will display the operation button of Update Kernel
, click to update.
If you select Online Download Update
for OpenWrt firmware or kernel, it will be downloaded according to the firmware download address
and kernel download address
in the Plugin Settings
. You can customize the download source. For specific operation methods, please refer to the compilation and usage instructions of luci-app-amlogic.
If you feel that the current box's memory is not enough when using memory-intensive applications like docker
, you can create a swap
virtual memory partition, and use a certain capacity of the /mnt/*4
disk space as memory. The unit of the input parameter in the command below is GB
, the default is 1
.
From the browser, access the default IP of OpenWrt: 192.168.1.1 → Log in to OpenWrt with the default account
→ System Menu
→ TTYD Terminal
→ enter the command
openwrt-swap 1
Supports backing up/restoring the EMMC
partition of the box in TF/SD/USB
. We recommend that you backup the Android TV system that comes with the box before installing the OpenWrt system in a brand-new box for future use in restoring the TV system, etc.
Please boot OpenWrt system from TF/SD/USB
, from the browser, access the default IP of OpenWrt: 192.168.1.1 → Log in to OpenWrt with the default account
→ System Menu
→ TTYD Terminal
→ enter the command
openwrt-ddbr
Follow the prompts to enter b
to backup the system, or enter r
to restore the system.
Important
In addition, the Android system can also be flashed into eMMC using the method of flashing via a cable. The download image of the Android system can be found in Tools.
From the browser, access the default IP of OpenWrt: 192.168.1.1 → Log in to OpenWrt with the default account
→ System Menu
→ TTYD Terminal
→ enter the command
openwrt-openvfd
Refer to LED Screen Display Control Description for debugging.
The firstboot
command can restore the system to its initial state. Some common problems that might be encountered during the use of OpenWrt can be found in the User Guide
- Install necessary packages (for Ubuntu 22.04 LTS users)
sudo apt-get update -y
sudo apt-get full-upgrade -y
# For Ubuntu-22.04
sudo apt-get install -y $(curl -fsSL https://is.gd/depend_ubuntu2204_openwrt)
- Clone repository to local
git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-openwrt.git
- In the root directory of
~/amlogic-s9xxx-openwrt
, createopenwrt-armvirt
folder, and upload theopenwrt-armvirt-64-default-rootfs.tar.gz
file to this directory. - Enter the packaging command in the root directory of
~/amlogic-s9xxx-openwrt
, such assudo ./make -b s905x3 -k 6.1.10
. The packaged OpenWrt firmware is placed in theout
folder in the root directory.
Parameter | Meaning | Description |
---|---|---|
-b | Board | Specify the model of the TV box, such as -b s905x3 . Connect multiple models with _ , such as -b s905x3_s905d . Use all to represent all models. See the BOARD setting in model_database.conf for model codes. Default: all |
-r | KernelRepo | Specify the <owner>/<repo> of the github.com kernel repository. Default: ophub/kernel |
-u | kernelUsage | Set the tag suffix of the kernel to be used, such as stable, flippy, dev, beta. Default: stable |
-k | Kernel | Specify the kernel name, such as -k 5.10.125 . Connect multiple kernels with _ , such as -k 5.10.125_5.15.50 . The kernel version freely specified by the -k parameter is only valid for kernels using stable/flippy/dev/beta . Other kernel series such as rk3588 / rk35xx / h6 can only use specific kernels. |
-a | AutoKernel | Set whether to automatically adopt the latest version of the same series of kernels. When set to true , it will automatically search the kernel library for updates of the same series as the kernel specified in -k , such as 5.10.125, and will automatically switch to the latest version if there is a version later than 5.10.125. When set to false , it will compile the specified version of the kernel. Default: true |
-s | Size | Set the size of the system's ROOTFS partition. The system size must be greater than 2048MiB. For example: -s 2560 . Default: 2560 |
-n | BuilderName | Set the signature of the OpenWrt system builder. Do not include spaces when setting signatures. Default: none |
sudo ./make
: Use default configuration, use the latest kernel package in the kernel library, and package all models of TV boxes.sudo ./make -b s905x3 -k 6.1.10
: Recommended. Use default configuration for related kernel packaging.sudo ./make -b s905x3_s905d -k 6.1.10_5.15.50
: Use the default configuration and package multiple kernels at the same time. Use_
to connect multiple kernel parameters.sudo ./make -b s905x3 -k 6.1.10 -s 1024
: Use the default configuration, specify a kernel, a model for packaging, and set the firmware size to 1024 MiB.sudo ./make -b s905x3_s905d
: Use default configuration, package all kernels for multiple models of TV boxes, use_
to connect multiple models.sudo ./make -k 6.1.10_5.15.50
: Use the default configuration, specify multiple kernels, package all models of TV boxes, and connect kernel packages with_
.sudo ./make -k 6.1.10_5.15.50 -a true
: Use the default configuration, specify multiple kernels, package all models of TV boxes, and connect kernel packages with_
. Automatically upgrade to the latest kernel of the same series.sudo ./make -s 1024 -k 6.1.10
: Use the default configuration, set the firmware size to 1024 MiB, and specify the kernel as 6.1.10 to package all models of TV boxes.
You can modify the related personalized firmware configuration files in the config directory, as well as the .yml file, customize and compile your OpenWrt firmware, and the firmware can be uploaded to Actions
and Releases
on github.com.
- You can view the personalized firmware configuration instructions in the user documentation. The compilation process control file is .yml
- New compilation: In github.com's Action select
Build OpenWrt
. Click theRun workflow
button for one-stop firmware compilation and packaging. - Re-compilation: If there is already a compiled
openwrt-armvirt-64-default-rootfs.tar.gz
file in Releases, and you just want to remake other different boards, you can skip the compilation of OpenWrt source files and go directly to the second production. SelectUse Releases file to Packaging
on the Actions page, and click theRun workflow
button to recompile. - More Support: The compiled
openwrt-armvirt-64-default-rootfs.tar.gz
file is a universal file for making firmware for different boards. It is also applicable for creating OpenWrt firmware using unifreq's packaging scripts. As the pioneer of using OpenWrt and Armbian systems in TV boxes, he provides support for more devices, such as OpenWrt (QEMU version) used in the Armbian system through aKVM
virtual machine, and Amlogic, Rockchip, and Allwinner series, etc. For packaging methods, please refer to the instructions in his repository. In Actions, through packaging-openwrt-for-qemu-etc.yml, you can call his packaging scripts to create more firmware.
- name: Package Armvirt as OpenWrt
uses: ophub/amlogic-s9xxx-openwrt@main
with:
openwrt_path: openwrt/bin/targets/*/*/*rootfs.tar.gz
openwrt_board: s905x3_s905x2_s905x_s905w_s905d_s922x_s912
openwrt_kernel: 6.1.10_5.15.50
These parameters correspond to the local packaging command
, please refer to the explanations above.
Parameter | Default Value | Description |
---|---|---|
openwrt_path | None | Set the file path of openwrt-armvirt-64-default-rootfs.tar.gz , you can use relative path like openwrt/bin/targets/*/*/*rootfs.tar.gz or a network file download URL like https://github.com/*/releases/*/*rootfs.tar.gz |
openwrt_board | all | Set the board of the box to be packaged, functionality refers to -b |
kernel_repo | ophub/kernel | Specify <owner>/<repo> of the kernel repository on github.com, functionality refers to -r |
kernel_usage | stable | Set the tags suffix of the kernel to be used, functionality refers to -u |
openwrt_kernel | 6.1.1_5.15.1 | Set the kernel version, functionality refers to -k |
auto_kernel | true | Set whether to automatically adopt the latest version of the same series of kernels, functionality refers to -a |
openwrt_size | 1024 | Set the size of the firmware ROOTFS partition, functionality refers to -s |
builder_name | None | Set the signature of the OpenWrt system builder, functionality refers to -n |
To upload to Releases
, you need to set Workflow read/write permissions
for repository. For details, see usage instructions.
Parameter | Default Value | Description |
---|---|---|
${{ env.PACKAGED_OUTPUTPATH }} | out | OpenWrt system files output path |
${{ env.PACKAGED_OUTPUTDATE }} | 04.13.1058 | Packaging date (month.day.hourminute) |
${{ env.PACKAGED_STATUS }} | success / failure | Packaging status. success / failure |
Option | Value |
---|---|
Target System | Arm SystemReady (EFI) compliant |
Subtarget | 64-bit (armv8) machines |
Target Profile | Generic EFI Boot |
Target Images | tar.gz |
For more information, please refer to the User Documentation
Name | Value |
---|---|
Default IP | 192.168.1.1 |
Default Account | root |
Default Password | password |
Default WIFI Name | OpenWrt |
Default WIFI Password | None |
For instructions on how to compile the kernel, see compile-kernel.
- name: Compile the kernel
uses: ophub/amlogic-s9xxx-armbian@main
with:
build_target: kernel
kernel_version: 6.1.10_5.15.50
kernel_auto: true
kernel_sign: -yourname
When making the OpenWrt system, the files used, such as kernel and u-boot, are the same files used to create the Armbian system. In order to avoid repeated maintenance, related content has been classified and placed in the corresponding resource repositories, and will be automatically downloaded from the relevant repositories during use.
The u-boot, kernel and other resources used by this system mainly come from the unifreq/openwrt_packit project. Some files are shared by users in the Pull and Issues of the amlogic-s9xxx-openwrt / amlogic-s9xxx-armbian / luci-app-amlogic / kernel / u-boot and other projects. unifreq
has opened the door for us to use OpenWrt in TV boxes. Deeply influenced by him, my firmware production and usage follow his consistent standards. To thank these pioneers and sharers, I have recorded them in CONTRIBUTORS.md. Once again, I want to thank everyone for giving new life and meaning to the boxes.
- unifreq has made
OpenWrt
systems for more boxes such as Amlogic, Rockchip, and Allwinner. It is a benchmark in the box circle, recommended for use. - The amlogic-s9xxx-armbian project provides the
Armbian
system used in the box, which is also applicable in devices that support OpenWrt.
The amlogic-s9xxx-openwrt © OPHUB is licensed under GPL-2.0