[coreboot] Patch set updated: b38b651 Add the coreboot config to CBFS

Cristian Măgherușan-Stanciu (cristi.magherusan@gmail.com) gerrit at coreboot.org
Tue Jun 21 02:38:20 CEST 2011


Cristian Măgherușan-Stanciu (cristi.magherusan at gmail.com) just uploaded a new patch set to gerrit, which you can find at
http://review.coreboot.org/46

-gerrit

commit b38b651d1254ff9dd2e49c51120c40b5a787ce3d
Author: Cristian Măgherușan-Stanciu <cristi.magherusan at gmail.com>
Date:   Sun Jun 19 03:03:28 2011 +0200

    Add the coreboot config to CBFS
    
    The CBFS will contain a new file, named 'config' of type 'raw' that
    is a stripped-down stripped-down version of the .config file that
    was used to build coreboot. For space savings, all the comments and
    empty lines were removed from the original config.
    
    This is done in order to easily reproduce the process of creating an
    image made by someone else when only having the original binary
    image.
    
    Known issues/TODOs:
    -when using abuild, the generated images will contain the config from
    the coreboot tree, if anf only if this exists, and not the config file
    generated for the current board by abuild.
    -the coreboot git revision is not listed in the config file as of yet.
    
    Change-Id: I784989aac0227d3679d30314b06dadaec402749e
    Signed-off-by: Cristian Măgherușan-Stanciu <cristi.magherusan at gmail.com>
---
 src/Kconfig               |    6 ++++++
 src/arch/x86/Makefile.inc |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/Kconfig b/src/Kconfig
index 9abbc21..7e6214a 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -106,6 +106,12 @@ config COMPRESS_RAMSTAGE
 	  that decompression might slow down booting if the boot flash
 	  is connected through a slow Link (i.e. SPI)
 
+config INCLUDE_CONFIG_FILE
+  bool "Include the coreboot config file into the ROM image"
+	default y
+  help
+    Include in CBFS the coreboot config file that was used to compile the ROM image
+
 endmenu
 
 source src/mainboard/Kconfig
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 8c1a887..986a72a 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -99,6 +99,12 @@ ifeq ($(CONFIG_GEODE_VSA_FILE),y)
 	$(LD) -m elf_i386 -e 0x60020 --section-start .data=0x60000 $(obj)/vsa.o -o $(obj)/vsa.elf
 	$(CBFSTOOL) $@.tmp add-stage $(obj)/vsa.elf vsa
 endif
+ifeq ($(CONFIG_INCLUDE_CONFIG_FILE),y)
+	@printf "    CONFIG       $(CONFIG_INCLUDE_CONFIG_FILE)\n"
+	if [ -f $(top)/.config ]; then \
+	sed -e '/^#/d' -e '/^ *$$/d' $(top)/.config > $(obj)/config.tmp ; \
+	$(CBFSTOOL) $@.tmp add $(obj)/config.tmp config raw; rm -f $(obj)/config.tmp ; fi
+endif
 	mv $@.tmp $@
 	@printf "    CBFSPRINT  $(subst $(obj)/,,$(@))\n\n"
 	$(CBFSTOOL) $@ print




More information about the coreboot mailing list