diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2017-03-02 15:26:01 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2017-07-07 08:39:39 +0100 |
commit | 14b9c852f21e3a11e6988e86a9e346a4068cd555 (patch) | |
tree | 93d222bdd1041d3a3ff1431f33066dfb260bb606 | |
parent | f4433991b4608ae895e00d050bf40d6ab67f0d5a (diff) |
vexpress64: fvp: boot from DRAM if semihosting fails
If devtree.dtb, ramdisk.img and Image exist, boot via semihosting.
If we partially load from semihosting, then fail, stop loading.
If nothing loads from semihosting, boot from whatever is in DRAM.
note: semihosting expects to load an initrd without a u-boot header and
sets the chosen node with the initrd address and length. We don't know
the length of the initrd in the DRAM method, so it will need a u-boot
header so booti can load it.
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rw-r--r-- | include/configs/vexpress_aemv8a.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h index de31313998..977d2f0d49 100644 --- a/include/configs/vexpress_aemv8a.h +++ b/include/configs/vexpress_aemv8a.h @@ -224,13 +224,25 @@ "systemd.log_target=null "\ "loglevel=9" -#define CONFIG_BOOTCOMMAND "smhload ${kernel_name} ${kernel_addr}; " \ - "smhload ${fdt_name} ${fdt_addr}; " \ - "smhload ${initrd_name} ${initrd_addr} "\ - "initrd_end; " \ - "fdt addr ${fdt_addr}; fdt resize; " \ - "fdt chosen ${initrd_addr} ${initrd_end}; " \ - "booti $kernel_addr - $fdt_addr" +#define CONFIG_BOOTCOMMAND "if smhload ${fdt_name} ${fdt_addr}; then "\ + " if smhload ${initrd_name} ${initrd_addr} "\ + " initrd_end; then " \ + " if smhload ${kernel_name} "\ + " ${kernel_addr}; then " \ + " fdt addr ${fdt_addr}; fdt resize; "\ + " fdt chosen ${initrd_addr} "\ + " ${initrd_end}; "\ + " booti ${kernel_addr} - ${fdt_addr}; "\ + " else; " \ + " exit; " \ + " fi; " \ + " else; " \ + " exit; " \ + " fi; " \ + "fi; " \ + "echo semihosting load failed, try booting "\ + "with contents of DRAM; " \ + "booti $kernel_addr $initrd_addr $fdt_addr" #elif CONFIG_TARGET_VEXPRESS64_BASE_FVP_DRAM |