The first thing to consider is editing uEnv.txt to change the name of the script run in place of the init program. This is the file /boot/uEnv.txt. Change the last line to be something like:
cmdline=init=/opt/scripts/tools/eMMC/my_flasher.sh
Installing a different U-boot would first of all be a matter of replacing the files in /opt/backup/uboot, namely these:
-rw-r--r-- 1 tom tom 65620 Sep 27 17:27 MLO -rw-r--r-- 1 tom tom 317044 Sep 27 17:27 u-boot.imgYou could just replace these files and reflash the entire eMMC. This only takes a couple of minutes. You might want to take a gentler approach, in which case you could consider modifying the flasher script to do only the following:
dd if=/opt/backup/uboot/MLO of=/dev/mmcblk1 count=1 seek=1 conv=notrunc bs=128k dd if=/opt/backup/uboot/u-boot.img of=/dev/mmcblk1 count=2 seek=1 conv=notrunc bs=384kWhile you were at it, you might want to install a different uEnv.txt. You could for example set up a flasher script that installs a uEnv.txt that always does network booting (such as if you were setting up myriads of boards for some kind of student lab). This file ends up in /boot/uEnv.txt.
What is wanted here is a modified flasher card that can just be inserted,, booted, and allowed to run to completion. This card could do nothing more than boot up linux to run a runt flasher script, copy a new kyu.bin to /boot and shutdown. This would work on top of a mountain, up on a microwave tower -- or whereever.
Tom's Computer Info / [email protected]