From e3bfdb617b8d1efde0ef78193c59ec468660a821 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Fri, 14 Oct 2022 17:30:21 +0200 Subject: [PATCH] image: switch to use universal mksquashfs mksquashfs supports both xz and lzma compression. Drop use of mksquashfs4 and mksquashfs-lzma and use new universal mksquashfs. For -lzma version use the -comp lzma option and change the -fixed-time to the new option -all-time that accomplish the same thing. Signed-off-by: Christian Marangi --- include/image-commands.mk | 8 ++++---- include/image.mk | 4 ++-- target/linux/ath79/image/common-netgear.mk | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 6b4bc4945c..2518308f37 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -105,17 +105,17 @@ endef define Build/append-squashfs-fakeroot-be rm -rf $@.fakefs $@.fakesquashfs mkdir $@.fakefs - $(STAGING_DIR_HOST)/bin/mksquashfs-lzma \ + $(STAGING_DIR_HOST)/bin/mksquashfs \ $@.fakefs $@.fakesquashfs \ - -noappend -root-owned -be -nopad -b 65536 \ - $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH)) + -comp lzma -noappend -root-owned -be -nopad -b 65536 \ + $(if $(SOURCE_DATE_EPOCH),-all-time $(SOURCE_DATE_EPOCH)) cat $@.fakesquashfs >> $@ endef define Build/append-squashfs4-fakeroot rm -rf $@.fakefs $@.fakesquashfs mkdir $@.fakefs - $(STAGING_DIR_HOST)/bin/mksquashfs4 \ + $(STAGING_DIR_HOST)/bin/mksquashfs \ $@.fakefs $@.fakesquashfs \ -nopad -noappend -root-owned cat $@.fakesquashfs >> $@ diff --git a/include/image.mk b/include/image.mk index 9e4e999581..eda7689323 100644 --- a/include/image.mk +++ b/include/image.mk @@ -77,7 +77,7 @@ SQUASHFSOPT := -b $(SQUASHFS_BLOCKSIZE) SQUASHFSOPT += -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1' SQUASHFSOPT += $(if $(CONFIG_SELINUX),-xattrs,-no-xattrs) SQUASHFSCOMP := gzip -LZMA_XZ_OPTIONS := -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2 +LZMA_XZ_OPTIONS := -Xpreset extreme -Xlc 0 -Xlp 2 -Xpb 2 ifeq ($(CONFIG_SQUASHFS_XZ),y) ifneq ($(filter arm x86 powerpc sparc,$(LINUX_KARCH)),) BCJ_FILTER:=-Xbcj $(LINUX_KARCH) @@ -220,7 +220,7 @@ $(eval $(foreach S,$(JFFS2_BLOCKSIZE),$(call Image/mkfs/jffs2/template,$(S)))) $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S)))) define Image/mkfs/squashfs-common - $(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \ + $(STAGING_DIR_HOST)/bin/mksquashfs $(call mkfs_target_dir,$(1)) $@ \ -nopad -noappend -root-owned \ -comp $(SQUASHFSCOMP) $(SQUASHFSOPT) endef diff --git a/target/linux/ath79/image/common-netgear.mk b/target/linux/ath79/image/common-netgear.mk index 5a61caf1f6..0909a284d1 100644 --- a/target/linux/ath79/image/common-netgear.mk +++ b/target/linux/ath79/image/common-netgear.mk @@ -12,10 +12,10 @@ define Build/netgear-squashfs rm -rf $@.fs $@.squashfs mkdir -p $@.fs/image cp $@ $@.fs/image/uImage - $(STAGING_DIR_HOST)/bin/mksquashfs-lzma \ + $(STAGING_DIR_HOST)/bin/mksquashfs \ $@.fs $@.squashfs -be \ - -noappend -root-owned -b 65536 \ - $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH)) + -comp lzma -noappend -root-owned -b 65536 \ + $(if $(SOURCE_DATE_EPOCH),-all-time $(SOURCE_DATE_EPOCH)) dd if=/dev/zero bs=1k count=1 >> $@.squashfs mkimage \ -- 2.30.2