Config-images.in 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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_NONE
  18. depends on TARGET_ROOTFS_INITRAMFS
  19. help
  20. Select ramdisk compression.
  21. config TARGET_INITRAMFS_COMPRESSION_NONE
  22. bool "none"
  23. config TARGET_INITRAMFS_COMPRESSION_GZIP
  24. bool "gzip"
  25. config TARGET_INITRAMFS_COMPRESSION_BZIP2
  26. bool "bzip2"
  27. config TARGET_INITRAMFS_COMPRESSION_LZMA
  28. bool "lzma"
  29. config TARGET_INITRAMFS_COMPRESSION_LZO
  30. bool "lzo"
  31. config TARGET_INITRAMFS_COMPRESSION_LZ4
  32. bool "lz4"
  33. config TARGET_INITRAMFS_COMPRESSION_XZ
  34. bool "xz"
  35. config TARGET_INITRAMFS_COMPRESSION_ZSTD
  36. depends on !LINUX_5_4 && !LINUX_4_19
  37. bool "zstd"
  38. endchoice
  39. config EXTERNAL_CPIO
  40. string
  41. prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
  42. default ""
  43. help
  44. Kernel uses specified external cpio as INITRAMFS_SOURCE.
  45. config TARGET_INITRAMFS_FORCE
  46. bool "Force"
  47. depends on TARGET_ROOTFS_INITRAMFS
  48. default n
  49. help
  50. Ignore the initramfs passed by the bootloader.
  51. comment "Root filesystem archives"
  52. config TARGET_ROOTFS_CPIOGZ
  53. bool "cpio.gz"
  54. default y if USES_CPIOGZ
  55. help
  56. Build a compressed cpio archive of the root filesystem.
  57. config TARGET_ROOTFS_TARGZ
  58. bool "tar.gz"
  59. default y if USES_TARGZ
  60. help
  61. Build a compressed tar archive of the root filesystem.
  62. comment "Root filesystem images"
  63. menuconfig TARGET_ROOTFS_EXT4FS
  64. bool "ext4"
  65. default y if USES_EXT4
  66. help
  67. Build an ext4 root filesystem.
  68. config TARGET_EXT4_RESERVED_PCT
  69. int "Percentage of reserved blocks in root filesystem"
  70. depends on TARGET_ROOTFS_EXT4FS
  71. default 0
  72. help
  73. Select the percentage of reserved blocks in the root filesystem.
  74. choice
  75. prompt "Root filesystem block size"
  76. default TARGET_EXT4_BLOCKSIZE_4K
  77. depends on TARGET_ROOTFS_EXT4FS
  78. help
  79. Select the block size of the root filesystem.
  80. config TARGET_EXT4_BLOCKSIZE_4K
  81. bool "4k"
  82. config TARGET_EXT4_BLOCKSIZE_2K
  83. bool "2k"
  84. config TARGET_EXT4_BLOCKSIZE_1K
  85. bool "1k"
  86. endchoice
  87. config TARGET_EXT4_BLOCKSIZE
  88. int
  89. default 4096 if TARGET_EXT4_BLOCKSIZE_4K
  90. default 2048 if TARGET_EXT4_BLOCKSIZE_2K
  91. default 1024 if TARGET_EXT4_BLOCKSIZE_1K
  92. depends on TARGET_ROOTFS_EXT4FS
  93. config TARGET_EXT4_JOURNAL
  94. bool "Create a journaling filesystem"
  95. depends on TARGET_ROOTFS_EXT4FS
  96. default n
  97. help
  98. Create an ext4 filesystem with a journal.
  99. config TARGET_ROOTFS_JFFS2
  100. bool "jffs2"
  101. depends on USES_JFFS2
  102. help
  103. Build a JFFS2 root filesystem.
  104. config TARGET_ROOTFS_JFFS2_NAND
  105. bool "jffs2 for NAND"
  106. default y if USES_JFFS2_NAND
  107. depends on USES_JFFS2_NAND
  108. help
  109. Build a JFFS2 root filesystem for NAND flash.
  110. menuconfig TARGET_ROOTFS_SQUASHFS
  111. bool "squashfs"
  112. default y if USES_SQUASHFS
  113. help
  114. Build a squashfs-lzma root filesystem.
  115. config TARGET_SQUASHFS_BLOCK_SIZE
  116. int "Block size (in KiB)"
  117. depends on TARGET_ROOTFS_SQUASHFS
  118. default 64 if LOW_MEMORY_FOOTPRINT
  119. default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  120. default 256
  121. menuconfig TARGET_ROOTFS_UBIFS
  122. bool "ubifs"
  123. default y if USES_UBIFS
  124. depends on USES_UBIFS
  125. help
  126. Build a UBIFS root filesystem.
  127. choice
  128. prompt "compression"
  129. default TARGET_UBIFS_COMPRESSION_ZLIB
  130. depends on TARGET_ROOTFS_UBIFS
  131. help
  132. Select compression type
  133. config TARGET_UBIFS_COMPRESSION_NONE
  134. bool "none"
  135. config TARGET_UBIFS_COMPRESSION_LZO
  136. bool "lzo"
  137. config TARGET_UBIFS_COMPRESSION_ZLIB
  138. bool "zlib"
  139. endchoice
  140. config TARGET_UBIFS_FREE_SPACE_FIXUP
  141. bool "free space fixup" if TARGET_ROOTFS_UBIFS
  142. default y
  143. help
  144. The filesystem free space has to be fixed up on first mount.
  145. config TARGET_UBIFS_JOURNAL_SIZE
  146. string
  147. prompt "journal size" if TARGET_ROOTFS_UBIFS
  148. default ""
  149. config GRUB_IMAGES
  150. bool "Build GRUB images (Linux x86 or x86_64 host only)"
  151. depends on TARGET_x86
  152. depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
  153. select PACKAGE_grub2
  154. default y
  155. config GRUB_EFI_IMAGES
  156. bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
  157. depends on TARGET_x86
  158. depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
  159. select PACKAGE_grub2
  160. select PACKAGE_grub2-efi
  161. select PACKAGE_kmod-fs-vfat
  162. default y
  163. config GRUB_CONSOLE
  164. bool "Use Console Terminal (in addition to Serial)"
  165. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  166. default y
  167. config GRUB_SERIAL
  168. string "Serial port device"
  169. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  170. default "ttyS0"
  171. config GRUB_BAUDRATE
  172. int "Serial port baud rate"
  173. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  174. default 38400 if TARGET_x86_generic
  175. default 115200
  176. config GRUB_FLOWCONTROL
  177. bool "Use RTE/CTS on serial console"
  178. depends on GRUB_SERIAL != ""
  179. default n
  180. config GRUB_BOOTOPTS
  181. string "Extra kernel boot options"
  182. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  183. help
  184. If you don't know, just leave it blank.
  185. config GRUB_TIMEOUT
  186. string "Seconds to wait before booting the default entry"
  187. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  188. default "5"
  189. help
  190. If you don't know, 5 seconds is a reasonable default.
  191. config GRUB_TITLE
  192. string "Title for the menu entry in GRUB"
  193. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  194. default "OpenWrt"
  195. help
  196. This is the title of the GRUB menu entry.
  197. If unspecified, it defaults to OpenWrt.
  198. config ISO_IMAGES
  199. bool "Build LiveCD image (ISO)"
  200. depends on TARGET_x86
  201. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  202. config VDI_IMAGES
  203. bool "Build VirtualBox image files (VDI)"
  204. depends on TARGET_x86
  205. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  206. select PACKAGE_kmod-e1000
  207. config VMDK_IMAGES
  208. bool "Build VMware image files (VMDK)"
  209. depends on TARGET_x86
  210. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  211. select PACKAGE_kmod-e1000
  212. config TARGET_IMAGES_GZIP
  213. bool "GZip images"
  214. depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
  215. default y
  216. comment "Image Options"
  217. source "target/linux/*/image/Config.in"
  218. config TARGET_KERNEL_PARTSIZE
  219. int "Kernel partition size (in MB)"
  220. depends on USES_BOOT_PART
  221. default 8 if TARGET_apm821xx_sata
  222. default 64 if TARGET_bcm27xx
  223. default 16
  224. config TARGET_ROOTFS_PARTSIZE
  225. int "Root filesystem partition size (in MB)"
  226. depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml
  227. default 104
  228. help
  229. Select the root filesystem partition size.
  230. config TARGET_ROOTFS_PARTNAME
  231. string "Root partition on target device"
  232. depends on GRUB_IMAGES || GRUB_EFI_IMAGES
  233. help
  234. Override the root partition on the final device. If left empty,
  235. it will be mounted by PARTUUID which makes the kernel find the
  236. appropriate disk automatically.
  237. endmenu