From patchwork Wed Jul 5 21:00:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 784841 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x2tYp2rPzz9s7F for ; Thu, 6 Jul 2017 07:00:30 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NCuR3UbK"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9952289025; Wed, 5 Jul 2017 21:00:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IgcCwoIu2ayp; Wed, 5 Jul 2017 21:00:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id CBF64892C9; Wed, 5 Jul 2017 21:00:25 +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 810671C411B for ; Wed, 5 Jul 2017 21:00:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7B204252CF for ; Wed, 5 Jul 2017 21:00:21 +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 f2emnwYAzvoB for ; Wed, 5 Jul 2017 21:00:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by silver.osuosl.org (Postfix) with ESMTPS id AE12F244BC for ; Wed, 5 Jul 2017 21:00:20 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id z45so220911wrb.2 for ; Wed, 05 Jul 2017 14:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gDgWFbOhW8LlY33to4nrAxhGxEUHnbZpBiz0jbjPgF0=; b=NCuR3UbKaQ12JFFTe1TX9Dh/pA7ytjWf8IoZStISqSgv26vj+h3k062z9C6GkLSbBW hLbg4ZYvltHNYdqywsSIXTDEFXesx3823qKSKaJOsXcbTMbxtB6/cX2BR/9kwo3Xd76O sJx+cCPXRmdEy0NZjlH+SIYg5TQencg+ZHzIQBJ2OZ4uIYyVkgTPSRbM3Wb9vDJgB8V7 D0nLxzirIHoLXqx5VbK1A3uusF0q5C6P59XsKv6v1o2Q2V9FZsb2svGV7e5LZnrfrzO7 eozFm7bmzvLlWAfvq98cr2EBoY4bmOMhQv6sS3BwQUa7sQpZGyRzNWaFkR2vBWhB0mS4 3chw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gDgWFbOhW8LlY33to4nrAxhGxEUHnbZpBiz0jbjPgF0=; b=hj76NVRVprjwyUe/+xU+MzOVInyBPkNnRLSpyPTcIpI27ntQkkY5syB65ZQkKjBC9M WNLQ/lcZDt7adwaEncoZ3n0MsXXatdWTQJTP0303XDLSUuyjY4VWEMmYlvA/yC90yy6V 4UoNXHNTLYR4Q3/GU90D20VXZKcG5on4nFJVPc/XD2TV6DlK4ADPS3wy7A+bDeuI8W/0 CiX4G3TS7hIFtYXE4ZKbj4SzKMzw4fkPxFvMZzXrCAsMfSdB1v64FM42RLCdtwlsTJ+E RiaEk+QkkqAaAseVHO+oTlQURJVoNsnlhi7E5E1SSdFuGomuJw2O6+B06RwlTnGc883C kh1g== X-Gm-Message-State: AKS2vOySYqa+bbyyterHPnCWzwOQbWpBLZ4TH+EGGbK3XnJBLE4yzJxE Vx6gfw8bn6nrTSw/Wdc= X-Received: by 10.28.225.133 with SMTP id y127mr32191187wmg.51.1499288418894; Wed, 05 Jul 2017 14:00:18 -0700 (PDT) Received: from localhost.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by smtp.gmail.com with ESMTPSA id 3sm56937wrs.18.2017.07.05.14.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 14:00:18 -0700 (PDT) From: Samuel Martin To: buildroot@buildroot.org Date: Wed, 5 Jul 2017 23:00:12 +0200 Message-Id: <20170705210012.10226-2-s.martin49@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170705210012.10226-1-s.martin49@gmail.com> References: <20170705210012.10226-1-s.martin49@gmail.com> MIME-Version: 1.0 Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH v8 2/2] fs/ext2: Add BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS option X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Sébastien Szymanski This option lets the user specify mke2fs options and/or ext2/3/4 features. Signed-off-by: Sébastien Szymanski Signed-off-by: Samuel Martin Cc: "Yann E. MORIN" Reviewed-by: Arnout Vandecappelle (Essensium/Mind) --- changes v7->v8: - typos (Arnout) changes v6->v7: - none changes v5->v6: - wrap help text at 70 chars. (Arnout) - reword default value explainations (Arnout) changes v4->v5: - turn the options to accept any mke2fs options, not only ext2/3/4 features (Arnout) - add explaination for the default value for this new option (Arnout) changes v3->v4: - none changes v2->v3: - none changes v1->v2: - rebase --- fs/ext2/Config.in | 18 ++++++++++++++++++ fs/ext2/ext2.mk | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/fs/ext2/Config.in b/fs/ext2/Config.in index a851afb439..f0a5cd76e2 100644 --- a/fs/ext2/Config.in +++ b/fs/ext2/Config.in @@ -68,6 +68,24 @@ config BR2_TARGET_ROOTFS_EXT2_RESBLKS Traditionally, this has been 5%, and all ext-related tools still default to reserving 5% when creating a new ext filesystem. +config BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS + string "additional mke2fs options" + default "-O ^64bit" + help + Specify a space-separated list of mke2fs options, including any + ext2/3/4 filesystem features. + + For more information about the mke2fs options, see the manual + page mke2fs(8). + + For more information about the ext2/3/4 features which can be + set, see then manual page ext4(5). + + The default is "-O ^64bit", i.e. disable the 64-bit filesystem. + This is chosen because U-Boot versions before 2017.02 don't + support that filesystem option, which may render the system + unbootable if it is used. + choice prompt "Compression method" default BR2_TARGET_ROOTFS_EXT2_NONE diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk index fdd4a389a0..902e6639ee 100644 --- a/fs/ext2/ext2.mk +++ b/fs/ext2/ext2.mk @@ -9,6 +9,8 @@ ifeq ($(BR2_TARGET_ROOTFS_EXT2)-$(EXT2_SIZE),y-) $(error BR2_TARGET_ROOTFS_EXT2_SIZE cannot be empty) endif +EXT2_MKFS_OPTS = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS)) + # qstrip results in stripping consecutive spaces into a single one. So the # variable is not qstrip-ed to preserve the integrity of the string value. EXT2_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL)) @@ -19,7 +21,8 @@ EXT2_OPTS = \ -r $(BR2_TARGET_ROOTFS_EXT2_REV) \ -N $(BR2_TARGET_ROOTFS_EXT2_INODES) \ -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) \ - -L "$(EXT2_LABEL)" + -L "$(EXT2_LABEL)" \ + $(EXT2_MKFS_OPTS) ROOTFS_EXT2_DEPENDENCIES = host-e2fsprogs