summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2020-04-03 19:58:24 -0700
committerTom Rini <trini@konsulko.com>2020-04-24 10:10:01 -0400
commitec8eef5e71e4d876324aa81b3c394822d8ef1eb6 (patch)
treea90cdc4b7d25e8199a210448987c0ece7ed55a40 /include
parentebfe611be91e0075c040588a30a9996519d30aa6 (diff)
downloadu-boot-ec8eef5e71e4d876324aa81b3c394822d8ef1eb6.tar.gz
u-boot-ec8eef5e71e4d876324aa81b3c394822d8ef1eb6.tar.bz2
u-boot-ec8eef5e71e4d876324aa81b3c394822d8ef1eb6.zip
fvp: Add support for loading Android boot images via semihosting
FVP now loads an Android boot image named boot.img if available, otherwise it falls back to the existing code path. Signed-off-by: Peter Collingbourne <pcc@google.com> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/configs/vexpress_aemv8a.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index 9a9cec414c..4f3a792f49 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -177,16 +177,26 @@
"initrd_addr=0x88000000\0" \
"fdtfile=devtree.dtb\0" \
"fdt_addr=0x83000000\0" \
- "fdt_high=0xffffffffffffffff\0" \
- "initrd_high=0xffffffffffffffff\0"
-
-#define CONFIG_BOOTCOMMAND "smhload ${kernel_name} ${kernel_addr}; " \
- "smhload ${fdtfile} ${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"
+ "boot_name=boot.img\0" \
+ "boot_addr=0x8007f800\0"
+
+#define CONFIG_BOOTCOMMAND "if smhload ${boot_name} ${boot_addr}; then " \
+ " set bootargs; " \
+ " abootimg addr ${boot_addr}; " \
+ " abootimg get dtb --index=0 fdt_addr; " \
+ " bootm ${boot_addr} ${boot_addr} " \
+ " ${fdt_addr}; " \
+ "else; " \
+ " set fdt_high 0xffffffffffffffff; " \
+ " set initrd_high 0xffffffffffffffff; " \
+ " smhload ${kernel_name} ${kernel_addr}; " \
+ " smhload ${fdtfile} ${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; " \
+ "fi"
#endif