Config-images.in 9.7 KB

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