All of 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

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.