6f2f92643234d6370c6f33fd664dec93efdeb7fb
[openwrt/openwrt.git] / config / Config-images.in
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Copyright (C) 2006-2013 OpenWrt.org
4
5 menu "Target Images"
6
7 menuconfig TARGET_ROOTFS_INITRAMFS
8 bool "ramdisk"
9 default y if USES_INITRAMFS
10 help
11 Embed the root filesystem into the kernel (initramfs).
12
13 choice
14 prompt "Compression"
15 default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
16 default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ath79_mikrotik
17 default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
18 default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
19 default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
20 default TARGET_INITRAMFS_COMPRESSION_ZSTD if TARGET_qualcommax
21 default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
22 default TARGET_INITRAMFS_COMPRESSION_NONE
23 depends on TARGET_ROOTFS_INITRAMFS
24 help
25 Select ramdisk compression.
26
27 config TARGET_INITRAMFS_COMPRESSION_NONE
28 bool "none"
29
30 config TARGET_INITRAMFS_COMPRESSION_GZIP
31 bool "gzip"
32
33 config TARGET_INITRAMFS_COMPRESSION_BZIP2
34 bool "bzip2"
35
36 config TARGET_INITRAMFS_COMPRESSION_LZMA
37 bool "lzma"
38
39 config TARGET_INITRAMFS_COMPRESSION_LZO
40 bool "lzo"
41
42 config TARGET_INITRAMFS_COMPRESSION_LZ4
43 bool "lz4"
44
45 config TARGET_INITRAMFS_COMPRESSION_XZ
46 bool "xz"
47
48 config TARGET_INITRAMFS_COMPRESSION_ZSTD
49 bool "zstd"
50 endchoice
51
52 config EXTERNAL_CPIO
53 string
54 prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
55 default ""
56 help
57 Kernel uses specified external cpio as INITRAMFS_SOURCE.
58
59 config TARGET_INITRAMFS_FORCE
60 bool "Force"
61 depends on TARGET_ROOTFS_INITRAMFS
62 help
63 Ignore the initramfs passed by the bootloader.
64
65 config TARGET_ROOTFS_INITRAMFS_SEPARATE
66 bool "separate ramdisk"
67 depends on USES_SEPARATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
68 default y if USES_SEPARATE_INITRAMFS
69 help
70 Generate separate initrd.cpio instead of embedding it.
71 This is useful for generating images with a dedicated
72 ramdisk e.g. in U-Boot's uImage and uImage.FIT formats.
73
74 comment "Root filesystem archives"
75
76 config TARGET_ROOTFS_CPIOGZ
77 bool "cpio.gz"
78 default y if USES_CPIOGZ
79 help
80 Build a compressed cpio archive of the root filesystem.
81
82 config TARGET_ROOTFS_TARGZ
83 bool "tar.gz"
84 default y if USES_TARGZ
85 help
86 Build a compressed tar archive of the root filesystem.
87
88 comment "Root filesystem images"
89
90 menuconfig TARGET_ROOTFS_EXT4FS
91 bool "ext4"
92 default y if USES_EXT4
93 help
94 Build an ext4 root filesystem.
95
96 config TARGET_EXT4_RESERVED_PCT
97 int "Percentage of reserved blocks in root filesystem"
98 depends on TARGET_ROOTFS_EXT4FS
99 default 0
100 help
101 Select the percentage of reserved blocks in the root filesystem.
102
103 choice
104 prompt "Root filesystem block size"
105 default TARGET_EXT4_BLOCKSIZE_4K
106 depends on TARGET_ROOTFS_EXT4FS
107 help
108 Select the block size of the root filesystem.
109
110 config TARGET_EXT4_BLOCKSIZE_4K
111 bool "4k"
112
113 config TARGET_EXT4_BLOCKSIZE_2K
114 bool "2k"
115
116 config TARGET_EXT4_BLOCKSIZE_1K
117 bool "1k"
118 endchoice
119
120 config TARGET_EXT4_BLOCKSIZE
121 int
122 default 4096 if TARGET_EXT4_BLOCKSIZE_4K
123 default 2048 if TARGET_EXT4_BLOCKSIZE_2K
124 default 1024 if TARGET_EXT4_BLOCKSIZE_1K
125 depends on TARGET_ROOTFS_EXT4FS
126
127 config TARGET_EXT4_JOURNAL
128 bool "Create a journaling filesystem"
129 depends on TARGET_ROOTFS_EXT4FS
130 default y
131 help
132 Create an ext4 filesystem with a journal.
133
134 config TARGET_ROOTFS_JFFS2
135 bool "jffs2"
136 depends on USES_JFFS2
137 help
138 Build a JFFS2 root filesystem.
139
140 config TARGET_ROOTFS_JFFS2_NAND
141 bool "jffs2 for NAND"
142 default y if USES_JFFS2_NAND
143 depends on USES_JFFS2_NAND
144 help
145 Build a JFFS2 root filesystem for NAND flash.
146
147 menuconfig TARGET_ROOTFS_SQUASHFS
148 bool "squashfs"
149 default y if USES_SQUASHFS
150 help
151 Build a squashfs root filesystem.
152
153 config TARGET_SQUASHFS_BLOCK_SIZE
154 int "Block size (in KiB)"
155 depends on TARGET_ROOTFS_SQUASHFS
156 default 64 if LOW_MEMORY_FOOTPRINT
157 default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
158 default 256
159 help
160 Select squashfs block size, must be one of:
161 4, 8, 16, 32, 64, 128, 256, 512, 1024
162
163 menuconfig TARGET_ROOTFS_UBIFS
164 bool "ubifs"
165 default y if USES_UBIFS
166 depends on USES_UBIFS
167 help
168 Build a UBIFS root filesystem.
169
170 choice
171 prompt "compression"
172 default TARGET_UBIFS_COMPRESSION_ZLIB
173 depends on TARGET_ROOTFS_UBIFS
174 help
175 Select compression type
176
177 config TARGET_UBIFS_COMPRESSION_NONE
178 bool "none"
179
180 config TARGET_UBIFS_COMPRESSION_LZO
181 bool "lzo"
182
183 config TARGET_UBIFS_COMPRESSION_ZLIB
184 bool "zlib"
185 endchoice
186
187 config TARGET_UBIFS_FREE_SPACE_FIXUP
188 bool "free space fixup" if TARGET_ROOTFS_UBIFS
189 default y
190 help
191 The filesystem free space has to be fixed up on first mount.
192
193 config TARGET_UBIFS_JOURNAL_SIZE
194 string
195 prompt "journal size" if TARGET_ROOTFS_UBIFS
196 default ""
197
198 config GRUB_IMAGES
199 bool "Build GRUB images (Linux x86 or x86_64 host only)"
200 depends on TARGET_x86
201 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
202 select PACKAGE_grub2
203 select PACKAGE_grub2-bios-setup
204 default y
205
206 config GRUB_EFI_IMAGES
207 bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
208 depends on TARGET_x86 || TARGET_armsr
209 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
210 select PACKAGE_grub2 if TARGET_x86
211 select PACKAGE_grub2-efi if TARGET_x86
212 select PACKAGE_grub2-bios-setup if TARGET_x86
213 select PACKAGE_grub2-efi-arm if TARGET_armsr
214 select PACKAGE_kmod-fs-vfat
215 default y
216
217 config GRUB_CONSOLE
218 bool "Use Console Terminal (in addition to Serial)"
219 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
220 default y
221
222 config GRUB_BAUDRATE
223 int "Serial port baud rate"
224 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
225 default 38400 if TARGET_x86_generic
226 default 115200
227
228 config GRUB_FLOWCONTROL
229 bool "Use RTE/CTS on serial console"
230 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
231 depends on TARGET_SERIAL != ""
232
233 config GRUB_BOOTOPTS
234 string "Extra kernel boot options"
235 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
236 help
237 If you don't know, just leave it blank.
238
239 config GRUB_TIMEOUT
240 string "Seconds to wait before booting the default entry"
241 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
242 default "5"
243 help
244 If you don't know, 5 seconds is a reasonable default.
245
246 config GRUB_TITLE
247 string "Title for the menu entry in GRUB"
248 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
249 default "OpenWrt"
250 help
251 This is the title of the GRUB menu entry.
252 If unspecified, it defaults to OpenWrt.
253
254 config ISO_IMAGES
255 bool "Build LiveCD image (ISO)"
256 depends on TARGET_x86
257 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
258
259 config VDI_IMAGES
260 bool "Build VirtualBox image files (VDI)"
261 depends on TARGET_x86
262 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
263 select PACKAGE_kmod-e1000
264
265 config VMDK_IMAGES
266 bool "Build VMware image files (VMDK)"
267 depends on TARGET_x86 || TARGET_armsr
268 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
269 select PACKAGE_kmod-e1000
270
271 config VHDX_IMAGES
272 bool "Build Hyper-V image files (VHDX)"
273 depends on TARGET_x86
274 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
275 select PACKAGE_kmod-e1000
276
277 config TARGET_SERIAL
278 string "Serial port device"
279 depends on TARGET_x86 || TARGET_armsr
280 default "ttyS0"
281
282 config TARGET_IMAGES_GZIP
283 bool "GZip images"
284 depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta
285 default y
286
287 comment "Image Options"
288
289 source "target/linux/*/image/Config.in"
290 source "target/linux/*/*/image/Config.in"
291
292 config TARGET_KERNEL_PARTSIZE
293 int "Kernel partition size (in MiB)"
294 depends on USES_BOOT_PART
295 default 8 if TARGET_apm821xx_sata
296 default 64 if TARGET_bcm27xx
297 default 128 if TARGET_armsr
298 default 16
299
300 config TARGET_ROOTFS_PARTSIZE
301 int "Root filesystem partition size (in MiB)"
302 depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
303 default 104
304 help
305 Select the root filesystem partition size.
306
307 config TARGET_ROOTFS_PARTNAME
308 string "Root partition on target device"
309 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
310 help
311 Override the root partition on the final device. If left empty,
312 it will be mounted by PARTUUID which makes the kernel find the
313 appropriate disk automatically.
314
315 config TARGET_ROOTFS_PERSIST_VAR
316 bool "Make /var persistent"
317 help
318 Do not symlink /var to /tmp, so that its content will persist
319 across reboots. When enabled, /var/run will still be linked
320 to /tmp/run.
321
322 endmenu