I am trying to flash libreelec on an android TV box without having an image I could throw in the libreelec toaster. On the RPi it was quite simple, here I guess I have to compile stuff, I don't really have the answer for. There is an Image for the previous Box based on S802 (only found a lakka Version(?)), but even though there is libreelec for S812, I don't know who to "compile" it from zip/tar whatever to an actual image for the usb-sd-creator. Maybe it is easier than it seems, please give me a hint!

Starting question: Does anybody know how to flash/compile Libreelec on a S812 based board?

current question: How can I decompile an arm firmware file , to get the device tree file, which is apperently needed for installing a different operating system on my board?


Toaster: https://libreelec.tv/2016/08/usb-sd-creator/

lakka/libreelec build (.img) for previous box: http://le.builds.lakka.tv/S802.M8.arm/

libreelec build from amlinux.ru e.g. for S812 based box: https://mega.nz/#F!W0Qk2JIQ!P1iyw7dFFHvubkIUZ-i1lA!3ohmxIaJ

1. How can I create the imagefile for the Toaster from the libreelec build for S812 based board?

Possible solution:

The following page contains a lot of Linux builds for Amlogic boards (S805 S905 S905X S912 (SD and USB):

see: http://freaktab.com/forum/tv-player-support/amlogic-based-tv-players/606133-linux-images-for-s805-s905-s905x-s912-sd-and-usb

2. So how can I write a bootable sd-card, which suits the needs for the amlogic board (I guess I can't use the imagetoaster)?

Possible solution:

This page helped a bit, apparently I only need to copy the extracted image (.xz -> .img) via dd on the sd-card, since newer builds contain allready the neccessary files for enabling multiboot for a parallel use of android and linux (which I am explaining later).

I'm posting both because I know many people are not familiar with the great xz compression format. Download the image that suits your needs and, from a Unix-like system, and running as root, dump it to the MicroSD card you will use to boot your CuBox-i. Say, if your MicroSD card appears as /dev/sdd:

# dd if=cubox-i.img of=/dev/sdd

see: https://people.debian.org/~gwolf/

3. I finally went with the following instructions to flash linux on the tv box:

1.) With the TV box running Android, insert the prepared card in to the box's SD slot or use a USB card reader. Note: I like to use a card reader with activity LED, so I can see something is happening. The first boot can take a few minutes and the flashing LED is reassuring.

2.) At Android/Settings/About Device/System/updates. Note: You may have the Update and Backup app in the App Drawer. -From the Update and Backup App, under the UpdateLocale section, click Select, select aml_autoscript.zip, click update. Note: Leave "Wipe Data" and "Wipe Media" unchecked/unticked. To be clear, do not use those options

3.) The TV box will reboot, it will do so a couple of times. Eventually you will see the initial login prompt. Initial login credentials, See here for login info on the different images.

You will be asked to select a new password, do so. You will be asked to create a new User and P/W, do so.

The box will reboot, this boot will be a bit slow, but ultimately should bring you to the desktop. If the card's available space does not get expanded, use gparted(may need to install) to expand the Ext partition to fill the card.

The steps sound far more complicated than they are. Do it once, and you probably won't need this guide the second time.

see: http://freaktab.com/forum/tv-player-support/amlogic-based-tv-players/s905/tronsmart-ac/firmware-roms-tools-at/565449-running-linux-from-sd-card-or-usb-flash-drive-using-balbes150-method-and-files


Regarding Point 3.3.); Till now the only result after the initialized "update" seems to be, that after each reboot I encounter loss of the HDMI-Signal, so I go and reconnect the HDMI-Cable... Now I got the nicest bluescreen I have ever seen (I guess it is the bluescreen of the android era...).

4. Looks like I have to extract a socalled .dtb file from the actual firmware of my device to apply it to the sd-card ...

If somebody knows an overview site for .dtb files , please post.

see: http://www.cnx-software.com/2014/05/12/how-to-extract-a-device-tree-file-from-android-firmware-files/


Perfect linux error

FATAL ERROR: Blob has incorrect magic number

    user@user-x:~/Downloads$ unrar x -r ./M8N-M8S_Amlogic_11152015.rar

unrar 0.0.1  Copyright (C) 2004  Ben Asselstine, Jeroen Dekkers

Extracting from /home/user/Downloads/M8N-M8S_Amlogic_11152015.rar

Extracting  n200C-ota-20151103.zip                                    OK        
Extracting  recovery.img                                              OK        
Extracting  u-boot.bin                                                OK        
Extracting  aml_autoscript                                            OK        
Extracting  factory_update_param.aml                                  OK        
Extracting  readme.txt                                                OK        
All OK
user@user-x:~/Downloads$ split_bootimg.pl recovery.img
Page size: 2048 (0x00000800)
Kernel size: 6065155 (0x005c8c03)
Ramdisk size: 2057152 (0x001f63c0)
Second size: 180224 (0x0002c000)
Board name: 
Command line: 
Writing recovery.img-kernel ... complete.
Writing recovery.img-ramdisk.gz ... complete.
Writing recovery.img-second.gz ... complete.
user@user-x:~/Downloads$ dtc -I dtb recovery.img-second.gz -O dts -o meson8_tm8.dtd
FATAL ERROR: Blob has incorrect magic number
user@user-x:~/Downloads$ dtc -I dtb recovery.img-second.gz -O dts -o bla.dtd
FATAL ERROR: Blob has incorrect magic number

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.