From: Paul Spooren Date: Sun, 27 Dec 2020 23:03:31 +0000 (-1000) Subject: build,squashfs: switch to squashfs-tools-ng X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ed4471fb938b9ed847f3dc2b2a5329954137ef8d;p=openwrt%2Fstaging%2Faparcar.git build,squashfs: switch to squashfs-tools-ng Let the newly added `squasfs-tools-ng` handle the squashfs file creation. Signed-off-by: Paul Spooren --- diff --git a/include/image.mk b/include/image.mk index a7473abe68..cf43ff1180 100644 --- a/include/image.mk +++ b/include/image.mk @@ -76,12 +76,13 @@ SQUASHFS_BLOCKSIZE := $(CONFIG_TARGET_SQUASHFS_BLOCK_SIZE)k SQUASHFSOPT := -b $(SQUASHFS_BLOCKSIZE) SQUASHFSOPT += -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1' SQUASHFSCOMP := gzip -LZMA_XZ_OPTIONS := -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2 +LZMA_XZ_OPTIONS := -X lc=0,lp=2,pb=2 +BCJ_FILTER:=extreme ifeq ($(CONFIG_SQUASHFS_XZ),y) ifneq ($(filter arm x86 powerpc sparc,$(LINUX_KARCH)),) - BCJ_FILTER:=-Xbcj $(LINUX_KARCH) + BCJ_FILTER:=,$(LINUX_KARCH) endif - SQUASHFSCOMP := xz $(LZMA_XZ_OPTIONS) $(BCJ_FILTER) + SQUASHFSCOMP := xz $(LZMA_XZ_OPTIONS)$(BCJ_FILTER) endif JFFS2_BLOCKSIZE ?= 64k 128k @@ -226,10 +227,18 @@ $(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)) $@ \ - -nopad -noappend -root-owned \ - -comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \ - -processors 1 + echo 'dir /dev 0755 0 0' > $@.squashfs.packfile; \ + echo 'nod /dev/console 0600 0 0 c 5 1' >> $@.squashfs.packfile; \ + echo 'glob / * * *' >> $@.squashfs.packfile; \ + $(STAGING_DIR_HOST)/bin/gensquashfs \ + --block-size $(SQUASHFS_BLOCKSIZE) \ + --all-root \ + --force \ + --compressor $(SQUASHFSCOMP) \ + --defaults uid=0,gid=0,mtime=0 \ + --pack-dir $(call mkfs_target_dir,$(1)) \ + --pack-file $@.squashfs.packfile \ + $@ endef ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y) diff --git a/tools/Makefile b/tools/Makefile index 6c402087a5..e61e7625e1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -25,7 +25,7 @@ tools-y += autoconf autoconf-archive automake bc bison cmake cpio dosfstools tools-y += e2fsprogs fakeroot findutils firmware-utils flex gengetopt tools-y += libressl libtool lzma m4 make-ext4fs meson missing-macros mkimage tools-y += mklibs mm-macros mtd-utils mtools ninja padjffs2 patch-image -tools-y += patchelf pkgconf quilt squashfskit4 sstrip xxd zip zlib zstd +tools-y += patchelf pkgconf quilt squashfs-tools-ng sstrip xxd zip zlib zstd tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_ISL) += isl tools-$(BUILD_TOOLCHAIN) += expat gmp mpc mpfr @@ -69,13 +69,13 @@ $(curdir)/patchelf/compile := $(curdir)/libtool/compile $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile $(curdir)/sdcc/compile := $(curdir)/bison/compile $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile -$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/squashfs-tools-ng/compile := $(curdir)/libtool/compile $(curdir)/xz/compile $(curdir)/zlib/compile +>>>>>>> 107716fe30 (build,squashfs: switch to squashfs-tools-ng) $(curdir)/zlib/compile := $(curdir)/cmake/compile $(curdir)/zstd/compile := $(curdir)/cmake/compile ifneq ($(HOST_OS),Linux) - $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile + $(curdir)/squashfs-tools-ng/compile += $(curdir)/coreutils/compile tools-y += coreutils endif