From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 2/5] fs/ext2: use mkfs to generate rootfs image
Date: Tue, 4 Jul 2017 16:47:26 +0200 [thread overview]
Message-ID: <20170704144729.19753-3-s.martin49@gmail.com> (raw)
In-Reply-To: <20170704144729.19753-1-s.martin49@gmail.com>
From: S?bastien Szymanski <sebastien.szymanski@armadeus.com>
mkfs is now capable of generating rootfs images. Use mkfs instead of
genext2fs.
If not set, we now let mkfs calculate the block size and the number of
inodes needed.
This change also adjusts the options to meet those of mkfs.
Notes:
* Passing a null inode number to mkfs triggers its automatic calculation.
* Passing a fs-size with no unit suffix to mkfs is interpreted as using
1K block size.
Signed-off-by: S?bastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v4->v5:
- remove BR2_TARGET_ROOTFS_EXT2_BLOCKS renaming
- update commit log
changes v3->v4:
- disable the size check when ext* rootfs is disabled
- remove unneeded comment
- introduce a _WRAP symbol to actually select BR2_LEGACY when needed
(Arnout)
changes v2->v3:
- reword commit log
changes v1->v2:
- rebase
- add default size value
---
fs/ext2/Config.in | 2 +-
fs/ext2/ext2.mk | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/fs/ext2/Config.in b/fs/ext2/Config.in
index ec1b5f2c55..9c58ac62ed 100644
--- a/fs/ext2/Config.in
+++ b/fs/ext2/Config.in
@@ -1,6 +1,6 @@
config BR2_TARGET_ROOTFS_EXT2
bool "ext2/3/4 root filesystem"
- select BR2_PACKAGE_HOST_MKE2IMG
+ select BR2_PACKAGE_HOST_E2FSPROGS
help
Build an ext2/3/4 root filesystem
diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index 8a648dd66c..bff442ff18 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -10,18 +10,18 @@ EXT2_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
#" Syntax highlighting... :-/ )
EXT2_OPTS = \
- -G $(BR2_TARGET_ROOTFS_EXT2_GEN) \
- -R $(BR2_TARGET_ROOTFS_EXT2_REV) \
- -B 1024 \
- -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS) \
- -i $(BR2_TARGET_ROOTFS_EXT2_INODES) \
- -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) \
- -l "$(EXT2_LABEL)"
+ -d $(TARGET_DIR) \
+ -r $(BR2_TARGET_ROOTFS_EXT2_REV) \
+ -N $(BR2_TARGET_ROOTFS_EXT2_INODES) \
+ -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) \
+ -L "$(EXT2_LABEL)"
-ROOTFS_EXT2_DEPENDENCIES = host-mke2img
+ROOTFS_EXT2_DEPENDENCIES = host-e2fsprogs
define ROOTFS_EXT2_CMD
- PATH=$(BR_PATH) mke2img -d $(TARGET_DIR) $(EXT2_OPTS) -o $@
+ rm -f $@
+ PATH=$(BR_PATH) mkfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN) $(EXT2_OPTS) $@ \
+ $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
endef
rootfs-ext2-symlink:
--
2.13.2
next prev parent reply other threads:[~2017-07-04 14:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-04 14:47 [Buildroot] [PATCH v5 0/5] fs/ext2: cleanup and improvement Samuel Martin
2017-07-04 14:47 ` [Buildroot] [PATCH v5 1/5] fs/ext2: deprecate BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES option Samuel Martin
2017-07-04 17:01 ` Arnout Vandecappelle
2017-07-04 22:40 ` Thomas Petazzoni
2017-07-04 14:47 ` Samuel Martin [this message]
2017-07-04 17:12 ` [Buildroot] [PATCH v5 2/5] fs/ext2: use mkfs to generate rootfs image Arnout Vandecappelle
2017-07-04 22:41 ` Thomas Petazzoni
2017-07-04 14:47 ` [Buildroot] [PATCH v5 3/5] fs/ext2: rename BR2_TARGET_ROOTFS_EXT2_BLOCKS -> BR2_TARGET_ROOTFS_EXT2_SIZE Samuel Martin
2017-07-04 17:28 ` Arnout Vandecappelle
2017-07-04 23:39 ` Peter Korsgaard
2017-07-04 14:47 ` [Buildroot] [PATCH v5 4/5] fs/ext2: Add BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS option Samuel Martin
2017-07-04 17:39 ` Arnout Vandecappelle
2017-07-05 12:08 ` Sébastien Szymanski
2017-07-04 14:47 ` [Buildroot] [PATCH v5 5/5] package/mke2img: remove package Samuel Martin
2017-07-04 22:55 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170704144729.19753-3-s.martin49@gmail.com \
--to=s.martin49@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox