]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
cdrom: Change format to XZ and compress in parallel
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Oct 2017 13:58:52 +0000 (14:58 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Oct 2017 13:58:52 +0000 (14:58 +0100)
This allows us to use all processor cores to compress
the image faster.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/cdrom
lfs/flash-images
src/installer/main.c

index 58e754f87b9db39c828994f100fcea7bb7dd1684..7a7fff166d752c051e76e22477858314cb9fd2fb 100644 (file)
--- a/lfs/cdrom
+++ b/lfs/cdrom
@@ -32,9 +32,12 @@ TARGET     = $(DIR_INFO)/$(THISAPP)
 ifeq "$(BUILD_PLATFORM)" "arm"
        TAR_OPTIONS =
 else
 ifeq "$(BUILD_PLATFORM)" "arm"
        TAR_OPTIONS =
 else
-       TAR_OPTIONS = --lzma
+       TAR_OPTIONS = --xz
 endif
 
 endif
 
+# Enable multi-threaded compression for LZMA
+export XZ_OPT = --threads=0
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
 ###############################################################################
 # Top-level Rules
 ###############################################################################
index 8ed7f63756f4d3924a83289f24deaf5b4629bc65..a75d711696af0f627613ca34107c62ee586976f1 100644 (file)
@@ -137,7 +137,7 @@ endif
 
        # Install IPFire
 ifneq "$(BUILD_PLATFORM)" "arm"
 
        # Install IPFire
 ifneq "$(BUILD_PLATFORM)" "arm"
-       tar -x --lzma -C $(MNThdd)/ -f /install/cdrom/distro.img
+       tar -x --xz -C $(MNThdd)/ -f /install/cdrom/distro.img
 else
        tar -x -C $(MNThdd)/ -f /install/cdrom/distro.img
 endif
 else
        tar -x -C $(MNThdd)/ -f /install/cdrom/distro.img
 endif
index e9517e2209033d820851898cf8b0ccf44e30fa06..a3642551d69ec4fa7609dba3cb57b799e4206b71 100644 (file)
@@ -778,7 +778,7 @@ int main(int argc, char *argv[]) {
 
        // Extract files...
        snprintf(commandstring, STRING_SIZE,
 
        // Extract files...
        snprintf(commandstring, STRING_SIZE,
-               "/bin/tar -C /harddisk  -xvf /cdrom/distro.img --lzma 2>/dev/null");
+               "/bin/tar -C /harddisk -xvf /cdrom/distro.img --xz 2>/dev/null");
 
        if (runcommandwithprogress(60, 4, title, commandstring, INST_FILECOUNT,
                        _("Installing the system..."), logfile)) {
 
        if (runcommandwithprogress(60, 4, title, commandstring, INST_FILECOUNT,
                        _("Installing the system..."), logfile)) {