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

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@adamh.cz Cc: Alexander Graf agraf@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

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@adamh.cz Cc: Alexander Graf agraf@suse.de
Thanks, applied to rpi-next
Alex

On 02.12.18 23:02, Alexander Graf wrote:
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@adamh.cz Cc: Alexander Graf agraf@suse.de
Thanks, applied to rpi-next
I need to revert this from rpi-next again, as it breaks compilation on aarch64:
aarch64: + rpi_3 +cmd/bmp.c: In function 'gunzip_bmp': +cmd/bmp.c:60:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] + bmp = (struct bmp_image *)((((unsigned int)dst + 1) & ~3) + 2); + ^ +cmd/bmp.c:60:8: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] + ^ +cc1: all warnings being treated as errors +make[2]: *** [cmd/bmp.o] Error 1 +make[1]: *** [cmd] Error 2 +make: *** [sub-make] Error 2
Please fix that cast up and then resubmit this patch again :).
Thanks!
Alex
participants (2)
-
Adam Heinrich
-
Alexander Graf