Skip to contentSkip to conversation

fs/ext2: cleanup and improvement

PATCH Superseded Samuel Martin 2 participants 8 messages Jul 3, 2017 ext2 file system

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover fs/ext2: cleanup and improvement

Hi all,

Here is a short series based on 2 series initially sent early last May by S?bastien Szymanski and Yann E. Morin, refactoring and improvement the ext* image support.

This series is mostly about merging and updating these 2 series into a single one.

Regards,

Samuel Martin (1):
fs/ext2: simplify code

S?bastien Szymanski (3):
fs/ext2: use mkfs to generate rootfs image fs/ext2: Add BR2_TARGET_ROOTFS_EXT2_FEATURES option package/mke2img: remove package

Yann E. MORIN (2):
fs/ext2: always pass the label option
fs/ext2: allow reserving zero block for root

 Config.in.legacy               |  40 +++++++++
 DEVELOPERS                     |   1 -
 fs/ext2/Config.in              |  44 +++++----
 fs/ext2/ext2.mk                |  30 +++----
 package/Config.in.host         |   1 -
 package/mke2img/Config.in.host |  11 ---
 package/mke2img/mke2img        | 199 -----------------------------------------
 package/mke2img/mke2img.mk     |  13 ---
 8 files changed, 80 insertions(+), 259 deletions(-)
 delete mode 100644 package/mke2img/Config.in.host
 delete mode 100755 package/mke2img/mke2img
 delete mode 100644 package/mke2img/mke2img.mk

--
2.13.2

#1 lore raw

PATCH v2 1/6 fs/ext2: always pass the label option

From: "Yann E. MORIN" <[email protected]>

... since passing an empty string is equivalent to not setting a label.

And fix the syntax highlighting in some editors...

---
changes v1->v2:
- rebase

---
 fs/ext2/ext2.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/ext2/ext2.mk +2 -2
index 9d3e8fd666..277e696290 100644
@@ -20,9 +20,9 @@ endif
 # 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))
-ifneq ($(EXT2_LABEL),)
+#" Syntax highlighting... :-/ )
+
 EXT2_OPTS += -l "$(EXT2_LABEL)"
-endif
 
 ROOTFS_EXT2_DEPENDENCIES = host-mke2img
 
Signature · 1 line
2.13.2
#2 lore raw

PATCH v2 2/6 fs/ext2: allow reserving zero block for root

In reply to Samuel Martin

From: "Yann E. MORIN" <[email protected]>

The previous default, zero, just meant "use the default value of the filesystem generator", which happened to be 5% (the traditional value for all ext-creating tools we've ever seen).

So, change the new default accordingly to 5%.

---
changes v1->v2:
- rebase
- fix typos

---
 fs/ext2/Config.in | 7 ++++++-
 fs/ext2/ext2.mk   | 2 --
 2 files changed, 6 insertions(+), 3 deletions(-)
fs/ext2/Config.in +6 -1
index a1e3647a14..33891601f4 100644
@@ -65,7 +65,12 @@ config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES
 
 config BR2_TARGET_ROOTFS_EXT2_RESBLKS
 	int "reserved blocks percentage"
-	default 0
+	default 5
+	help
+	  The number of blocks on the filesystem (as a percentage of the
+	  total number of blocks), that are reserved for use by root.
+	  Traditionally, this has been 5%, and all ext-related tools still
+	  default to reserving 5% when creating a new ext filesystem.
 
 choice
 	prompt "Compression method"
fs/ext2/ext2.mk +0 -2
index 277e696290..ce567de34c 100644
@@ -13,9 +13,7 @@ EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES)
 endif
 EXT2_OPTS += -I $(BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES)
 
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0)
 EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
-endif
 
 # 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.
Signature · 1 line
2.13.2
#3 lore raw

PATCH v2 3/6 fs/ext2: use mkfs to generate rootfs image

In reply to Samuel Martin

From: S?bastien Szymanski <[email protected]>

mkfs is now capable of generating rootfs images. Use mkfs intead of genext2fs. As we let mkfs calculate the block size and the number of inodes needed we can drop BR2_TARGET_ROOTFS_EXT2_INODES and BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES and rename BR2_TARGET_ROOTFS_EXT2_BLOCKS to BR2_TARGET_ROOTFS_EXT2_SIZE

---
changes v1->v2:
- rebase
- add default size value

---
 Config.in.legacy  | 34 ++++++++++++++++++++++++++++++++++
 fs/ext2/Config.in | 27 +++++++++------------------
 fs/ext2/ext2.mk   | 22 +++++++++++-----------
 3 files changed, 54 insertions(+), 29 deletions(-)
Config.in.legacy +34 -0
index 453c5eb8b8..c086d30ee5 100644
@@ -145,6 +145,40 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2017.08"
 
+config BR2_TARGET_ROOTFS_EXT2_INODES
+	int "exact number of inodes has been removed"
+	default 0
+	help
+	  Buildroot uses mkfs.ext2/3/4 to generate ext2/3/4 images. So let mkfs
+	  automatically selects the number of inodes needed. Set this option to
+	  0.
+
+config BR2_TARGET_ROOTFS_EXT2_INODES_WRAP
+	bool
+	default y if BR2_TARGET_ROOTFS_EXT2_INODES != 0
+	select BR2_LEGACY
+
+config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES
+	int "extra inodes has been removed" if BR2_TARGET_ROOTFS_EXT2_INODES = 0
+	default 0
+	help
+	  Buildroot uses mkfs.ext2/3/4 to generate ext2/3/4 images. So let mkfs
+	  automatically selects the number of inodes needed. Set this option to
+	  0.
+
+config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES_WRAP
+	bool
+	default y if BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES != 0
+	select BR2_LEGACY
+
+config BR2_TARGET_ROOTFS_EXT2_BLOCKS
+	int "exact size in blocks has been removed"
+	default 0
+	help
+	  This option has been removed in favor of BR2_TARGET_ROOTFS_EXT2_SIZE.
+
+# Note: BR2_TARGET_ROOTFS_EXT2_BLOCKS still reference in fs/ext2/Config.in
+
 config BR2_STRIP_none
 	bool "Strip command 'none' has been removed"
 	select BR2_LEGACY
fs/ext2/Config.in +9 -18
index 33891601f4..d3e9d16a44 100644
@@ -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
 
@@ -44,24 +44,15 @@ config BR2_TARGET_ROOTFS_EXT2_REV
 config BR2_TARGET_ROOTFS_EXT2_LABEL
 	string "filesystem label"
 
-# 61440 = 60MB, i.e usually small enough to fit on a 64MB media
-config BR2_TARGET_ROOTFS_EXT2_BLOCKS
-	int "exact size in blocks"
-	default 61440
+config BR2_TARGET_ROOTFS_EXT2_SIZE
+	string "exact size"
+	default BR2_TARGET_ROOTFS_EXT2_BLOCKS if BR2_TARGET_ROOTFS_EXT2_BLOCKS != 0 # legacy 2017.08
+	default "60M" # default size
 	help
-	  Specify the file system size as a number of 1024-byte blocks.
-
-config BR2_TARGET_ROOTFS_EXT2_INODES
-	int "exact number of inodes (leave at 0 for auto calculation)"
-	default 0
-
-config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES
-	int "extra inodes" if BR2_TARGET_ROOTFS_EXT2_INODES = 0
-	default 0
-	help
-	  Enter here the number of extra free inodes you want on
-	  your filesystem. By default, Buildroot will not leave
-	  many free inodes.
+	  The size of the filesystem image. If it does not have a suffix, it is
+	  interpreted as power-of-two kilobytes. If it is suffixed by 'k', 'm',
+	  'g', 't' (either upper-case or lower-case), then it is interpreted in
+	  power-of-two kilobytes, megabytes, gigabytes, terabytes, etc.
 
 config BR2_TARGET_ROOTFS_EXT2_RESBLKS
 	int "reserved blocks percentage"
fs/ext2/ext2.mk +11 -11
index ce567de34c..5269e99a29 100644
@@ -4,28 +4,28 @@
 #
 ################################################################################
 
-EXT2_OPTS = -G $(BR2_TARGET_ROOTFS_EXT2_GEN) -R $(BR2_TARGET_ROOTFS_EXT2_REV)
-
-EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
-
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
-EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES)
+EXT2_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_SIZE))
+ifeq ($(EXT2_SIZE),)
+$(error BR2_TARGET_ROOTFS_EXT2_SIZE cannot be empty)
 endif
-EXT2_OPTS += -I $(BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES)
 
-EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
+EXT2_OPTS = -d $(TARGET_DIR)
+EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_REV)
+
+EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
 
 # 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))
 #" Syntax highlighting... :-/ )
 
-EXT2_OPTS += -l "$(EXT2_LABEL)"
+EXT2_OPTS += -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) $@ $(EXT2_SIZE)
 endef
 
 rootfs-ext2-symlink:
Signature · 1 line
2.13.2
#4 lore raw

PATCH v2 3/6 fs/ext2: use mkfs to generate rootfs image

Samuel, S?bastien, All,

On 2017-07-03 17:51 +0200, Samuel Martin spake thusly:

Quoted 7 lines

From: S?bastien Szymanski <[email protected]>

mkfs is now capable of generating rootfs images. Use mkfs intead of genext2fs. As we let mkfs calculate the block size and the number of inodes needed we can drop BR2_TARGET_ROOTFS_EXT2_INODES and BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES and rename BR2_TARGET_ROOTFS_EXT2_BLOCKS to BR2_TARGET_ROOTFS_EXT2_SIZE

This is incorrect, because we now loose two features:

1. the possibility to force the number of inodes;

2. the possibility to auto-calculate the number of inodes, but add a bit of extra ones.

While I agree that mkfs.ext2 can now autocalculate the number of inodes and so we need not do it ourselves anymore. However, we so far had the option to force the exact number of inodes, and this is lost with this patch.

So, I would like that:

1. we keep BR2_TARGET_ROOTFS_EXT2_INODES and handle adequately:
- if it is set to zero, we let mkfs auto-calcualte
- if it is non-zero, we pass -N $(BR2_TARGET_ROOTFS_EXT2_INODES)

2. we indeed drop the option to set the extra number of inodes, as there is no way to pass this information to mkfs.ext2

So, can you rework this patch as thus:

- split it in two, with the first one that drops (and adds legacy for) BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES

- the seond patch is the actual switch to using mkfs.ext2, but keeps using BR2_TARGET_ROOTFS_EXT2_INODES

Thank you! :-)

Regards,
Yann E. MORIN.

Quoted 154 lines

---
changes v1->v2:
- rebase
- add default size value

---
 Config.in.legacy  | 34 ++++++++++++++++++++++++++++++++++
 fs/ext2/Config.in | 27 +++++++++------------------
 fs/ext2/ext2.mk   | 22 +++++++++++-----------
 3 files changed, 54 insertions(+), 29 deletions(-)
Config.in.legacy +34 -0
index 453c5eb8b8..c086d30ee5 100644
@@ -145,6 +145,40 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2017.08"
 
+config BR2_TARGET_ROOTFS_EXT2_INODES
+	int "exact number of inodes has been removed"
+	default 0
+	help
+	  Buildroot uses mkfs.ext2/3/4 to generate ext2/3/4 images. So let mkfs
+	  automatically selects the number of inodes needed. Set this option to
+	  0.
+
+config BR2_TARGET_ROOTFS_EXT2_INODES_WRAP
+	bool
+	default y if BR2_TARGET_ROOTFS_EXT2_INODES != 0
+	select BR2_LEGACY
+
+config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES
+	int "extra inodes has been removed" if BR2_TARGET_ROOTFS_EXT2_INODES = 0
+	default 0
+	help
+	  Buildroot uses mkfs.ext2/3/4 to generate ext2/3/4 images. So let mkfs
+	  automatically selects the number of inodes needed. Set this option to
+	  0.
+
+config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES_WRAP
+	bool
+	default y if BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES != 0
+	select BR2_LEGACY
+
+config BR2_TARGET_ROOTFS_EXT2_BLOCKS
+	int "exact size in blocks has been removed"
+	default 0
+	help
+	  This option has been removed in favor of BR2_TARGET_ROOTFS_EXT2_SIZE.
+
+# Note: BR2_TARGET_ROOTFS_EXT2_BLOCKS still reference in fs/ext2/Config.in
+
 config BR2_STRIP_none
 	bool "Strip command 'none' has been removed"
 	select BR2_LEGACY
fs/ext2/Config.in +9 -18
index 33891601f4..d3e9d16a44 100644
@@ -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
 
@@ -44,24 +44,15 @@ config BR2_TARGET_ROOTFS_EXT2_REV
 config BR2_TARGET_ROOTFS_EXT2_LABEL
 	string "filesystem label"
 
-# 61440 = 60MB, i.e usually small enough to fit on a 64MB media
-config BR2_TARGET_ROOTFS_EXT2_BLOCKS
-	int "exact size in blocks"
-	default 61440
+config BR2_TARGET_ROOTFS_EXT2_SIZE
+	string "exact size"
+	default BR2_TARGET_ROOTFS_EXT2_BLOCKS if BR2_TARGET_ROOTFS_EXT2_BLOCKS != 0 # legacy 2017.08
+	default "60M" # default size
 	help
-	  Specify the file system size as a number of 1024-byte blocks.
-
-config BR2_TARGET_ROOTFS_EXT2_INODES
-	int "exact number of inodes (leave at 0 for auto calculation)"
-	default 0
-
-config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES
-	int "extra inodes" if BR2_TARGET_ROOTFS_EXT2_INODES = 0
-	default 0
-	help
-	  Enter here the number of extra free inodes you want on
-	  your filesystem. By default, Buildroot will not leave
-	  many free inodes.
+	  The size of the filesystem image. If it does not have a suffix, it is
+	  interpreted as power-of-two kilobytes. If it is suffixed by 'k', 'm',
+	  'g', 't' (either upper-case or lower-case), then it is interpreted in
+	  power-of-two kilobytes, megabytes, gigabytes, terabytes, etc.
 
 config BR2_TARGET_ROOTFS_EXT2_RESBLKS
 	int "reserved blocks percentage"
fs/ext2/ext2.mk +11 -11
index ce567de34c..5269e99a29 100644
@@ -4,28 +4,28 @@
 #
 ################################################################################
 
-EXT2_OPTS = -G $(BR2_TARGET_ROOTFS_EXT2_GEN) -R $(BR2_TARGET_ROOTFS_EXT2_REV)
-
-EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
-
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
-EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES)
+EXT2_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_SIZE))
+ifeq ($(EXT2_SIZE),)
+$(error BR2_TARGET_ROOTFS_EXT2_SIZE cannot be empty)
 endif
-EXT2_OPTS += -I $(BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES)
 
-EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
+EXT2_OPTS = -d $(TARGET_DIR)
+EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_REV)
+
+EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
 
 # 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))
 #" Syntax highlighting... :-/ )
 
-EXT2_OPTS += -l "$(EXT2_LABEL)"
+EXT2_OPTS += -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) $@ $(EXT2_SIZE)
 endef
 
 rootfs-ext2-symlink:
Signature · 6 lines
2.13.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH v2 4/6 fs/ext2: Add BR2_TARGET_ROOTFS_EXT2_FEATURES option

In reply to Samuel Martin

From: S?bastien Szymanski <[email protected]>

This option lets the user specify ext2/3/4 features.

---
changes v1->v2:
- rebase

---
 fs/ext2/Config.in | 10 ++++++++++
 fs/ext2/ext2.mk   |  5 +++++
 2 files changed, 15 insertions(+)
fs/ext2/Config.in +10 -0
index d3e9d16a44..1b0ccf1395 100644
@@ -63,6 +63,16 @@ 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_FEATURES
+	string "Filesystem features"
+	default "^64bit"
+	help
+	  Specify a comma-separated list of ext2/3/4 features.
+	  For more information about this option, see the mkefs' -O option in
+	  the manual page mke2fs(8).
+	  For more information about the features which can be set, see then
+	  manual page ext4(5).
+
 choice
 	prompt "Compression method"
 	default BR2_TARGET_ROOTFS_EXT2_NONE
fs/ext2/ext2.mk +5 -0
index 5269e99a29..7ab2b5cf8f 100644
@@ -12,6 +12,11 @@ endif
 EXT2_OPTS = -d $(TARGET_DIR)
 EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_REV)
 
+EXT2_FEATURES = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_FEATURES))
+ifneq ($(EXT2_FEATURES),)
+EXT2_OPTS += -O "$(EXT2_FEATURES)"
+endif
+
 EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
 
 # qstrip results in stripping consecutive spaces into a single one. So the
Signature · 1 line
2.13.2
#6 lore raw

PATCH v2 5/6 fs/ext2: simplify code

In reply to Samuel Martin

Just collate all options into a single assignment.

Cc S?bastien Szymanski <[email protected]>
Cc "Yann E. MORIN" <[email protected]>

---
changes v1->v2:
- new patch

---
 fs/ext2/ext2.mk | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
fs/ext2/ext2.mk +6 -9
index 7ab2b5cf8f..1b3c1db39b 100644
@@ -9,22 +9,19 @@ ifeq ($(EXT2_SIZE),)
 $(error BR2_TARGET_ROOTFS_EXT2_SIZE cannot be empty)
 endif
 
-EXT2_OPTS = -d $(TARGET_DIR)
-EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_REV)
-
 EXT2_FEATURES = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_FEATURES))
-ifneq ($(EXT2_FEATURES),)
-EXT2_OPTS += -O "$(EXT2_FEATURES)"
-endif
-
-EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
 
 # 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))
 #" Syntax highlighting... :-/ )
 
-EXT2_OPTS += -L "$(EXT2_LABEL)"
+EXT2_OPTS = \
+	-d $(TARGET_DIR) \
+	-r $(BR2_TARGET_ROOTFS_EXT2_REV) \
+	-m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) \
+	-L "$(EXT2_LABEL)" \
+	$(if $(EXT2_FEATURES),-O "$(EXT2_FEATURES)")
 
 ROOTFS_EXT2_DEPENDENCIES = host-e2fsprogs
 
Signature · 1 line
2.13.2
#7 lore raw

PATCH v2 6/6 package/mke2img: remove package

In reply to Samuel Martin

From: S?bastien Szymanski <[email protected]>

Now that we use mkfs to generate ext2/3/4 filesystem image by calling mkfs directly from fs/ext2/ext2.mk, we can remove this package.

---
changes v1->v2:
- rebase

---
 Config.in.legacy               |   6 ++
 DEVELOPERS                     |   1 -
 package/Config.in.host         |   1 -
 package/mke2img/Config.in.host |  11 ---
 package/mke2img/mke2img        | 199 -----------------------------------------
 package/mke2img/mke2img.mk     |  13 ---
 6 files changed, 6 insertions(+), 225 deletions(-)
 delete mode 100644 package/mke2img/Config.in.host
 delete mode 100755 package/mke2img/mke2img
 delete mode 100644 package/mke2img/mke2img.mk
Config.in.legacy +6 -0
index c086d30ee5..c63c2f5bd5 100644
@@ -145,6 +145,12 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2017.08"
 
+config BR2_PACKAGE_HOST_MKE2IMG
+	bool "host mke2img has been removed"
+	select BR2_LEGACY
+	help
+	  We now call mkfs directly to generate ext2/3/4 filesystem image.
+
 config BR2_TARGET_ROOTFS_EXT2_INODES
 	int "exact number of inodes has been removed"
 	default 0
DEVELOPERS +0 -1
index d121bd8163..62172abcd0 100644
@@ -1779,7 +1779,6 @@ F:	package/libiscsi/
 F:	package/libseccomp/
 F:	package/linux-tools/
 F:	package/mesa3d-headers/
-F:	package/mke2img/
 F:	package/nbd/
 F:	package/nut/
 F:	package/nvidia-driver/
package/Config.in.host +0 -1
index 0932b9f1f9..c5a852b858 100644
@@ -24,7 +24,6 @@ menu "Host utilities"
 	source "package/lpc3250loader/Config.in.host"
 	source "package/lttng-babeltrace/Config.in.host"
 	source "package/mfgtools/Config.in.host"
-	source "package/mke2img/Config.in.host"
 	source "package/mkpasswd/Config.in.host"
 	source "package/mtd/Config.in.host"
 	source "package/mtools/Config.in.host"
package/mke2img/Config.in.host deleted +0 -11
deleted file mode 100644
index b5bcb8455f..0000000000
@@ -1,11 +0,0 @@
-config BR2_PACKAGE_HOST_MKE2IMG
-	bool "host mke2img"
-	select BR2_PACKAGE_HOST_E2FSPROGS
-	select BR2_PACKAGE_HOST_GENEXT2FS
-	help
-	  Easily create filesystems of the extend familly: ext2/3/4.
-
-	  This tool is bundled by, and specific to Buildroot. However, it can
-	  be used from post-images scripts is needed.
-
-	  https://code.google.com/p/mke2img/
package/mke2img/mke2img deleted +0 -199

199 lines not on this page · raw message

package/mke2img/mke2img.mk deleted +0 -13
deleted file mode 100644
index 9de387a3a3..0000000000
@@ -1,13 +0,0 @@
-################################################################################
-#
-# mke2img
-#
-################################################################################
-
-HOST_MKE2IMG_DEPENDENCIES = host-genext2fs host-e2fsprogs
-
-define HOST_MKE2IMG_INSTALL_CMDS
-	$(INSTALL) -D -m 0755 package/mke2img/mke2img $(HOST_DIR)/usr/bin/mke2img
-endef
-
-$(eval $(host-generic-package))
Signature · 1 line
2.13.2