From 9f27b5d5fd6f32980ed9e39513fc97097aaf56d8 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 4 Feb 2026 00:11:11 +0530 Subject: [PATCH] vc/google/chromeos: Allow mainboard-specific boot logo overrides The current bmp_logo_filename implementation returns static filenames based on Kconfig or ChromeOS branding levels. This lacks flexibility for boards that need to select a logo dynamically at runtime (e.g., based on SKU ID or hardware straps). Introduce a weak function mainboard_bmp_logo_filename() that can be overridden by mainboard code. If the mainboard implementation returns a non-NULL string, that filename is used; otherwise, the logic falls back to the existing default behavior. BUG=None BRANCH=None TEST=Verified that a mainboard can override the logo filename by implementing mainboard_bmp_logo_filename. Verified default behavior is preserved when no override is present. Change-Id: Ia410dfb2a7a88779bb8eb4551605747bb326d353 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/91082 Reviewed-by: Paul Menzel Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) --- src/include/bootsplash.h | 2 ++ src/vendorcode/google/chromeos/splash.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/include/bootsplash.h b/src/include/bootsplash.h index da51590345..fa13316955 100644 --- a/src/include/bootsplash.h +++ b/src/include/bootsplash.h @@ -147,6 +147,8 @@ void convert_bmp_to_blt(uintptr_t logo, size_t logo_size, uintptr_t *blt, size_t *blt_size, uint32_t *pixel_height, uint32_t *pixel_width, enum lb_fb_orientation orientation); +/* Mainboard-specific override for logo filenames */ +const char *mainboard_bmp_logo_filename(void); /* * Allow platform-specific BMP logo overrides via HAVE_CUSTOM_BMP_LOGO config. * For example: Introduce configurable BMP logo for customization on platforms like ChromeOS diff --git a/src/vendorcode/google/chromeos/splash.c b/src/vendorcode/google/chromeos/splash.c index 5923513473..ff6d83d6dd 100644 --- a/src/vendorcode/google/chromeos/splash.c +++ b/src/vendorcode/google/chromeos/splash.c @@ -3,8 +3,22 @@ #include #include +/* + * Mainboard-specific override for logo filenames. + * Default implementation returns NULL to signal no override. + */ +__weak const char *mainboard_bmp_logo_filename(void) +{ + return NULL; +} + const char *bmp_logo_filename(void) { + /* Check if the mainboard wants to provide a logo */ + const char *mainboard_logo = mainboard_bmp_logo_filename(); + if (mainboard_logo) + return mainboard_logo; + /* * If the device has a custom boot splash footer logo (SPLASH_SCREEN_FOOTER Kconfig * is enabled and a logo path is provided), we only return the main OEM logo, which