riscv: qemu: enable distro boot
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Thu, 22 Nov 2018 10:26:34 +0000 (11:26 +0100)
committerAndes <uboot@andestech.com>
Mon, 26 Nov 2018 05:57:33 +0000 (13:57 +0800)
Enable distro boot on the qemu-riscv32/64 boards. Supported boot target
devices are VirtIO and DHCP.

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

index b55644378a07b6d0cdb0e906f3cd2d6af617a9cc..6334d8c0fc7f542ea9a4b10ff50be5b290c9e6ae 100644 (file)
@@ -1,7 +1,9 @@
 CONFIG_RISCV=y
 CONFIG_TARGET_QEMU_VIRT=y
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_FIT=y
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
+# CONFIG_CMD_MII is not set
 CONFIG_OF_PRIOR_STAGE=y
index a542ac489391a970d983d9869ba9dd2c4d16e3af..2d9ead93a28dcb58bc6cd59b33284bcb936afaed 100644 (file)
@@ -1,8 +1,10 @@
 CONFIG_RISCV=y
 CONFIG_TARGET_QEMU_VIRT=y
 CONFIG_ARCH_RV64I=y
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_FIT=y
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
+# CONFIG_CMD_MII is not set
 CONFIG_OF_PRIOR_STAGE=y
index ba6a18f2e66e0da18bea8242cbbe188da574b22e..66d61bd896de09a43b4b90cfc0b97cd5174ff342 100644 (file)
 /* Environment options */
 #define CONFIG_ENV_SIZE                        SZ_4K
 
+#define BOOT_TARGET_DEVICES(func) \
+       func(VIRTIO, virtio, 0) \
+       func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "fdt_high=0xffffffffffffffff\0" \
-       "initrd_high=0xffffffffffffffff\0"
+       "initrd_high=0xffffffffffffffff\0" \
+       "kernel_addr_r=0x81000000\0" \
+       "fdt_addr_r=0x82000000\0" \
+       "scriptaddr=0x82100000\0" \
+       "pxefile_addr_r=0x82200000\0" \
+       "ramdisk_addr_r=0x82300000\0" \
+       BOOTENV
 
 #endif /* __CONFIG_H */