Martin L Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75108 )
Change subject: Make: Create makefile function to add a file to CBFS ......................................................................
Make: Create makefile function to add a file to CBFS
This function can be called to more easily add a file to CBFS.
Additional file attributes can be added later:
cbfs-files-y += pagetables pagetables-file := $(objcbfs)/pt pagetables-type := raw pagetables-compression := none pagetables-COREBOOT-position := $(CONFIG_ARCH_X86_64_PGTBL_LOC)
becomes
$(call add-cbfs-file-simple, pagetables, $(objcbfs)/pt, raw, none ) pagetables-COREBOOT-position := $(CONFIG_ARCH_X86_64_PGTBL_LOC)
This is especially useful inside macros where you may want to add an unknown number of entries - see the following patch.
Signed-off-by: Martin Roth gaumless@gmail.com Change-Id: I72bb2f21fb22f650b7970c7a37a48c10a4af0ed5 --- M Makefile.inc 1 file changed, 41 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/75108/1
diff --git a/Makefile.inc b/Makefile.inc index 6901ef4..294763b 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -327,6 +327,19 @@ endef
####################################################################### +# Add a file to CBFS with just type and compression values +# arg1: name in CBFS +# arg2: filename and path +# arg3: type in cbfs +# arg4: compression type +define add-cbfs-file-simple + $(eval cbfs-files-y += $(1)) + $(eval $(1)-file := $(2)) + $(eval $(1)-type := $(3)) + $(eval $(1)-compression := $(4)) +endef + +####################################################################### # Compile a C file with a bare struct definition into binary # arg1: C source file # arg2: binary file