devmfc / amlogic-bootscripts-Armbian

Amlogic boot scripts for Armbian
GNU General Public License v2.0
8 stars 3 forks source link

Installation EMMC error [BOOT] #1

Open educabox opened 7 months ago

educabox commented 7 months ago

Hey [@Devmfc],

I hope this message finds you well. I wanted to express my gratitude for your tutorial on installing [Armbian] via USB on TV Boxes with S905X3 and S905X2 processors. The tutorial worked flawlessly during the USB boot process.

However, I've encountered a challenge when attempting to install the system on the Box using the command "/root/install-aml.sh". After completing the installation, upon rebooting the device, the Box starts but remains stuck on a black screen.

To troubleshoot, I initiated a USB boot and accessed the /boot partition on EMMC. I noticed that during the installation process, the script copies /boot from the USB, but it doesn't add the files "aml_autoscript" and "s905_autoscript" as outlined in your tutorial.

In an attempt to resolve this, I manually copied these files to the /boot partition on EMMC. Unfortunately, this didn't resolve the issue, and the Box still fails to start after installation.

I'm using a BTV B11 TV Box with S905X3 and another with BTV Express S905X2. Both boxes boot successfully via USB, but post-installation on EMMC, they seem unresponsive. Is there any specific configuration or step I might be missing to ensure the installation on the TV Box works seamlessly?

educabox commented 7 months ago

Hey @Devmfc,

I followed the steps outlined in your GitHub repository (https://github.com/devmfc/amlogic-bootscripts-Armbian) to install [Armbian] on my TV Box.

Here's a quick rundown of the steps I took:

1) Installed the system following the recommendations on the GitHub page. 2) Initiated Armbian via USB and proceeded with the installation using the "/root/install-aml.sh" command. 3) Upon completion of the installation, I replaced the "emmc_autoscript" file with "s905_autoscript" (and renamed it to "emmc_autoscript"). 4) Used the command "$ sudo blkid" to identify the UUID of my EMMC partition. 5) Opened the "armbianEnv.txt" file and updated the UUID with that of my EMMC partition, then saved the file. 6) Removed the USB device and restarted my Box.

The substitution of "emmc_autoscript" with "s905_autoscript" proved to be the key, and everything is running smoothly now.

Thanks once again for your invaluable assistance! Best regards!

illlumin commented 5 months ago

Same problem as you, waiting for dev instructions. my tv box magicsee N5 max

tobiaswaldvogel commented 4 months ago

@devmfc Thanks a lot for all the effort and providing these scripts.

I had the issue that the chainloading u-boot which comes with Armbian has an issue with the emmc my on X96 boxes. It works from SD card but for the emmc it just reports "no partitions".

So I had the same idea as you, using the directly the stock u-boot and figured out that you did already all the work. The only missing piece was the support for emmc.

The aml_autoscript is looking for emmc_autoscript on the emmc, so as @educabox already mentioned it has to be copied to this name. In addition I had to change the default devtype to "mmc" and the default devnum to 0.

So it looks like:

# Armbian boot script modified for Amlogic vendor u-boot by devmfc

test "${devtype}" = "" && setenv devtype "mmc"
test "${devnum}" = "" && setenv devnum 1

As the install script labels the emmc Linux partition always ROOT_EMMC I also moved to rootdev to the emmc_autoscript after the import of armbienEnv.txt, so you can use the same file for usb or SD and emmc:

if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
        fatload ${devtype} ${devnum} ${scriptaddr} ${prefix}armbianEnv.txt
        env import -t ${scriptaddr} ${filesize}
fi

setenv rootdev "LABEL=ROOT_EMMC"

The changes has to be done in emmc_autoscript.command and the emmc_autoscript has to be recompile with the command which @devmfc put kindly at the end:

mkimage -C none -A arm -T script -d emmc_autoscript.command emmc_autoscript

Another thing you might want to double check is if your kernel is named Image or zImage. The script expects the name Image.

@devmfc: If you like we could add the emmc_autoscript to your repository. I could prepare a pull request

One more time thanks a lot for all the effort. Now can re-use my old X96 box as a USB over network server for my scanner.

devmfc commented 3 months ago

Thank you very much! With some minor changes, I applied your changes. Thanx for the lengthily response.