[coreboot] [v2] r4054 - in trunk/coreboot-v2: src/arch/i386 util/newconfig

svn at coreboot.org svn at coreboot.org
Fri Apr 3 18:17:05 CEST 2009

Author: oxygene
Date: 2009-04-03 18:17:05 +0200 (Fri, 03 Apr 2009)
New Revision: 4054

I thought that romfs infrastructure is done now, but there were some
issues (see buildbot).
The romfs image was always built, and sometimes broke (because of
the different image layouts) for buildrom images. After the patch, these
issues are avoided by not adding payloads to the romfs image (they
wouldn't be read anyway). Both workarounds (in buildrom code for
romfs and vice-versa) aren't very pretty, but that's what our buildsystem
As I had to create a "communication channel" (via the romfs-support
files), I took the chance to also use it for compression
information, so if you configure lzma support, you'll get lzma
compressed payloads in romfs.

Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>

Modified: trunk/coreboot-v2/src/arch/i386/Config.lb
--- trunk/coreboot-v2/src/arch/i386/Config.lb	2009-04-03 15:57:58 UTC (rev 4053)
+++ trunk/coreboot-v2/src/arch/i386/Config.lb	2009-04-03 16:17:05 UTC (rev 4054)
@@ -80,7 +80,8 @@
 	makerule coreboot.rom 
 		depends	"coreboot.strip buildrom $(PAYLOAD-1)"
-		action "PAYLOAD=$(PAYLOAD-1); if [ $(CONFIG_ROMFS) -eq 1 ]; then PAYLOAD=/dev/null; fi; ./buildrom $< $@ $$PAYLOAD $(ROM_IMAGE_SIZE) $(ROM_SECTION_SIZE)"
+		action "PAYLOAD=$(PAYLOAD-1); if [ $(CONFIG_ROMFS) -eq 1 ]; then PAYLOAD=/dev/null; touch romfs-support; fi; ./buildrom $< $@ $$PAYLOAD $(ROM_IMAGE_SIZE) $(ROM_SECTION_SIZE)"
+		action "if [ $(CONFIG_COMPRESSED_PAYLOAD_LZMA) -eq 1 -a $(CONFIG_ROMFS) -eq 1 ]; then echo l > romfs-support; fi"

Modified: trunk/coreboot-v2/util/newconfig/config.g
--- trunk/coreboot-v2/util/newconfig/config.g	2009-04-03 15:57:58 UTC (rev 4053)
+++ trunk/coreboot-v2/util/newconfig/config.g	2009-04-03 16:17:05 UTC (rev 4054)
@@ -2275,7 +2275,7 @@
 		for j in i.roms:
 			#failover is a hack that will go away soon. 
 			if (j != "failover") and (rommapping[j] != "/dev/null"):
-				file.write("\t $(TOP)/util/romtool/romtool %sfs add-payload %s %s/payload\n" % (i.name, rommapping[j], j))
+				file.write("\tif [ -f %s/romfs-support ]; then $(TOP)/util/romtool/romtool %sfs add-payload %s %s/payload `cat %s/romfs-support`; fi\n" % (j, i.name, rommapping[j], j, j))
 		file.write("\t $(TOP)/util/romtool/romtool %sfs print\n" % i.name)
 	file.write(".PHONY: all clean romtool")

More information about the coreboot mailing list