Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly
@ 2024-10-26 11:00 Romain Naour via buildroot
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 2/5] configs/qemu_nios2_10m50: delete config Romain Naour via buildroot
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Romain Naour via buildroot @ 2024-10-26 11:00 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

From: Waldemar Brodkorb <wbx@openadk.org>

Qemu 9.1 recently fixed the RISC-V virt target by adding the missing
default type for block devices [1].

But the qemu command line we use for RISC-V virt is slightly incorrect:

  -drive file=rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0

With Qemu 9.1, this command line now rejected since it conflict with
the new default bus:

  qemu-system-riscv64: -drive file=rootfs.ext2,format=raw,id=hd0: Drive 'hd0' is already in use because it has been automatically connected to another device (did you need 'if=none' in the drive options?)

Since we are currently still using Qemu 9.0, apply the suggested change by
adding 'if=none'.

Note: '-drive file=rootfs.ext2,format=raw,id=hd0' can be removed
in a followup patch after the qemu version bump 9.1 is merged.

[1] https://gitlab.com/qemu-project/qemu/-/commit/4406ba2b5efce6af64905f827ca244f699db8170

[Romain: rework the commit log]
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 board/qemu/riscv32-virt/readme.txt     | 4 ++--
 board/qemu/riscv64-virt-efi/readme.txt | 2 +-
 board/qemu/riscv64-virt/readme.txt     | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/board/qemu/riscv32-virt/readme.txt b/board/qemu/riscv32-virt/readme.txt
index 555924f949..048306cd54 100644
--- a/board/qemu/riscv32-virt/readme.txt
+++ b/board/qemu/riscv32-virt/readme.txt
@@ -1,7 +1,7 @@
 Run Linux in emulation with:
 
-  qemu-system-riscv32 -M virt -bios output/images/fw_jump.elf -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv32_virt_defconfig
+  qemu-system-riscv32 -M virt -bios output/images/fw_jump.elf -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0,if=none -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv32_virt_defconfig
 
-  qemu-system-riscv32 -M virt -bios none -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -nographic -cpu rv32,mmu=off -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 # qemu_riscv32_nommu_virt_defconfig
+  qemu-system-riscv32 -M virt -bios none -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0,if=none -device virtio-blk-device,drive=hd0 -nographic -cpu rv32,mmu=off -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 # qemu_riscv32_nommu_virt_defconfig
 
 The login prompt will appear in the terminal that started Qemu.
diff --git a/board/qemu/riscv64-virt-efi/readme.txt b/board/qemu/riscv64-virt-efi/readme.txt
index 6b9651a011..c7b3177af1 100644
--- a/board/qemu/riscv64-virt-efi/readme.txt
+++ b/board/qemu/riscv64-virt-efi/readme.txt
@@ -22,7 +22,7 @@ Run the emulation with:
         -blockdev node-name=pflash0,driver=file,read-only=on,filename=output/images/RISCV_VIRT_CODE.fd \
         -blockdev node-name=pflash1,driver=file,filename=output/images/RISCV_VIRT_VARS.fd \
         \
-        -drive file=output/images/disk.img,format=raw,id=hd0 \
+        -drive file=output/images/disk.img,format=raw,id=hd0,if=none \
         -device virtio-blk-device,drive=hd0 \
         \
         -netdev user,id=net0 \
diff --git a/board/qemu/riscv64-virt/readme.txt b/board/qemu/riscv64-virt/readme.txt
index f1c7bf41b5..5b3bb85b4b 100644
--- a/board/qemu/riscv64-virt/readme.txt
+++ b/board/qemu/riscv64-virt/readme.txt
@@ -1,7 +1,7 @@
 Run Linux in emulation with:
 
-  qemu-system-riscv64 -M virt -bios output/images/fw_jump.elf -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv64_virt_defconfig
+  qemu-system-riscv64 -M virt -bios output/images/fw_jump.elf -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0,if=none -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv64_virt_defconfig
 
-  qemu-system-riscv64 -M virt -bios none -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -nographic -cpu rv64,mmu=off -netdev user,id=net0 -device virtio-net-device,netdev=net0 # qemu_riscv64_nommu_virt_defconfig
+  qemu-system-riscv64 -M virt -bios none -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0,if=none -device virtio-blk-device,drive=hd0 -nographic -cpu rv64,mmu=off -netdev user,id=net0 -device virtio-net-device,netdev=net0 # qemu_riscv64_nommu_virt_defconfig
 
 The login prompt will appear in the terminal that started Qemu.
-- 
2.45.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 2/5] configs/qemu_nios2_10m50: delete config
  2024-10-26 11:00 [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Romain Naour via buildroot
@ 2024-10-26 11:00 ` Romain Naour via buildroot
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 3/5] package/qemu: remove leftover QEMU_IGNORE_CVES from Qemu 8.1 Romain Naour via buildroot
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Romain Naour via buildroot @ 2024-10-26 11:00 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

From: Waldemar Brodkorb <wbx@openadk.org>

Qemu 9.1.0 removed support for NIOS2 emulation, so we can't
no longer test it when updating Qemu zo 9.1.0.
Furthermore it seems that NIOS2 architecture will be soon
deprecated in the toolchain support.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 board/qemu/nios2-10m50/linux.fragment |  3 ---
 board/qemu/nios2-10m50/readme.txt     |  5 -----
 configs/qemu_nios2_10m50_defconfig    | 15 ---------------
 3 files changed, 23 deletions(-)
 delete mode 100644 board/qemu/nios2-10m50/linux.fragment
 delete mode 100644 board/qemu/nios2-10m50/readme.txt
 delete mode 100644 configs/qemu_nios2_10m50_defconfig

diff --git a/board/qemu/nios2-10m50/linux.fragment b/board/qemu/nios2-10m50/linux.fragment
deleted file mode 100644
index c7647cee8a..0000000000
--- a/board/qemu/nios2-10m50/linux.fragment
+++ /dev/null
@@ -1,3 +0,0 @@
-# Embed the DTB in the kernel image
-CONFIG_NIOS2_DTB_SOURCE_BOOL=y
-CONFIG_NIOS2_DTB_SOURCE="10m50_devboard.dts"
diff --git a/board/qemu/nios2-10m50/readme.txt b/board/qemu/nios2-10m50/readme.txt
deleted file mode 100644
index f8f8f3b3a5..0000000000
--- a/board/qemu/nios2-10m50/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Run the emulation with:
-
-  qemu-system-nios2 -kernel output/images/vmlinux -nographic # qemu_nios2_10m50_defconfig
-
-The login prompt will appear in the terminal that started Qemu.
diff --git a/configs/qemu_nios2_10m50_defconfig b/configs/qemu_nios2_10m50_defconfig
deleted file mode 100644
index 8b8b4524bd..0000000000
--- a/configs/qemu_nios2_10m50_defconfig
+++ /dev/null
@@ -1,15 +0,0 @@
-BR2_nios2=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
-BR2_GLOBAL_PATCH_DIR="board/qemu/patches"
-BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32"
-BR2_LINUX_KERNEL_DEFCONFIG="10m50"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/nios2-10m50/linux.fragment"
-BR2_TARGET_ROOTFS_INITRAMFS=y
-BR2_PACKAGE_HOST_QEMU=y
-BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-- 
2.45.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 3/5] package/qemu: remove leftover QEMU_IGNORE_CVES from Qemu 8.1
  2024-10-26 11:00 [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Romain Naour via buildroot
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 2/5] configs/qemu_nios2_10m50: delete config Romain Naour via buildroot
@ 2024-10-26 11:00 ` Romain Naour via buildroot
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 4/5] package/qemu: update to 9.1.0 Romain Naour via buildroot
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Romain Naour via buildroot @ 2024-10-26 11:00 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Theses CVE are no longer listed by pkg-stats:

  https://nvd.nist.gov/vuln/detail/CVE-2023-4135
  https://nvd.nist.gov/vuln/detail/CVE-2023-3354
  https://nvd.nist.gov/vuln/detail/CVE-2023-3180

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 package/qemu/qemu.mk | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 16cff13d18..a2d164d189 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -17,12 +17,6 @@ QEMU_LICENSE_FILES = COPYING COPYING.LIB
 #       individual source files.
 QEMU_CPE_ID_VENDOR = qemu
 
-# Need to ignore the following CVEs because the CPE database does
-# not have an entry for the 8.1.1 version yet.
-QEMU_IGNORE_CVES += CVE-2023-4135
-QEMU_IGNORE_CVES += CVE-2023-3354
-QEMU_IGNORE_CVES += CVE-2023-3180
-
 #-------------------------------------------------------------
 
 # The build system is now partly based on Meson.
-- 
2.45.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 4/5] package/qemu: update to 9.1.0
  2024-10-26 11:00 [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Romain Naour via buildroot
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 2/5] configs/qemu_nios2_10m50: delete config Romain Naour via buildroot
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 3/5] package/qemu: remove leftover QEMU_IGNORE_CVES from Qemu 8.1 Romain Naour via buildroot
@ 2024-10-26 11:00 ` Romain Naour via buildroot
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 5/5] board/qemu/riscv{32, 64}-virt: remove virtio-blk-device, drive=hd0 Romain Naour via buildroot
  2024-10-28 21:36 ` [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Thomas Petazzoni via buildroot
  4 siblings, 0 replies; 6+ messages in thread
From: Romain Naour via buildroot @ 2024-10-26 11:00 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

From: Waldemar Brodkorb <wbx@openadk.org>

See here for changes:
https://wiki.qemu.org/ChangeLog/9.1

The support for the nios2 architecture got removed.

[Romain: Remove BR2_PACKAGE_QEMU_TARGET_NIOS2 from qemu.mk]
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 Config.in.legacy            | 6 ++++++
 package/qemu/Config.in      | 5 -----
 package/qemu/Config.in.host | 1 -
 package/qemu/qemu.hash      | 2 +-
 package/qemu/qemu.mk        | 4 +---
 5 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 4a47a2dda1..b478de809b 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,12 @@ endif
 
 comment "Legacy options removed in 2024.11"
 
+config BR2_PACKAGE_QEMU_TARGET_NIOS2
+	bool "Qemu NIOS2 support has been removed"
+	select BR2_LEGACY
+	help
+	  Qemu NIOS2 support has been removed.
+
 config BR2_KERNEL_HEADERS_6_10
 	bool "kernel headers version 6.10.x are no longer supported"
 	select BR2_LEGACY
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 608e4d429d..2d15ab1ea9 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -252,11 +252,6 @@ config BR2_PACKAGE_QEMU_TARGET_MIPSN32EL
 	help
 	  MIPS N32 architecture, little-endian.
 
-config BR2_PACKAGE_QEMU_TARGET_NIOS2
-	bool "nios2"
-	help
-	  Nios II architecture.
-
 config BR2_PACKAGE_QEMU_TARGET_OR1K
 	bool "or1k"
 	select BR2_PACKAGE_QEMU_FDT if BR2_PACKAGE_QEMU_SYSTEM
diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
index 8dd0c7d11b..4db114490a 100644
--- a/package/qemu/Config.in.host
+++ b/package/qemu/Config.in.host
@@ -9,7 +9,6 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
 	default y if BR2_microblazebe
 	default y if BR2_mips
 	default y if BR2_mipsel
-	default y if BR2_nios2
 	default y if BR2_or1k
 	default y if BR2_powerpc
 	default y if BR2_powerpc64
diff --git a/package/qemu/qemu.hash b/package/qemu/qemu.hash
index 419dd0d1b3..169fe05068 100644
--- a/package/qemu/qemu.hash
+++ b/package/qemu/qemu.hash
@@ -1,4 +1,4 @@
 # Locally computed, tarball verified with GPG signature
-sha256  a8c3f596aece96da3b00cafb74baafa0d14515eafb8ed1ee3f7f5c2d0ebf02b6  qemu-9.0.2.tar.xz
+sha256  816b7022a8ba7c2ac30e2e0cf973e826f6bcc8505339603212c5ede8e94d7834  qemu-9.1.0.tar.xz
 sha256  6f04ae8364d0079a192b14635f4b1da294ce18724c034c39a6a41d1b09df6100  COPYING
 sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING.LIB
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index a2d164d189..76394b3e77 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -6,7 +6,7 @@
 
 # When updating the version, check whether the list of supported targets
 # needs to be updated.
-QEMU_VERSION = 9.0.2
+QEMU_VERSION = 9.1.0
 QEMU_SOURCE = qemu-$(QEMU_VERSION).tar.xz
 QEMU_SITE = https://download.qemu.org
 QEMU_SELINUX_MODULES = qemu virt
@@ -63,7 +63,6 @@ QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_MIPS) += mips-softmmu
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_MIPS64) += mips64-softmmu
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_MIPS64EL) += mips64el-softmmu
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_MIPSEL) += mipsel-softmmu
-QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_NIOS2) += nios2-softmmu
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_OR1K) += or1k-softmmu
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_PPC) += ppc-softmmu
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_PPC64) += ppc64-softmmu
@@ -104,7 +103,6 @@ QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_MIPS64EL) += mips64el-linux-user
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_MIPSEL) += mipsel-linux-user
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_MIPSN32) += mipsn32-linux-user
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_MIPSN32EL) += mipsn32el-linux-user
-QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_NIOS2) += nios2-linux-user
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_OR1K) += or1k-linux-user
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_PPC) += ppc-linux-user
 QEMU_TARGET_LIST_$(BR2_PACKAGE_QEMU_TARGET_PPC64) += ppc64-linux-user
-- 
2.45.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 5/5] board/qemu/riscv{32, 64}-virt: remove virtio-blk-device, drive=hd0
  2024-10-26 11:00 [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Romain Naour via buildroot
                   ` (2 preceding siblings ...)
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 4/5] package/qemu: update to 9.1.0 Romain Naour via buildroot
@ 2024-10-26 11:00 ` Romain Naour via buildroot
  2024-10-28 21:36 ` [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Thomas Petazzoni via buildroot
  4 siblings, 0 replies; 6+ messages in thread
From: Romain Naour via buildroot @ 2024-10-26 11:00 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Qemu 9.1 recently fixed the RISC-V virt target by adding the missing
default type for block devices [1].

We no longer need to specify virtio-blk-device on the qemu command line
since it's already the default.

[1] https://gitlab.com/qemu-project/qemu/-/commit/4406ba2b5efce6af64905f827ca244f699db8170

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Waldemar Brodkorb <wbx@openadk.org>
---
 board/qemu/riscv32-virt/readme.txt     | 4 ++--
 board/qemu/riscv64-virt-efi/readme.txt | 3 +--
 board/qemu/riscv64-virt/readme.txt     | 4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/board/qemu/riscv32-virt/readme.txt b/board/qemu/riscv32-virt/readme.txt
index 048306cd54..c2ac27121f 100644
--- a/board/qemu/riscv32-virt/readme.txt
+++ b/board/qemu/riscv32-virt/readme.txt
@@ -1,7 +1,7 @@
 Run Linux in emulation with:
 
-  qemu-system-riscv32 -M virt -bios output/images/fw_jump.elf -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0,if=none -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv32_virt_defconfig
+  qemu-system-riscv32 -M virt -bios output/images/fw_jump.elf -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv32_virt_defconfig
 
-  qemu-system-riscv32 -M virt -bios none -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0,if=none -device virtio-blk-device,drive=hd0 -nographic -cpu rv32,mmu=off -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 # qemu_riscv32_nommu_virt_defconfig
+  qemu-system-riscv32 -M virt -bios none -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw -nographic -cpu rv32,mmu=off -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 # qemu_riscv32_nommu_virt_defconfig
 
 The login prompt will appear in the terminal that started Qemu.
diff --git a/board/qemu/riscv64-virt-efi/readme.txt b/board/qemu/riscv64-virt-efi/readme.txt
index c7b3177af1..10d4ed966f 100644
--- a/board/qemu/riscv64-virt-efi/readme.txt
+++ b/board/qemu/riscv64-virt-efi/readme.txt
@@ -22,8 +22,7 @@ Run the emulation with:
         -blockdev node-name=pflash0,driver=file,read-only=on,filename=output/images/RISCV_VIRT_CODE.fd \
         -blockdev node-name=pflash1,driver=file,filename=output/images/RISCV_VIRT_VARS.fd \
         \
-        -drive file=output/images/disk.img,format=raw,id=hd0,if=none \
-        -device virtio-blk-device,drive=hd0 \
+        -drive file=output/images/disk.img,format=raw \
         \
         -netdev user,id=net0 \
         -device virtio-net-device,netdev=net0 # qemu_riscv64_virt_efi_defconfig
diff --git a/board/qemu/riscv64-virt/readme.txt b/board/qemu/riscv64-virt/readme.txt
index 5b3bb85b4b..d7b198842b 100644
--- a/board/qemu/riscv64-virt/readme.txt
+++ b/board/qemu/riscv64-virt/readme.txt
@@ -1,7 +1,7 @@
 Run Linux in emulation with:
 
-  qemu-system-riscv64 -M virt -bios output/images/fw_jump.elf -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0,if=none -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv64_virt_defconfig
+  qemu-system-riscv64 -M virt -bios output/images/fw_jump.elf -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv64_virt_defconfig
 
-  qemu-system-riscv64 -M virt -bios none -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0,if=none -device virtio-blk-device,drive=hd0 -nographic -cpu rv64,mmu=off -netdev user,id=net0 -device virtio-net-device,netdev=net0 # qemu_riscv64_nommu_virt_defconfig
+  qemu-system-riscv64 -M virt -bios none -kernel output/images/Image -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw -nographic -cpu rv64,mmu=off -netdev user,id=net0 -device virtio-net-device,netdev=net0 # qemu_riscv64_nommu_virt_defconfig
 
 The login prompt will appear in the terminal that started Qemu.
-- 
2.45.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly
  2024-10-26 11:00 [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Romain Naour via buildroot
                   ` (3 preceding siblings ...)
  2024-10-26 11:00 ` [Buildroot] [PATCH v3 5/5] board/qemu/riscv{32, 64}-virt: remove virtio-blk-device, drive=hd0 Romain Naour via buildroot
@ 2024-10-28 21:36 ` Thomas Petazzoni via buildroot
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-28 21:36 UTC (permalink / raw)
  To: Romain Naour via buildroot; +Cc: Romain Naour

On Sat, 26 Oct 2024 13:00:55 +0200
Romain Naour via buildroot <buildroot@buildroot.org> wrote:

> From: Waldemar Brodkorb <wbx@openadk.org>
> 
> Qemu 9.1 recently fixed the RISC-V virt target by adding the missing
> default type for block devices [1].
> 
> But the qemu command line we use for RISC-V virt is slightly incorrect:
> 
>   -drive file=rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0
> 
> With Qemu 9.1, this command line now rejected since it conflict with
> the new default bus:
> 
>   qemu-system-riscv64: -drive file=rootfs.ext2,format=raw,id=hd0: Drive 'hd0' is already in use because it has been automatically connected to another device (did you need 'if=none' in the drive options?)
> 
> Since we are currently still using Qemu 9.0, apply the suggested change by
> adding 'if=none'.
> 
> Note: '-drive file=rootfs.ext2,format=raw,id=hd0' can be removed
> in a followup patch after the qemu version bump 9.1 is merged.
> 
> [1] https://gitlab.com/qemu-project/qemu/-/commit/4406ba2b5efce6af64905f827ca244f699db8170
> 
> [Romain: rework the commit log]
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
>  board/qemu/riscv32-virt/readme.txt     | 4 ++--
>  board/qemu/riscv64-virt-efi/readme.txt | 2 +-
>  board/qemu/riscv64-virt/readme.txt     | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)

Thanks, series applied!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-28 21:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-26 11:00 [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Romain Naour via buildroot
2024-10-26 11:00 ` [Buildroot] [PATCH v3 2/5] configs/qemu_nios2_10m50: delete config Romain Naour via buildroot
2024-10-26 11:00 ` [Buildroot] [PATCH v3 3/5] package/qemu: remove leftover QEMU_IGNORE_CVES from Qemu 8.1 Romain Naour via buildroot
2024-10-26 11:00 ` [Buildroot] [PATCH v3 4/5] package/qemu: update to 9.1.0 Romain Naour via buildroot
2024-10-26 11:00 ` [Buildroot] [PATCH v3 5/5] board/qemu/riscv{32, 64}-virt: remove virtio-blk-device, drive=hd0 Romain Naour via buildroot
2024-10-28 21:36 ` [Buildroot] [PATCH v3 1/5] board/qemu/riscv{32, 64}-virt: do not use the default bus implicitly Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox