diff options
author | Martin Roth <gaumless@gmail.com> | 2023-05-10 12:43:24 -0600 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-05-31 07:03:50 +0000 |
commit | fda545d5dd408c6ae2bfdec501e9b7a7ea24bbbc (patch) | |
tree | 65954894181b240afcf44348432346bd11a68892 | |
parent | 32282c62c64eac538494cfed26b109fbe61d05ff (diff) |
Makefile.inc: Create 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.
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I72bb2f21fb22f650b7970c7a37a48c10a4af0ed5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75108
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
-rw-r--r-- | Makefile.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc index 808c0d916a..abf47d4fae 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -327,6 +327,19 @@ define cbfs-files-processor-config 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 |