From patchwork Fri Jun 12 13:32:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 1308171 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sntech.de Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49k1rP4jHCz9s1x for ; Fri, 12 Jun 2020 23:33:07 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 15F6188AA9; Fri, 12 Jun 2020 13:33:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K9tV4RY2ttms; Fri, 12 Jun 2020 13:33:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DD1AF88A65; Fri, 12 Jun 2020 13:33:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id D937E1BF399 for ; Fri, 12 Jun 2020 13:33:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BE900203D5 for ; Fri, 12 Jun 2020 13:33:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MzS3iZyp1ODb for ; Fri, 12 Jun 2020 13:32:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by silver.osuosl.org (Postfix) with ESMTPS id 87DA020364 for ; Fri, 12 Jun 2020 13:32:57 +0000 (UTC) Received: from p5b1279a9.dip0.t-ipconnect.de ([91.18.121.169] helo=phil.sntech) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jjjnh-00027r-MB; Fri, 12 Jun 2020 15:32:53 +0200 From: Heiko Stuebner To: buildroot@buildroot.org Date: Fri, 12 Jun 2020 15:32:49 +0200 Message-Id: <20200612133249.4127906-1-heiko@sntech.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] fs: squashfs: Add config option to pass mksquashfs cmdln paramters. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , heiko@sntech.de, christoph.muellner@theobroma-systems.com Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Christoph Muellner This can be use to specify additional command line argument to mksquashfs (e.g. -nopad). The implementation is inspired by a similar mechanism for ext file system images. Signed-off-by: Christoph Muellner Signed-off-by: Heiko Stuebner --- fs/squashfs/Config.in | 11 +++++++++++ fs/squashfs/squashfs.mk | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/fs/squashfs/Config.in b/fs/squashfs/Config.in index dde2097cb7..789b2cd24a 100644 --- a/fs/squashfs/Config.in +++ b/fs/squashfs/Config.in @@ -5,6 +5,16 @@ config BR2_TARGET_ROOTFS_SQUASHFS if BR2_TARGET_ROOTFS_SQUASHFS +config BR2_TARGET_ROOTFS_SQUASHFS_MKFS_OPTIONS + string "additional mksquashfs options" + default "" + help + Specify a space-separated list of mksquashfs options, including + any squashfs filesystem features. + + For more information about the mke2fs options, see the manual + page mksquashfs(1). + choice prompt "Compression algorithm" default BR2_TARGET_ROOTFS_SQUASHFS4_GZIP @@ -31,4 +41,5 @@ config BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD bool "zstd" endchoice + endif diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk index 34ab048603..4bc6b338b0 100644 --- a/fs/squashfs/squashfs.mk +++ b/fs/squashfs/squashfs.mk @@ -6,7 +6,13 @@ ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs -ROOTFS_SQUASHFS_ARGS = -noappend -processors $(PARALLEL_JOBS) +SQUASHFS_MKFS_OPTS = $(call qstrip,$(BR2_TARGET_ROOTFS_SQUASHFS_MKFS_OPTIONS)) + +ROOTFS_SQUASHFS_ARGS = \ + -noappend \ + -processors \ + $(PARALLEL_JOBS) \ + $(SQUASHFS_MKFS_OPTS) ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4),y) ROOTFS_SQUASHFS_ARGS += -comp lz4 -Xhc