Back to home page

LXR

 
 

    


0001 #
0002 # Configuration for initramfs
0003 #
0004 
0005 config INITRAMFS_SOURCE
0006         string "Initramfs source file(s)"
0007         default ""
0008         help
0009           This can be either a single cpio archive with a .cpio suffix or a
0010           space-separated list of directories and files for building the
0011           initramfs image.  A cpio archive should contain a filesystem archive
0012           to be used as an initramfs image.  Directories should contain a
0013           filesystem layout to be included in the initramfs image.  Files
0014           should contain entries according to the format described by the
0015           "usr/gen_init_cpio" program in the kernel tree.
0016 
0017           When multiple directories and files are specified then the
0018           initramfs image will be the aggregate of all of them.
0019 
0020           See <file:Documentation/early-userspace/README> for more details.
0021 
0022           If you are not sure, leave it blank.
0023 
0024 config INITRAMFS_ROOT_UID
0025         int "User ID to map to 0 (user root)"
0026         depends on INITRAMFS_SOURCE!=""
0027         default "0"
0028         help
0029           This setting is only meaningful if the INITRAMFS_SOURCE is
0030           contains a directory.  Setting this user ID (UID) to something
0031           other than "0" will cause all files owned by that UID to be
0032           owned by user root in the initial ramdisk image.
0033 
0034           If you are not sure, leave it set to "0".
0035 
0036 config INITRAMFS_ROOT_GID
0037         int "Group ID to map to 0 (group root)"
0038         depends on INITRAMFS_SOURCE!=""
0039         default "0"
0040         help
0041           This setting is only meaningful if the INITRAMFS_SOURCE is
0042           contains a directory.  Setting this group ID (GID) to something
0043           other than "0" will cause all files owned by that GID to be
0044           owned by group root in the initial ramdisk image.
0045 
0046           If you are not sure, leave it set to "0".
0047 
0048 config RD_GZIP
0049         bool "Support initial ramdisks compressed using gzip"
0050         depends on BLK_DEV_INITRD
0051         default y
0052         select DECOMPRESS_GZIP
0053         help
0054           Support loading of a gzip encoded initial ramdisk or cpio buffer.
0055           If unsure, say Y.
0056 
0057 config RD_BZIP2
0058         bool "Support initial ramdisks compressed using bzip2"
0059         default y
0060         depends on BLK_DEV_INITRD
0061         select DECOMPRESS_BZIP2
0062         help
0063           Support loading of a bzip2 encoded initial ramdisk or cpio buffer
0064           If unsure, say N.
0065 
0066 config RD_LZMA
0067         bool "Support initial ramdisks compressed using LZMA"
0068         default y
0069         depends on BLK_DEV_INITRD
0070         select DECOMPRESS_LZMA
0071         help
0072           Support loading of a LZMA encoded initial ramdisk or cpio buffer
0073           If unsure, say N.
0074 
0075 config RD_XZ
0076         bool "Support initial ramdisks compressed using XZ"
0077         depends on BLK_DEV_INITRD
0078         default y
0079         select DECOMPRESS_XZ
0080         help
0081           Support loading of a XZ encoded initial ramdisk or cpio buffer.
0082           If unsure, say N.
0083 
0084 config RD_LZO
0085         bool "Support initial ramdisks compressed using LZO"
0086         default y
0087         depends on BLK_DEV_INITRD
0088         select DECOMPRESS_LZO
0089         help
0090           Support loading of a LZO encoded initial ramdisk or cpio buffer
0091           If unsure, say N.
0092 
0093 config RD_LZ4
0094         bool "Support initial ramdisks compressed using LZ4"
0095         default y
0096         depends on BLK_DEV_INITRD
0097         select DECOMPRESS_LZ4
0098         help
0099           Support loading of a LZ4 encoded initial ramdisk or cpio buffer
0100           If unsure, say N.
0101 
0102 choice
0103         prompt "Built-in initramfs compression mode"
0104         depends on INITRAMFS_SOURCE!=""
0105         optional
0106         help
0107           This option allows you to decide by which algorithm the builtin
0108           initramfs will be compressed.  Several compression algorithms are
0109           available, which differ in efficiency, compression and
0110           decompression speed.  Compression speed is only relevant
0111           when building a kernel.  Decompression speed is relevant at
0112           each boot. Also the memory usage during decompression may become
0113           relevant on memory constrained systems. This is usually based on the
0114           dictionary size of the algorithm with algorithms like XZ and LZMA
0115           featuring large dictionary sizes.
0116 
0117           High compression options are mostly useful for users who are
0118           low on RAM, since it reduces the memory consumption during
0119           boot.
0120 
0121           Keep in mind that your build system needs to provide the appropriate
0122           compression tool to compress the generated initram cpio file for
0123           embedding.
0124 
0125           If in doubt, select 'None'
0126 
0127 config INITRAMFS_COMPRESSION_NONE
0128         bool "None"
0129         help
0130           Do not compress the built-in initramfs at all. This may sound wasteful
0131           in space, but, you should be aware that the built-in initramfs will be
0132           compressed at a later stage anyways along with the rest of the kernel,
0133           on those architectures that support this. However, not compressing the
0134           initramfs may lead to slightly higher memory consumption during a
0135           short time at boot, while both the cpio image and the unpacked
0136           filesystem image will be present in memory simultaneously
0137 
0138 config INITRAMFS_COMPRESSION_GZIP
0139         bool "Gzip"
0140         depends on RD_GZIP
0141         help
0142           Use the old and well tested gzip compression algorithm. Gzip provides
0143           a good balance between compression ratio and decompression speed and
0144           has a reasonable compression speed. It is also more likely to be
0145           supported by your build system as the gzip tool is present by default
0146           on most distros.
0147 
0148 config INITRAMFS_COMPRESSION_BZIP2
0149         bool "Bzip2"
0150         depends on RD_BZIP2
0151         help
0152           It's compression ratio and speed is intermediate. Decompression speed
0153           is slowest among the choices. The initramfs size is about 10% smaller
0154           with bzip2, in comparison to gzip. Bzip2 uses a large amount of
0155           memory. For modern kernels you will need at least 8MB RAM or more for
0156           booting.
0157 
0158           If you choose this, keep in mind that you need to have the bzip2 tool
0159           available to be able to compress the initram.
0160 
0161 config INITRAMFS_COMPRESSION_LZMA
0162         bool "LZMA"
0163         depends on RD_LZMA
0164         help
0165           This algorithm's compression ratio is best but has a large dictionary
0166           size which might cause issues in memory constrained systems.
0167           Decompression speed is between the other choices. Compression is
0168           slowest. The initramfs size is about 33% smaller with LZMA in
0169           comparison to gzip.
0170 
0171           If you choose this, keep in mind that you may need to install the xz
0172           or lzma tools to be able to compress the initram.
0173 
0174 config INITRAMFS_COMPRESSION_XZ
0175         bool "XZ"
0176         depends on RD_XZ
0177         help
0178           XZ uses the LZMA2 algorithm and has a large dictionary which may cause
0179           problems on memory constrained systems. The initramfs size is about
0180           30% smaller with XZ in comparison to gzip. Decompression speed is
0181           better than that of bzip2 but worse than gzip and LZO. Compression is
0182           slow.
0183 
0184           If you choose this, keep in mind that you may need to install the xz
0185           tool to be able to compress the initram.
0186 
0187 config INITRAMFS_COMPRESSION_LZO
0188         bool "LZO"
0189         depends on RD_LZO
0190         help
0191           It's compression ratio is the second poorest amongst the choices. The
0192           kernel size is about 10% bigger than gzip. Despite that, it's
0193           decompression speed is the second fastest and it's compression speed
0194           is quite fast too.
0195 
0196           If you choose this, keep in mind that you may need to install the lzop
0197           tool to be able to compress the initram.
0198 
0199 config INITRAMFS_COMPRESSION_LZ4
0200         bool "LZ4"
0201         depends on RD_LZ4
0202         help
0203           It's compression ratio is the poorest amongst the choices. The kernel
0204           size is about 15% bigger than gzip; however its decompression speed
0205           is the fastest.
0206 
0207           If you choose this, keep in mind that most distros don't provide lz4
0208           by default which could cause a build failure.
0209 
0210 endchoice
0211 
0212 config INITRAMFS_COMPRESSION
0213         string
0214         default ""      if INITRAMFS_COMPRESSION_NONE
0215         default ".gz"   if INITRAMFS_COMPRESSION_GZIP
0216         default ".bz2"  if INITRAMFS_COMPRESSION_BZIP2
0217         default ".lzma" if INITRAMFS_COMPRESSION_LZMA
0218         default ".xz"   if INITRAMFS_COMPRESSION_XZ
0219         default ".lzo"  if INITRAMFS_COMPRESSION_LZO
0220         default ".lz4"  if INITRAMFS_COMPRESSION_LZ4
0221         default ".gz"   if RD_GZIP
0222         default ".lz4"  if RD_LZ4
0223         default ".lzo"  if RD_LZO
0224         default ".xz"   if RD_XZ
0225         default ".lzma" if RD_LZMA
0226         default ".bz2"  if RD_BZIP2
0227         default ""