Shelley Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/79775?usp=email )
Change subject: WIP: vendorcode/google/chromeos: Add SW Splash screen Kconfigs ......................................................................
WIP: vendorcode/google/chromeos: Add SW Splash screen Kconfigs
create FW splash screen Kconfigs in vendorcode.
BUG=b:317880956 BRANCH=None TEST=emerge-rex coreboot
Change-Id: I56613d1e7e81e25b31ad034edae0f716c94c4960 Signed-off-by: Shelley Chen shchen@google.com --- M src/drivers/intel/fsp2_0/Makefile.inc M src/drivers/intel/fsp2_0/silicon_init.c M src/lib/Makefile.inc M src/vendorcode/google/chromeos/Kconfig M src/vendorcode/google/chromeos/Makefile.inc 5 files changed, 67 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/79775/1
diff --git a/src/drivers/intel/fsp2_0/Makefile.inc b/src/drivers/intel/fsp2_0/Makefile.inc index e5ebe75..d134a06 100644 --- a/src/drivers/intel/fsp2_0/Makefile.inc +++ b/src/drivers/intel/fsp2_0/Makefile.inc @@ -35,6 +35,7 @@ ramstage-$(CONFIG_MMA) += mma_core.c ramstage-$(CONFIG_ENABLE_FSP_ERROR_INFO) += fsp_error_info_hob.c ramstage-$(CONFIG_BMP_LOGO) += fsp_gop_blt.c +ramstage-$(CONFIG_FW_SPLASH_SCREEN) += fsp_gop_blt.c
ifneq ($(CONFIG_NO_FSP_TEMP_RAM_EXIT),y) postcar-$(CONFIG_FSP_CAR) += temp_ram_exit.c @@ -126,23 +127,6 @@ true endif
-# Add logo to the cbfs image -cbfs-files-$(CONFIG_BMP_LOGO) += cb_logo.bmp -cb_logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP2_0_LOGO_FILE_NAME)) -cb_logo.bmp-type := raw - -cbfs-files-$(CONFIG_BMP_LOGO) += cbx_logo.bmp -cbx_logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP2_0_LOGO_FILE_NAME2)) -cbx_logo.bmp-type := raw - -ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZMA),y) -cb_logo.bmp-compression := LZMA -cbx_logo.bmp-compression := LZMA -else ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZ4),y) -cb_logo.bmp-compression := LZ4 -cbx_logo.bmp-compression := LZ4 -endif - ifneq ($(call strip_quotes,$(CONFIG_FSP_HEADER_PATH)),) CPPFLAGS_common+=-I$(CONFIG_FSP_HEADER_PATH) endif diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c index e543628..f917f96 100644 --- a/src/drivers/intel/fsp2_0/silicon_init.c +++ b/src/drivers/intel/fsp2_0/silicon_init.c @@ -125,7 +125,7 @@ platform_fsp_silicon_init_params_cb(upd);
/* Populate logo related entries */ - if (CONFIG(BMP_LOGO)) + if (CONFIG(BMP_LOGO) || CONFIG(FW_SPLASH_SCREEN)) soc_load_logo(upd);
/* Call SiliconInit */ @@ -149,7 +149,7 @@ timestamp_add_now(TS_FSP_SILICON_INIT_END); post_code(POSTCODE_FSP_SILICON_EXIT);
- if (CONFIG(BMP_LOGO)) + if (CONFIG(BMP_LOGO) || CONFIG(FW_SPLASH_SCREEN)) bmp_release_logo();
fsp_debug_after_silicon_init(status); diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index fd3f464..f484474 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -153,6 +153,7 @@ ramstage-y += wrdd.c ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c ramstage-$(CONFIG_BMP_LOGO) += bmp_logo.c +ramstage-$(CONFIG_FW_SPLASH_SCREEN) += bmp_logo.c ramstage-$(CONFIG_BOOTSPLASH) += bootsplash.c ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig index 0979652..61b9ce7 100644 --- a/src/vendorcode/google/chromeos/Kconfig +++ b/src/vendorcode/google/chromeos/Kconfig @@ -81,3 +81,49 @@
endif # CHROMEOS endmenu + +config FW_SPLASH_SCREEN + bool "Display Splash Screen in Firmware" + default n + depends on CHROMEOS + help + Display the ChromeOS splash screen in the firmware. + +config CB_LOGO_PATH + string "Path to CB Logo file" + depends on FW_SPLASH_SCREEN + default "3rdparty/blobs/mainboard/$(MAINBOARDDIR)/logo.bmp" + +config CBX_LOGO_PATH + string "Path to CBX Logo file" + depends on FW_SPLASH_SCREEN + default "3rdparty/blobs/mainboard/$(MAINBOARDDIR)/logo.bmp" + +config HAVE_FW_SPLASH_SCREEN_COMPRESS_LZMA + bool + depends on FW_SPLASH_SCREEN + default y + +choice + prompt "FW Splash Screen compression" + depends on FW_SPLASH_SCREEN + default FW_SPLASH_SCREEN_COMPRESS_LZMA if HAVE_FW_SPLASH_SCREEN_COMPRESS_LZMA + default FW_SPLASH_SCREEN_COMPRESS_LZ4 + +config FW_SPLASH_SCREEN_COMPRESS_LZMA + bool "Use LZMA compression for BMP logo" + help + This option enables the use of LZMA compression for the FW Splash Screen. + 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 FW Splash Screen will be uncompressed. + +config FW_SPLASH_SCREEN_COMPRESS_LZ4 + bool "Compress BMP logo using LZ4" + help + This option enables compression of the FW Splash Screen 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 diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc index fbfd7a4..7c15f10 100644 --- a/src/vendorcode/google/chromeos/Makefile.inc +++ b/src/vendorcode/google/chromeos/Makefile.inc @@ -19,3 +19,20 @@ ramstage-y += watchdog.c
romstage-$(CONFIG_CHROMEOS_DRAM_PART_NUMBER_IN_CBI) += dram_part_num_override.c + +# Add logo to the cbfs image +cbfs-files-$(CONFIG_FW_SPLASH_SCREEN) += cb_logo.bmp +cb_logo.bmp-file := $(call strip_quotes,$(CONFIG_CB_LOGO_PATH)) +cb_logo.bmp-type := raw + +cbfs-files-$(CONFIG_FW_SPLASH_SCREEN) += cbx_logo.bmp +cbx_logo.bmp-file := $(call strip_quotes,$(CONFIG_CBX_LOGO_PATH)) +cbx_logo.bmp-type := raw + +ifeq ($(CONFIG_FW_SPLASH_SCREEN_COMPRESS_LZMA),y) +cb_logo.bmp-compression := LZMA +cbx_logo.bmp-compression := LZMA +else ifeq ($(CONFIG_FW_SPLASH_SCREEN_COMPRESS_LZ4),y) +cb_logo.bmp-compression := LZ4 +cbx_logo.bmp-compression := LZ4 +endif