Jérémy Compostella has submitted this change. ( 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/86237 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Subrata Banik subratabanik@google.com --- M src/vendorcode/google/chromeos/Makefile.mk 1 file changed, 10 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Subrata Banik: Looks good to me, approved
diff --git a/src/vendorcode/google/chromeos/Makefile.mk b/src/vendorcode/google/chromeos/Makefile.mk index 44d4d2b..67b50f6b 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 add_bmp_logo_file_to_cbfs +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 add_bmp_logo_file_to_cbfs,CONFIG_CHROMEOS_FW_SPLASH_SCREEN, \ + cb_logo.bmp,CONFIG_CHROMEOS_LOGO_PATH)) +$(eval $(call add_bmp_logo_file_to_cbfs,CONFIG_CHROMEOS_FW_SPLASH_SCREEN, \ + cb_plus_logo.bmp,CONFIG_CHROMEBOOK_PLUS_LOGO_PATH))