diff mbox series

[v2,2/3] config.mk: Update QEMU run command for generic and sifive fu540 platforms

Message ID 1593134764-16743-2-git-send-email-bmeng.cn@gmail.com
State Accepted
Headers show
Series [v2,1/3] docs/platform: Update QEMU parameter for fw_payload | expand

Commit Message

Bin Meng June 26, 2020, 1:26 a.m. UTC
From: Bin Meng <bin.meng@windriver.com>

Since QEMU v5.1, if there is no "-bios" option provided, the default
OpenSBI firmware will be loaded by QEMU as the BIOS automatically,
hence to load fw_payload type image, we should explicitly pass the
"-bios" option to QEMU.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
---

(no changes since v1)

 platform/generic/config.mk      | 2 +-
 platform/sifive/fu540/config.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Anup Patel June 29, 2020, 4:49 a.m. UTC | #1
> -----Original Message-----
> From: opensbi <opensbi-bounces@lists.infradead.org> On Behalf Of Bin
> Meng
> Sent: 26 June 2020 06:56
> To: Atish Patra <Atish.Patra@wdc.com>; opensbi@lists.infradead.org
> Cc: Bin Meng <bin.meng@windriver.com>
> Subject: [PATCH v2 2/3] config.mk: Update QEMU run command for generic
> and sifive fu540 platforms
> 
> From: Bin Meng <bin.meng@windriver.com>
> 
> Since QEMU v5.1, if there is no "-bios" option provided, the default OpenSBI
> firmware will be loaded by QEMU as the BIOS automatically, hence to load
> fw_payload type image, we should explicitly pass the "-bios" option to
> QEMU.
> 
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> Reviewed-by: Atish Patra <atish.patra@wdc.com>
> ---
> 
> (no changes since v1)
> 
>  platform/generic/config.mk      | 2 +-
>  platform/sifive/fu540/config.mk | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/platform/generic/config.mk b/platform/generic/config.mk index
> 8d63ece..8151974 100644
> --- a/platform/generic/config.mk
> +++ b/platform/generic/config.mk
> @@ -15,7 +15,7 @@ platform-ldflags-y =
> 
>  # Command for platform specific "make run"
>  platform-runcmd = qemu-system-riscv$(PLATFORM_RISCV_XLEN) -M virt -
> m 256M \
> -  -nographic -kernel $(build_dir)/platform/generic/firmware/fw_payload.elf
> +  -nographic -bios
> + $(build_dir)/platform/generic/firmware/fw_payload.elf
> 
>  # Blobs to build
>  FW_TEXT_START=0x80000000
> diff --git a/platform/sifive/fu540/config.mk
> b/platform/sifive/fu540/config.mk index e76adcd..23169b1 100644
> --- a/platform/sifive/fu540/config.mk
> +++ b/platform/sifive/fu540/config.mk
> @@ -15,7 +15,7 @@ platform-ldflags-y =
> 
>  # Command for platform specific "make run"
>  platform-runcmd = qemu-system-riscv$(PLATFORM_RISCV_XLEN) -M
> sifive_u -m 256M \
> -  -nographic -kernel
> $(build_dir)/platform/sifive/fu540/firmware/fw_payload.elf
> +  -nographic -bios
> + $(build_dir)/platform/sifive/fu540/firmware/fw_payload.elf
> 
>  # Blobs to build
>  FW_TEXT_START=0x80000000
> --
> 2.7.4
> 
> 
> --
> opensbi mailing list
> opensbi@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup
diff mbox series

Patch

diff --git a/platform/generic/config.mk b/platform/generic/config.mk
index 8d63ece..8151974 100644
--- a/platform/generic/config.mk
+++ b/platform/generic/config.mk
@@ -15,7 +15,7 @@  platform-ldflags-y =
 
 # Command for platform specific "make run"
 platform-runcmd = qemu-system-riscv$(PLATFORM_RISCV_XLEN) -M virt -m 256M \
-  -nographic -kernel $(build_dir)/platform/generic/firmware/fw_payload.elf
+  -nographic -bios $(build_dir)/platform/generic/firmware/fw_payload.elf
 
 # Blobs to build
 FW_TEXT_START=0x80000000
diff --git a/platform/sifive/fu540/config.mk b/platform/sifive/fu540/config.mk
index e76adcd..23169b1 100644
--- a/platform/sifive/fu540/config.mk
+++ b/platform/sifive/fu540/config.mk
@@ -15,7 +15,7 @@  platform-ldflags-y =
 
 # Command for platform specific "make run"
 platform-runcmd = qemu-system-riscv$(PLATFORM_RISCV_XLEN) -M sifive_u -m 256M \
-  -nographic -kernel $(build_dir)/platform/sifive/fu540/firmware/fw_payload.elf
+  -nographic -bios $(build_dir)/platform/sifive/fu540/firmware/fw_payload.elf
 
 # Blobs to build
 FW_TEXT_START=0x80000000