2005-02-10 01:59:22 +01:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2
|
2013-04-11 14:17:51 +02:00
|
|
|
bool "ext2/3/4 root filesystem"
|
package/mke2img: new package
Currently, we are using a shell script called genext2fs, that
impersonates the real genext2fs. But that script does much more than
just call genextfs: it also calls tune2fs and e2fsck.
Because it impersonates genext2fs, we can not easily add new options,
and are constrained by the genext2fs options.
But it turns out that, of all the options supported by the real
genext2fs, we only really care for a subset, namely:
- number of blocks
- number of inodes
- percentage of blocks reeserved to root
- the root directory which to generate the image from
So, we introduce a new host package, mke2img, that is intended to
eventually replace genext2fs.sh.
This new script is highly modeled from the existing genext2fs.sh, but
was slightly refreshed, and a new, supposedly sane set of options has
been choosen for the features we need (see above), and some new options
were added, too, rather than relying on the arguments order or
environment variables:
-b <nb-blocks> number of blocks in the filesystem
-i <nb-inodes> number of inodes in the filesystem
-r <pc-reserved> percentage of reserved blocks
* -d <root-dir> directory containing the root of the filesystem
* -o <img-file> output image file
-G <ext-gen> extfs generation: 2, 3, or 4 (default: 2)
-R <ext-rev> ext2 revision: 0 or 1 (default 1)
-l <label> filesystem label
-u <uid> filesystem UUID; if not specified, a random one is used
* Mandatory options
Since the upstream e2fsprogs are expected to release a new mke2fs that
will be able to generate a filesystem image from a directory, we then
will be able to replace all the logic in mke2img, to use mke2fs instead
of the (relatively fragile) combination of the three tools we currently
use.
An entry is added for it in the "Host utilities" menu, so it can be
selected for use by post-{build,image} scripts. The ext2 filesystem
selection is changed to select that now.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Karoly Kasza <kaszak@gmail.com>
Reviewed-by: Karoly Kasza <kaszak@gmail.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-12-06 23:40:04 +01:00
|
|
|
select BR2_PACKAGE_HOST_MKE2IMG
|
2004-10-09 06:34:21 +02:00
|
|
|
help
|
2013-04-11 14:17:51 +02:00
|
|
|
Build an ext2/3/4 root filesystem
|
2004-10-09 06:34:21 +02:00
|
|
|
|
2013-04-11 14:17:50 +02:00
|
|
|
if BR2_TARGET_ROOTFS_EXT2
|
|
|
|
|
2013-04-11 14:17:53 +02:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_2
|
|
|
|
bool
|
|
|
|
|
2013-04-11 14:17:51 +02:00
|
|
|
choice
|
|
|
|
bool "ext2/3/4 variant"
|
2016-12-13 09:18:27 +01:00
|
|
|
default BR2_TARGET_ROOTFS_EXT2_2r1
|
2013-04-11 14:17:51 +02:00
|
|
|
|
2013-04-11 14:17:53 +02:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_2r0
|
|
|
|
bool "ext2 (rev0)"
|
|
|
|
select BR2_TARGET_ROOTFS_EXT2_2
|
|
|
|
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_2r1
|
|
|
|
bool "ext2 (rev1)"
|
|
|
|
select BR2_TARGET_ROOTFS_EXT2_2
|
2013-04-11 14:17:51 +02:00
|
|
|
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_3
|
|
|
|
bool "ext3"
|
|
|
|
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_4
|
|
|
|
bool "ext4"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_GEN
|
|
|
|
int
|
|
|
|
default 2 if BR2_TARGET_ROOTFS_EXT2_2
|
|
|
|
default 3 if BR2_TARGET_ROOTFS_EXT2_3
|
|
|
|
default 4 if BR2_TARGET_ROOTFS_EXT2_4
|
|
|
|
|
2013-04-11 14:17:53 +02:00
|
|
|
# All ext generations are revision 1, except ext2r0, which is revision 0
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_REV
|
2013-12-25 12:09:31 +01:00
|
|
|
int
|
|
|
|
default 0 if BR2_TARGET_ROOTFS_EXT2_2r0
|
|
|
|
default 1 if !BR2_TARGET_ROOTFS_EXT2_2r0
|
2013-04-11 14:17:53 +02:00
|
|
|
|
2014-12-06 23:40:06 +01:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_LABEL
|
|
|
|
string "filesystem label"
|
|
|
|
|
2017-03-24 17:20:29 +01:00
|
|
|
# 61440 = 60MB, i.e usually small enough to fit on a 64MB media
|
2005-01-23 11:53:06 +01:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_BLOCKS
|
2017-03-24 17:20:29 +01:00
|
|
|
int "exact size in blocks"
|
|
|
|
default 61440
|
2005-02-16 20:48:43 +01:00
|
|
|
|
2005-01-23 11:53:06 +01:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_INODES
|
2015-10-29 21:10:36 +01:00
|
|
|
int "exact number of inodes (leave at 0 for auto calculation)"
|
2007-10-05 14:55:40 +02:00
|
|
|
default 0
|
2005-02-16 20:48:43 +01:00
|
|
|
|
2015-10-29 21:10:36 +01:00
|
|
|
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.
|
|
|
|
|
2005-01-23 11:53:06 +01:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_RESBLKS
|
2007-03-20 17:52:44 +01:00
|
|
|
int "reserved blocks percentage"
|
2005-01-23 11:53:06 +01:00
|
|
|
default 0
|
2005-02-16 20:48:43 +01:00
|
|
|
|
2006-12-14 16:47:50 +01:00
|
|
|
choice
|
2007-10-05 14:55:40 +02:00
|
|
|
prompt "Compression method"
|
|
|
|
default BR2_TARGET_ROOTFS_EXT2_NONE
|
|
|
|
help
|
2013-04-11 14:17:51 +02:00
|
|
|
Select compressor for ext2/3/4 filesystem of the root filesystem
|
2006-12-14 16:47:50 +01:00
|
|
|
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_NONE
|
2007-10-05 14:55:40 +02:00
|
|
|
bool "no compression"
|
|
|
|
help
|
2013-04-11 14:17:51 +02:00
|
|
|
Do not compress the ext2/3/4 filesystem.
|
2006-12-14 16:47:50 +01:00
|
|
|
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_GZIP
|
2007-10-05 14:55:40 +02:00
|
|
|
bool "gzip"
|
|
|
|
help
|
2013-04-11 14:17:51 +02:00
|
|
|
Do compress the ext2/3/4 filesystem with gzip.
|
2006-12-14 16:47:50 +01:00
|
|
|
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_BZIP2
|
2007-10-05 14:55:40 +02:00
|
|
|
bool "bzip2"
|
|
|
|
help
|
2013-04-11 14:17:51 +02:00
|
|
|
Do compress the ext2/3/4 filesystem with bzip2.
|
2005-01-23 11:53:06 +01:00
|
|
|
|
2006-11-04 20:15:56 +01:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_LZMA
|
2007-10-05 14:55:40 +02:00
|
|
|
bool "lzma"
|
|
|
|
help
|
2013-04-11 14:17:51 +02:00
|
|
|
Do compress the ext2/3/4 filesystem with lzma.
|
2006-11-04 20:15:56 +01:00
|
|
|
|
2013-01-22 02:03:43 +01:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_LZO
|
|
|
|
bool "lzo"
|
|
|
|
help
|
|
|
|
Do compress the ext2 filesystem with lzop.
|
|
|
|
|
|
|
|
config BR2_TARGET_ROOTFS_EXT2_XZ
|
|
|
|
bool "xz"
|
|
|
|
help
|
|
|
|
Do compress the ext2 filesystem with xz.
|
|
|
|
|
2006-12-14 16:47:50 +01:00
|
|
|
endchoice
|
2006-11-04 20:15:56 +01:00
|
|
|
|
2013-04-11 14:17:50 +02:00
|
|
|
endif # BR2_TARGET_ROOTFS_EXT2
|