On Thu, Sep 03, 2026 at 03:59:35PM +0200, Julien Stephan wrote:
> Building with CONFIG_VIDEO enabled but CONFIG_VIDEO_LOGO disabled fails
> at link time:
>
> video-uclass.o: in function `video_get_u_boot_logo':
> video-uclass.c:593: undefined reference to `__splash_u_boot_logo_begin'
>
> The __splash_u_boot_logo_begin/_end symbols are provided by
> u_boot_logo.bmp.o, which is only built when CONFIG_VIDEO_LOGO is set:
>
> obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.bmp.o
>
> The only remaining caller, video_post_probe(), is fine: it sits under an
> if (CONFIG_IS_ENABLED(VIDEO_LOGO) && ...) check and is eliminated when
> the logo is disabled. video_get_u_boot_logo() however is an exported
> function and is always emitted, leaving the reference dangling.
>
> Guard the splash symbol declaration and video_get_u_boot_logo() with
> CONFIG_IS_ENABLED(VIDEO_LOGO), and provide a static inline stub
> returning NULL for the disabled case in video.h. Callers already handle
> a NULL logo pointer (e.g. bootflow_menu.c), so no caller changes are
> needed.
>
> Reproduce with any board that enables VIDEO without VIDEO_LOGO or
> enabling SPLASH_SCREEN (it disables automatically VIDEO_LOGO).
>
> Fixes: 0d3890188d6b ("video: Add function to obtain the U-Boot logo")
> Signed-off-by: Julien Stephan <[email protected]>Reviewed-by: Tom Rini <[email protected]> -- Tom
signature.asc
Description: PGP signature
