Config-images.in 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Copyright (C) 2006-2013 OpenWrt.org
  4. menu "Target Images"
  5. menuconfig TARGET_ROOTFS_INITRAMFS
  6. bool "ramdisk"
  7. default y if USES_INITRAMFS
  8. help
  9. Embed the root filesystem into the kernel (initramfs).
  10. choice
  11. prompt "Compression"
  12. default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
  13. default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ath79_mikrotik
  14. default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
  15. default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
  16. default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
  17. default TARGET_INITRAMFS_COMPRESSION_ZSTD if TARGET_qualcommax
  18. default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
  19. default TARGET_INITRAMFS_COMPRESSION_NONE
  20. depends on TARGET_ROOTFS_INITRAMFS
  21. help
  22. Select ramdisk compression.
  23. config TARGET_INITRAMFS_COMPRESSION_NONE
  24. bool "none"
  25. config TARGET_INITRAMFS_COMPRESSION_GZIP
  26. bool "gzip"
  27. config TARGET_INITRAMFS_COMPRESSION_BZIP2
  28. bool "bzip2"
  29. config TARGET_INITRAMFS_COMPRESSION_LZMA
  30. bool "lzma"
  31. config TARGET_INITRAMFS_COMPRESSION_LZO
  32. bool "lzo"
  33. config TARGET_INITRAMFS_COMPRESSION_LZ4
  34. bool "lz4"
  35. config TARGET_INITRAMFS_COMPRESSION_XZ
  36. bool "xz"
  37. config TARGET_INITRAMFS_COMPRESSION_ZSTD
  38. bool "zstd"
  39. endchoice
  40. config EXTERNAL_CPIO
  41. string
  42. prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
  43. default ""
  44. help
  45. Kernel uses specified external cpio as INITRAMFS_SOURCE.
  46. config TARGET_INITRAMFS_FORCE
  47. bool "Force"
  48. depends on TARGET_ROOTFS_INITRAMFS
  49. help
  50. Ignore the initramfs passed by the bootloader.
  51. config TARGET_ROOTFS_INITRAMFS_SEPARATE
  52. bool "separate ramdisk"
  53. depends on USES_SEPARATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
  54. default y if USES_SEPARATE_INITRAMFS
  55. help
  56. Generate separate initrd.cpio instead of embedding it.
  57. This is useful for generating images with a dedicated
  58. ramdisk e.g. in U-Boot's uImage and uImage.FIT formats.
  59. comment "Root filesystem archives"
  60. config TARGET_ROOTFS_CPIOGZ
  61. bool "cpio.gz"
  62. default y if USES_CPIOGZ
  63. help
  64. Build a compressed cpio archive of the root filesystem.
  65. config TARGET_ROOTFS_TARGZ
  66. bool "tar.gz"
  67. default y if USES_TARGZ
  68. help
  69. Build a compressed tar archive of the root filesystem.
  70. comment "Root filesystem images"
  71. menuconfig TARGET_ROOTFS_EROFS
  72. bool "erofs"
  73. default y if USES_EROFS
  74. select KERNEL_EROFS_FS
  75. help
  76. Build a EROFS root filesystem.
  77. config TARGET_EROFS_PCLUSTER_SIZE
  78. int "physical cluster size (in KiB)"
  79. depends on TARGET_ROOTFS_EROFS
  80. default 64 if LOW_MEMORY_FOOTPRINT
  81. default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  82. default 256
  83. help
  84. Specify the EROFS physical cluster size (must be equal
  85. to or a multiple of the filesystem block size).
  86. menuconfig TARGET_ROOTFS_EXT4FS
  87. bool "ext4"
  88. default y if USES_EXT4
  89. help
  90. Build an ext4 root filesystem.
  91. config TARGET_EXT4_RESERVED_PCT
  92. int "Percentage of reserved blocks in root filesystem"
  93. depends on TARGET_ROOTFS_EXT4FS
  94. default 0
  95. help
  96. Select the percentage of reserved blocks in the root filesystem.
  97. choice
  98. prompt "Root filesystem block size"
  99. default TARGET_EXT4_BLOCKSIZE_4K
  100. depends on TARGET_ROOTFS_EXT4FS
  101. help
  102. Select the block size of the root filesystem.
  103. config TARGET_EXT4_BLOCKSIZE_4K
  104. bool "4k"
  105. config TARGET_EXT4_BLOCKSIZE_2K
  106. bool "2k"
  107. config TARGET_EXT4_BLOCKSIZE_1K
  108. bool "1k"
  109. endchoice
  110. config TARGET_EXT4_BLOCKSIZE
  111. int
  112. default 4096 if TARGET_EXT4_BLOCKSIZE_4K
  113. default 2048 if TARGET_EXT4_BLOCKSIZE_2K
  114. default 1024 if TARGET_EXT4_BLOCKSIZE_1K
  115. depends on TARGET_ROOTFS_EXT4FS
  116. config TARGET_EXT4_JOURNAL
  117. bool "Create a journaling filesystem"
  118. depends on TARGET_ROOTFS_EXT4FS
  119. default y
  120. help
  121. Create an ext4 filesystem with a journal.
  122. config TARGET_ROOTFS_JFFS2
  123. bool "jffs2"
  124. depends on USES_JFFS2
  125. help
  126. Build a JFFS2 root filesystem.
  127. config TARGET_ROOTFS_JFFS2_NAND
  128. bool "jffs2 for NAND"
  129. default y if USES_JFFS2_NAND
  130. depends on USES_JFFS2_NAND
  131. help
  132. Build a JFFS2 root filesystem for NAND flash.
  133. menuconfig TARGET_ROOTFS_SQUASHFS
  134. bool "squashfs"
  135. default y if USES_SQUASHFS
  136. help
  137. Build a squashfs root filesystem.
  138. config TARGET_SQUASHFS_BLOCK_SIZE
  139. int "Block size (in KiB)"
  140. depends on TARGET_ROOTFS_SQUASHFS
  141. default 64 if LOW_MEMORY_FOOTPRINT
  142. default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  143. default 256
  144. help
  145. Select squashfs block size, must be one of:
  146. 4, 8, 16, 32, 64, 128, 256, 512, 1024
  147. config TARGET_SQUASHFS_BLOCK_READERS
  148. int "mksquashfs tool parallel block reader threads"
  149. depends on TARGET_ROOTFS_SQUASHFS
  150. default 4
  151. help
  152. Specify the number of parallel block reader threads
  153. (for files equal or larger than the squashfs block size).
  154. config TARGET_SQUASHFS_SMALL_READERS
  155. int "mksquashfs tool parallel small file reader threads"
  156. depends on TARGET_ROOTFS_SQUASHFS
  157. default 4
  158. help
  159. Specify the number of parallel small file reader threads
  160. (for files less than the squashfs block size).
  161. menuconfig TARGET_ROOTFS_UBIFS
  162. bool "ubifs"
  163. default y if USES_UBIFS
  164. depends on USES_UBIFS
  165. help
  166. Build a UBIFS root filesystem.
  167. choice
  168. prompt "compression"
  169. default TARGET_UBIFS_COMPRESSION_ZLIB
  170. depends on TARGET_ROOTFS_UBIFS
  171. help
  172. Select compression type
  173. config TARGET_UBIFS_COMPRESSION_NONE
  174. bool "none"
  175. config TARGET_UBIFS_COMPRESSION_LZO
  176. bool "lzo"
  177. config TARGET_UBIFS_COMPRESSION_ZLIB
  178. bool "zlib"
  179. endchoice
  180. config TARGET_UBIFS_FREE_SPACE_FIXUP
  181. bool "free space fixup" if TARGET_ROOTFS_UBIFS
  182. default y
  183. help
  184. The filesystem free space has to be fixed up on first mount.
  185. config TARGET_UBIFS_JOURNAL_SIZE
  186. string
  187. prompt "journal size" if TARGET_ROOTFS_UBIFS
  188. default ""
  189. config GRUB_IMAGES
  190. bool "Build GRUB images (Linux x86 or x86_64 host only)"
  191. depends on TARGET_x86
  192. depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS || TARGET_ROOTFS_EROFS
  193. select PACKAGE_grub2
  194. select PACKAGE_grub2-bios-setup
  195. default y
  196. config GRUB_EFI_IMAGES
  197. bool "Build GRUB EFI images"
  198. depends on TARGET_x86 || TARGET_armsr || TARGET_loongarch64
  199. depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS || TARGET_ROOTFS_EROFS
  200. select PACKAGE_grub2 if TARGET_x86
  201. select PACKAGE_grub2-efi if TARGET_x86
  202. select PACKAGE_grub2-bios-setup if TARGET_x86
  203. select PACKAGE_grub2-efi-arm if TARGET_armsr
  204. select PACKAGE_grub2-efi-loongarch64 if TARGET_loongarch64
  205. select PACKAGE_kmod-fs-vfat
  206. default y
  207. config GRUB_CONSOLE
  208. bool "Use Console Terminal (in addition to Serial)"
  209. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  210. default y
  211. config GRUB_BAUDRATE
  212. int "Serial port baud rate"
  213. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  214. default 38400 if TARGET_x86_generic
  215. default 115200
  216. config GRUB_FLOWCONTROL
  217. bool "Use RTE/CTS on serial console"
  218. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  219. depends on TARGET_SERIAL != ""
  220. config GRUB_BOOTOPTS
  221. string "Extra kernel boot options"
  222. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  223. help
  224. If you don't know, just leave it blank.
  225. config GRUB_TIMEOUT
  226. string "Seconds to wait before booting the default entry"
  227. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  228. default "5"
  229. help
  230. If you don't know, 5 seconds is a reasonable default.
  231. config GRUB_TITLE
  232. string "Title for the menu entry in GRUB"
  233. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  234. default "OpenWrt"
  235. help
  236. This is the title of the GRUB menu entry.
  237. If unspecified, it defaults to OpenWrt.
  238. config ISO_IMAGES
  239. bool "Build LiveCD image (ISO)"
  240. depends on TARGET_x86
  241. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  242. config VDI_IMAGES
  243. bool "Build VirtualBox image files (VDI)"
  244. depends on TARGET_x86
  245. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  246. select PACKAGE_kmod-e1000
  247. config VMDK_IMAGES
  248. bool "Build VMware image files (VMDK)"
  249. depends on TARGET_x86 || TARGET_armsr
  250. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  251. select PACKAGE_kmod-e1000
  252. config VHDX_IMAGES
  253. bool "Build Hyper-V image files (VHDX)"
  254. depends on TARGET_x86
  255. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  256. select PACKAGE_kmod-e1000
  257. config TARGET_SERIAL
  258. string "Serial port device"
  259. depends on TARGET_x86 || TARGET_armsr || TARGET_loongarch64
  260. default "ttyS0"
  261. config TARGET_IMAGES_GZIP
  262. bool "GZip images"
  263. depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta || TARGET_loongarch64
  264. default y
  265. comment "Image Options"
  266. source "target/linux/*/image/Config.in"
  267. source "target/linux/*/*/image/Config.in"
  268. config TARGET_KERNEL_PARTSIZE
  269. int "Kernel partition size (in MiB)"
  270. depends on USES_BOOT_PART
  271. default 8 if TARGET_apm821xx_sata
  272. default 64 if TARGET_bcm27xx
  273. default 128 if TARGET_armsr
  274. default 16
  275. config TARGET_ROOTFS_PARTSIZE
  276. int "Root filesystem partition size (in MiB)"
  277. depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
  278. default 232 if TARGET_loongarch64
  279. default 448 if TARGET_mediatek
  280. default 104
  281. help
  282. Select the root filesystem partition size.
  283. config TARGET_ROOTFS_PARTNAME
  284. string "Root partition on target device"
  285. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  286. help
  287. Override the root partition on the final device. If left empty,
  288. it will be mounted by PARTUUID which makes the kernel find the
  289. appropriate disk automatically.
  290. config TARGET_ROOTFS_PERSIST_VAR
  291. bool "Make /var persistent"
  292. help
  293. Do not symlink /var to /tmp, so that its content will persist
  294. across reboots. When enabled, /var/run will still be linked
  295. to /tmp/run.
  296. endmenu