1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2006-2013 OpenWrt.org
7 menuconfig TARGET_ROOTFS_INITRAMFS
9 default y if USES_INITRAMFS
11 Embed the root filesystem into the kernel (initramfs).
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_ipq807x
21 default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
22 default TARGET_INITRAMFS_COMPRESSION_NONE
23 depends on TARGET_ROOTFS_INITRAMFS
25 Select ramdisk compression.
27 config TARGET_INITRAMFS_COMPRESSION_NONE
30 config TARGET_INITRAMFS_COMPRESSION_GZIP
33 config TARGET_INITRAMFS_COMPRESSION_BZIP2
36 config TARGET_INITRAMFS_COMPRESSION_LZMA
39 config TARGET_INITRAMFS_COMPRESSION_LZO
42 config TARGET_INITRAMFS_COMPRESSION_LZ4
45 config TARGET_INITRAMFS_COMPRESSION_XZ
48 config TARGET_INITRAMFS_COMPRESSION_ZSTD
54 prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
57 Kernel uses specified external cpio as INITRAMFS_SOURCE.
59 config TARGET_INITRAMFS_FORCE
61 depends on TARGET_ROOTFS_INITRAMFS
64 Ignore the initramfs passed by the bootloader.
66 config TARGET_ROOTFS_INITRAMFS_SEPARATE
67 bool "separate ramdisk"
68 depends on USES_SEPARATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
69 default y if USES_SEPARATE_INITRAMFS
71 Generate separate initrd.cpio instead of embedding it.
72 This is useful for generating images with a dedicated
73 ramdisk e.g. in U-Boot's uImage and uImage.FIT formats.
75 comment "Root filesystem archives"
77 config TARGET_ROOTFS_CPIOGZ
79 default y if USES_CPIOGZ
81 Build a compressed cpio archive of the root filesystem.
83 config TARGET_ROOTFS_TARGZ
85 default y if USES_TARGZ
87 Build a compressed tar archive of the root filesystem.
89 comment "Root filesystem images"
91 menuconfig TARGET_ROOTFS_EXT4FS
93 default y if USES_EXT4
95 Build an ext4 root filesystem.
97 config TARGET_EXT4_RESERVED_PCT
98 int "Percentage of reserved blocks in root filesystem"
99 depends on TARGET_ROOTFS_EXT4FS
102 Select the percentage of reserved blocks in the root filesystem.
105 prompt "Root filesystem block size"
106 default TARGET_EXT4_BLOCKSIZE_4K
107 depends on TARGET_ROOTFS_EXT4FS
109 Select the block size of the root filesystem.
111 config TARGET_EXT4_BLOCKSIZE_4K
114 config TARGET_EXT4_BLOCKSIZE_2K
117 config TARGET_EXT4_BLOCKSIZE_1K
121 config TARGET_EXT4_BLOCKSIZE
123 default 4096 if TARGET_EXT4_BLOCKSIZE_4K
124 default 2048 if TARGET_EXT4_BLOCKSIZE_2K
125 default 1024 if TARGET_EXT4_BLOCKSIZE_1K
126 depends on TARGET_ROOTFS_EXT4FS
128 config TARGET_EXT4_JOURNAL
129 bool "Create a journaling filesystem"
130 depends on TARGET_ROOTFS_EXT4FS
133 Create an ext4 filesystem with a journal.
135 config TARGET_ROOTFS_JFFS2
137 depends on USES_JFFS2
139 Build a JFFS2 root filesystem.
141 config TARGET_ROOTFS_JFFS2_NAND
142 bool "jffs2 for NAND"
143 default y if USES_JFFS2_NAND
144 depends on USES_JFFS2_NAND
146 Build a JFFS2 root filesystem for NAND flash.
148 menuconfig TARGET_ROOTFS_SQUASHFS
150 default y if USES_SQUASHFS
152 Build a squashfs root filesystem.
154 config TARGET_SQUASHFS_BLOCK_SIZE
155 int "Block size (in KiB)"
156 depends on TARGET_ROOTFS_SQUASHFS
157 default 64 if LOW_MEMORY_FOOTPRINT
158 default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
161 Select squashfs block size, must be one of:
162 4, 8, 16, 32, 64, 128, 256, 512, 1024
164 menuconfig TARGET_ROOTFS_UBIFS
166 default y if USES_UBIFS
167 depends on USES_UBIFS
169 Build a UBIFS root filesystem.
173 default TARGET_UBIFS_COMPRESSION_ZLIB
174 depends on TARGET_ROOTFS_UBIFS
176 Select compression type
178 config TARGET_UBIFS_COMPRESSION_NONE
181 config TARGET_UBIFS_COMPRESSION_LZO
184 config TARGET_UBIFS_COMPRESSION_ZLIB
188 config TARGET_UBIFS_FREE_SPACE_FIXUP
189 bool "free space fixup" if TARGET_ROOTFS_UBIFS
192 The filesystem free space has to be fixed up on first mount.
194 config TARGET_UBIFS_JOURNAL_SIZE
196 prompt "journal size" if TARGET_ROOTFS_UBIFS
200 bool "Build GRUB images (Linux x86 or x86_64 host only)"
201 depends on TARGET_x86
202 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
204 select PACKAGE_grub2-bios-setup
207 config GRUB_EFI_IMAGES
208 bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
209 depends on TARGET_x86
210 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
212 select PACKAGE_grub2-efi
213 select PACKAGE_grub2-bios-setup
214 select PACKAGE_kmod-fs-vfat
218 bool "Use Console Terminal (in addition to Serial)"
219 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
223 string "Serial port device"
224 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
228 int "Serial port baud rate"
229 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
230 default 38400 if TARGET_x86_generic
233 config GRUB_FLOWCONTROL
234 bool "Use RTE/CTS on serial console"
235 depends on GRUB_SERIAL != ""
239 string "Extra kernel boot options"
240 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
242 If you don't know, just leave it blank.
245 string "Seconds to wait before booting the default entry"
246 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
249 If you don't know, 5 seconds is a reasonable default.
252 string "Title for the menu entry in GRUB"
253 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
256 This is the title of the GRUB menu entry.
257 If unspecified, it defaults to OpenWrt.
260 bool "Build LiveCD image (ISO)"
261 depends on TARGET_x86
262 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
265 bool "Build VirtualBox image files (VDI)"
266 depends on TARGET_x86
267 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
268 select PACKAGE_kmod-e1000
271 bool "Build VMware image files (VMDK)"
272 depends on TARGET_x86
273 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
274 select PACKAGE_kmod-e1000
277 bool "Build Hyper-V image files (VHDX)"
278 depends on TARGET_x86
279 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
280 select PACKAGE_kmod-e1000
282 config TARGET_IMAGES_GZIP
284 depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
287 comment "Image Options"
289 source "target/linux/*/image/Config.in"
291 config TARGET_KERNEL_PARTSIZE
292 int "Kernel partition size (in MiB)"
293 depends on USES_BOOT_PART
294 default 8 if TARGET_apm821xx_sata
295 default 64 if TARGET_bcm27xx
298 config TARGET_ROOTFS_PARTSIZE
299 int "Root filesystem partition size (in MiB)"
300 depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
303 Select the root filesystem partition size.
305 config TARGET_ROOTFS_PARTNAME
306 string "Root partition on target device"
307 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
309 Override the root partition on the final device. If left empty,
310 it will be mounted by PARTUUID which makes the kernel find the
311 appropriate disk automatically.
313 config TARGET_ROOTFS_PERSIST_VAR
314 bool "Make /var persistent"
317 Do not symlink /var to /tmp, so that its content will persist
318 across reboots. When enabled, /var/run will still be linked