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)
$(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
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
$(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
$(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