From efb1806d3d26b623d67e6536f1201ebd77edc821 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 5 Mar 2025 12:05:29 +0000 Subject: [PATCH] {drivers, lib}: Move BMP_LOGO Kconfig options to common library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit relocates the BMP_LOGO related Kconfig options from the FSP1.1 and FSP2.0 drivers to the common library (lib/). This change: - Centralizes the BMP_LOGO configuration, making it accessible to all drivers and platforms. - Removes duplicate Kconfig entries from the FSP drivers. - Prepares for future refactoring where BMP_LOGO will be handled entirely within the library, enabling its use by both FSP and non-FSP platforms. The following Kconfig options are moved under "Boot Logo Configuration" menu option: - `BMP_LOGO` - `BMP_LOGO_COMPRESS_LZMA` - `BMP_LOGO_COMPRESS_LZ4` - `BMP_LOGO_FILE_NAME` - `HAVE_BMP_LOGO_COMPRESS_LZMA` - `HAVE_CUSTOM_BMP_LOGO` BUG=b:400738815 TEST=Able to build and boot google/brox. Change-Id: I9bbfade9b919cfbd0b689a67c988ed8c65deb597 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/86730 Reviewed-by: Jérémy Compostella Reviewed-by: Dinesh Gehlot Tested-by: build bot (Jenkins) --- src/drivers/intel/fsp1_1/Kconfig | 12 -------- src/drivers/intel/fsp1_1/Makefile.mk | 6 ---- src/drivers/intel/fsp2_0/Kconfig | 42 ------------------------- src/lib/Kconfig | 46 ++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 60 deletions(-) diff --git a/src/drivers/intel/fsp1_1/Kconfig b/src/drivers/intel/fsp1_1/Kconfig index aabcabbf26..3460202eb1 100644 --- a/src/drivers/intel/fsp1_1/Kconfig +++ b/src/drivers/intel/fsp1_1/Kconfig @@ -78,16 +78,4 @@ config SKIP_FSP_CAR help Selected by platforms that implement their own CAR setup. -config BMP_LOGO - bool "Enable logo" - default n - help - Uses the FSP to display the boot logo. This method supports a - BMP file only. The uncompressed size can be up to 1 MB. - -config BMP_LOGO_FILE_NAME - string "Logo file" - depends on BMP_LOGO - default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/logo.bmp" - endif #PLATFORM_USES_FSP1_1 diff --git a/src/drivers/intel/fsp1_1/Makefile.mk b/src/drivers/intel/fsp1_1/Makefile.mk index 28489fe133..0415d09b5a 100644 --- a/src/drivers/intel/fsp1_1/Makefile.mk +++ b/src/drivers/intel/fsp1_1/Makefile.mk @@ -36,10 +36,4 @@ fsp.bin-options := --xip $(TXTIBB) fsp.bin-COREBOOT-position := $(CONFIG_FSP_LOC) endif -# Add logo to the cbfs image -cbfs-files-$(CONFIG_BMP_LOGO) += logo.bmp -logo.bmp-file := $(call strip_quotes,$(CONFIG_BMP_LOGO_FILE_NAME)) -logo.bmp-type := raw -logo.bmp-compression := LZMA - endif diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig index c9fa8e560f..ffe0778971 100644 --- a/src/drivers/intel/fsp2_0/Kconfig +++ b/src/drivers/intel/fsp2_0/Kconfig @@ -265,48 +265,6 @@ config FSP_PLATFORM_MEMORY_SETTINGS_VERSIONS This allows deployed systems to bump their version number with the same FSP which will trigger a retrain of the memory. -config BMP_LOGO - bool "Enable logo" - default n - help - Uses the FSP to display the boot logo. This method supports a - BMP file only. The uncompressed size can be up to 1 MB. The logo can - be compressed based on either `BMP_LOGO_COMPRESS_*` configs (default LZMA). - -config HAVE_BMP_LOGO_COMPRESS_LZMA - bool - depends on BMP_LOGO - default y - -choice - prompt "BMP Logo compression" - depends on BMP_LOGO - default BMP_LOGO_COMPRESS_LZMA if HAVE_BMP_LOGO_COMPRESS_LZMA - default BMP_LOGO_COMPRESS_LZ4 - -config BMP_LOGO_COMPRESS_LZMA - bool "Use LZMA compression for BMP logo" - help - This option enables the use of LZMA compression for the BMP logo. - LZMA is a lossless compression algorithm that can significantly reduce - the size of the logo, without sacrificing quality. - - If this option is not enabled, the BMP logo will be uncompressed. - -config BMP_LOGO_COMPRESS_LZ4 - bool "Compress BMP logo using LZ4" - help - This option enables compression of the BMP logo using the LZ4 algorithm. - Although the size reduction is not as efficient as LZMA compression, however, - it can also make the boot process slightly faster compared to the LZMA. - -endchoice - -config BMP_LOGO_FILE_NAME - string "Logo file" - depends on BMP_LOGO - default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/logo.bmp" - config FSP_COMPRESS_FSP_S_LZMA bool diff --git a/src/lib/Kconfig b/src/lib/Kconfig index ad706261b8..dce3c44b5b 100644 --- a/src/lib/Kconfig +++ b/src/lib/Kconfig @@ -156,10 +156,56 @@ config PROBE_RAM When enabled it will be possible to detect usable RAM using probe_ram function. +menu "Boot Logo Configuration" + +config BMP_LOGO + bool "Enable logo" + default n + help + Uses the FSP to display the boot logo. This method supports a + BMP file only. The uncompressed size can be up to 1 MB. The logo can + be compressed based on either `BMP_LOGO_COMPRESS_*` configs (default LZMA). + config HAVE_CUSTOM_BMP_LOGO def_bool n depends on BMP_LOGO +config HAVE_BMP_LOGO_COMPRESS_LZMA + bool + depends on BMP_LOGO + default y + +choice + prompt "BMP Logo compression" + depends on BMP_LOGO + default BMP_LOGO_COMPRESS_LZMA if HAVE_BMP_LOGO_COMPRESS_LZMA + default BMP_LOGO_COMPRESS_LZ4 + +config BMP_LOGO_COMPRESS_LZMA + bool "Use LZMA compression for BMP logo" + help + This option enables the use of LZMA compression for the BMP logo. + LZMA is a lossless compression algorithm that can significantly reduce + the size of the logo, without sacrificing quality. + + If this option is not enabled, the BMP logo will be uncompressed. + +config BMP_LOGO_COMPRESS_LZ4 + bool "Compress BMP logo using LZ4" + help + This option enables compression of the BMP logo using the LZ4 algorithm. + Although the size reduction is not as efficient as LZMA compression, however, + it can also make the boot process slightly faster compared to the LZMA. + +endchoice + +config BMP_LOGO_FILE_NAME + string "Logo file" + depends on BMP_LOGO + default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/logo.bmp" + +endmenu + config HAVE_EARLY_POWEROFF_SUPPORT bool help