Skip to contentSkip to conversation

video: allow version string to be optional when using LOGO

PATCH New Tim Harvey 2 participants 4 messages May 24, 2016 – Jul 11, 2016 Framebuffer layer

lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH 1/1 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.

---
 README                      | 3 +++
 drivers/video/cfb_console.c | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
README +3 -0
index d881da2..a820079 100644
@@ -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,
drivers/video/cfb_console.c +3 -1
index ef4984b..b2b4a35 100644
@@ -1929,7 +1929,6 @@ 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;
@@ -1978,6 +1977,8 @@ static void *video_logo(void)
 
 	sprintf(info, " %s", version_string);
 
+#ifndef CONFIG_HIDE_LOGO_VERSION
+	int space, len;
 	space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
 	len = strlen(info);
 
@@ -1990,6 +1991,7 @@ static void *video_logo(void)
 		y_off = 1;
 	} else
 		video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
+#endif
 
 #ifdef CONFIG_CONSOLE_EXTRA_INFO
 	{
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 video: allow version string to be optional when using LOGO

Quoted 53 lines · Tim Harvey

The CONFIG_HIDE_LOGO_VERSION config can be used to disable putting the U-Boot version string on top of the logo.

---
 README                      | 3 +++
 drivers/video/cfb_console.c | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
README +3 -0
index d881da2..a820079 100644
@@ -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,
drivers/video/cfb_console.c +3 -2
index ef4984b..b2b4a35 100644
@@ -1929,7 +1929,6 @@ 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;
@@ -1978,6 +1977,8 @@ static void *video_logo(void)
 
        sprintf(info, " %s", version_string);
 
+#ifndef CONFIG_HIDE_LOGO_VERSION
+       int space, len;
        space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
        len = strlen(info);
 
@@ -1990,6 +1991,7 @@ static void *video_logo(void)
                y_off = 1;
        } else
                video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
+#endif
 
 #ifdef CONFIG_CONSOLE_EXTRA_INFO
        {
--
Quoted 2 lines

1.9.1

Anatolij / Tom,

I haven't seen any feedback on this. Do you have any comment or ack?

Regards,

Tim

#2 lore raw

PATCH 1/1 video: allow version string to be optional when using LOGO

Hi Tim,

On Fri, 8 Jul 2016 06:45:10 -0700
Tim Harvey tharvey at gateworks.com wrote:
...

Quoted 1 line

I haven't seen any feedback on this. Do you have any comment or ack?

sorry for delay, I was on vacation. Applied slightly modified patch to u-boot-video/next.

Thanks,

Anatolij

#3 lore raw

PATCH v2 1/1 video: allow version string to be optional when using LOGO

In reply to Tim Harvey

From: Tim Harvey <[email protected]>

The CONFIG_HIDE_LOGO_VERSION config can be used to disable putting the U-Boot version string on top of the logo.

---
Changes in v2:
- move len and space variables to functio top
- hide extra string if CONFIG_CONSOLE_EXTRA_INFO is defined

 README                      |    3 +++
 drivers/video/cfb_console.c |    4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
README +3 -0
index 26d5ad2..e86934a 100644
@@ -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,
drivers/video/cfb_console.c +3 -1
index ef4984b..30b53db 100644
@@ -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);
 
@@ -2027,6 +2028,7 @@ static void *video_logo(void)
 		}
 	}
 #endif
+#endif
 
 	return (video_fb_address + video_logo_height * VIDEO_LINE_LEN);
 }
Signature · 1 line
1.7.9.5