From c061d66fca5e252dab8fa2e5be5c684faeec75e0 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 17 Oct 2017 14:58:52 +0100 Subject: [PATCH] cdrom: Change format to XZ and compress in parallel This allows us to use all processor cores to compress the image faster. Signed-off-by: Michael Tremer --- lfs/cdrom | 5 ++++- lfs/flash-images | 2 +- src/installer/main.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lfs/cdrom b/lfs/cdrom index 58e754f87b..7a7fff166d 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -32,9 +32,12 @@ TARGET = $(DIR_INFO)/$(THISAPP) ifeq "$(BUILD_PLATFORM)" "arm" TAR_OPTIONS = else - TAR_OPTIONS = --lzma + TAR_OPTIONS = --xz endif +# Enable multi-threaded compression for LZMA +export XZ_OPT = --threads=0 + ############################################################################### # Top-level Rules ############################################################################### diff --git a/lfs/flash-images b/lfs/flash-images index 8ed7f63756..a75d711696 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -137,7 +137,7 @@ endif # 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 diff --git a/src/installer/main.c b/src/installer/main.c index e9517e2209..a3642551d6 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -778,7 +778,7 @@ int main(int argc, char *argv[]) { // 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)) { -- 2.39.2