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