riscv: qemu: support booting Linux
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Thu, 22 Nov 2018 10:26:31 +0000 (11:26 +0100)
committerAndes <uboot@andestech.com>
Mon, 26 Nov 2018 05:57:32 +0000 (13:57 +0800)
Support booting Linux (as payload of BBL) from FIT images. For this, the
default CONFIG_SYS_BOOTM_LEN is increased to 16 MB, and the environment
variables fdt_high and initrd_high are set to mark the device tree and
initrd as in-place.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
configs/qemu-riscv32_defconfig
configs/qemu-riscv64_defconfig
include/configs/qemu-riscv.h

index 72c54a3dd5c15b922cd74978f612a62d3a8ee4e4..b55644378a07b6d0cdb0e906f3cd2d6af617a9cc 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_RISCV=y
 CONFIG_TARGET_QEMU_VIRT=y
 CONFIG_NR_DRAM_BANKS=1
+CONFIG_FIT=y
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_OF_PRIOR_STAGE=y
index 44766c38f609bb0a90fc22b8b88df291a53e4a55..a542ac489391a970d983d9869ba9dd2c4d16e3af 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_RISCV=y
 CONFIG_TARGET_QEMU_VIRT=y
 CONFIG_ARCH_RV64I=y
 CONFIG_NR_DRAM_BANKS=1
+CONFIG_FIT=y
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_OF_PRIOR_STAGE=y
index d279c233b2c610dd6e9f632c18497db0bc1497e5..ba6a18f2e66e0da18bea8242cbbe188da574b22e 100644 (file)
 
 #define CONFIG_SYS_MALLOC_LEN          SZ_8M
 
+#define CONFIG_SYS_BOOTM_LEN           SZ_16M
+
 /* Environment options */
 #define CONFIG_ENV_SIZE                        SZ_4K
 
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       "fdt_high=0xffffffffffffffff\0" \
+       "initrd_high=0xffffffffffffffff\0"
+
 #endif /* __CONFIG_H */