ophub / luci-app-amlogic

Support for managing OpenWrt in Amlogic, Rockchip and Allwinner boxes. include install and update the OpenWrt and kernel, Backup and Restore config, Snapshot management, etc.
GNU General Public License v2.0
306 stars 108 forks source link
allwinner amlogic beikeyun h96 hk1 l1pro n1 openwrt rockchip vplus x96

luci-app-amlogic / Amlogic Service

View Chinese description | 查看中文说明

This plugin supports online management of Amlogic S9xxx series (X96, HK1, H96, etc.), Allwinner (V-Plus Cloud), and Rockchip (BeikeYun, Chainedbox-L1-Pro, FastRhino-R66S/R68S, Radxa-5B/E25) boxes. It also works in OpenWrt installed in the KVM virtual machine of the Armbian system. Current features include install OpenWrt to EMMC, manually uploading/updating online OpenWrt firmware or kernel versions, backup/restore OpenWrt configuration, snapshot management, and customizing firmware/kernel download site, etc.

Using the OpenWrt system and Amlogic box plugin in the box requires the support of some required software packages. When custom compiling OpenWrt, please add it according to the instructions. When using the one-click script for manual installation in OpenWrt without compiling Amlogic's box, if there is a prompt for missing dependencies, please install the dependencies according to the log prompt (System > Software Packages > Refresh List > Search for the corresponding package > Install), then retry.

Manual Installation

curl -fsSL git.io/luci-app-amlogic | bash

Plugin Compilation

# Add the plugin
rm -rf package/luci-app-amlogic
git clone https://github.com/ophub/luci-app-amlogic.git package/luci-app-amlogic

# You can compile this plugin separately
make package/luci-app-amlogic/compile V=99

# Or integrate this plugin during the full compilation of OpenWrt
make menuconfig
# choose LuCI ---> 3. Applications  ---> <*> luci-app-amlogic ----> save
make V=99

Custom Configuration

# 1. Set the download repository of OpenWrt files
sed -i "s|amlogic_firmware_repo.*|amlogic_firmware_repo 'https://github.com/USERNAME/REPOSITORY'|g" package/luci-app-amlogic/root/etc/config/amlogic

# 2. Set the keyword of Tags in Releases
sed -i "s|ARMv8|RELEASES_TAGS_KEYWORD|g" package/luci-app-amlogic/root/etc/config/amlogic

# 3. Set the suffix of OpenWrt file in Releases
sed -i "s|.img.gz|.OPENWRT_SUFFIX|g" package/luci-app-amlogic/root/etc/config/amlogic

# 4. Set the download path of OpenWrt kernel
sed -i "s|amlogic_kernel_path.*|amlogic_kernel_path 'https://github.com/USERNAME/REPOSITORY'|g" package/luci-app-amlogic/root/etc/config/amlogic

Plugin Settings Explanation

The plugin settings consist of 4 elements: OpenWrt firmware download address, kernel download address, version branch selection, and others.

OpenWrt firmware download contains three options

  1. OpenWrt firmware download repository: Fill in your repository on github where you compile OpenWrt (or other compiler's repository), such as: https://github.com/breakings/OpenWrt. The OpenWrt Compiler author button on the plugin's welcome homepage will link to the website filled in here (automatically updates the link according to the filled website), making it easy for everyone to find the firmware compiler for exchange and learning.

  2. Tags keywords in Releases: It needs to distinguish other x86, R2S, etc. firmwares, and ensure that this keyword can find the corresponding OpenWrt firmware.

  3. Suffix of OpenWrt file: Supported formats include .img.gz / .img.xz / .7z. However, .img is not supported because it is too large and slow to download.

Kernel download address is one option

Version branch selection is one option

Other options

Default Settings Explanation

Plugin User Instructions

The plugin has 6 functions: Install OpenWrt, Manual Upload Update, Online Download Update, Firmware Configuration Backup, Plugin Settings, and CPU Settings.

  1. Install OpenWrt: Select your device from the Select Device Model list, and click Install to write the firmware from TF/SD/USB into the built-in eMMC of the device.

  2. Manual Upload Update: Click the Choose File button, select the local OpenWrt Kernel (upload the full set of kernel files) or OpenWrt Firmware (recommended to upload compressed firmware), and upload. Once the upload is complete, the corresponding Replace OpenWrt Kernel or Update OpenWrt Firmware button will appear at the bottom of the page, click to update (the system will automatically reboot after the update).

  3. Online Download Update: Click the Update Box Plugin Only button to update the Amlogic Box plugin to the latest version; click Update System Kernel Only to download the corresponding kernel according to the kernel branch selected in Plugin Settings; click Full System Update to download the latest firmware based on the download site set in Plugin Settings. Clicking the Rescue the original system kernel button will copy the kernel currently in use on the device to the target disk. This facilitates rescue operations in case a kernel update fails and the OpenWrt system cannot start. For example, it allows for booting the OpenWrt system from a USB drive to rescue the system on the eMMC, supporting mutual rescue among eMMC/NVME/sdX devices.

  4. Backup Firmware Configuration: Click the Open List button to edit the backup list; click the Download Backup button to backup the OpenWrt configuration information from the current device to local; click the Upload Backup button to upload the backup configuration files and restore the system configuration. Click Create Snapshot, Restore Snapshot and Delete Snapshot buttons to manage the snapshot accordingly. Snapshots will record all configuration information in the /etc directory of the current OpenWrt system, which is convenient for one-click restore to the current configuration status in the future. This function is similar to Download Backup, but only saves in the current system and does not support download use.

  5. Plugin Settings: Set the kernel download address and other information of the plugin, for details, see the relevant introduction in Plugin Settings Instructions.

  6. CPU Settings: Set the scheduling policy of the CPU (recommended to use the default settings), which can be set according to needs.

Note: Install OpenWrt and CPU Settings and other functions will automatically hide inapplicable functions depending on the device and environment.

KVM Virtual Machine User Instructions

For overpowered boxes, you can first install the Armbian system, then install the KVM virtual machine to achieve multi-system use. The compilation of the OpenWrt system can use the mk_qemu-aarch64_img.sh script developed by unifreq, and its installation and use instructions are detailed in the qemu-aarch64-readme.md document. The OpenWrt qemu firmware in Online Download Update is supported by breakings.

The method of using the plugin in the KVM virtual machine is the same as the method of directly installing and using OpenWrt in the box.

Compilation Instructions for OpenWrt System

Step 1: Compile the Rootfs file for OpenWrt: Use the OpenWrt source code and select Arm SystemReady (EFI) compliant option in Target System, select 64-bit (armv8) machines option in Subtarget, select Generic EFI Boot option in Target Profile, and add the required software packages to compile the rootfs.tar.gz file for OpenWrt.

Step 2: Package the dedicated OpenWrt firmware for different devices: You can use the scripts from flippy or ophub to package the dedicated OpenWrt firmware for different devices. Please refer to the respective repositories for detailed usage instructions.

Plugin Interface

luci-app-amlogic

Acknowledgement

Links

License

The luci-app-amlogic © OPHUB is licensed under GPL-2.0