Compare commits

...

3 Commits
acpi ... efio

Author SHA1 Message Date
Simon Glass
3128639948 efi: Switch over to OF_SEPARATE for the app
Now that we can support a separate devicetree, enable this for the
EFI-app builds.

Drop the Makefile-warning exception since we don't need it anymore.

Series-to: u-boot
Cover-letter:
efi: Minor tweaks to the EFI app
This little series adjusts a few things related to the app:

- Support OF_SEPARATE with 32-bit app
- Use OF_SEPARATE now that it is actually functional
- Fix a bad symbol name for the dtb

With these the apps both seem to function OK, and OF_EMBED is not needed
anymore.
END

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-10 17:06:06 -07:00
Simon Glass
d7c138eb04 efi: Support an embedded DTB for the 32-bit app
While this is not likely to be used these days, it seems best to keep it
in sync with the 64-bit app. Update the linker script to support a
separate devicetree.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-10 17:06:06 -07:00
Simon Glass
cc8ba0ea6a efi: Correct logic for OF_EMBED and OF_SEPARATE co-existing
While we do plan to switch to OF_SEPARATE now it is supported, it seems
worth at least showing how OF_EMBED could be used instead, just for the
record.

So make the Makefile rule conditional on OF_SEPARATE and adjust fdtdec
to avoid a build error when OF_EMBED is used.

Finally. the dtb symbol has a double underscore, so update it to avoid a
build warning.

With future patches, OF_EMBED will no-longer be used with the EFI app,
so it is expected that it will eventually stop working.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 2e7bf25f6b ("Support separate DTB files with the UEFI app")
2024-12-10 17:05:28 -07:00
6 changed files with 9 additions and 6 deletions

View File

@@ -1145,7 +1145,7 @@ all: .binman_stamp
ifeq ($(CONFIG_DEPRECATED),y)
$(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
endif
ifeq ($(CONFIG_OF_EMBED)$(CONFIG_EFI_APP),y)
ifeq ($(CONFIG_OF_EMBED),y)
@echo >&2 "===================== WARNING ======================"
@echo >&2 "CONFIG_OF_EMBED is enabled. This option should only"
@echo >&2 "be used for debugging purposes. Please use"
@@ -1678,7 +1678,7 @@ endif # CONFIG_X86
OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)
u-boot-app.efi: u-boot dts/dt.dtb FORCE
$(call if_changed,embeddtb)
$(if $(CONFIG_OF_SEPARATE),$(call if_changed,embeddtb))
$(call if_changed,zobjcopy)
u-boot.bin.o: u-boot.bin FORCE

View File

@@ -87,5 +87,10 @@ SECTIONS
*(.eh_frame)
*(.note.GNU-stack)
}
.embedded_dtb : {
*(.embedded_dtb)
}
.comment 0 : { *(.comment) }
}

View File

@@ -31,7 +31,6 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_MAC_PARTITION=y
CONFIG_ISO_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_OF_EMBED=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y

View File

@@ -35,7 +35,6 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_MAC_PARTITION=y
CONFIG_ISO_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_OF_EMBED=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y

View File

@@ -70,7 +70,7 @@ extern char __image_copy_start[], __image_copy_end[];
extern char __bss_end[];
extern char __rel_dyn_start[], __rel_dyn_end[];
extern char _image_binary_end[];
extern char _dtb[];
extern char __dtb[];
/*
* This is the U-Boot entry point - prior to relocation it should be same

View File

@@ -1236,7 +1236,7 @@ static void *fdt_find_separate(void)
fdt_blob = (ulong *)_image_binary_end;
else
fdt_blob = (ulong *)__bss_end;
#elif defined CONFIG_EFI_APP
#elif defined CONFIG_EFI_APP && defined CONFIG_OF_SEPARATE
/* FDT is in a separate section */
fdt_blob = (ulong *)__dtb;
#else