[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: backing storage for eMMC boot partitions
From: |
Cédric Le Goater |
Subject: |
Re: backing storage for eMMC boot partitions |
Date: |
Mon, 18 Nov 2024 13:36:38 +0100 |
User-agent: |
Mozilla Thunderbird |
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. :)
I don't think the -nodefaults option applies to the platform devices.
These are part of the SoC and can not be replaced/removed on a real
config. However, any device attached to some bus, flash, eMMC, I2C,
PCI, etc. is a good candidate. Some would say that these devices
are soldered on the board. This is not always the case (some are in
sockets) and since HW vendors offer boards with different topologies,
I think we can leverage QEMU to define custom boards on the command
line.
aspeed seems to only (or additionally?) skip creation of the flash
devices with -nodefaults.
Yes. Flash devices were a good (first) candidate. The goal was to
extend testing to all SPI controllers (some SoCs have 8) and also
to limit the proliferation of boards having only one different
flash model.
There is a cost to it :
- it complexifies the command line
- the machine boots in "execute-in-place" mode which is what HW
does, so the model is much more precise, but it is also slower
in emulation.
We thought about doing the same for I2C. Given the amount of I2C
devices on some boards, it didn't seem reasonable and the need
for it was limited. We can still attach on the command line I2C
devices and discover them after boot.
Isn't there a way to configure only default devices as disabled?
That's -nodefaults or I am misunderstanding. Am I ?
Or to
dynamically attach a user-created SD/eMMC device to an existing SD
controller?
QEMU lacks a way to identify the SD bus the user wants to attach the
device to.
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.
May be Philippe can answer. I am not an sd person.
Thanks,
C.