acpi: bgrt: Move the BGRT image into the images directory

Move the BGRT image to use the same video_image linker-list approach
as the other embedded image. Move it into the drivers/video/images
directory and rename it to 'bgrt.bmp' since we know it is an image.

Drop the old bgrt Makefile rule as it is no-longer needed.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-10-01 15:37:04 -06:00
parent 1ad737c2ab
commit ed6674e5be
5 changed files with 8 additions and 38 deletions

View File

@@ -3,3 +3,7 @@
# Copyright 2025 Simon Glass <sjg@chromium.org>
obj-$(CONFIG_VIDEO_LOGO) += u_boot.o
ifdef CONFIG_$(PHASE_)GENERATE_ACPI_TABLE
obj-y += bgrt.o
endif

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -12,8 +12,6 @@ obj-$(CONFIG_$(PHASE_)ACPIGEN) += acpi_table.o
obj-y += acpi_extra.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

View File

@@ -13,23 +13,6 @@
#include <video.h>
#include <acpi/acpi_table.h>
#define BGRT_DECL(_name) \
extern u8 __bgrt_ ## _name ## _begin[]; \
extern u8 __bgrt_ ## _name ## _end[]
#define BGRT_START(_name) __bgrt_ ## _name ## _begin
#define BGRT_END(_name) __bgrt_ ## _name ## _end
BGRT_DECL(image);
static void *bgrt_get_image(int *sizep)
{
if (sizep)
*sizep = BGRT_END(image) - BGRT_START(image);
return BGRT_START(image);
}
int acpi_write_bgrt(struct acpi_ctx *ctx)
{
struct udevice *dev;
@@ -42,7 +25,10 @@ int acpi_write_bgrt(struct acpi_ctx *ctx)
/* If video is available, use the screen size to centre the logo */
have_video = !uclass_first_device_err(UCLASS_VIDEO, &dev);
logo = bgrt_get_image(&size);
if (!IS_ENABLED(CONFIG_VIDEO))
return -ENOENT;
logo = video_image_get(bgrt, &size);
/* If there's no logo data, there's nothing to report */
if (!logo)

View File

@@ -561,24 +561,6 @@ $(obj)/%.S: $(src)/%.bmp
$(call cmd,S_image)
endif
# 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.