image: ext4: allow to choose a block size for the rootfs
[oweals/openwrt.git] / config / Config-images.in
1 # Copyright (C) 2006-2013 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 menu "Target Images"
8
9         menuconfig TARGET_ROOTFS_INITRAMFS
10                 bool "ramdisk"
11                 default y if USES_INITRAMFS
12                 help
13                   Embed the rootfs into the kernel (initramfs)
14
15                 choice
16                         prompt "Compression"
17                         default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx
18                         default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
19                         default TARGET_INITRAMFS_COMPRESSION_NONE
20                         depends on TARGET_ROOTFS_INITRAMFS
21                         help
22                           Select ramdisk compression.
23
24                         config TARGET_INITRAMFS_COMPRESSION_NONE
25                                 bool "none"
26
27                         config TARGET_INITRAMFS_COMPRESSION_GZIP
28                                 bool "gzip"
29
30                         config TARGET_INITRAMFS_COMPRESSION_BZIP2
31                                 bool "bzip2"
32
33                         config TARGET_INITRAMFS_COMPRESSION_LZMA
34                                 bool "lzma"
35
36                         config TARGET_INITRAMFS_COMPRESSION_LZO
37                                 bool "lzo"
38
39                         config TARGET_INITRAMFS_COMPRESSION_LZ4
40                                 bool "lz4"
41
42                         config TARGET_INITRAMFS_COMPRESSION_XZ
43                                 bool "xz"
44                 endchoice
45
46                 config EXTERNAL_CPIO
47                         string
48                         prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
49                         default ""
50                         help
51                           Kernel uses specified external cpio as INITRAMFS_SOURCE
52
53         comment "Root filesystem archives"
54
55         config TARGET_ROOTFS_CPIOGZ
56                 bool "cpio.gz"
57                 default y if USES_CPIOGZ
58                 help
59                   Build a compressed cpio archive of the the root filesystem
60
61         config TARGET_ROOTFS_TARGZ
62                 bool "tar.gz"
63                 default y if USES_TARGZ
64                 help
65                   Build a compressed tar archive of the the root filesystem
66
67         comment "Root filesystem images"
68
69         menuconfig TARGET_ROOTFS_EXT4FS
70                 bool "ext4"
71                 default y if USES_EXT4
72                 help
73                   Build a ext4 root filesystem
74
75                 config TARGET_ROOTFS_MAXINODE
76                         int "Maximum number of inodes in root filesystem"
77                         depends on TARGET_ROOTFS_EXT4FS
78                         default 6000
79                         help
80                           Allows you to change the maximum number of inodes in the root filesystem
81
82                 config TARGET_ROOTFS_RESERVED_PCT
83                         int "Percentage of reserved blocks in root filesystem"
84                         depends on TARGET_ROOTFS_EXT4FS
85                         default 0
86                         help
87                           Allows you to change the percentage of reserved blocks in the root filesystem
88
89                 choice
90                         prompt "Root filesystem block size""
91                         default TARGET_EXT4_BLOCKSIZE_4K
92                         depends TARGET_ROOTFS_EXT4FS
93                         help
94                           Allows you to change the block size of the root filesystem
95
96                         config TARGET_EXT4_BLOCKSIZE_4K
97                                 bool "4k"
98
99                         config TARGET_EXT4_BLOCKSIZE_2K
100                                 bool "2k"
101
102                         config TARGET_EXT4_BLOCKSIZE_1K
103                                 bool "1k"
104                 endchoice
105
106                 config TARGET_EXT4_BLOCKSIZE
107                         int
108                         default 4096 if TARGET_EXT4_BLOCKSIZE_4K
109                         default 2048 if TARGET_EXT4_BLOCKSIZE_2K
110                         default 1024 if TARGET_EXT4_BLOCKSIZE_1K
111                         depends TARGET_ROOTFS_EXT4FS
112
113         config TARGET_ROOTFS_ISO
114                 bool "iso"
115                 default n
116                 depends on TARGET_x86_generic
117                 help
118                   Create some bootable ISO image
119
120         config TARGET_ROOTFS_JFFS2
121                 bool "jffs2"
122                 default y if USES_JFFS2
123                 help
124                   Build a jffs2 root filesystem
125
126         config TARGET_ROOTFS_JFFS2_NAND
127                 bool "jffs2 for NAND"
128                 default y if USES_JFFS2_NAND
129                 depends on USES_JFFS2_NAND
130                 help
131                   Build a jffs2 root filesystem for NAND flash
132
133         config TARGET_ROOTFS_SQUASHFS
134                 bool "squashfs"
135                 default y if USES_SQUASHFS
136                 help
137                   Build a squashfs-lzma root filesystem
138
139         menuconfig TARGET_ROOTFS_UBIFS
140                 bool "ubifs"
141                 default y if USES_UBIFS
142                 depends on USES_UBIFS
143                 help
144                   Build a ubifs root filesystem
145
146                 choice
147                         prompt "compression"
148                         default TARGET_UBIFS_COMPRESSION_NONE
149                         depends on TARGET_ROOTFS_UBIFS
150                         help
151                           Select compression type
152
153                         config TARGET_UBIFS_COMPRESSION_NONE
154                                 bool "none"
155
156                         config TARGET_UBIFS_COMPRESSION_LZO
157                                 bool "lzo"
158
159                         config TARGET_UBIFS_COMPRESSION_ZLIB
160                                 bool "zlib"
161                 endchoice
162
163                 config TARGET_UBIFS_FREE_SPACE_FIXUP
164                         bool "free space fixup" if TARGET_ROOTFS_UBIFS
165                         default y
166                         help
167                           The file-system free space has to be fixed up on first mount
168
169                 config TARGET_UBIFS_JOURNAL_SIZE
170                         string
171                         prompt "journal size" if TARGET_ROOTFS_UBIFS
172                         default ""
173
174         config GRUB_IMAGES
175                 bool "Build GRUB images (Linux x86 or x86_64 host only)"
176                 depends on TARGET_x86_64 || (TARGET_x86 && !(TARGET_x86_olpc || TARGET_x86_rdc))
177                 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
178                 select PACKAGE_grub2
179                 default y
180
181         config GRUB_CONSOLE
182                 bool "Use Console Terminal (in addition to Serial)"
183                 depends on GRUB_IMAGES
184                 default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2)
185                 default y
186
187         config GRUB_SERIAL
188                 string "Serial port device"
189                 depends on GRUB_IMAGES
190                 default "hvc0" if TARGET_x86_xen_domu
191                 default "ttyS0" if ! TARGET_x86_xen_domu
192
193         config GRUB_BAUDRATE
194                 int "Serial port baud rate"
195                 depends on GRUB_IMAGES
196                 default 19200 if TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501
197                 default 38400 if TARGET_x86_alix2
198                 default 115200 if TARGET_x86_geos || TARGET_x86_kvm_guest
199                 default 38400
200
201         config GRUB_BOOTOPTS
202                 string "Extra kernel boot options"
203                 depends on GRUB_IMAGES
204                 default "xencons=hvc" if TARGET_x86_xen_domu
205                 help
206                   If you don't know, just leave it blank.
207
208         config GRUB_TIMEOUT
209                 string "Seconds to wait before booting the default entry"
210                 depends on GRUB_IMAGES
211                 default "5"
212                 help
213                   If you don't know, 5 seconds is a reasonable default.
214
215         config VDI_IMAGES
216                 bool "Build VirtualBox image files (VDI)"
217                 depends on TARGET_x86 || TARGET_x86_64
218                 select GRUB_IMAGES
219                 select TARGET_ROOTFS_EXT4FS
220                 select PACKAGE_kmod-e1000
221
222         config VMDK_IMAGES
223                 bool "Build VMware image files (VMDK)"
224                 depends on TARGET_x86 || TARGET_x86_64
225                 select GRUB_IMAGES
226                 select TARGET_ROOTFS_EXT4FS
227                 select PACKAGE_kmod-e1000
228
229         config TARGET_IMAGES_PAD
230                 bool "Pad images to filesystem size (for JFFS2)"
231                 depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
232
233         config TARGET_IMAGES_GZIP
234                 bool "GZip images"
235                 depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS
236                 default y
237
238         comment "Image Options"
239
240         source "target/linux/*/image/Config.in"
241
242         config TARGET_KERNEL_PARTSIZE
243                 int "Kernel partition size (in MB)"
244                 depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
245                 default 4
246
247         config TARGET_ROOTFS_PARTSIZE
248                 int "Root filesystem partition size (in MB)"
249                 depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532
250                 default 48
251                 help
252                   Allows you to change the root filesystem partition size
253
254         config TARGET_ROOTFS_PARTNAME
255                 string "Root partition on target device"
256                 depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
257                 default "/dev/xvda2" if TARGET_x86_xen_domu
258                 default "/dev/sda2" if ! TARGET_x86_xen_domu
259                 help
260                   The root partition on the final device.  If you don't know,
261                   you probably want the default (/dev/sda2).
262
263
264         menuconfig TARGET_ROOTFS_INCLUDE_KERNEL
265                 bool "Include kernel in root filesystem"
266                 depends on TARGET_ROOTFS_UBIFS || TARGET_ROOTFS_EXT4FS
267                 default n
268                 help
269                   Include the kernel image in the rootfs. Typically the image is placed
270                   below /boot.
271
272                 config TARGET_ROOTFS_INCLUDE_UIMAGE
273                         bool "include uImage" if TARGET_ROOTFS_INCLUDE_KERNEL
274                         default y
275                         help
276                           This option might not apply to all targets. Make sure
277                           to check target/linux/<your_target>/image/Makefile to
278                           see if this option will have any effect.
279
280                 config TARGET_ROOTFS_INCLUDE_ZIMAGE
281                         bool "include zImage" if TARGET_ROOTFS_INCLUDE_KERNEL
282                         default y
283                         help
284                           This option might not apply to all targets. Make sure
285                           to check target/linux/<your_target>/image/Makefile to
286                           see if this option will have any effect.
287
288                 config TARGET_ROOTFS_INCLUDE_FIT
289                         bool "include FIT" if TARGET_ROOTFS_INCLUDE_KERNEL
290                         default y
291                         help
292                           This option might not apply to all targets. Make sure
293                           to check target/linux/<your_target>/image/Makefile to
294                           see if this option will have any effect.
295
296         config TARGET_ROOTFS_INCLUDE_DTB
297                 bool "Include DTB in root filesystem"
298                 depends on USES_DEVICETREE && (TARGET_ROOTFS_UBIFS || TARGET_ROOTFS_EXT4FS)
299                 default n
300                 help
301                   Include the device tree blob file(s) in the rootfs. Typically the DTBs
302                   are placed below /boot.
303
304 endmenu