Jérémy Compostella has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86237?usp=email )
Change subject: vc/google/chromeos: Refactor Makefile to use a macro for CBFS logo ......................................................................
vc/google/chromeos: Refactor Makefile to use a macro for CBFS logo
This commit introduces a new macro, cbfs_add_bmp_file, to the ChromeOS vendor code Makefile. The macro simplifies the process of adding BMP files to the CBFS (Coreboot Filesystem) by encapsulating the repetitive tasks of specifying file attributes such as file path, type, and compression flag.
TEST:Both 'cb_logo.bmp' and 'cb_plus_logo.bmp' files are included with the same properties, within the coreboot firmware image.
Change-Id: I827451da79931c09768965c3ad071ecdd918d367 Signed-off-by: Jeremy Compostella jeremy.compostella@intel.com --- M src/vendorcode/google/chromeos/Makefile.mk 1 file changed, 10 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/86237/1
diff --git a/src/vendorcode/google/chromeos/Makefile.mk b/src/vendorcode/google/chromeos/Makefile.mk index 44d4d2b..10b1f5b 100644 --- a/src/vendorcode/google/chromeos/Makefile.mk +++ b/src/vendorcode/google/chromeos/Makefile.mk @@ -30,12 +30,14 @@ BMP_LOGO_COMPRESS_FLAG := LZ4 endif
-cbfs-files-$(CONFIG_CHROMEOS_FW_SPLASH_SCREEN) += cb_logo.bmp -cb_logo.bmp-file := $(call strip_quotes,$(CONFIG_CHROMEOS_LOGO_PATH)) -cb_logo.bmp-type := raw -cb_logo.bmp-compression := $(BMP_LOGO_COMPRESS_FLAG) +define cbfs_add_bmp_file +cbfs-files-$$($(1)) += $(2) +$(2)-file := $$(call strip_quotes,$$($(3))) +$(2)-type := raw +$(2)-compression := $$(BMP_LOGO_COMPRESS_FLAG) +endef
-cbfs-files-$(CONFIG_CHROMEOS_FW_SPLASH_SCREEN) += cb_plus_logo.bmp -cb_plus_logo.bmp-file := $(call strip_quotes,$(CONFIG_CHROMEBOOK_PLUS_LOGO_PATH)) -cb_plus_logo.bmp-type := raw -cb_plus_logo.bmp-compression := $(BMP_LOGO_COMPRESS_FLAG) +$(eval $(call cbfs_add_bmp_file,CONFIG_CHROMEOS_FW_SPLASH_SCREEN, \ + cb_logo.bmp,CONFIG_CHROMEOS_LOGO_PATH)) +$(eval $(call cbfs_add_bmp_file,CONFIG_CHROMEOS_FW_SPLASH_SCREEN, \ + cb_plus_logo.bmp,CONFIG_CHROMEBOOK_PLUS_LOGO_PATH))