I want to let u-boot select between 2 linux kernel images based on a criterion. For example, I have uImage1 and uImage2 in SPI, u-boot checks the CRC of uImage1 and if ok, boots up uImage1 else boots up uImage2. Is there an option in u-boot that I can use?
Thanks, Mani
You can just set you bootcmd variable to 'bootm 80000000; bootm 820000000'. If the first bootm fails (which it will if the CRC check fails) then the second will run. If the first succeeds then the second never gets a chance to run.
Uboot does support a scripting mechanism with constructs like 'for' and 'if' e.g.:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With