
From: Simon Glass <sjg@chromium.org> Move u_boot_logo.bmp into drivers/video/images and include it in the build. Make use of the new video_image_get() macro to obtain the logo. Drop the old SPLASH_...() macros. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/video/Makefile | 3 ++- drivers/video/images/Makefile | 5 +++++ .../{u_boot_logo.bmp => images/u_boot.bmp} | Bin drivers/video/video-uclass.c | 20 +++++++----------- 4 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 drivers/video/images/Makefile rename drivers/video/{u_boot_logo.bmp => images/u_boot.bmp} (100%) diff --git a/drivers/video/Makefile b/drivers/video/Makefile index e0b0015606f..620f278c738 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -24,7 +24,6 @@ obj-$(CONFIG_$(PHASE_)PANEL) += panel-uclass.o obj-$(CONFIG_PANEL_HX8238D) += hx8238d.o obj-$(CONFIG_$(PHASE_)SIMPLE_PANEL) += simple_panel.o -obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o obj-$(CONFIG_$(PHASE_)BMP) += bmp.o obj-y += vesa_helper.o @@ -86,3 +85,5 @@ obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp/ obj-y += bridge/ obj-y += sunxi/ obj-y += tegra20/ + +obj-y += images/ diff --git a/drivers/video/images/Makefile b/drivers/video/images/Makefile new file mode 100644 index 00000000000..d3aca2ee7f7 --- /dev/null +++ b/drivers/video/images/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright 2025 Simon Glass <sjg@chromium.org> + +obj-$(CONFIG_VIDEO_LOGO) += u_boot.o diff --git a/drivers/video/u_boot_logo.bmp b/drivers/video/images/u_boot.bmp similarity index 100% rename from drivers/video/u_boot_logo.bmp rename to drivers/video/images/u_boot.bmp diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index be014a770d0..eaf6cf9fc71 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -581,28 +581,24 @@ int video_get_ysize(struct udevice *dev) return priv->ysize; } -#define SPLASH_DECL(_name) \ - extern u8 __splash_ ## _name ## _begin[]; \ - extern u8 __splash_ ## _name ## _end[] - -#define SPLASH_START(_name) __splash_ ## _name ## _begin -#define SPLASH_END(_name) __splash_ ## _name ## _end - -SPLASH_DECL(u_boot_logo); - void *video_get_u_boot_logo(int *sizep) { + void *ptr; + int size; + + ptr = video_image_get(u_boot, &size); if (sizep) - *sizep = SPLASH_END(u_boot_logo) - SPLASH_START(u_boot_logo); + *sizep = size; - return SPLASH_START(u_boot_logo); + return ptr; } static int show_splash(struct udevice *dev) { - u8 *data = SPLASH_START(u_boot_logo); + u8 *data; int ret; + data = video_image_getptr(u_boot); ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true); return 0; -- 2.43.0