lib: Refactor logo.bmp inclusion with helper macro
This commit refactors the logo.bmp inclusion logic to use a helper macro, `add_bmp_logo_file_to_cbfs`. This centralizes the logic for adding BMP logo files to the CBFS image and improves code readability. Change-Id: I135c1f2af02064b72bc1f747336ac98ffdb20842 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86368 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
parent
801d0a1491
commit
40b9e55696
1 changed files with 14 additions and 6 deletions
|
|
@ -422,13 +422,21 @@ header_pointer-type := "cbfs header"
|
|||
romstage-y += ux_locales.c
|
||||
|
||||
# Add logo to the cbfs image
|
||||
ifneq ($(CONFIG_HAVE_CUSTOM_BMP_LOGO),y)
|
||||
cbfs-files-$(CONFIG_BMP_LOGO) += logo.bmp
|
||||
logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP2_0_LOGO_FILE_NAME))
|
||||
logo.bmp-type := raw
|
||||
BMP_LOGO_COMPRESS_FLAG := $(CBFS_COMPRESS_FLAG)
|
||||
ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZMA),y)
|
||||
logo.bmp-compression := LZMA
|
||||
BMP_LOGO_COMPRESS_FLAG := LZMA
|
||||
else ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZ4),y)
|
||||
logo.bmp-compression := LZ4
|
||||
BMP_LOGO_COMPRESS_FLAG := LZ4
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
ifneq ($(CONFIG_HAVE_CUSTOM_BMP_LOGO),y)
|
||||
$(eval $(call add_bmp_logo_file_to_cbfs,CONFIG_BMP_LOGO, logo.bmp,\
|
||||
CONFIG_FSP2_0_LOGO_FILE_NAME))
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue