If your system is already set up you can use the method described by @Joe Kul.
In effect you set a environment variable with the boot options you want and save the u-boot configuration file to your media.
If you are still debugging your installation you may want to set your environment variable in the source code then recompile. After you get your u-boot commands figured out.
The file to edit depends on what board you are using. I use the mx23evk so I edit the /include/configs/mx23evk.h
file. Look at the /* Extra Environments */
section.
I removed everything that was in that section and replaced it with this.
/* Extra Environments */
#define CONFIG_EXTRA_ENV_SETTINGS \
"boot_mfg=echo Running mfgtools...; " \
"ext2load mmc 0:6 0x40600000 /boot/uboot/mfgupdat.zIm; " \
"ext2load mmc 0:6 0x40a00000 /boot/uboot/mfgupdat.dtb; " \
"bootz 40600000 - 40a00000;\0" \
"boot_pro=echo Running Production...; " \
"ext2load mmc 0:6 0x40600000 /boot/uboot/pro_1.zIm; " \
"ext2load mmc 0:6 0x40a00000 /boot/uboot/pro_1.dtb; " \
"bootz 40600000 - 40a00000;\0" \
"boot_rescue=echo Running Rescue...; " \
"bootz 40600000 - 40a00000;\0" \
At the u-boot command line I can pick between the 3 predefined boot settings by simply: run boot_mfg
OR run boot_pro
...
This allows me to quickly boot into 3 different configurations. Just set one as default when you are done with your debugging.
If I remember correctly the CONFIG_BOOTDELAY
and CONFIG_BOOTCOMMAND
variables have something to do with the default boot.
So first I would boot as you have been figure out what commands allow you to boot on the media in the partition with the kernel and root you want.
ext2load mmc 0:6 0x40600000 /boot/uboot/mfgupdat.zIm
Then I would change my source code to reflect this command, not auto booting yet, by running the variable you set in source code.
run my_boot_variable
If you are happy with that then change you source code again to auto boot using that variable with or without a timed delay. You can add multiple boot variables and select different ones by a key press.
I have not worked with this in a couple of months so I may be leaving out important information, but this should get you looking in the right direction.