Use bcj filter for compressing squashfs ramdisk
Using the BCJ filter can shave a few MB off the filesize of our ramdisk at the expense of added CPU time. Worth it.
This commit is contained in:
parent
d0960bba14
commit
7bf9ee4fce
@ -75,6 +75,7 @@ ARCHMAPS = {
|
|||||||
LIB32 = "lib"
|
LIB32 = "lib"
|
||||||
LIB64 = "lib64"
|
LIB64 = "lib64"
|
||||||
|
|
||||||
|
bcj = dict(i386="x86", x86_64="x86", ppc="powerpc", sparc="sparc", ia64="ia64")
|
||||||
|
|
||||||
class Lorax(BaseLoraxClass):
|
class Lorax(BaseLoraxClass):
|
||||||
|
|
||||||
@ -104,6 +105,7 @@ class Lorax(BaseLoraxClass):
|
|||||||
self.conf.add_section("compression")
|
self.conf.add_section("compression")
|
||||||
self.conf.set("compression", "type", "squashfs")
|
self.conf.set("compression", "type", "squashfs")
|
||||||
self.conf.set("compression", "args", "-comp xz")
|
self.conf.set("compression", "args", "-comp xz")
|
||||||
|
self.conf.set("compression", "bcj", "on")
|
||||||
|
|
||||||
# read the config file
|
# read the config file
|
||||||
if os.path.isfile(conf_file):
|
if os.path.isfile(conf_file):
|
||||||
@ -385,6 +387,9 @@ class Lorax(BaseLoraxClass):
|
|||||||
|
|
||||||
ctype = self.conf.get("compression", "type")
|
ctype = self.conf.get("compression", "type")
|
||||||
cargs = self.conf.get("compression", "args")
|
cargs = self.conf.get("compression", "args")
|
||||||
|
if self.conf.get("compression", "bcj") == "on":
|
||||||
|
if self.basearch in bcj:
|
||||||
|
cargs += " -Xbcj %s" % bcj.get(self.basearch)
|
||||||
|
|
||||||
i = imgclass(kernellist=self.outputtree.kernels,
|
i = imgclass(kernellist=self.outputtree.kernels,
|
||||||
installtree=self.installtree,
|
installtree=self.installtree,
|
||||||
|
Loading…
Reference in New Issue
Block a user