[U-Boot] [PATCH v2 2/2] rpi: Enable command bmp

Alexander Graf agraf at suse.de
Tue Jan 8 15:38:33 UTC 2019



On 31.12.18 12:11, Adam Heinrich 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 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 66b0de31b6..18b7cfef76 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 ba75e52dda..6c04a622ff 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 bbcdd91e90..c856621a03 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 54b6303c2d..7d2eff0517 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 e7820cb147..7b3f82c0d3 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 9ce41767a9..284e3a98de 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)

This doesn't seem correct: IIUC the RPi can display up to Full HD, no?

Also, doesn't gzip contain a header that actually tells us the target
size? Why do we have to unconditionally allocate
CONFIG_SYS_VIDEO_LOGO_MAX_SIZE in the first place?

Furthermore I'm missing the rationale here: Why do you need the bmp
command? What exactly are you trying to do? Is there maybe a better
(more platform agnostic) solution for that? The bmp command seems to be
quite unmaintained.


Alex


More information about the U-Boot mailing list