[coreboot] [PATCH]romfs: change the mechanism that builds the romtool utility

Patrick Georgi patrick at georgi-clan.de
Sat Apr 4 11:50:50 CEST 2009


That whole discussion is so unrelated to the actual issue the patch 
attempts to solve, it isn't funny.

To reduce the impact of the patch, here's an updated version that 
doesn't change the behaviour in util/romtool at all.
The only thing it fixes is the concurrency issue that currently kills 
the first target in the list of the autobuilder.

Feel free to continue to debate the merit of default install locations 
etc (btw: Solaris wants SVr4 style, ie /opt/coreboot/bin or so. 
/usr/local/bin is not part of their file system standard. Please take 
that into account, if you really want to go down that route), I don't 
think romfs should be considered stable (in terms of interfaces and file 
formats) enough for installation yet, so I'll stay away from that.

Again, the patch is probably not whitespace clean (copy&pasted), but I 
will commit as soon as I get an ack.

Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>

Index: util/newconfig/config.g
===================================================================
--- util/newconfig/config.g     (Revision 4060)
+++ util/newconfig/config.g     (Arbeitskopie)
@@ -2225,13 +2225,14 @@
         writemakefileheader(file, makefilepath)

         # main rule
-       file.write("\nall: romtool")
+       file.write("\nall: ")
         for i in buildroms:
                 file.write(" %sfs" % i.name)
         file.write("\n\n")

         # romtool rules
-       file.write("\nromtool:\n\tcd $(TOP)/util/romtool; make\n")
+       file.write("\nromtool:\n\t$(MAKE) -C 
$(TOP)/util/romtool\n\tmkdir -p tools\n")
+       file.write("\tcp $(TOP)/util/romtool/tools/rom-mkpayload 
$(TOP)/util/romtool/tools/rom-mkstage tools\n\tcp 
$(TOP)/util/romtool/romtool romtool\n")

         file.write("include Makefile.settings\n\n")
         for i, o in romimages.items():
@@ -2268,15 +2269,15 @@

         romsize = getoption("ROM_SIZE", image)
         # i.name? That can not be right, can it?
-       file.write("%sfs: %s $(TOP)/util/romtool/romtool\n" 
%(i.name,i.name));
+       file.write("%sfs: %s romtool\n" %(i.name,i.name));
         file.write("\trm -f coreboot.romfs\n");
-       file.write("\t$(TOP)/util/romtool/romtool %sfs create %s %s 
%s.bootblock\n" % (i.name, romsize, bootblocksize, i.name))
+       file.write("\t./romtool %sfs create %s %s %s.bootblock\n" % 
(i.name, romsize, bootblocksize, i.name))
         for i in buildroms:
                 for j in i.roms:
                         #failover is a hack that will go away soon.
                         if (j != "failover") and (rommapping[j] != 
"/dev/null"):
-                               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("\tif [ -f %s/romfs-support 
]; then ./romtool %sfs add-payload %s %s/payload `cat %s/romfs-support`; 
fi\n" % (j, i.name, rommapping[j], j, j))
+               file.write("\t ./romtool %sfs print\n" % i.name)

         file.write(".PHONY: all clean romtool")
         for i in romimages.keys():





More information about the coreboot mailing list