Kconfig 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. #
  2. # Configuration for initramfs
  3. #
  4. config INITRAMFS_SOURCE
  5. string "Initramfs source file(s)"
  6. default ""
  7. help
  8. This can be either a single cpio archive with a .cpio suffix or a
  9. space-separated list of directories and files for building the
  10. initramfs image. A cpio archive should contain a filesystem archive
  11. to be used as an initramfs image. Directories should contain a
  12. filesystem layout to be included in the initramfs image. Files
  13. should contain entries according to the format described by the
  14. "usr/gen_init_cpio" program in the kernel tree.
  15. When multiple directories and files are specified then the
  16. initramfs image will be the aggregate of all of them.
  17. See <file:Documentation/early-userspace/README> for more details.
  18. If you are not sure, leave it blank.
  19. config INITRAMFS_FORCE
  20. bool "Ignore the initramfs passed by the bootloader"
  21. depends on CMDLINE_EXTEND || CMDLINE_FORCE
  22. help
  23. This option causes the kernel to ignore the initramfs image
  24. (or initrd image) passed to it by the bootloader. This is
  25. analogous to CMDLINE_FORCE, which is found on some architectures,
  26. and is useful if you cannot or don't want to change the image
  27. your bootloader passes to the kernel.
  28. config INITRAMFS_ROOT_UID
  29. int "User ID to map to 0 (user root)"
  30. depends on INITRAMFS_SOURCE!=""
  31. default "0"
  32. help
  33. If INITRAMFS_SOURCE points to a directory, files owned by this UID
  34. (-1 = current user) will be owned by root in the resulting image.
  35. If you are not sure, leave it set to "0".
  36. config INITRAMFS_ROOT_GID
  37. int "Group ID to map to 0 (group root)"
  38. depends on INITRAMFS_SOURCE!=""
  39. default "0"
  40. help
  41. If INITRAMFS_SOURCE points to a directory, files owned by this GID
  42. (-1 = current group) will be owned by root in the resulting image.
  43. If you are not sure, leave it set to "0".
  44. config RD_GZIP
  45. bool "Support initial ramdisk/ramfs compressed using gzip"
  46. depends on BLK_DEV_INITRD
  47. default y
  48. select DECOMPRESS_GZIP
  49. help
  50. Support loading of a gzip encoded initial ramdisk or cpio buffer.
  51. If unsure, say Y.
  52. config RD_BZIP2
  53. bool "Support initial ramdisk/ramfs compressed using bzip2"
  54. default y
  55. depends on BLK_DEV_INITRD
  56. select DECOMPRESS_BZIP2
  57. help
  58. Support loading of a bzip2 encoded initial ramdisk or cpio buffer
  59. If unsure, say N.
  60. config RD_LZMA
  61. bool "Support initial ramdisk/ramfs compressed using LZMA"
  62. default y
  63. depends on BLK_DEV_INITRD
  64. select DECOMPRESS_LZMA
  65. help
  66. Support loading of a LZMA encoded initial ramdisk or cpio buffer
  67. If unsure, say N.
  68. config RD_XZ
  69. bool "Support initial ramdisk/ramfs compressed using XZ"
  70. depends on BLK_DEV_INITRD
  71. default y
  72. select DECOMPRESS_XZ
  73. help
  74. Support loading of a XZ encoded initial ramdisk or cpio buffer.
  75. If unsure, say N.
  76. config RD_LZO
  77. bool "Support initial ramdisk/ramfs compressed using LZO"
  78. default y
  79. depends on BLK_DEV_INITRD
  80. select DECOMPRESS_LZO
  81. help
  82. Support loading of a LZO encoded initial ramdisk or cpio buffer
  83. If unsure, say N.
  84. config RD_LZ4
  85. bool "Support initial ramdisk/ramfs compressed using LZ4"
  86. default y
  87. depends on BLK_DEV_INITRD
  88. select DECOMPRESS_LZ4
  89. help
  90. Support loading of a LZ4 encoded initial ramdisk or cpio buffer
  91. If unsure, say N.
  92. choice
  93. prompt "Built-in initramfs compression mode"
  94. depends on INITRAMFS_SOURCE!=""
  95. optional
  96. help
  97. This option allows you to decide by which algorithm the builtin
  98. initramfs will be compressed. Several compression algorithms are
  99. available, which differ in efficiency, compression and
  100. decompression speed. Compression speed is only relevant
  101. when building a kernel. Decompression speed is relevant at
  102. each boot. Also the memory usage during decompression may become
  103. relevant on memory constrained systems. This is usually based on the
  104. dictionary size of the algorithm with algorithms like XZ and LZMA
  105. featuring large dictionary sizes.
  106. High compression options are mostly useful for users who are
  107. low on RAM, since it reduces the memory consumption during
  108. boot.
  109. Keep in mind that your build system needs to provide the appropriate
  110. compression tool to compress the generated initram cpio file for
  111. embedding.
  112. If in doubt, select 'None'
  113. config INITRAMFS_COMPRESSION_NONE
  114. bool "None"
  115. help
  116. Do not compress the built-in initramfs at all. This may sound wasteful
  117. in space, but, you should be aware that the built-in initramfs will be
  118. compressed at a later stage anyways along with the rest of the kernel,
  119. on those architectures that support this. However, not compressing the
  120. initramfs may lead to slightly higher memory consumption during a
  121. short time at boot, while both the cpio image and the unpacked
  122. filesystem image will be present in memory simultaneously
  123. config INITRAMFS_COMPRESSION_GZIP
  124. bool "Gzip"
  125. depends on RD_GZIP
  126. help
  127. Use the old and well tested gzip compression algorithm. Gzip provides
  128. a good balance between compression ratio and decompression speed and
  129. has a reasonable compression speed. It is also more likely to be
  130. supported by your build system as the gzip tool is present by default
  131. on most distros.
  132. config INITRAMFS_COMPRESSION_BZIP2
  133. bool "Bzip2"
  134. depends on RD_BZIP2
  135. help
  136. It's compression ratio and speed is intermediate. Decompression speed
  137. is slowest among the choices. The initramfs size is about 10% smaller
  138. with bzip2, in comparison to gzip. Bzip2 uses a large amount of
  139. memory. For modern kernels you will need at least 8MB RAM or more for
  140. booting.
  141. If you choose this, keep in mind that you need to have the bzip2 tool
  142. available to be able to compress the initram.
  143. config INITRAMFS_COMPRESSION_LZMA
  144. bool "LZMA"
  145. depends on RD_LZMA
  146. help
  147. This algorithm's compression ratio is best but has a large dictionary
  148. size which might cause issues in memory constrained systems.
  149. Decompression speed is between the other choices. Compression is
  150. slowest. The initramfs size is about 33% smaller with LZMA in
  151. comparison to gzip.
  152. If you choose this, keep in mind that you may need to install the xz
  153. or lzma tools to be able to compress the initram.
  154. config INITRAMFS_COMPRESSION_XZ
  155. bool "XZ"
  156. depends on RD_XZ
  157. help
  158. XZ uses the LZMA2 algorithm and has a large dictionary which may cause
  159. problems on memory constrained systems. The initramfs size is about
  160. 30% smaller with XZ in comparison to gzip. Decompression speed is
  161. better than that of bzip2 but worse than gzip and LZO. Compression is
  162. slow.
  163. If you choose this, keep in mind that you may need to install the xz
  164. tool to be able to compress the initram.
  165. config INITRAMFS_COMPRESSION_LZO
  166. bool "LZO"
  167. depends on RD_LZO
  168. help
  169. It's compression ratio is the second poorest amongst the choices. The
  170. kernel size is about 10% bigger than gzip. Despite that, it's
  171. decompression speed is the second fastest and it's compression speed
  172. is quite fast too.
  173. If you choose this, keep in mind that you may need to install the lzop
  174. tool to be able to compress the initram.
  175. config INITRAMFS_COMPRESSION_LZ4
  176. bool "LZ4"
  177. depends on RD_LZ4
  178. help
  179. It's compression ratio is the poorest amongst the choices. The kernel
  180. size is about 15% bigger than gzip; however its decompression speed
  181. is the fastest.
  182. If you choose this, keep in mind that most distros don't provide lz4
  183. by default which could cause a build failure.
  184. endchoice
  185. config INITRAMFS_COMPRESSION
  186. depends on INITRAMFS_SOURCE!=""
  187. string
  188. default "" if INITRAMFS_COMPRESSION_NONE
  189. default ".gz" if INITRAMFS_COMPRESSION_GZIP
  190. default ".bz2" if INITRAMFS_COMPRESSION_BZIP2
  191. default ".lzma" if INITRAMFS_COMPRESSION_LZMA
  192. default ".xz" if INITRAMFS_COMPRESSION_XZ
  193. default ".lzo" if INITRAMFS_COMPRESSION_LZO
  194. default ".lz4" if INITRAMFS_COMPRESSION_LZ4
  195. default ".gz" if RD_GZIP
  196. default ".lz4" if RD_LZ4
  197. default ".lzo" if RD_LZO
  198. default ".xz" if RD_XZ
  199. default ".lzma" if RD_LZMA
  200. default ".bz2" if RD_BZIP2
  201. default ""