Config-images.in 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  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_EXT4FS
  72. bool "ext4"
  73. default y if USES_EXT4
  74. help
  75. Build an ext4 root filesystem.
  76. config TARGET_EXT4_RESERVED_PCT
  77. int "Percentage of reserved blocks in root filesystem"
  78. depends on TARGET_ROOTFS_EXT4FS
  79. default 0
  80. help
  81. Select the percentage of reserved blocks in the root filesystem.
  82. choice
  83. prompt "Root filesystem block size"
  84. default TARGET_EXT4_BLOCKSIZE_4K
  85. depends on TARGET_ROOTFS_EXT4FS
  86. help
  87. Select the block size of the root filesystem.
  88. config TARGET_EXT4_BLOCKSIZE_4K
  89. bool "4k"
  90. config TARGET_EXT4_BLOCKSIZE_2K
  91. bool "2k"
  92. config TARGET_EXT4_BLOCKSIZE_1K
  93. bool "1k"
  94. endchoice
  95. config TARGET_EXT4_BLOCKSIZE
  96. int
  97. default 4096 if TARGET_EXT4_BLOCKSIZE_4K
  98. default 2048 if TARGET_EXT4_BLOCKSIZE_2K
  99. default 1024 if TARGET_EXT4_BLOCKSIZE_1K
  100. depends on TARGET_ROOTFS_EXT4FS
  101. config TARGET_EXT4_JOURNAL
  102. bool "Create a journaling filesystem"
  103. depends on TARGET_ROOTFS_EXT4FS
  104. default y
  105. help
  106. Create an ext4 filesystem with a journal.
  107. config TARGET_ROOTFS_JFFS2
  108. bool "jffs2"
  109. depends on USES_JFFS2
  110. help
  111. Build a JFFS2 root filesystem.
  112. config TARGET_ROOTFS_JFFS2_NAND
  113. bool "jffs2 for NAND"
  114. default y if USES_JFFS2_NAND
  115. depends on USES_JFFS2_NAND
  116. help
  117. Build a JFFS2 root filesystem for NAND flash.
  118. menuconfig TARGET_ROOTFS_SQUASHFS
  119. bool "squashfs"
  120. default y if USES_SQUASHFS
  121. help
  122. Build a squashfs root filesystem.
  123. config TARGET_SQUASHFS_BLOCK_SIZE
  124. int "Block size (in KiB)"
  125. depends on TARGET_ROOTFS_SQUASHFS
  126. default 64 if LOW_MEMORY_FOOTPRINT
  127. default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  128. default 256
  129. help
  130. Select squashfs block size, must be one of:
  131. 4, 8, 16, 32, 64, 128, 256, 512, 1024
  132. menuconfig TARGET_ROOTFS_UBIFS
  133. bool "ubifs"
  134. default y if USES_UBIFS
  135. depends on USES_UBIFS
  136. help
  137. Build a UBIFS root filesystem.
  138. choice
  139. prompt "compression"
  140. default TARGET_UBIFS_COMPRESSION_ZLIB
  141. depends on TARGET_ROOTFS_UBIFS
  142. help
  143. Select compression type
  144. config TARGET_UBIFS_COMPRESSION_NONE
  145. bool "none"
  146. config TARGET_UBIFS_COMPRESSION_LZO
  147. bool "lzo"
  148. config TARGET_UBIFS_COMPRESSION_ZLIB
  149. bool "zlib"
  150. endchoice
  151. config TARGET_UBIFS_FREE_SPACE_FIXUP
  152. bool "free space fixup" if TARGET_ROOTFS_UBIFS
  153. default y
  154. help
  155. The filesystem free space has to be fixed up on first mount.
  156. config TARGET_UBIFS_JOURNAL_SIZE
  157. string
  158. prompt "journal size" if TARGET_ROOTFS_UBIFS
  159. default ""
  160. config GRUB_IMAGES
  161. bool "Build GRUB images (Linux x86 or x86_64 host only)"
  162. depends on TARGET_x86
  163. depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
  164. select PACKAGE_grub2
  165. select PACKAGE_grub2-bios-setup
  166. default y
  167. config GRUB_EFI_IMAGES
  168. bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
  169. depends on TARGET_x86 || TARGET_armsr
  170. depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
  171. select PACKAGE_grub2 if TARGET_x86
  172. select PACKAGE_grub2-efi if TARGET_x86
  173. select PACKAGE_grub2-bios-setup if TARGET_x86
  174. select PACKAGE_grub2-efi-arm if TARGET_armsr
  175. select PACKAGE_kmod-fs-vfat
  176. default y
  177. config GRUB_CONSOLE
  178. bool "Use Console Terminal (in addition to Serial)"
  179. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  180. default y
  181. config GRUB_BAUDRATE
  182. int "Serial port baud rate"
  183. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  184. default 38400 if TARGET_x86_generic
  185. default 115200
  186. config GRUB_FLOWCONTROL
  187. bool "Use RTE/CTS on serial console"
  188. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  189. depends on TARGET_SERIAL != ""
  190. config GRUB_BOOTOPTS
  191. string "Extra kernel boot options"
  192. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  193. help
  194. If you don't know, just leave it blank.
  195. config GRUB_TIMEOUT
  196. string "Seconds to wait before booting the default entry"
  197. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  198. default "5"
  199. help
  200. If you don't know, 5 seconds is a reasonable default.
  201. config GRUB_TITLE
  202. string "Title for the menu entry in GRUB"
  203. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  204. default "OpenWrt"
  205. help
  206. This is the title of the GRUB menu entry.
  207. If unspecified, it defaults to OpenWrt.
  208. config ISO_IMAGES
  209. bool "Build LiveCD image (ISO)"
  210. depends on TARGET_x86
  211. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  212. config VDI_IMAGES
  213. bool "Build VirtualBox image files (VDI)"
  214. depends on TARGET_x86
  215. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  216. select PACKAGE_kmod-e1000
  217. config VMDK_IMAGES
  218. bool "Build VMware image files (VMDK)"
  219. depends on TARGET_x86 || TARGET_armsr
  220. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  221. select PACKAGE_kmod-e1000
  222. config VHDX_IMAGES
  223. bool "Build Hyper-V image files (VHDX)"
  224. depends on TARGET_x86
  225. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  226. select PACKAGE_kmod-e1000
  227. config TARGET_SERIAL
  228. string "Serial port device"
  229. depends on TARGET_x86 || TARGET_armsr
  230. default "ttyS0"
  231. config TARGET_IMAGES_GZIP
  232. bool "GZip images"
  233. depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta
  234. default y
  235. comment "Image Options"
  236. source "target/linux/*/image/Config.in"
  237. source "target/linux/*/*/image/Config.in"
  238. config TARGET_KERNEL_PARTSIZE
  239. int "Kernel partition size (in MiB)"
  240. depends on USES_BOOT_PART
  241. default 8 if TARGET_apm821xx_sata
  242. default 64 if TARGET_bcm27xx
  243. default 128 if TARGET_armsr
  244. default 16
  245. config TARGET_ROOTFS_PARTSIZE
  246. int "Root filesystem partition size (in MiB)"
  247. depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
  248. default 104
  249. help
  250. Select the root filesystem partition size.
  251. config TARGET_ROOTFS_PARTNAME
  252. string "Root partition on target device"
  253. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  254. help
  255. Override the root partition on the final device. If left empty,
  256. it will be mounted by PARTUUID which makes the kernel find the
  257. appropriate disk automatically.
  258. config TARGET_ROOTFS_PERSIST_VAR
  259. bool "Make /var persistent"
  260. help
  261. Do not symlink /var to /tmp, so that its content will persist
  262. across reboots. When enabled, /var/run will still be linked
  263. to /tmp/run.
  264. endmenu