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"
|
2017-07-04 16:47:26 +02:00
|
|
|
select BR2_PACKAGE_HOST_E2FSPROGS
|
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"
|
2020-04-15 14:36:56 +02:00
|
|
|
default "rootfs"
|
2014-12-06 23:40:06 +01:00
|
|
|
|
2017-07-09 07:00:38 +02:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_SIZE
|
|
|
|
string "exact size"
|
|
|
|
default BR2_TARGET_ROOTFS_EXT2_BLOCKS if BR2_TARGET_ROOTFS_EXT2_BLOCKS_WRAP # legacy 2017.08
|
|
|
|
default "60M"
|
2017-05-01 17:58:36 +02:00
|
|
|
help
|
2018-04-01 07:08:42 +02:00
|
|
|
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.
|
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
|
|
|
|
fs/ext2: generate Y2K38-resilient filesystems
When creating a filesystem, mkfs.ext will chose the inode size depending
on the size of the filesystem. Small filesystem get 128-bytes inodes,
while bigger filesystems use 256-byte inodes (inode must be a power of 2
larger or equal to 128, and smaller or equal to the blocksize).
However, 128-byte inodes can't store timestamps past the dreaded
2038-01-19 03:14:07Z deadline, while inodes larger than or equal to 256
do not have the issue.
It turns out that the tipping point to decide whether a filesystem is
small or big, is about around the size of the filesystems we generate
for our runtime tests. This causes the kernel to emit warning like:
ext2 filesystem being remounted at / supports timestamps until 2038 (0x7fffffff)
We add a new option to our ext2 filesystem, so that user can specify the
size of the inode. That new option defaults to 256 to be resilient to
the Y2K38 problem.
Note: it was already possible for users to explicitly pass the -I
option, through BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS. We could have
chosen to extend the existing value with a -I 256, but that is not
satisfactory. Indeed, we do want to ensure that the default is now
Y2K38-OK, even for existing configurations that did not have explicit
setting.
We also pass that new option before the user-specified arbitrary ones,
so that BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS still wins (in case -I was
set there).
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
[Peter: tweak help text]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-11-20 21:42:26 +01:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_INODE_SIZE
|
|
|
|
int "inode size"
|
|
|
|
default 256
|
|
|
|
help
|
|
|
|
Set the size of inodes, in bytes, as a power of 2 larger or
|
|
|
|
equal to 128.
|
|
|
|
|
|
|
|
Set to 0 to let the filesystem generator decide based on the
|
|
|
|
file system size. If unsure, keep the default, 256.
|
|
|
|
|
|
|
|
Note: 128-byte inodes suffer of the Y2K38 problem, and can't
|
|
|
|
store timestamps beyond 2038-01-19 03:14:07Z.
|
|
|
|
|
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"
|
2017-07-04 00:50:59 +02:00
|
|
|
default 5
|
|
|
|
help
|
|
|
|
The number of blocks on the filesystem (as a percentage of the
|
2017-07-28 01:02:26 +02:00
|
|
|
total number of blocks), that are reserved for use by root.
|
2018-04-01 07:08:42 +02:00
|
|
|
Traditionally, this has been 5%, and all ext-related tools
|
|
|
|
still default to reserving 5% when creating a new ext
|
|
|
|
filesystem.
|
2005-02-16 20:48:43 +01:00
|
|
|
|
2017-07-09 07:00:39 +02:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS
|
|
|
|
string "additional mke2fs options"
|
|
|
|
default "-O ^64bit"
|
|
|
|
help
|
2018-04-01 07:08:42 +02:00
|
|
|
Specify a space-separated list of mke2fs options, including
|
|
|
|
any ext2/3/4 filesystem features.
|
2017-07-09 07:00:39 +02:00
|
|
|
|
|
|
|
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 the manual page ext4(5).
|
|
|
|
|
|
|
|
The default is "-O ^64bit", i.e. disable 64-bit filesystem
|
|
|
|
support. This default value has been chosen because U-Boot
|
|
|
|
versions before 2017.02 don't support this filesystem
|
|
|
|
option: using it may make the filesystem unreadable by
|
|
|
|
U-Boot.
|
|
|
|
|
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
|
2018-04-01 07:08:42 +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
|
|
|
|
2017-10-13 21:16:54 +02:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_LZ4
|
|
|
|
bool "lz4"
|
|
|
|
help
|
|
|
|
Do compress the ext2 filesystem with lz4.
|
|
|
|
|
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.
|
|
|
|
|
2022-06-24 16:07:40 +02:00
|
|
|
config BR2_TARGET_ROOTFS_EXT2_ZSTD
|
|
|
|
bool "zstd"
|
|
|
|
help
|
|
|
|
Do compress the ext2 filesystem with zstd.
|
|
|
|
|
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
|