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_NONE
21 depends on TARGET_ROOTFS_INITRAMFS
23 Select ramdisk compression.
25 config TARGET_INITRAMFS_COMPRESSION_NONE
28 config TARGET_INITRAMFS_COMPRESSION_GZIP
31 config TARGET_INITRAMFS_COMPRESSION_BZIP2
34 config TARGET_INITRAMFS_COMPRESSION_LZMA
37 config TARGET_INITRAMFS_COMPRESSION_LZO
38 depends on !TARGET_ROOTFS_INITRAMFS_SEPERATE
41 config TARGET_INITRAMFS_COMPRESSION_LZ4
42 depends on !TARGET_ROOTFS_INITRAMFS_SEPERATE
45 config TARGET_INITRAMFS_COMPRESSION_XZ
48 config TARGET_INITRAMFS_COMPRESSION_ZSTD
49 depends on !LINUX_5_4 && !LINUX_4_19
55 prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
58 Kernel uses specified external cpio as INITRAMFS_SOURCE.
60 config TARGET_INITRAMFS_FORCE
62 depends on TARGET_ROOTFS_INITRAMFS
65 Ignore the initramfs passed by the bootloader.
67 config TARGET_ROOTFS_INITRAMFS_SEPERATE
68 bool "seperate ramdisk"
69 depends on TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
70 default y if USES_SEPERATE_INITRAMFS
72 Generate seperate 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.
76 comment "Root filesystem archives"
78 config TARGET_ROOTFS_CPIOGZ
80 default y if USES_CPIOGZ
82 Build a compressed cpio archive of the root filesystem.
84 config TARGET_ROOTFS_TARGZ
86 default y if USES_TARGZ
88 Build a compressed tar archive of the root filesystem.
90 comment "Root filesystem images"
92 menuconfig TARGET_ROOTFS_EXT4FS
94 default y if USES_EXT4
96 Build an ext4 root filesystem.
98 config TARGET_EXT4_RESERVED_PCT
99 int "Percentage of reserved blocks in root filesystem"
100 depends on TARGET_ROOTFS_EXT4FS
103 Select the percentage of reserved blocks in the root filesystem.
106 prompt "Root filesystem block size"
107 default TARGET_EXT4_BLOCKSIZE_4K
108 depends on TARGET_ROOTFS_EXT4FS
110 Select the block size of the root filesystem.
112 config TARGET_EXT4_BLOCKSIZE_4K
115 config TARGET_EXT4_BLOCKSIZE_2K
118 config TARGET_EXT4_BLOCKSIZE_1K
122 config TARGET_EXT4_BLOCKSIZE
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
129 config TARGET_EXT4_JOURNAL
130 bool "Create a journaling filesystem"
131 depends on TARGET_ROOTFS_EXT4FS
134 Create an ext4 filesystem with a journal.
136 config TARGET_ROOTFS_JFFS2
138 depends on USES_JFFS2
140 Build a JFFS2 root filesystem.
142 config TARGET_ROOTFS_JFFS2_NAND
143 bool "jffs2 for NAND"
144 default y if USES_JFFS2_NAND
145 depends on USES_JFFS2_NAND
147 Build a JFFS2 root filesystem for NAND flash.
149 menuconfig TARGET_ROOTFS_SQUASHFS
151 default y if USES_SQUASHFS
153 Build a squashfs-lzma root filesystem.
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)
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
204 config GRUB_EFI_IMAGES
205 bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
206 depends on TARGET_x86
207 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
209 select PACKAGE_grub2-efi
210 select PACKAGE_kmod-fs-vfat
214 bool "Use Console Terminal (in addition to Serial)"
215 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
219 string "Serial port device"
220 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
224 int "Serial port baud rate"
225 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
226 default 38400 if TARGET_x86_generic
229 config GRUB_FLOWCONTROL
230 bool "Use RTE/CTS on serial console"
231 depends on GRUB_SERIAL != ""
235 string "Extra kernel boot options"
236 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
238 If you don't know, just leave it blank.
241 string "Seconds to wait before booting the default entry"
242 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
245 If you don't know, 5 seconds is a reasonable default.
248 string "Title for the menu entry in GRUB"
249 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
252 This is the title of the GRUB menu entry.
253 If unspecified, it defaults to OpenWrt.
256 bool "Build LiveCD image (ISO)"
257 depends on TARGET_x86
258 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
261 bool "Build VirtualBox image files (VDI)"
262 depends on TARGET_x86
263 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
264 select PACKAGE_kmod-e1000
267 bool "Build VMware image files (VMDK)"
268 depends on TARGET_x86
269 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
270 select PACKAGE_kmod-e1000
272 config TARGET_IMAGES_GZIP
274 depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
277 comment "Image Options"
279 source "target/linux/*/image/Config.in"
281 config TARGET_KERNEL_PARTSIZE
282 int "Kernel partition size (in MB)"
283 depends on USES_BOOT_PART
284 default 8 if TARGET_apm821xx_sata
285 default 64 if TARGET_bcm27xx
288 config TARGET_ROOTFS_PARTSIZE
289 int "Root filesystem partition size (in MB)"
290 depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml
293 Select the root filesystem partition size.
295 config TARGET_ROOTFS_PARTNAME
296 string "Root partition on target device"
297 depends on GRUB_IMAGES || GRUB_EFI_IMAGES
299 Override the root partition on the final device. If left empty,
300 it will be mounted by PARTUUID which makes the kernel find the
301 appropriate disk automatically.