From: DaveKucharczyk Date: Fri, 11 Sep 2015 08:00:17 -0700 (MST) Subject: [U-Boot] Condition in bootcmd to run bootz else bootm Message-ID: <1441983617396-228003.post@n7.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.