Jump to content

Installation Instructions for TV Boxes with Amlogic CPUs


SteeMan
 Share

Recommended Posts

These instructions are for Amlogic CPUs for TV Boxes. 

 

Note1: If you have previously run other distributions on the box such as coreelec the below installation will not work.  You will need to restore the original android firmware before attemping the install.  coreelec changes the boot environment in ways that are incompatible with these armbian builds.

 

Download links:

aml-s9xx-box: https://github.com/armbian/community

or build your own image using the armbian build framework

 

Once you download your chosen build, you need to burn the image to an SD card.  Generally balenaEtcher is recommended as it does a verification of the burn.  Also be sure to use high quality SD cards.

 

Once you have the SD card with your chosen build, then you need to edit the boot configuration file on the SD card.  In the BOOT partition of the SD card there will be a file /boot/extlinux/extlinux.conf, that you need to edit.

 

Your extlinux.conf file should look like:

LABEL Armbian
LINUX /uImage
INITRD /uInitrd


#FDT /dtb/amlogic/meson-gxbb-p200.dtb
FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb
#FDT /dtb/amlogic/meson-gxm-q200.dtb
#FDT /dtb/amlogic/meson-g12a-x96-max.dtb
#FDT /dtb/amlogic/meson-g12b-odroid-n2.dtb
APPEND ...
 

Basically you need to have the correct dtb for your box and the correct boot command for your box, along with the top three environment variables set.  A common mistake is for people to uncomment the dtb file needed, but leave other dtb lines in the file not uncommented and thus they fail to boot.  You may need to attempt to use different dtb files until you find the one that works the best for your box's hardware (there are a bunch of dtb files in /boot/dtb/... to try depending on your cpu architecture and hardware).  It is unlikely that there will be a matching dtb file for your TV box.  The idea is to find the one that works best for your box.  This may mean that you try booting with different dtb files until you fine one that works good enough for your needs.  By searching the forums you will find information about what dtbs other users have found work best for different boxes.

 

Next you need to copy the correct uboot for your box.  This is needed for how these builds boot on amlogic boxes.  There are three different u-boot files located in the /boot directory:  u-boot-s905, u-boot-s905x-s912, u-boot-s905x2-s922

You need to copy (note copy not move) the u-boot file that matches your cpu to a new file named: u-boot.ext

So for example with a TX3 mini box that has an s905w cpu you would copy u-boot-s905x-s912 to u-boot.ext

Note that for x905[w,d,l], and other variants use u-boot-s905x-s912; for s905x3 use u-boot-s905x2-s922

Note2: The current extlinux.conf has "LINUX /Image", you may need to edit this to "LINUX /uImage" as I am having issues on some boxes.

 

Once you have your SD card prepared you need to enable multiboot on the box.  There are different ways documented to do this, but the most common is the "toothpick" method.  The "toothpick" method means to hold the reset button while applying power to the box.  The reset button is often hidden and located at the back of the audio/video jack connector.  By pressing that button with a toothpick or other such pointed device you can enable multiboot.  What you need to do is have the box unpluged, have your prepared sd card inserted, then press and hold the button while inserting the power connector.  Then after a bit of time you can release the button.  (I don't know exactly how long you need to hold the button after power is applied, but if it doesn't work the first time try again holding for longer or shorter times).

 

You should now be booting into armbian/linux.  Note that the first boot takes longer as it is enlarging the root filesystem to utilize the entire SD card.

 

After you are satisfied that your box is working correctly for your needs you can optionally copy the installation from the SD card to internal emmc storage (assuming your box has emmc). (Note: Installing to emmc has some risks of bricking your box.  Don't do this unless you feel you understand how to reinstall the boxes android firmware)  You install armbian to emmc by running the appropriate shell script in /root, which is either /root/install-aml-s905-emmc.sh for s905 cpus or /root/install-aml.sh for all others: s905[x,w,l,x2,x3],s912,s922.  Note that it is recommended that you make a backup of emmc first.  Also be prepared if anything goes horribly wrong with your emmc install to reinstall the android firmware using the Amlogic USB Burning Tool to unbrick your device.  It is generally easy to find original android firmwares on the internet and you can generally (but not always) recover a bricked box using the Amlogic tool and an original firmware file.

 

 

Note: Followup posts in this thread should be limited to comments to improve or better understand these instructions.

Link to comment
Share on other sites

Check forum guidelines to use maximum potential!

Posted (edited)

Hi, Thanks for the guide first. I am able to follow that to flash the sd and boot to armbian (Armbian_20.10_Arm-64_focal_current_5.9.0.img) to my A95X (A7_s905x_v2) without any problem. Then I ran the install shell. And it worked without any error as well. Then I stupid type `shutdown now` to shutdown the box. Now the box not able to turn on. I mean its not able to turn on not even boot. The red light is on when I connected the power. But with the remote I am not able to turn it on. Unplug and plug nothing happens. Before when I plug the power it will turn on (light from red to blue) but now nothing could make that happen. anybody knows what can I do now? Thanks in advance.

 

Edit: 

Forgot to mention there is no reset button or hold or pin on this box. So I can't use toothpick method at all.

Edited by 7j49b0ab
add more information
Link to comment
Share on other sites

17 hours ago, 7j49b0ab said:

Hi, Thanks for the guide first. I am able to follow that to flash the sd and boot to armbian (Armbian_20.10_Arm-64_focal_current_5.9.0.img) to my A95X (A7_s905x_v2) without any problem. Then I ran the install shell. And it worked without any error as well. Then I stupid type `shutdown now` to shutdown the box. Now the box not able to turn on. I mean its not able to turn on not even boot. The red light is on when I connected the power. But with the remote I am not able to turn it on. Unplug and plug nothing happens. Before when I plug the power it will turn on (light from red to blue) but now nothing could make that happen. anybody knows what can I do now? Thanks in advance.

 

Edit: 

Forgot to mention there is no reset button or hold or pin on this box. So I can't use toothpick method at all.

You are going to need to find an android rom for your box and reinstall that.  The installation to emmc is risky as the boot environment is on emmc.  If something goes wrong then the box is not bootable as you are seeing.  It sounds like from your description you had it working from sdcard which is what I would recommend you stay with.

Link to comment
Share on other sites

On 5/22/2022 at 8:29 AM, SteeMan said:

You are going to need to find an android rom for your box and reinstall that.  The installation to emmc is risky as the boot environment is on emmc.  If something goes wrong then the box is not bootable as you are seeing.  It sounds like from your description you had it working from sdcard which is what I would recommend you stay with.

 

Thanks a lot for the reply. After some research I found my nexbox bricked. Found the firmware and burning tool and unbricked it. Trying to install the emmc again since I just don't want to waste my sd card. :) Wish me luck!

 

UPDATE:

 

Succeed! Instead using install_aml_s905x.sh just simply use install_aml.sh and it works fine. Thanks again for the folks here.

Link to comment
Share on other sites

Very helpful guide, but I want to add one point that tripped me because I was careless when editing extlinux.conf

 

I was trying to boot Armbian on a Nexbox A95X. Initially I thought that it was a S905X box so I used u-boot-s905x-s912 and I cannot see anything on the screen. Then I realized that my box has only 1GiB of RAM and was running Android 4.4, so it was probably using the S905 SoC .  After I copied u-boot-s905 into u-boot.ext I can finally see the boot messages. But then the screen hangs with the message "starting kernel...".

 

I thought that this is obviously a problem with the dtb I used. I was using the obvious choice: /dtb/amlogic/meson-gxbb-nexbox-a95x.dtb , but I guess maybe that dtb assumed 2GiB of RAM.  So I switch to /dtb/amlogic/meson-gxbb-p200.dtb, but still no go.

 

So I read the boot messages more carefully and noticed these two lines:
   

Quote

ignoring unknown command: /dtb/amlogic/meson-gxbb-p200.dtb

ignoring unknown command: APPEND

So my meson-gxbb-p200.dtb is being ignored?

 

Googled and found people with similar problems but no solution.

 

I Looked at extlinux.conf more carefully and I found the problem.

 

By default extlinux.conf is assuming that the device is a rk3399-nanopc-t4!
# rk-3399
FDT /dtb/rockchip/rk3399-nanopc-t4.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32,0xff1a0000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

 

So those two lines got loaded first.  I should have been more careful, but this was easy to miss because at a glance it looks as if all the "FDT" and "APPEND" lines have been commented out.  And the error message about "unknown command: " is misleading. After commenting out those lines, I was able to boot into the Armbian desktop without any problem.

Link to comment
Share on other sites

On 2/21/2021 at 10:19 PM, SteeMan said:

for s905x3 use u-boot-s905x2-s922

 

FYI, on a H96 Max X3 (s905x3): I was able to boot the latest community aml-s9xx-box image, but only after switching to u-boot-x96maxplus.bin (from a person's repo that uses Armbian's name without permission and wastes Armbian's resources by tricking users into thinking they get support from official Armbian)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...