acpi: Provide a way to build in a boot logo

EFI has a Boot Graphics Record Table which can be used to show a logo
when booting up and shutting down.

Add support for adding this to the image, using a U-Boot logo which
includes the name, since many people will be unfamiliar with the logo.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-07-08 06:23:52 +02:00
parent 4f8548284b
commit a4a1a69412
3 changed files with 20 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ obj-$(CONFIG_$(PHASE_)ACPIGEN) += acpi_dp.o
obj-$(CONFIG_$(PHASE_)ACPIGEN) += acpi_table.o
obj-y += acpi_writer.o
obj-y += bgrt_image.o
# With QEMU the ACPI tables come from there, not from U-Boot
ifndef CONFIG_QFW_ACPI
obj-y += base.o

BIN
lib/acpi/bgrt_image.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -495,6 +495,24 @@ cmd_S_splash= \
$(obj)/%_logo.S: $(src)/%_logo.bmp
$(call cmd,S_splash)
# Generate an assembly file to wrap the EFI 'Boot Graphics Resource Table' image
quiet_cmd_S_bgrt= BGRT $@
# Modified for U-Boot
cmd_S_bgrt= \
( \
echo '.section .rodata.bgrt.init,"a"'; \
echo '.balign 16'; \
echo '.global __$(*F)_image_begin'; \
echo '__$(*F)_image_begin:'; \
echo '.incbin "$<" '; \
echo '__$(*F)_image_end:'; \
echo '.global __$(*F)_image_end'; \
echo '.balign 16'; \
) > $@
$(obj)/%_image.S: $(src)/%_image.bmp
$(call cmd,S_bgrt)
# EFI applications
# A Makefile target *.efi is built as EFI application.
# A Makefile target *_efi.S wraps *.efi as built-in EFI application.