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:
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user