Boot Phicomm N1 without emmc_autoscript / s905_autoscript

It’s recommended to backup your firmware environment variables before changing them.

If fw_printenv / fw_setenv does not work on your device, you might want to checkout this post to fix them.

emmc_autoscript / s905_autoscript is just a script run by start_emmc_autoscript:

In your case start_emmc_autoscript is likely using fatload instead ext4load as here. I changed the variable to use ext4 /boot partition before.

If you got an error from executing this command, such as ## Error: "start_emmc_autoscript" not defined, it means that your device is not booting though the variable. You could fix this by:

Do not reboot your system now. start_emmc_autoscript has not been defined yet (see below).

Let’s get back to emmc_autoscript. The file in my case is:

This chould be different from your case, as I changed it so that kernel image name could by specified in /boot/uEnv.ini.

It’s possible to bake the entire script into firmware variables, by executing the following commands:

The following commands also 1) change filename of /boot/uEnv.ini to /boot/boot.ini, 2) read dtb’s filename from /boot/boot.ini instead of hardcoding it, 3) and change the variable names of kernel_name, dtb_name in /boot/boot.ini to image, dtb, respectively. Feel free to revert these changes back if you want.

Actually I believe that with the help of rewritting start_emmc_autoscript (to import /boot/boot.ini using env import), emmc_autoscript could be written in /boot/boot.ini (in a slightly different format, though) in its entirety. However, I don’t see much sense in doing this, they do not change much anyway.

… and use /boot/boot.ini to specify the kernel, initrd, and dtb’s filename:

/boot/uEnv.ini, /boot/*_autoscript could all be removed now.

Now /boot/ should look like this way:

Leave a Reply

Your email address will not be published.