diff mbox series

[U-Boot,v3,25/28] riscv: qemu: enable distro boot

Message ID 20181109125923.7034-26-lukas.auer@aisec.fraunhofer.de
State Superseded
Delegated to: Andes
Headers show
Series General fixes / cleanup for RISC-V and improvements to qemu-riscv | expand

Commit Message

Lukas Auer Nov. 9, 2018, 12:59 p.m. UTC
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>
---

Changes in v3:
- New patch to enable distro boot on qemu-riscv32/64

Changes in v2: None

 configs/qemu-riscv32_defconfig |  2 ++
 configs/qemu-riscv64_defconfig |  2 ++
 include/configs/qemu-riscv.h   | 14 +++++++++++++-
 3 files changed, 17 insertions(+), 1 deletion(-)

Comments

Bin Meng Nov. 13, 2018, 5:57 a.m. UTC | #1
On Fri, Nov 9, 2018 at 9:00 PM Lukas Auer
<lukas.auer@aisec.fraunhofer.de> wrote:
>
> 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>
> ---
>
> Changes in v3:
> - New patch to enable distro boot on qemu-riscv32/64
>
> Changes in v2: None
>
>  configs/qemu-riscv32_defconfig |  2 ++
>  configs/qemu-riscv64_defconfig |  2 ++
>  include/configs/qemu-riscv.h   | 14 +++++++++++++-
>  3 files changed, 17 insertions(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Alexander Graf Nov. 13, 2018, 8:57 a.m. UTC | #2
On 09.11.18 13:59, Lukas Auer wrote:
> 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: Alexander Graf <agraf@suse.de>


Alex
diff mbox series

Patch

diff --git a/configs/qemu-riscv32_defconfig b/configs/qemu-riscv32_defconfig
index b55644378a..6334d8c0fc 100644
--- a/configs/qemu-riscv32_defconfig
+++ b/configs/qemu-riscv32_defconfig
@@ -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
diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
index a542ac4893..2d9ead93a2 100644
--- a/configs/qemu-riscv64_defconfig
+++ b/configs/qemu-riscv64_defconfig
@@ -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
diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
index ba6a18f2e6..66d61bd896 100644
--- a/include/configs/qemu-riscv.h
+++ b/include/configs/qemu-riscv.h
@@ -20,8 +20,20 @@ 
 /* 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 */