johang / sd-card-images

Scripts to build bootable SD card images with Debian for various single-board computers
https://sd-card-images.johang.se
GNU General Public License v3.0
138 stars 32 forks source link

Installation on the internal emmc storage of an old amlogic tvbox #136

Open pitsi opened 3 weeks ago

pitsi commented 3 weeks ago

Can the (p200) images be installed on the emmc storage device of an old s905 amlogic tvbox? Its device tree is this (taken from the stock android rom it ran).

$ cat /proc/device-tree/amlogic-dt-id
gxb_p200_1g

I am not interested in running it from an sd card.

johang commented 3 weeks ago

I think you can. Amlogic supports native eMMC boot.

https://docs.u-boot.org/en/latest/board/amlogic/boot-flow.html

pitsi commented 3 weeks ago

No offence but everything described in that documentaion of uboot is under the category "easier said than done". And, as an owner of 3 old amlogic tvboxes (s805, s905 and s912) let me explain why. Please note that, a long time ago, every single one of those tvboxes had their android based rom, made by their manufacturers/vendors. Today, all their vendor roms are obsolete due to age.

On the s805 one I have installed libreelec-aml, which is a custom build of libreelec for that amlogic AMLMX devices. It relies on the vendor's bootloader so as to boot, so the boot partition is not erased or altered, and it can be installed on the internal emmc storage with one single command. Simple as 1-2-3, works as advertised, I would definitely recommend.

On the s905 one I had installed coreelec-legacy, which is a fork of libreelec for most amlogic based devices. The legacy version is for the AMLGX ones. It also relies on the vendor's bootloader to boot, so again the boot partition was not erased or altered. However, in early 2023, I wanted to try the latest version of libreelec, which brought back support for AMLGX. That support comes with a big, fat drawback. It supports emmc installation on only a few AMLGX devices. On the ones thet it does not support it, the bootloader is altered so as to boot from the sdcard, permanently. It also completely ignores the internal emmc storage, i.e. it is completely invisible to the os! This is the device I want to install your image on.

Last but not least, the s912 one. I installed a custom android rom on it a few years ago and another one last year. I concluded that its wifi's reception is trash regardless of the installed rom. However, in order to install any rom, one must use amlogic burn tool, which must be one of the worst apps I have ever seen. The app overwrites everything on the emmc storage in order to install any rom, including the bootloader. It has some serious issues, e.g. one must find the exact app version that works for the hw he has to flash, it is slow

If you have read all of the above, I assume that you can now understand my concerns and annoyances about the bootloader and the way each amlogic device boots. Tbh, the forementioned issues which I encountered on s905 and s912 made me hate amlogic devices in general (although I bought an s905x3 one for a friend last year). I would like the installation of your images to be as simple as the one for s805, but I am willing to do any extra steps if needed.