Hi,

On Mon, 2024-11-18 at 10:14 +0100, Cédric Le Goater wrote:
> > > also boots from the emmc controller. How do I provide the
> > > bus and bus index ? "bus=sdhci-bus.2" doesn't work for me.
> > > There is "sd-bus", but it does not have an index.
> 
> Yes. Changes are required in the sdhci model and in the boards using
> it.
> 
> > I've not really understood how to assemble more complex setups
> > using qemu's commandline when the board already creates some of the
> > devices.
> 
> Yes. That's a "problem" to fix for emmc/sd devices. They should only
> be created when defaults_enabled(), just like the flash devices.

This is -nodefaults, right? The man-page for that says:
  -nodefaults
         Don't  create default devices. Normally, QEMU sets the de‐
         fault devices like serial  port,  parallel  port,  virtual
         console,  monitor  device,  VGA adapter, floppy and CD-ROM
         drive and others. The -nodefaults option will disable  all
         those default devices.

That sounds like it would require explicit configuration of the devices
on the SoC (such as UARTs) as well? Having to specify them (perhaps
even with their MMIO addresses) doesn't seem convenient. :)

aspeed seems to only (or additionally?) skip creation of the flash
devices with -nodefaults.

Isn't there a way to configure only default devices as disabled? Or to
dynamically attach a user-created SD/eMMC device to an existing SD
controller?

In system/vl.c, I found 'default_sdcard', which is disabled in some
cases. I wasn't able to figure out how to use it or if it would help
for this use-case.

Jan

> > Perhaps Cédric can explain how the different boot options are
> > configured for aspeed?
> 
> See
> https://qemu.readthedocs.io/en/v9.1.0/system/arm/aspeed.html#boot-options
> and the avocado/functional tests for examples.
> 
> The eMMC case is missing from the docs. Here is a proposal :
> https://lore.kernel.org/qemu-devel/[email protected]/
> 
> Thanks,
> 
> C.

Reply via email to