Dasharo / dasharo-issues

The Dasharo issue tracker
https://dasharo.com/
24 stars 0 forks source link

Firmware update for QEMU to extend Dasharo ecosystem testability #542

Open pietrushnic opened 10 months ago

pietrushnic commented 10 months ago

The problem you're addressing (if any)

Currently, we use only firmware binary file replacement on the host system, QEMU runs. This limits the scope of possible tests, excluding capsule updates and flashrom testing. It also limits the DTS and potential fwupd/LVFS testing scope.

Describe the solution you'd like

Out QEMU Q35 release should support some (even fake) update methods, which would work from the perspective of the user and operating system.

Where is the value to a user, and who might that user be?

Extended validation scope will help keep the Dasharo release stable and reliable.

Describe alternatives you've considered

No response

Additional context

No response

tlaurion commented 10 months ago

Related https://github.com/osresearch/heads/issues/1203

krystian-hebel commented 4 months ago

QEMU Q35 is able to write to flash file when it is mounted as -drive if=pflash.

Writing itself is very peculiar, code for doing so can be found in https://github.com/tianocore/edk2/blob/master/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c, I wasn't able to find any concrete documentation on this. It is different from real-life flash devices, i.e. you don't have to erase before writing, write is able to change bits both ways (1 to 0 and 0 to 1). Erase is still available, probably to make higher level APIs at least somewhat similar to physical devices. Block size seems to be 4K (https://github.com/tianocore/edk2/blob/987bea6525d70cd01649472c93d19f89d41d83a2/OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc#L72, https://github.com/tianocore/edk2/blob/987bea6525d70cd01649472c93d19f89d41d83a2/OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc#L11), not sure if this is configurable.

tlaurion commented 4 months ago

Ideal would be flashrom/flashprog support

krystian-hebel commented 3 months ago

When doing preliminary tests for QEMU Q35 v0.2.0 I got an error on DTS test in network-boot.robot. Since SMBIOS says that it already is Dasharo firmware, DTS doesn't show Install Dasharo firmware, and since there is no update known to DTS, there is no Update Dasharo firmware. We don't plan to include any form of firmware update in this release, so this error will have to be listed as a known issue until we implement Capsule Updates.