1config BR2_TARGET_ROOTFS_EXT2
2	bool "ext2/3/4 root filesystem"
3	select BR2_PACKAGE_HOST_E2FSPROGS
4	help
5	  Build an ext2/3/4 root filesystem
6
7if BR2_TARGET_ROOTFS_EXT2
8
9config BR2_TARGET_ROOTFS_EXT2_2
10	bool
11
12choice
13	bool "ext2/3/4 variant"
14	default BR2_TARGET_ROOTFS_EXT2_2r1
15
16config BR2_TARGET_ROOTFS_EXT2_2r0
17	bool "ext2 (rev0)"
18	select BR2_TARGET_ROOTFS_EXT2_2
19
20config BR2_TARGET_ROOTFS_EXT2_2r1
21	bool "ext2 (rev1)"
22	select BR2_TARGET_ROOTFS_EXT2_2
23
24config BR2_TARGET_ROOTFS_EXT2_3
25	bool "ext3"
26
27config BR2_TARGET_ROOTFS_EXT2_4
28	bool "ext4"
29
30endchoice
31
32config BR2_TARGET_ROOTFS_EXT2_GEN
33	int
34	default 2 if BR2_TARGET_ROOTFS_EXT2_2
35	default 3 if BR2_TARGET_ROOTFS_EXT2_3
36	default 4 if BR2_TARGET_ROOTFS_EXT2_4
37
38# All ext generations are revision 1, except ext2r0, which is revision 0
39config BR2_TARGET_ROOTFS_EXT2_REV
40	int
41	default 0   if BR2_TARGET_ROOTFS_EXT2_2r0
42	default 1   if !BR2_TARGET_ROOTFS_EXT2_2r0
43
44config BR2_TARGET_ROOTFS_EXT2_LABEL
45	string "filesystem label"
46	default "rootfs"
47
48config BR2_TARGET_ROOTFS_EXT2_SIZE
49	string "exact size"
50	default BR2_TARGET_ROOTFS_EXT2_BLOCKS if BR2_TARGET_ROOTFS_EXT2_BLOCKS_WRAP # legacy 2017.08
51	default "60M"
52	help
53	  The size of the filesystem image. If it does not have a
54	  suffix, it is interpreted as power-of-two kilobytes. If it is
55	  suffixed by 'k', 'm', 'g', 't' (either upper-case or
56	  lower-case), then it is interpreted in power-of-two kilobytes,
57	  megabytes, gigabytes, terabytes, etc.
58
59config BR2_TARGET_ROOTFS_EXT2_INODES
60	int "exact number of inodes (leave at 0 for auto calculation)"
61	default 0
62
63config BR2_TARGET_ROOTFS_EXT2_INODE_SIZE
64	int "inode size"
65	default 256
66	help
67	  Set the size of inodes, in bytes, as a power of 2 larger or
68	  equal to 128.
69
70	  Set to 0 to let the filesystem generator decide based on the
71	  file system size. If unsure, keep the default, 256.
72
73	  Note: 128-byte inodes suffer of the Y2K38 problem, and can't
74	  store timestamps beyond 2038-01-19 03:14:07Z.
75
76config BR2_TARGET_ROOTFS_EXT2_RESBLKS
77	int "reserved blocks percentage"
78	default 5
79	help
80	  The number of blocks on the filesystem (as a percentage of the
81	  total number of blocks), that are reserved for use by root.
82	  Traditionally, this has been 5%, and all ext-related tools
83	  still default to reserving 5% when creating a new ext
84	  filesystem.
85
86config BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS
87	string "additional mke2fs options"
88	default "-O ^64bit"
89	help
90	  Specify a space-separated list of mke2fs options, including
91	  any ext2/3/4 filesystem features.
92
93	  For more information about the mke2fs options, see the manual
94	  page mke2fs(8).
95
96	  For more information about the ext2/3/4 features which can be
97	  set, see the manual page ext4(5).
98
99	  The default is "-O ^64bit", i.e. disable 64-bit filesystem
100	  support. This default value has been chosen because U-Boot
101	  versions before 2017.02 don't support this filesystem
102	  option: using it may make the filesystem unreadable by
103	  U-Boot.
104
105choice
106	prompt "Compression method"
107	default BR2_TARGET_ROOTFS_EXT2_NONE
108	help
109	  Select compressor for ext2/3/4 filesystem of the root
110	  filesystem
111
112config BR2_TARGET_ROOTFS_EXT2_NONE
113	bool "no compression"
114	help
115	  Do not compress the ext2/3/4 filesystem.
116
117config BR2_TARGET_ROOTFS_EXT2_GZIP
118	bool "gzip"
119	help
120	  Do compress the ext2/3/4 filesystem with gzip.
121
122config BR2_TARGET_ROOTFS_EXT2_BZIP2
123	bool "bzip2"
124	help
125	  Do compress the ext2/3/4 filesystem with bzip2.
126
127config BR2_TARGET_ROOTFS_EXT2_LZ4
128	bool "lz4"
129	help
130	  Do compress the ext2 filesystem with lz4.
131
132config BR2_TARGET_ROOTFS_EXT2_LZMA
133	bool "lzma"
134	help
135	  Do compress the ext2/3/4 filesystem with lzma.
136
137config BR2_TARGET_ROOTFS_EXT2_LZO
138	bool "lzo"
139	help
140	  Do compress the ext2 filesystem with lzop.
141
142config BR2_TARGET_ROOTFS_EXT2_XZ
143	bool "xz"
144	help
145	  Do compress the ext2 filesystem with xz.
146
147config BR2_TARGET_ROOTFS_EXT2_ZSTD
148	bool "zstd"
149	help
150	  Do compress the ext2 filesystem with zstd.
151
152endchoice
153
154endif # BR2_TARGET_ROOTFS_EXT2
155