[PATCH 3/8] video: Kconfig: convert CONFIG_VIDEO_FONT_4X6 to Kconfig

Andre Przywara andre.przywara at arm.com
Mon Jan 10 01:56:33 CET 2022


We used to have two boards using a very tiny font, replacing the
standard 8x16 font used on most framebuffers. This was done outside of
Kconfig though, so move this over now.

As those boards have been removed lately, there are currently no users,
but we will gain more font support in a later patch.

Fix the build for the 4x6 font on the way.

Signed-off-by: Andre Przywara <andre.przywara at arm.com>
---
 drivers/video/fonts/Kconfig  | 12 ++++++++++++
 include/video_font_4x6.h     |  2 +-
 scripts/config_whitelist.txt |  1 -
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fonts/Kconfig b/drivers/video/fonts/Kconfig
index c692fa9602f..82df137542c 100644
--- a/drivers/video/fonts/Kconfig
+++ b/drivers/video/fonts/Kconfig
@@ -2,6 +2,18 @@
 # Video fonts
 #
 
+choice
+	prompt "Bitmap font for framebuffers"
+	default VIDEO_FONT_8X16
+
+config VIDEO_FONT_4X6
+        bool "Tiny 4x6 font"
+
+config VIDEO_FONT_8X16
+	bool "Standard VGA font"
+
+endchoice
+
 menu "TrueType Fonts"
 
 config CONSOLE_TRUETYPE_NIMBUS
diff --git a/include/video_font_4x6.h b/include/video_font_4x6.h
index c7e6351b64c..65dd5e8c1d9 100644
--- a/include/video_font_4x6.h
+++ b/include/video_font_4x6.h
@@ -46,7 +46,7 @@ __END__;
 #define VIDEO_FONT_HEIGHT	6
 #define VIDEO_FONT_SIZE		(VIDEO_FONT_CHARS * VIDEO_FONT_HEIGHT)
 
-static unsigned char video_fontdata[VIDEO_FONT_SIZE] = {
+static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = {
 
 	/*{*/
 		/*   Char 0: ' '  */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index b9c1c61e13d..2159bf36997 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -3051,7 +3051,6 @@ CONFIG_VERY_BIG_RAM
 CONFIG_VIDEO_BCM2835
 CONFIG_VIDEO_BMP_LOGO
 CONFIG_VIDEO_DA8XX
-CONFIG_VIDEO_FONT_4X6
 CONFIG_VIDEO_LOGO
 CONFIG_VIDEO_MXS_MODE_SYSTEM
 CONFIG_VIDEO_STD_TIMINGS
-- 
2.17.6



More information about the U-Boot mailing list