Config-images.in 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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_XZ if USES_SEPARATE_INITRAMFS
  18. default TARGET_INITRAMFS_COMPRESSION_NONE
  19. depends on TARGET_ROOTFS_INITRAMFS
  20. help
  21. Select ramdisk compression.
  22. config TARGET_INITRAMFS_COMPRESSION_NONE
  23. bool "none"
  24. config TARGET_INITRAMFS_COMPRESSION_GZIP
  25. bool "gzip"
  26. config TARGET_INITRAMFS_COMPRESSION_BZIP2
  27. bool "bzip2"
  28. config TARGET_INITRAMFS_COMPRESSION_LZMA
  29. bool "lzma"
  30. config TARGET_INITRAMFS_COMPRESSION_LZO
  31. depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
  32. bool "lzo"
  33. config TARGET_INITRAMFS_COMPRESSION_LZ4
  34. depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
  35. bool "lz4"
  36. config TARGET_INITRAMFS_COMPRESSION_XZ
  37. bool "xz"
  38. config TARGET_INITRAMFS_COMPRESSION_ZSTD
  39. depends on !LINUX_5_4 && !LINUX_4_19
  40. bool "zstd"
  41. endchoice
  42. config EXTERNAL_CPIO
  43. string
  44. prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
  45. default ""
  46. help
  47. Kernel uses specified external cpio as INITRAMFS_SOURCE.
  48. config TARGET_INITRAMFS_FORCE
  49. bool "Force"
  50. depends on TARGET_ROOTFS_INITRAMFS
  51. default n
  52. help
  53. Ignore the initramfs passed by the bootloader.
  54. config TARGET_ROOTFS_INITRAMFS_SEPARATE
  55. bool "separate ramdisk"
  56. depends on USES_SEPARATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
  57. default y if USES_SEPARATE_INITRAMFS
  58. help
  59. Generate separate initrd.cpio instead of embedding it.
  60. This is useful for generating images with a dedicated
  61. ramdisk e.g. in U-Boot's uImage and uImage.FIT formats.
  62. comment "Root filesystem archives"
  63. config TARGET_ROOTFS_CPIOGZ
  64. bool "cpio.gz"
  65. default y if USES_CPIOGZ
  66. help
  67. Build a compressed cpio archive of the root filesystem.
  68. config TARGET_ROOTFS_TARGZ
  69. bool "tar.gz"
  70. default y if USES_TARGZ
  71. help
  72. Build a compressed tar archive of the root filesystem.
  73. comment "Root filesystem images"
  74. menuconfig TARGET_ROOTFS_EXT4FS
  75. bool "ext4"
  76. default y if USES_EXT4
  77. help
  78. Build an ext4 root filesystem.
  79. config TARGET_EXT4_RESERVED_PCT
  80. int "Percentage of reserved blocks in root filesystem"
  81. depends on TARGET_ROOTFS_EXT4FS
  82. default 0
  83. help
  84. Select the percentage of reserved blocks in the root filesystem.
  85. choice
  86. prompt "Root filesystem block size"
  87. default TARGET_EXT4_BLOCKSIZE_4K
  88. depends on TARGET_ROOTFS_EXT4FS
  89. help
  90. Select the block size of the root filesystem.
  91. config TARGET_EXT4_BLOCKSIZE_4K
  92. bool "4k"
  93. config TARGET_EXT4_BLOCKSIZE_2K
  94. bool "2k"
  95. config TARGET_EXT4_BLOCKSIZE_1K
  96. bool "1k"
  97. endchoice
  98. config TARGET_EXT4_BLOCKSIZE
  99. int
  100. default 4096 if TARGET_EXT4_BLOCKSIZE_4K
  101. default 2048 if TARGET_EXT4_BLOCKSIZE_2K
  102. default 1024 if TARGET_EXT4_BLOCKSIZE_1K
  103. depends on TARGET_ROOTFS_EXT4FS
  104. config TARGET_EXT4_JOURNAL
  105. bool "Create a journaling filesystem"
  106. depends on TARGET_ROOTFS_EXT4FS
  107. default n
  108. help
  109. Create an ext4 filesystem with a journal.
  110. config TARGET_ROOTFS_JFFS2
  111. bool "jffs2"
  112. depends on USES_JFFS2
  113. help
  114. Build a JFFS2 root filesystem.
  115. config TARGET_ROOTFS_JFFS2_NAND
  116. bool "jffs2 for NAND"
  117. default y if USES_JFFS2_NAND
  118. depends on USES_JFFS2_NAND
  119. help
  120. Build a JFFS2 root filesystem for NAND flash.
  121. menuconfig TARGET_ROOTFS_SQUASHFS
  122. bool "squashfs"
  123. default y if USES_SQUASHFS
  124. help
  125. Build a squashfs-lzma root filesystem.
  126. config TARGET_SQUASHFS_BLOCK_SIZE
  127. int "Block size (in KiB)"
  128. depends on TARGET_ROOTFS_SQUASHFS
  129. default 64 if LOW_MEMORY_FOOTPRINT
  130. default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  131. default 256
  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
  170. depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
  171. select PACKAGE_grub2
  172. select PACKAGE_grub2-efi
  173. select PACKAGE_grub2-bios-setup
  174. select PACKAGE_kmod-fs-vfat
  175. default y
  176. config GRUB_CONSOLE
  177. bool "Use Console Terminal (in addition to Serial)"
  178. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  179. default y
  180. config GRUB_SERIAL
  181. string "Serial port device"
  182. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  183. default "ttyS0"
  184. config GRUB_BAUDRATE
  185. int "Serial port baud rate"
  186. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  187. default 38400 if TARGET_x86_generic
  188. default 115200
  189. config GRUB_FLOWCONTROL
  190. bool "Use RTE/CTS on serial console"
  191. depends on GRUB_SERIAL != ""
  192. default n
  193. config GRUB_BOOTOPTS
  194. string "Extra kernel boot options"
  195. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  196. help
  197. If you don't know, just leave it blank.
  198. config GRUB_TIMEOUT
  199. string "Seconds to wait before booting the default entry"
  200. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  201. default "5"
  202. help
  203. If you don't know, 5 seconds is a reasonable default.
  204. config GRUB_TITLE
  205. string "Title for the menu entry in GRUB"
  206. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  207. default "OpenWrt"
  208. help
  209. This is the title of the GRUB menu entry.
  210. If unspecified, it defaults to OpenWrt.
  211. config ISO_IMAGES
  212. bool "Build LiveCD image (ISO)"
  213. depends on TARGET_x86
  214. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  215. config VDI_IMAGES
  216. bool "Build VirtualBox image files (VDI)"
  217. depends on TARGET_x86
  218. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  219. select PACKAGE_kmod-e1000
  220. config VMDK_IMAGES
  221. bool "Build VMware image files (VMDK)"
  222. depends on TARGET_x86
  223. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  224. select PACKAGE_kmod-e1000
  225. config VHDX_IMAGES
  226. bool "Build Hyper-V image files (VHDX)"
  227. depends on TARGET_x86
  228. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  229. select PACKAGE_kmod-e1000
  230. config TARGET_IMAGES_GZIP
  231. bool "GZip images"
  232. depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
  233. default y
  234. comment "Image Options"
  235. source "target/linux/*/image/Config.in"
  236. config TARGET_KERNEL_PARTSIZE
  237. int "Kernel partition size (in MiB)"
  238. depends on USES_BOOT_PART
  239. default 8 if TARGET_apm821xx_sata
  240. default 64 if TARGET_bcm27xx
  241. default 16
  242. config TARGET_ROOTFS_PARTSIZE
  243. int "Root filesystem partition size (in MiB)"
  244. depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
  245. default 104
  246. help
  247. Select the root filesystem partition size.
  248. config TARGET_ROOTFS_PARTNAME
  249. string "Root partition on target device"
  250. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  251. help
  252. Override the root partition on the final device. If left empty,
  253. it will be mounted by PARTUUID which makes the kernel find the
  254. appropriate disk automatically.
  255. config TARGET_ROOTFS_PERSIST_VAR
  256. bool "Make /var persistent"
  257. default n
  258. help
  259. Do not symlink /var to /tmp, so that its content will persist
  260. across reboots. When enabled, /var/run will still be linked
  261. to /tmp/run.
  262. endmenu