U-boot - choose the correct linux image

I want u-boot to choose between two Linux Linux images based on a criterion. For example, I have uImage1 and uImage2 in SPI, u-boot checks the CRC of uImage1, and, if everything is fine, loads uImage1, still loads uImage2. Is there an option in u-boot that I can use?

Thanks Mani

+4
source share
1 answer

You can simply set the bootcmd variable to `bootm 80000000; bootm 820000000 '. If the first bootm fails (what happens if the CRC check fails), then the second will be executed. If the first succeeds, then the second will never get a chance to launch.

Uboot supports a scripting mechanism with constructs such as for and if, for example:

for part in ${partition_list} do if nfs ${loadaddr} ${nfs_update_prefix}.${part} echo Partition ${part} loaded at ${loadaddr}. echo Do something with it here. else echo Partition ${part} not found. fi done 
+7
source

All Articles