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 <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91082
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2026-02-04 00:11:11 +05:30
commit 9f27b5d5fd
2 changed files with 16 additions and 0 deletions

View file

@ -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

View file

@ -3,8 +3,22 @@
#include <bootsplash.h>
#include <vendorcode/google/chromeos/chromeos.h>
/*
* 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