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