Kconfig 7.6 KB

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