devmfc / amlogic-bootscripts-Armbian

Amlogic boot scripts for Armbian
GNU General Public License v2.0
8 stars 3 forks source link
amlogic armbian linux mainline s905x s905x2 s905x3 tvbox u-boot

Amlogic boot scripts for Armbian

The Armbian images for Amlogic TV Boxes use secondary, chain loaded u-boot blobs to boot mainline kernel images. The vendor u-boot bootloaders can however boot mainline Linux perfectly without them. So they are not needed.

All it takes are some simple modifications of some of the Armbian u-boot scripts.

Setup

assumption: you have vendor u-boot (the one that came with the box) running on eMMC. If you don't, you can just restore the stock Android image with Amlogic USB Burning tool.

DTB file for this tvbox

fdtfile=amlogic/meson-gxl-s905x-nexbox-a95x.dtb

fdtfile=amlogic/meson-sm1-x96-air-gbit.dtb

set this to the UUID of the root partition (value can be found

in /extlinux/extlinux.conf after APPEND root= or with blkid)

rootdev=UUID=92139c84-3871-41d7-a3f2-e8a943cbfa87

Enable ONLY for gxbb (S905) / gxl (S905X/L/W) to create fake u-boot header

soc_fixup=gxl-


+ **Step 6:** Change *fdtfile* to the DTB for your box.  
+ **Step 7:** (optional since version 3:) Change *rootdev* to the right UUID for the rootfs for your image or change to /dev/sda2 when booting from USB or /dev/mmcblk0p2 when booting from SDCARD  
+ **Step 8:** Only if your box has a GXBB (S905) or GXL (S905X/W/L) soc, uncomment the line *soc_fixup=gxl-*  
+ **Step 9:** Power off the the box.  
+ **Step 10:** Put the USB disk in your box.  
+ **Step 11:** Push the reset button and hold the button  
+ **Step 12:** power up your box while holding the reset button for approx 7 seconds.  
+ **Step 13:** If you're lucky, it will now boot Armbian with a mainline kernel. Without any secondary u-boot blobs.  

All used files and source files can be found on [Github](https://github.com/devmfc/amlogic-bootscripts-Armbian).  

This is tested on S905X, S905W, S912, S905X2, S922X, S905X3 and they all boot the kernel.  
I did test S905 also, but it boots only the first time for some reason.  
It will probably also work for S905X4 and S905W2, but did not test those. They are not supported by the Armbian kernel at this moment anyway.