From patchwork Sun Jun 20 21:35:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Spooren X-Patchwork-Id: 1494807 X-Patchwork-Delegate: mail@aparcar.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=gj8os+IC; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G7Qxr2hfhz9sVp for ; Mon, 21 Jun 2021 07:38:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3pLAOrj5yeZbRCE6L136zigmPMXzSQW7eJwDocRqFmY=; b=gj8os+ICFCcQKR Bdb18eudC/FwxtCNbB9lQHhvSR/LtZQSnJyPMn6upKK3OFXTuEBNpt27hxABxr0E2vmb7hQdKxN5H gLq2DLLmmiVP0q5lSt328hj3k5Vmlr6gkn+AL/sIPJIaUBtaowVPKkuPIim4lUYtfSCOHpkg/Adj1 5pLvB+s8DzSO5JQB6If8SMY6K4Zr0yzybOXkp5K2nQzI8IjyG3H1KQ1AWH3GOcM39tuijk/bAZf71 ydgdGNd35zyjuMiMmwFBLD+i/5FJ/zyATERoohQYFtYXE7ngEVH0Rr+97f2x5NjKCBj8czaN/aPEA nDLilgPT/JWwgvRmTDrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lv57C-001cQi-7p; Sun, 20 Jun 2021 21:36:26 +0000 Received: from relay11.mail.gandi.net ([217.70.178.231]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lv56j-001cFX-NA for openwrt-devel@lists.openwrt.org; Sun, 20 Jun 2021 21:36:00 +0000 Received: from reactor.lan (udp102851uds.hawaiiantel.net [72.235.131.57]) (Authenticated sender: mail@aparcar.org) by relay11.mail.gandi.net (Postfix) with ESMTPA id 16079100008; Sun, 20 Jun 2021 21:35:54 +0000 (UTC) From: Paul Spooren To: openwrt-devel@lists.openwrt.org Cc: Paul Spooren Subject: [PATCH 2/3] build,squashfs: switch to squashfs-tools-ng Date: Sun, 20 Jun 2021 11:35:41 -1000 Message-Id: <20210620213542.4087497-3-mail@aparcar.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210620213542.4087497-1-mail@aparcar.org> References: <20210620213542.4087497-1-mail@aparcar.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210620_143558_070877_8C8510C3 X-CRM114-Status: UNSURE ( 6.22 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Let the newly added `squasfs-tools-ng` handle the squashfs file creation. Signed-off-by: Paul Spooren --- include/image.mk | 23 ++++++++++++++++------- tools/Makefile | 6 +++--- 2 files changed, 19 insertions(+), 10 deletions(-) Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.178.231 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.178.231 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Let the newly added `squasfs-tools-ng` handle the squashfs file creation. Signed-off-by: Paul Spooren --- include/image.mk | 23 ++++++++++++++++------- tools/Makefile | 6 +++--- 2 files changed, 19 insertions(+), 10 deletions(-) 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 a48aa80db3..2f0c090ee9 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 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,12 +69,12 @@ $(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)/autoconf/compile $(curdir)/xz/compile $(curdir)/zlib/compile $(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