[U-Boot] Condition in bootcmd to run bootz else bootm
DaveKucharczyk
david.kucharczyk at gmail.com
Fri Sep 11 17:00:17 CEST 2015
Hi, I'd like to set a condition in bootcmd to run uImage from flash if it
can't find zImage on the filesystem.
Here is our zImage bootcmd...
mmc dev 0; ext2load mmc 0:1 ${loadaddr} /opt/common/var/zImage; ext2load mmc
0:1 0x71000000 /opt/common/var/dtb; bootz ${loadaddr} - 0x71000000
Here is our uImage bootcmd...
mmc read ${loadaddr} 0x800 0x1600; bootm
So I tried adding || like so, but it doesn't work...
mmc dev 0; ext2load mmc 0:1 ${loadaddr} /opt/common/var/zImage; ext2load mmc
0:1 0x71000000 /opt/common/var/dtb; bootz ${loadaddr} - 0x71000000 || mmc
read ${loadaddr} 0x800 0x1600; bootm
They work individually from command line, but when I add the || to boot
uImage it just errors out like so...
** File not found /opt/common/var/zImage.tls4xx **
30463 bytes read in 200 ms (148.4 KiB/s)
Bad Linux ARM zImage magic! <--- this is correct since
it can't find zImage
Wrong Image Format for bootm command <---- it tried bootm here so maybe
my || needs to be more strategically placed?
ERROR: can't get kernel image!
SYS42>
--
View this message in context: http://u-boot.10912.n7.nabble.com/Condition-in-bootcmd-to-run-bootz-else-bootm-tp228003.html
Sent from the U-Boot mailing list archive at Nabble.com.
More information about the U-Boot
mailing list