From a889fc5995c5d0b8c9a41b5974f5722d52cdb2c5 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Fri, 10 Apr 2020 21:55:48 -1000 Subject: [PATCH] build,squashfs: switch to squashfs-tools-ng Let the newly added `squasfs-tools-ng` handle the squashfs file creation. Signed-off-by: Paul Spooren Signed-off-by: Alexander Couzens --- include/image.mk | 10 +++++----- tools/Makefile | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/image.mk b/include/image.mk index 984b64fb9c..2ebc89d9a3 100644 --- a/include/image.mk +++ b/include/image.mk @@ -78,7 +78,6 @@ JFFS2OPTS += $(MKFS_DEVTABLE_OPT) 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 ifeq ($(CONFIG_SQUASHFS_XZ),y) @@ -234,11 +233,12 @@ endef $(eval $(foreach S,$(JFFS2_BLOCKSIZE),$(call Image/mkfs/jffs2/template,$(S)))) $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S)))) +# use tar2sqfs because gensquashfs lacks the owned by root feature define Image/mkfs/squashfs - $(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \ - -nopad -noappend -root-owned \ - -comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \ - -processors 1 + echo 'dir / 0755 0 0' > $@.squashfs.packfile + echo 'dir /dev 0755 0 0' >> $@.squashfs.packfile + echo 'nod /dev/console 0600 0 0 c 5 1' >> $@.squashfs.packfile + $(STAGING_DIR_HOST)/bin/gensquashfs -d uid=0,gid=0,mtime=0 --all-root $(SQUASHFSOPT) -F $@.squashfs.packfile -D $(call mkfs_target_dir,$(1)) endef # $(1): board name diff --git a/tools/Makefile b/tools/Makefile index 02556d4b83..97a2a5bd69 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -33,7 +33,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_ar71xx) += lzma-old tools-$(CONFIG_TARGET_ar71xx)$(CONFIG_TARGET_ath79) += squashfs tools-$(CONFIG_USES_MINOR) += kernel2minor -tools-y += lzma squashfskit4 zip +tools-y += lzma squashfs-tools-ng zip tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_ISL) += isl tools-$(CONFIG_USE_SPARSE) += sparse @@ -45,7 +45,7 @@ $(curdir)/bison/compile := $(curdir)/flex/compile $(curdir)/flex/compile := $(curdir)/libtool/compile $(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile -$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile +$(curdir)/squashfs-tools-ng/compile := $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile $(curdir)/autoconf/compile := $(curdir)/m4/compile $(curdir)/automake/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/pkgconf/compile $(curdir)/xz/compile @@ -80,7 +80,7 @@ $(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile $(curdir)/cbootimage/compile += $(curdir)/automake/compile ifneq ($(HOST_OS),Linux) - $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile + $(curdir)/squashfs-tools-ng/compile += $(curdir)/coreutils/compile tools-y += coreutils endif -- 2.30.2