[U-Boot] [PATCH] rpi: Enable command bmp

Adam Heinrich adam at adamh.cz
Sat Nov 10 20:14:27 UTC 2018


This patch enables the bmp command (with gzip support enabled) on all
Raspberry Pi boards.

The value of CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (required by
CONFIG_VIDEO_BMP_GZIP) is set to match resolution of the "official"
7 inch LCD.

Signed-off-by: Adam Heinrich <adam at adamh.cz>
Cc: Alexander Graf <agraf at suse.de>
---
 configs/rpi_0_w_defconfig   | 1 +
 configs/rpi_2_defconfig     | 1 +
 configs/rpi_3_32b_defconfig | 1 +
 configs/rpi_3_defconfig     | 1 +
 configs/rpi_defconfig       | 1 +
 include/configs/rpi.h       | 7 +++++++
 6 files changed, 12 insertions(+)

diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index d5bf01b76e..c809b12279 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -9,6 +9,7 @@ CONFIG_MISC_INIT_R=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_CMD_BMP=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index a50a815759..1afc3470c4 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -9,6 +9,7 @@ CONFIG_MISC_INIT_R=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_CMD_BMP=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index ec395d29ed..380fb81977 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -10,6 +10,7 @@ CONFIG_MISC_INIT_R=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_CMD_BMP=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index ac99f2000a..b3e7c20b76 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -10,6 +10,7 @@ CONFIG_MISC_INIT_R=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_CMD_BMP=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index db42ffd135..8eb8fda029 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -9,6 +9,7 @@ CONFIG_MISC_INIT_R=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_CMD_BMP=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 37be6dbeeb..58defc0c2a 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -63,6 +63,13 @@
 #define CONFIG_LCD_DT_SIMPLEFB
 #define CONFIG_VIDEO_BCM2835

+#ifdef CONFIG_DM_VIDEO
+#define CONFIG_BMP_24BPP
+#define CONFIG_BMP_32BPP
+#define CONFIG_VIDEO_BMP_GZIP
+#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE  ((800 * 480 * 4) + 54)
+#endif
+
 #ifdef CONFIG_CMD_USB
 #define CONFIG_TFTP_TSIZE
 #endif
-- 
2.17.1



More information about the U-Boot mailing list