[PATCH 1/1] efi_loader: provide valid PXE architecture on sandbox
Simon Glass
sjg at chromium.org
Sat Nov 9 18:33:51 CET 2024
Hi Heinrich,
On Sat, 9 Nov 2024 at 03:31, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Before this patch the sandbox uses 0xffffffea as PXE architecture.
>
> => efidebug defaults
> Default boot path: EFI\BOOT\BOOTSBOX.EFI
> PXE arch: 0xffffffea
>
> With this patch it uses the PXE architecture that matches the host.
> This allows us to use bootmeth EFI on the sandbox to load an EFI binary.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> lib/efi_loader/efi_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
The way things are, this isn't a valid thing to do. It is returning an
error to indicate that. The error should be checked. If you use -N
then it will do what you want, though.
But what architectures does this work for, with your setup? I haven't
been able to get x86_64 to work. I could perhaps try arm64?
Should we document this use of sandbox for your use case, once it is working?
>
> diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c
> index bf96f61d3d0..14049378930 100644
> --- a/lib/efi_loader/efi_helper.c
> +++ b/lib/efi_loader/efi_helper.c
> @@ -75,7 +75,7 @@ const char *efi_get_basename(void)
>
> int efi_get_pxe_arch(void)
> {
> - if (efi_use_host_arch())
> + if (IS_ENABLED(CONFIG_SANDBOX))
> return HOST_PXE_ARCH;
>
> /* http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml */
> --
> 2.45.2
>
Regards,
Simon
More information about the U-Boot
mailing list