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_XZ if USES_SEPARATE_INITRAMFS
21 default TARGET_INITRAMFS_COMPRESSION_NONE
22 depends on TARGET_ROOTFS_INITRAMFS
24 Select ramdisk compression.
26 config TARGET_INITRAMFS_COMPRESSION_NONE
29 config TARGET_INITRAMFS_COMPRESSION_GZIP
32 config TARGET_INITRAMFS_COMPRESSION_BZIP2
35 config TARGET_INITRAMFS_COMPRESSION_LZMA
38 config TARGET_INITRAMFS_COMPRESSION_LZO
39 depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
42 config TARGET_INITRAMFS_COMPRESSION_LZ4
43 depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
46 config TARGET_INITRAMFS_COMPRESSION_XZ
49 config TARGET_INITRAMFS_COMPRESSION_ZSTD
50 depends on !LINUX_5_4 && !LINUX_4_19
56 prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
59 Kernel uses specified external cpio as INITRAMFS_SOURCE.
61 config TARGET_INITRAMFS_FORCE
63 depends on TARGET_ROOTFS_INITRAMFS
66 Ignore the initramfs passed by the bootloader.
68 config TARGET_ROOTFS_INITRAMFS_SEPARATE
69 bool "separate ramdisk"
70 depends on USES_SEPARATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
71 default y if USES_SEPARATE_INITRAMFS
73 Generate separate initrd.cpio instead of embedding it.
74 This is useful for generating images with a dedicated
75 ramdisk e.g. in U-Boot's uImage and uImage.FIT formats.
77 comment "Root filesystem archives"
79 config TARGET_ROOTFS_CPIOGZ
81 default y if USES_CPIOGZ
83 Build a compressed cpio archive of the root filesystem.
85 config TARGET_ROOTFS_TARGZ
87 default y if USES_TARGZ
89 Build a compressed tar archive of the root filesystem.
91 comment "Root filesystem images"
93 menuconfig TARGET_ROOTFS_EXT4FS
95 default y if USES_EXT4
97 Build an ext4 root filesystem.
99 config TARGET_EXT4_RESERVED_PCT
100 int "Percentage of reserved blocks in root filesystem"
101 depends on TARGET_ROOTFS_EXT4FS
104 Select the percentage of reserved blocks in the root filesystem.
107 prompt "Root filesystem block size"
108 default TARGET_EXT4_BLOCKSIZE_4K
109 depends on TARGET_ROOTFS_EXT4FS
111 Select the block size of the root filesystem.
113 config TARGET_EXT4_BLOCKSIZE_4K
116 config TARGET_EXT4_BLOCKSIZE_2K
119 config TARGET_EXT4_BLOCKSIZE_1K
123 config TARGET_EXT4_BLOCKSIZE
125 default 4096 if TARGET_EXT4_BLOCKSIZE_4K
126 default 2048 if TARGET_EXT4_BLOCKSIZE_2K
127 default 1024 if TARGET_EXT4_BLOCKSIZE_1K
128 depends on TARGET_ROOTFS_EXT4FS
130 config TARGET_EXT4_JOURNAL
131 bool "Create a journaling filesystem"
132 depends on TARGET_ROOTFS_EXT4FS
135 Create an ext4 filesystem with a journal.
137 config TARGET_ROOTFS_JFFS2
139 depends on USES_JFFS2
141 Build a JFFS2 root filesystem.
143 config TARGET_ROOTFS_JFFS2_NAND
144 bool "jffs2 for NAND"
145 default y if USES_JFFS2_NAND
146 depends on USES_JFFS2_NAND
148 Build a JFFS2 root filesystem for NAND flash.
150 menuconfig TARGET_ROOTFS_SQUASHFS
152 default y if USES_SQUASHFS
154 Build a squashfs-lzma root filesystem.
156 config TARGET_SQUASHFS_BLOCK_SIZE
157 int "Block size (in KiB)"
158 depends on TARGET_ROOTFS_SQUASHFS
159 default 64 if LOW_MEMORY_FOOTPRINT
160 default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
163 menuconfig TARGET_ROOTFS_UBIFS
165 default y if USES_UBIFS
166 depends on USES_UBIFS
168 Build a UBIFS root filesystem.
172 default TARGET_UBIFS_COMPRESSION_ZLIB
173 depends on TARGET_ROOTFS_UBIFS
175 Select compression type
177 config TARGET_UBIFS_COMPRESSION_NONE
180 config TARGET_UBIFS_COMPRESSION_LZO
183 config TARGET_UBIFS_COMPRESSION_ZLIB
187 config TARGET_UBIFS_FREE_SPACE_FIXUP
188 bool "free space fixup" if TARGET_ROOTFS_UBIFS
191 The filesystem free space has to be fixed up on first mount.
193 config TARGET_UBIFS_JOURNAL_SIZE
195 prompt "journal size" if TARGET_ROOTFS_UBIFS
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
203 select PACKAGE_grub2-bios-setup
206 config GRUB_EFI_IMAGES
207 bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
208 depends on TARGET_x86
209 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
211 select PACKAGE_grub2-efi
212 select PACKAGE_grub2-bios-setup
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 != ""
238 string "Extra kernel boot options"
239 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
241 If you don't know, just leave it blank.
244 string "Seconds to wait before booting the default entry"
245 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
248 If you don't know, 5 seconds is a reasonable default.
251 string "Title for the menu entry in GRUB"
252 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
255 This is the title of the GRUB menu entry.
256 If unspecified, it defaults to OpenWrt.
259 bool "Build LiveCD image (ISO)"
260 depends on TARGET_x86
261 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
264 bool "Build VirtualBox image files (VDI)"
265 depends on TARGET_x86
266 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
267 select PACKAGE_kmod-e1000
270 bool "Build VMware image files (VMDK)"
271 depends on TARGET_x86
272 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
273 select PACKAGE_kmod-e1000
276 bool "Build Hyper-V image files (VHDX)"
277 depends on TARGET_x86
278 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
279 select PACKAGE_kmod-e1000
281 config TARGET_IMAGES_GZIP
283 depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
286 comment "Image Options"
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
297 config TARGET_ROOTFS_PARTSIZE
298 int "Root filesystem partition size (in MiB)"
299 depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_sunxi || TARGET_uml
302 Select the root filesystem partition size.
304 config TARGET_ROOTFS_PARTNAME
305 string "Root partition on target device"
306 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
308 Override the root partition on the final device. If left empty,
309 it will be mounted by PARTUUID which makes the kernel find the
310 appropriate disk automatically.
312 config TARGET_ROOTFS_PERSIST_VAR
313 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