Commit 52b984369fde8296c735575848075462e9112b69

Authored by Lukas Auer
Committed by Andes
1 parent 6e10e94ff7

riscv: qemu: support booting Linux

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>

Showing 3 changed files with 8 additions and 0 deletions Side-by-side Diff

configs/qemu-riscv32_defconfig
1 1 CONFIG_RISCV=y
2 2 CONFIG_TARGET_QEMU_VIRT=y
3 3 CONFIG_NR_DRAM_BANKS=1
  4 +CONFIG_FIT=y
4 5 CONFIG_DISPLAY_CPUINFO=y
5 6 CONFIG_DISPLAY_BOARDINFO=y
6 7 CONFIG_OF_PRIOR_STAGE=y
configs/qemu-riscv64_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_QEMU_VIRT=y
3 3 CONFIG_ARCH_RV64I=y
4 4 CONFIG_NR_DRAM_BANKS=1
  5 +CONFIG_FIT=y
5 6 CONFIG_DISPLAY_CPUINFO=y
6 7 CONFIG_DISPLAY_BOARDINFO=y
7 8 CONFIG_OF_PRIOR_STAGE=y
include/configs/qemu-riscv.h
... ... @@ -15,8 +15,14 @@
15 15  
16 16 #define CONFIG_SYS_MALLOC_LEN SZ_8M
17 17  
  18 +#define CONFIG_SYS_BOOTM_LEN SZ_16M
  19 +
18 20 /* Environment options */
19 21 #define CONFIG_ENV_SIZE SZ_4K
  22 +
  23 +#define CONFIG_EXTRA_ENV_SETTINGS \
  24 + "fdt_high=0xffffffffffffffff\0" \
  25 + "initrd_high=0xffffffffffffffff\0"
20 26  
21 27 #endif /* __CONFIG_H */