Patchwork Compress coreboot_ram also if no payload is compressed

login
register
about
Submitter Patrick Georgi
Date 2009-09-30 19:41:52
Message ID <1254339712.9254.13.camel@tetris>
Download mbox | patch
Permalink /patch/312/
State Accepted
Headers show

Comments

Patrick Georgi - 2009-09-30 19:41:52
Hi,

attached patch makes coreboot_ram compression depending on
CONFIG_COMPRESS again, instead of looking at the compression
configuration for the payload

Build-tested (some coreboot_ram files were too large without compression
for a full build, and now fit again)

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Myles Watson - 2009-09-30 19:49:00
On Wed, Sep 30, 2009 at 1:41 PM, Patrick Georgi <patrick@georgi-clan.de> wrote:
> Hi,
>
> attached patch makes coreboot_ram compression depending on
> CONFIG_COMPRESS again, instead of looking at the compression
> configuration for the payload
Makes sense.

> Build-tested (some coreboot_ram files were too large without compression
> for a full build, and now fit again)
>
> Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>

Thanks,
Myles
Peter Stuge - 2009-09-30 20:23:22
Myles Watson wrote:
> > attached patch makes coreboot_ram compression depending on
> > CONFIG_COMPRESS again, instead of looking at the compression
> > configuration for the payload
> 
> Makes sense.

Is the uncompressor always available?


//Peter
Patrick Georgi - 2009-09-30 20:33:45
Am Mittwoch, den 30.09.2009, 22:23 +0200 schrieb Peter Stuge:
> Myles Watson wrote:
> > > attached patch makes coreboot_ram compression depending on
> > > CONFIG_COMPRESS again, instead of looking at the compression
> > > configuration for the payload
> > 
> > Makes sense.
> 
> Is the uncompressor always available?
Yes, and even if not, that's what's CONFIG_COMPRESS is for, right?
(otherwise: what would be the point of that variable?)


Patrick
Peter Stuge - 2009-09-30 20:48:54
Patrick Georgi wrote:
> > > > attached patch makes coreboot_ram compression depending on
> > > > CONFIG_COMPRESS again, instead of looking at the compression
> > > > configuration for the payload
> > > 
> > > Makes sense.
> > 
> > Is the uncompressor always available?
> 
> Yes, and even if not, that's what's CONFIG_COMPRESS is for, right?

Completely right. Great!


//Peter

Patch

Index: util/newconfig/config.g
===================================================================
--- util/newconfig/config.g	(Revision 4695)
+++ util/newconfig/config.g	(Arbeitskopie)
@@ -2278,6 +2278,7 @@ 
 	file.write("ifeq \"$(CONFIG_CBFS)\" \"1\"\n\n")
 	file.write("CBFS_COMPRESS_FLAG:=\n")
 	file.write("ifeq \"$(CONFIG_COMPRESSED_PAYLOAD_LZMA)\" \"1\"\nCBFS_COMPRESS_FLAG:=l\nendif\n\n")
+	file.write("ifeq \"$(CONFIG_COMPRESS)\" \"1\"\nCBFS_STAGE_COMPRESS_FLAG:=l\nendif\n\n")
 
 	for i in buildroms:
 		file.write("%s: cbfstool" %(i.name))
@@ -2303,7 +2304,7 @@ 
 			if (j != "failover") and (rommapping[j] != "/dev/null"):
 				file.write("\t./cbfs/cbfstool %s add-payload %s %s/payload $(CBFS_COMPRESS_FLAG)\n" % (i.name, rommapping[j], j,))
 			if (j != "failover"):
-				file.write("\t./cbfs/cbfstool %s add-stage %s/coreboot_ram %s/coreboot_ram $(CBFS_COMPRESS_FLAG)\n" % (i.name, j, j,))
+				file.write("\t./cbfs/cbfstool %s add-stage %s/coreboot_ram %s/coreboot_ram $(CBFS_STAGE_COMPRESS_FLAG)\n" % (i.name, j, j,))
 			file.write("\tif [ -f %s/coreboot_apc ]; then ./cbfs/cbfstool %s add-stage %s/coreboot_apc %s/coreboot_apc $(CBFS_COMPRESS_FLAG); fi\n" % (j, i.name, j, j,))
 		file.write("\t./cbfs/cbfstool %s print\n" % i.name)
 		file.write("\n")