[coreboot-gerrit] New patch to review for coreboot: build system: Add option for auto generated cbfs attributes

Werner Zeh (werner.zeh@siemens.com) gerrit at coreboot.org
Thu Jan 14 15:23:01 CET 2016


Werner Zeh (werner.zeh at siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12968

-gerrit

commit ea8a37aed60a0b7c20f7a976422d81cff1dacab9
Author: Werner Zeh <werner.zeh at siemens.com>
Date:   Thu Jan 14 15:08:36 2016 +0100

    build system: Add option for auto generated cbfs attributes
    
    Add a new Kconfig variable to enable the generation of
    position and alignment attributes for cbfs files which
    has constrains on this parameters.
    In addition,  modify Makefile.inc to support that option.
    
    Change-Id: Ibd725fe69a4de35964bdb2dde106d9a7c37ffb47
    Signed-off-by: Werner Zeh <werner.zeh at siemens.com>
---
 Makefile.inc | 6 +++++-
 src/Kconfig  | 8 ++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/Makefile.inc b/Makefile.inc
index d7bb018..ce381e4 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -647,6 +647,10 @@ $(objcbfs)/%.elf: $(objcbfs)/%.debug
 # 4) replace all '*' characters with spaces
 extract_nth=$(subst *,$(spc),$(patsubst -%-,%,$(word $(1), $(subst |,- -,-$(2)-))))
 
+ifeq ($(CONFIG_CBFS_AUTOGEN_ATTRIBUTES),y)
+	cbfs-autogen-attributes=-g
+endif
+
 cbfs-add-cmd = \
                printf "    CBFS       $(call extract_nth,2,$(file))\n"; \
 	       $(CBFSTOOL) $@.tmp \
@@ -654,7 +658,7 @@ cbfs-add-cmd = \
 	       -f $(call extract_nth,1,$(file)) \
 	       -n $(call extract_nth,2,$(file)) \
 	       $(if $(filter-out stage,$(call extract_nth,3,$(file))),-t $(call extract_nth,3,$(file))) \
-	       $(if $(call extract_nth,4,$(file)),-c $(call extract_nth,4,$(file))) \
+	       $(if $(call extract_nth,4,$(file)),-c $(call extract_nth,4,$(file))) $(cbfs-autogen-attributes)\
 	       $(call extract_nth,7,$(file))
 
 cbfs-files=$(cbfs-files-fixed) $(cbfs-files-aligned) $(cbfs-files-regular)
diff --git a/src/Kconfig b/src/Kconfig
index f6702ea..1626997 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -389,6 +389,14 @@ config SYSTEM_TYPE_LAPTOP
 	default n
 	bool
 
+config CBFS_AUTOGEN_ATTRIBUTES
+	default n
+	bool
+	help
+	  If this option is selected, every file in cbfs which has a constrain
+	  regarding position or alignment will get an additional file attribute
+	  which describes this constrain.
+
 menu "Chipset"
 
 comment "SoC"



More information about the coreboot-gerrit mailing list