On Thu, Jul 30, 2026 at 12:37:46PM -0700, Elliot Berman wrote:

> Following the flow used for qemu-arm64, probe the pflash MTD device
> and set dfu_alt_info/mtdparts for qemu-x86 and qemu-x86_64 so EFI
> capsule updates can target the u-boot pflash partition.
> 
> Signed-off-by: Elliot Berman <[email protected]>
[snip]
> diff --git a/board/emulation/common/qemu_dfu.c 
> b/board/emulation/common/qemu_dfu.c
> index 8a59f5ade13..db7d8cbbb4e 100644
> --- a/board/emulation/common/qemu_dfu.c
> +++ b/board/emulation/common/qemu_dfu.c
> @@ -51,11 +51,13 @@ void set_dfu_alt_info(char *interface, char *devstr)
>       memset(buf, 0, DFU_ALT_BUF_LEN);
>  
>       /*
> -      * Currently dfu_alt_info is needed on Qemu ARM64 for
> +      * Currently dfu_alt_info is needed on Qemu ARM64/X86/X86_64 for
>        * capsule updates

Here and later, we should stop enumerating the platforms because it'll
just get expanded when say RISC-V is added by someone else down the
line and just "on QEMU for capsule updates" is clear enough I think.

>       */
>       if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT) &&
> -         IS_ENABLED(CONFIG_TARGET_QEMU_ARM_64BIT)) {
> +         (IS_ENABLED(CONFIG_TARGET_QEMU_ARM_64BIT) ||
> +          IS_ENABLED(CONFIG_TARGET_QEMU_X86) ||
> +          IS_ENABLED(CONFIG_TARGET_QEMU_X86_64))) {

Can we reasonably be CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT=y on a
platform that *can't* support it? Again thinking to when someone
supports this for say RISC-V it would I think make sense for it to then
show up as "Oh, I forgot to map the MTD device in" as a run-time thing,
rather than "Oh, I need to update a big conditional". And this too is a
"here and later" question. Thanks!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to