
From: Simon Glass <sjg@chromium.org> This call seems to have been added in an unrelated commit, likely to fix a bug: 046fe7b5074 ("efi_loader: efi_dp_from_file() expect UTF-8 path") With standard boot we don't need to call efi_set_bootdev(). Also this function is not available in the EFI app. So for now, add a condition, to avoid a build error in the x86 app when CONFIG_EFI_BINARY_EXEC is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) lib/efi/device_path.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/efi/device_path.c b/lib/efi/device_path.c index 0926b51e987..fb6653b23a3 100644 --- a/lib/efi/device_path.c +++ b/lib/efi/device_path.c @@ -741,12 +741,14 @@ static void path_to_uefi(void *uefi, const char *src) { u16 *pos = uefi; - /* - * efi_set_bootdev() calls this routine indirectly before the UEFI - * subsystem is initialized. So we cannot assume unaligned access to be - * enabled. - */ - allow_unaligned(); + if (!IS_ENABLED(CONFIG_EFI_APP)) { + /* + * efi_set_bootdev() calls this routine indirectly before the + * UEFI subsystem is initialized. So we cannot assume unaligned + * access to be enabled. + */ + allow_unaligned(); + } while (*src) { s32 code = utf8_get(&src); -- 2.43.0