From adde435fa7c03c17c40e9f771eceed127fbbc251 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 24 May 2016 14:59:59 -0700 Subject: video: allow version string to be optional when using LOGO The CONFIG_HIDE_LOGO_VERSION config can be used to disable putting the U-Boot version string on top of the logo. Signed-off-by: Tim Harvey --- README | 3 +++ drivers/video/cfb_console.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README b/README index 26d5ad273e..e86934af69 100644 --- a/README +++ b/README @@ -840,6 +840,9 @@ The following options need to be configured: CONFIG_CONSOLE_EXTRA_INFO additional board info beside the logo + CONFIG_HIDE_LOGO_VERSION + do not display bootloader + version string When CONFIG_CFB_CONSOLE_ANSI is defined, console will support a limited number of ANSI escape sequences (cursor control, diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index ef4984becb..30b53dbb80 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1929,10 +1929,10 @@ static void plot_logo_or_black(void *screen, int x, int y, int black) static void *video_logo(void) { char info[128]; - int space, len; __maybe_unused int y_off = 0; __maybe_unused ulong addr; __maybe_unused char *s; + __maybe_unused int len, space; splash_get_pos(&video_logo_xpos, &video_logo_ypos); @@ -1978,6 +1978,7 @@ static void *video_logo(void) sprintf(info, " %s", version_string); +#ifndef CONFIG_HIDE_LOGO_VERSION space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH; len = strlen(info); @@ -2026,6 +2027,7 @@ static void *video_logo(void) } } } +#endif #endif return (video_fb_address + video_logo_height * VIDEO_LINE_LEN); -- cgit v1.2.3 From d7b60fbfa63431eedccac17674311f0055f323fe Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Fri, 1 Jul 2016 22:47:36 +0300 Subject: splash: Accommodate DM_USB in splash_init_usb() Current implementation of splash_init_usb() requires usb_stor_scan() which doesn't exist in case of DM_USB simply because real probing happens right in usb_init(). So disable usage of usb_stor_scan() in case of DM_USB. Signed-off-by: Alexey Brodkin Cc: Nikita Kiryanov Cc: Simon Glass Cc: Jeroen Hofstee Cc: Anatolij Gustschin Cc: Robert Winkler Reviewed-by: Simon Glass --- common/splash_source.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/splash_source.c b/common/splash_source.c index 914f12f4cb..230b2db4d5 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -146,7 +146,11 @@ static int splash_init_usb(void) if (err) return err; - return usb_stor_scan(1) < 0 ? -ENODEV : 0; +#ifndef CONFIG_DM_USB + err = usb_stor_scan(1) < 0 ? -ENODEV : 0; +#endif + + return err; } #else static inline int splash_init_usb(void) -- cgit v1.2.3 From b6de2cd7ee5af536ae67ab5522b69e5c4925f5f2 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Fri, 1 Jul 2016 22:48:16 +0300 Subject: splash: Introduce default_splash_locations This change introduces default_splash_locations which simplifies splash recovery from the first partition of USB/MMC/SATA drive. Given usual mapping of the first partition of external media for basic boot stuff like uImage/zImage, .dtb etc it looks quite obvious option to put there splash.bmp as well. Signed-off-by: Alexey Brodkin Cc: Nikita Kiryanov Cc: Simon Glass Cc: Jeroen Hofstee Signed-off-by: Anatolij Gustschin --- common/splash.c | 30 +++++++++++++++++++++++++++++- include/splash.h | 9 +++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/common/splash.c b/common/splash.c index 561d35b4e4..89af437f2c 100644 --- a/common/splash.c +++ b/common/splash.c @@ -24,9 +24,37 @@ #include #include +static struct splash_location default_splash_locations[] = { + { + .name = "sf", + .storage = SPLASH_STORAGE_SF, + .flags = SPLASH_STORAGE_RAW, + .offset = 0x0, + }, + { + .name = "mmc_fs", + .storage = SPLASH_STORAGE_MMC, + .flags = SPLASH_STORAGE_FS, + .devpart = "0:1", + }, + { + .name = "usb_fs", + .storage = SPLASH_STORAGE_USB, + .flags = SPLASH_STORAGE_FS, + .devpart = "0:1", + }, + { + .name = "sata_fs", + .storage = SPLASH_STORAGE_SATA, + .flags = SPLASH_STORAGE_FS, + .devpart = "0:1", + }, +}; + __weak int splash_screen_prepare(void) { - return 0; + return splash_source_load(default_splash_locations, + ARRAY_SIZE(default_splash_locations)); } #ifdef CONFIG_SPLASH_SCREEN_ALIGN diff --git a/include/splash.h b/include/splash.h index 25df1cf5ad..136eac7402 100644 --- a/include/splash.h +++ b/include/splash.h @@ -47,7 +47,16 @@ struct splash_location { char *ubivol; /* UBI volume-name for ubifsmount */ }; +#ifdef CONFIG_SPLASH_SOURCE int splash_source_load(struct splash_location *locations, uint size); +#else +static inline int splash_source_load(struct splash_location *locations, + uint size) +{ + return 0; +} +#endif + int splash_screen_prepare(void); #ifdef CONFIG_SPLASH_SCREEN_ALIGN -- cgit v1.2.3