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
63 Ignore the initramfs passed by the bootloader.
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
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.
74 comment "Root filesystem archives"
76 config TARGET_ROOTFS_CPIOGZ
78 default y if USES_CPIOGZ
80 Build a compressed cpio archive of the root filesystem.
82 config TARGET_ROOTFS_TARGZ
84 default y if USES_TARGZ
86 Build a compressed tar archive of the root filesystem.
88 comment "Root filesystem images"
90 menuconfig TARGET_ROOTFS_EXT4FS
92 default y if USES_EXT4
94 Build an ext4 root filesystem.
96 config TARGET_EXT4_RESERVED_PCT
97 int "Percentage of reserved blocks in root filesystem"
98 depends on TARGET_ROOTFS_EXT4FS
101 Select the percentage of reserved blocks in the root filesystem.
104 prompt "Root filesystem block size"
105 default TARGET_EXT4_BLOCKSIZE_4K
106 depends on TARGET_ROOTFS_EXT4FS
108 Select the block size of the root filesystem.
110 config TARGET_EXT4_BLOCKSIZE_4K
113 config TARGET_EXT4_BLOCKSIZE_2K
116 config TARGET_EXT4_BLOCKSIZE_1K
120 config TARGET_EXT4_BLOCKSIZE
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
127 config TARGET_EXT4_JOURNAL
128 bool "Create a journaling filesystem"
129 depends on TARGET_ROOTFS_EXT4FS
131 Create an ext4 filesystem with a journal.
133 config TARGET_ROOTFS_JFFS2
135 depends on USES_JFFS2
137 Build a JFFS2 root filesystem.
139 config TARGET_ROOTFS_JFFS2_NAND
140 bool "jffs2 for NAND"
141 default y if USES_JFFS2_NAND
142 depends on USES_JFFS2_NAND
144 Build a JFFS2 root filesystem for NAND flash.
146 menuconfig TARGET_ROOTFS_SQUASHFS
148 default y if USES_SQUASHFS
150 Build a squashfs root filesystem.
152 config TARGET_SQUASHFS_BLOCK_SIZE
153 int "Block size (in KiB)"
154 depends on TARGET_ROOTFS_SQUASHFS
155 default 64 if LOW_MEMORY_FOOTPRINT
156 default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
159 Select squashfs block size, must be one of:
160 4, 8, 16, 32, 64, 128, 256, 512, 1024
162 menuconfig TARGET_ROOTFS_UBIFS
164 default y if USES_UBIFS
165 depends on USES_UBIFS
167 Build a UBIFS root filesystem.
171 default TARGET_UBIFS_COMPRESSION_ZLIB
172 depends on TARGET_ROOTFS_UBIFS
174 Select compression type
176 config TARGET_UBIFS_COMPRESSION_NONE
179 config TARGET_UBIFS_COMPRESSION_LZO
182 config TARGET_UBIFS_COMPRESSION_ZLIB
186 config TARGET_UBIFS_FREE_SPACE_FIXUP
187 bool "free space fixup" if TARGET_ROOTFS_UBIFS
190 The filesystem free space has to be fixed up on first mount.
192 config TARGET_UBIFS_JOURNAL_SIZE
194 prompt "journal size" if TARGET_ROOTFS_UBIFS
198 bool "Build GRUB images (Linux x86 or x86_64 host only)"
199 depends on TARGET_x86
200 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
202 select PACKAGE_grub2-bios-setup
205 config GRUB_EFI_IMAGES
206 bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
207 depends on TARGET_x86 || TARGET_armsr
208 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
209 select PACKAGE_grub2 if TARGET_x86
210 select PACKAGE_grub2-efi if TARGET_x86
211 select PACKAGE_grub2-bios-setup if TARGET_x86
212 select PACKAGE_grub2-efi-arm if TARGET_armsr
213 select PACKAGE_kmod-fs-vfat
217 bool "Use Console Terminal (in addition to Serial)"
218 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
222 string "Serial port device"
223 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
227 int "Serial port baud rate"
228 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
229 default 38400 if TARGET_x86_generic
232 config GRUB_FLOWCONTROL
233 bool "Use RTE/CTS on serial console"
234 depends on GRUB_SERIAL != ""
237 string "Extra kernel boot options"
238 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
240 If you don't know, just leave it blank.
243 string "Seconds to wait before booting the default entry"
244 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
247 If you don't know, 5 seconds is a reasonable default.
250 string "Title for the menu entry in GRUB"
251 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
254 This is the title of the GRUB menu entry.
255 If unspecified, it defaults to OpenWrt.
258 bool "Build LiveCD image (ISO)"
259 depends on TARGET_x86
260 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
263 bool "Build VirtualBox image files (VDI)"
264 depends on TARGET_x86
265 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
266 select PACKAGE_kmod-e1000
269 bool "Build VMware image files (VMDK)"
270 depends on TARGET_x86 || TARGET_armsr
271 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
272 select PACKAGE_kmod-e1000
275 bool "Build Hyper-V image files (VHDX)"
276 depends on TARGET_x86
277 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
278 select PACKAGE_kmod-e1000
280 config TARGET_IMAGES_GZIP
282 depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta
285 comment "Image Options"
287 source "target/linux/*/image/Config.in"
288 source "target/linux/*/*/image/Config.in"
290 config TARGET_KERNEL_PARTSIZE
291 int "Kernel partition size (in MiB)"
292 depends on USES_BOOT_PART
293 default 8 if TARGET_apm821xx_sata
294 default 64 if TARGET_bcm27xx
295 default 128 if TARGET_armsr
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"
316 Do not symlink /var to /tmp, so that its content will persist
317 across reboots. When enabled, /var/run will still be linked