]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/boards: Do not create unusable default if=sd drives
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 4 Feb 2025 12:17:43 +0000 (13:17 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 16 Feb 2025 13:25:08 +0000 (14:25 +0100)
commit5824fad4e92e3d10de1ce86d900dcde8f8dfaf76
treee4f75944760894e9a4a11f0ef94df502263aa5c7
parentcdc8d7cadaac33ca103791a6ebb535a3ad9fa05f
hw/boards: Do not create unusable default if=sd drives

A number of machines create an if=sd drive by default even though
they lack an SD bus, and therefore cannot use the drive.

This drive is created when the machine sets flag
@auto_create_sdcard.

See for example running HMP "info block" on the HPPA C3700 machine:

  $ qemu-system-hppa -M C3700 -monitor stdio -S
  (qemu) info block

  floppy0: [not inserted]
      Removable device: not locked, tray closed

  sd0: [not inserted]
      Removable device: not locked, tray closed

  $ qemu-system-hppa -M C3700 -sd /bin/sh
  qemu-system-hppa: -sd /bin/sh: machine type does not support if=sd,bus=0,unit=0

Delete that from machines that lack an SD bus.

Note, only the ARM and RISCV targets use such feature:

 $ git grep -wl IF_SD hw | cut -d/ -f-2 | sort -u
 hw/arm
 hw/riscv
 $

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250204200934.65279-5-philmd@linaro.org>
51 files changed:
hw/alpha/dp264.c
hw/avr/arduino.c
hw/hppa/machine.c
hw/i386/pc.c
hw/i386/x86.c
hw/i386/xen/xen-pvh.c
hw/loongarch/virt.c
hw/m68k/an5206.c
hw/m68k/mcf5208.c
hw/m68k/next-cube.c
hw/m68k/q800.c
hw/m68k/virt.c
hw/microblaze/petalogix_ml605_mmu.c
hw/microblaze/petalogix_s3adsp1800_mmu.c
hw/microblaze/xlnx-zynqmp-pmu.c
hw/mips/boston.c
hw/mips/fuloong2e.c
hw/mips/jazz.c
hw/mips/loongson3_virt.c
hw/mips/malta.c
hw/mips/mipssim.c
hw/openrisc/openrisc_sim.c
hw/openrisc/virt.c
hw/ppc/amigaone.c
hw/ppc/e500plat.c
hw/ppc/mac_newworld.c
hw/ppc/mac_oldworld.c
hw/ppc/mpc8544ds.c
hw/ppc/pegasos2.c
hw/ppc/pnv.c
hw/ppc/ppc405_boards.c
hw/ppc/ppc440_bamboo.c
hw/ppc/prep.c
hw/ppc/sam460ex.c
hw/ppc/spapr.c
hw/ppc/virtex_ml507.c
hw/remote/machine.c
hw/rx/rx-gdbsim.c
hw/sh4/r2d.c
hw/sparc/leon3.c
hw/sparc/sun4m.c
hw/sparc64/niagara.c
hw/sparc64/sun4u.c
hw/tricore/triboard.c
hw/tricore/tricore_testboard.c
hw/xen/xen-pvh-common.c
hw/xenpv/xen_machine_pv.c
hw/xtensa/sim.c
hw/xtensa/virt.c
hw/xtensa/xtfpga.c
tests/qemu-iotests/172.out