xref: /linux/usr/Kconfig (revision e76e1fdfa8f8dc1ea6699923cf5d92b5bee9c936)
1dbec4866SSam Ravnborg#
2dbec4866SSam Ravnborg# Configuration for initramfs
3dbec4866SSam Ravnborg#
4dbec4866SSam Ravnborg
5dbec4866SSam Ravnborgconfig INITRAMFS_SOURCE
6dbec4866SSam Ravnborg	string "Initramfs source file(s)"
7dbec4866SSam Ravnborg	default ""
8dbec4866SSam Ravnborg	help
9dbec4866SSam Ravnborg	  This can be either a single cpio archive with a .cpio suffix or a
10dbec4866SSam Ravnborg	  space-separated list of directories and files for building the
11dbec4866SSam Ravnborg	  initramfs image.  A cpio archive should contain a filesystem archive
12dbec4866SSam Ravnborg	  to be used as an initramfs image.  Directories should contain a
13dbec4866SSam Ravnborg	  filesystem layout to be included in the initramfs image.  Files
14dbec4866SSam Ravnborg	  should contain entries according to the format described by the
15dbec4866SSam Ravnborg	  "usr/gen_init_cpio" program in the kernel tree.
16dbec4866SSam Ravnborg
17dbec4866SSam Ravnborg	  When multiple directories and files are specified then the
18dbec4866SSam Ravnborg	  initramfs image will be the aggregate of all of them.
19dbec4866SSam Ravnborg
200979f378SAlexander E. Patrakov	  See <file:Documentation/early-userspace/README> for more details.
21dbec4866SSam Ravnborg
22dbec4866SSam Ravnborg	  If you are not sure, leave it blank.
23dbec4866SSam Ravnborg
24dbec4866SSam Ravnborgconfig INITRAMFS_ROOT_UID
25dbec4866SSam Ravnborg	int "User ID to map to 0 (user root)"
26dbec4866SSam Ravnborg	depends on INITRAMFS_SOURCE!=""
27dbec4866SSam Ravnborg	default "0"
28dbec4866SSam Ravnborg	help
29dbec4866SSam Ravnborg	  This setting is only meaningful if the INITRAMFS_SOURCE is
30dbec4866SSam Ravnborg	  contains a directory.  Setting this user ID (UID) to something
31dbec4866SSam Ravnborg	  other than "0" will cause all files owned by that UID to be
32dbec4866SSam Ravnborg	  owned by user root in the initial ramdisk image.
33dbec4866SSam Ravnborg
34dbec4866SSam Ravnborg	  If you are not sure, leave it set to "0".
35dbec4866SSam Ravnborg
36dbec4866SSam Ravnborgconfig INITRAMFS_ROOT_GID
37dbec4866SSam Ravnborg	int "Group ID to map to 0 (group root)"
38dbec4866SSam Ravnborg	depends on INITRAMFS_SOURCE!=""
39dbec4866SSam Ravnborg	default "0"
40dbec4866SSam Ravnborg	help
41dbec4866SSam Ravnborg	  This setting is only meaningful if the INITRAMFS_SOURCE is
42dbec4866SSam Ravnborg	  contains a directory.  Setting this group ID (GID) to something
43dbec4866SSam Ravnborg	  other than "0" will cause all files owned by that GID to be
44dbec4866SSam Ravnborg	  owned by group root in the initial ramdisk image.
45dbec4866SSam Ravnborg
46dbec4866SSam Ravnborg	  If you are not sure, leave it set to "0".
47fb9a4ca9SH. Peter Anvin
48fb9a4ca9SH. Peter Anvinconfig RD_GZIP
496a108a14SDavid Rientjes	bool "Support initial ramdisks compressed using gzip" if EXPERT
50fb9a4ca9SH. Peter Anvin	default y
5173d8a12fSH. Peter Anvin	depends on BLK_DEV_INITRD
52fb9a4ca9SH. Peter Anvin	select DECOMPRESS_GZIP
53fb9a4ca9SH. Peter Anvin	help
54fb9a4ca9SH. Peter Anvin	  Support loading of a gzip encoded initial ramdisk or cpio buffer.
55fb9a4ca9SH. Peter Anvin	  If unsure, say Y.
56fb9a4ca9SH. Peter Anvin
57fb9a4ca9SH. Peter Anvinconfig RD_BZIP2
586a108a14SDavid Rientjes	bool "Support initial ramdisks compressed using bzip2" if EXPERT
596a108a14SDavid Rientjes	default !EXPERT
6073d8a12fSH. Peter Anvin	depends on BLK_DEV_INITRD
61fb9a4ca9SH. Peter Anvin	select DECOMPRESS_BZIP2
62fb9a4ca9SH. Peter Anvin	help
63fb9a4ca9SH. Peter Anvin	  Support loading of a bzip2 encoded initial ramdisk or cpio buffer
64fb9a4ca9SH. Peter Anvin	  If unsure, say N.
65fb9a4ca9SH. Peter Anvin
66fb9a4ca9SH. Peter Anvinconfig RD_LZMA
676a108a14SDavid Rientjes	bool "Support initial ramdisks compressed using LZMA" if EXPERT
686a108a14SDavid Rientjes	default !EXPERT
6973d8a12fSH. Peter Anvin	depends on BLK_DEV_INITRD
70fb9a4ca9SH. Peter Anvin	select DECOMPRESS_LZMA
71fb9a4ca9SH. Peter Anvin	help
7255d1d26fSH. Peter Anvin	  Support loading of a LZMA encoded initial ramdisk or cpio buffer
73fb9a4ca9SH. Peter Anvin	  If unsure, say N.
74ab76f3d7SAlain Knaff
753ebe1243SLasse Collinconfig RD_XZ
766a108a14SDavid Rientjes	bool "Support initial ramdisks compressed using XZ" if EXPERT
776a108a14SDavid Rientjes	default !EXPERT
783ebe1243SLasse Collin	depends on BLK_DEV_INITRD
793ebe1243SLasse Collin	select DECOMPRESS_XZ
803ebe1243SLasse Collin	help
813ebe1243SLasse Collin	  Support loading of a XZ encoded initial ramdisk or cpio buffer.
823ebe1243SLasse Collin	  If unsure, say N.
833ebe1243SLasse Collin
84cacb246fSAlbin Tonnerreconfig RD_LZO
856a108a14SDavid Rientjes	bool "Support initial ramdisks compressed using LZO" if EXPERT
866a108a14SDavid Rientjes	default !EXPERT
87cacb246fSAlbin Tonnerre	depends on BLK_DEV_INITRD
88cacb246fSAlbin Tonnerre	select DECOMPRESS_LZO
89cacb246fSAlbin Tonnerre	help
90cacb246fSAlbin Tonnerre	  Support loading of a LZO encoded initial ramdisk or cpio buffer
91cacb246fSAlbin Tonnerre	  If unsure, say N.
92cacb246fSAlbin Tonnerre
93*e76e1fdfSKyungsik Leeconfig RD_LZ4
94*e76e1fdfSKyungsik Lee	bool "Support initial ramdisks compressed using LZ4" if EXPERT
95*e76e1fdfSKyungsik Lee	default !EXPERT
96*e76e1fdfSKyungsik Lee	depends on BLK_DEV_INITRD
97*e76e1fdfSKyungsik Lee	select DECOMPRESS_LZ4
98*e76e1fdfSKyungsik Lee	help
99*e76e1fdfSKyungsik Lee	  Support loading of a LZ4 encoded initial ramdisk or cpio buffer
100*e76e1fdfSKyungsik Lee	  If unsure, say N.
101*e76e1fdfSKyungsik Lee
102ab76f3d7SAlain Knaffchoice
1031359096eSH. Peter Anvin	prompt "Built-in initramfs compression mode" if INITRAMFS_SOURCE!=""
104ab76f3d7SAlain Knaff	help
10540297927SH. Peter Anvin	  This option decides by which algorithm the builtin initramfs
10640297927SH. Peter Anvin	  will be compressed.  Several compression algorithms are
10740297927SH. Peter Anvin	  available, which differ in efficiency, compression and
10840297927SH. Peter Anvin	  decompression speed.  Compression speed is only relevant
10940297927SH. Peter Anvin	  when building a kernel.  Decompression speed is relevant at
11040297927SH. Peter Anvin	  each boot.
111ab76f3d7SAlain Knaff
11255d1d26fSH. Peter Anvin	  If you have any problems with bzip2 or LZMA compressed
113ab76f3d7SAlain Knaff	  initramfs, mail me (Alain Knaff) <alain@knaff.lu>.
114ab76f3d7SAlain Knaff
11540297927SH. Peter Anvin	  High compression options are mostly useful for users who are
11640297927SH. Peter Anvin	  low on RAM, since it reduces the memory consumption during
11740297927SH. Peter Anvin	  boot.
118ab76f3d7SAlain Knaff
119ab76f3d7SAlain Knaff	  If in doubt, select 'gzip'
120ab76f3d7SAlain Knaff
121ab76f3d7SAlain Knaffconfig INITRAMFS_COMPRESSION_NONE
122ab76f3d7SAlain Knaff	bool "None"
123ab76f3d7SAlain Knaff	help
124ab76f3d7SAlain Knaff	  Do not compress the built-in initramfs at all. This may
125ab76f3d7SAlain Knaff	  sound wasteful in space, but, you should be aware that the
126ab76f3d7SAlain Knaff	  built-in initramfs will be compressed at a later stage
127ab76f3d7SAlain Knaff	  anyways along with the rest of the kernel, on those
128ab76f3d7SAlain Knaff	  architectures that support this.
129ab76f3d7SAlain Knaff	  However, not compressing the initramfs may lead to slightly
130ab76f3d7SAlain Knaff	  higher memory consumption during a short time at boot, while
131ab76f3d7SAlain Knaff	  both the cpio image and the unpacked filesystem image will
132ab76f3d7SAlain Knaff	  be present in memory simultaneously
133ab76f3d7SAlain Knaff
134ab76f3d7SAlain Knaffconfig INITRAMFS_COMPRESSION_GZIP
135ab76f3d7SAlain Knaff	bool "Gzip"
136ab76f3d7SAlain Knaff	depends on RD_GZIP
137ab76f3d7SAlain Knaff	help
138cacb246fSAlbin Tonnerre	  The old and tried gzip compression. It provides a good balance
139cacb246fSAlbin Tonnerre	  between compression ratio and decompression speed.
140ab76f3d7SAlain Knaff
141ab76f3d7SAlain Knaffconfig INITRAMFS_COMPRESSION_BZIP2
142ab76f3d7SAlain Knaff	bool "Bzip2"
143ab76f3d7SAlain Knaff	depends on RD_BZIP2
144ab76f3d7SAlain Knaff	help
145ab76f3d7SAlain Knaff	  Its compression ratio and speed is intermediate.
1460a4dd35cSRandy Dunlap	  Decompression speed is slowest among the choices.  The initramfs
147ab76f3d7SAlain Knaff	  size is about 10% smaller with bzip2, in comparison to gzip.
148ab76f3d7SAlain Knaff	  Bzip2 uses a large amount of memory. For modern kernels you
149ab76f3d7SAlain Knaff	  will need at least 8MB RAM or more for booting.
150ab76f3d7SAlain Knaff
151ab76f3d7SAlain Knaffconfig INITRAMFS_COMPRESSION_LZMA
152ab76f3d7SAlain Knaff	bool "LZMA"
153ab76f3d7SAlain Knaff	depends on RD_LZMA
154ab76f3d7SAlain Knaff	help
1550a4dd35cSRandy Dunlap	  This algorithm's compression ratio is best.
1560a4dd35cSRandy Dunlap	  Decompression speed is between the other choices.
1570a4dd35cSRandy Dunlap	  Compression is slowest. The initramfs size is about 33%
158ab76f3d7SAlain Knaff	  smaller with LZMA in comparison to gzip.
159ab76f3d7SAlain Knaff
1603ebe1243SLasse Collinconfig INITRAMFS_COMPRESSION_XZ
1613ebe1243SLasse Collin	bool "XZ"
1623ebe1243SLasse Collin	depends on RD_XZ
1633ebe1243SLasse Collin	help
1643ebe1243SLasse Collin	  XZ uses the LZMA2 algorithm. The initramfs size is about 30%
1653ebe1243SLasse Collin	  smaller with XZ in comparison to gzip. Decompression speed
1663ebe1243SLasse Collin	  is better than that of bzip2 but worse than gzip and LZO.
1673ebe1243SLasse Collin	  Compression is slow.
1683ebe1243SLasse Collin
169cacb246fSAlbin Tonnerreconfig INITRAMFS_COMPRESSION_LZO
170cacb246fSAlbin Tonnerre	bool "LZO"
171cacb246fSAlbin Tonnerre	depends on RD_LZO
172cacb246fSAlbin Tonnerre	help
1730a4dd35cSRandy Dunlap	  Its compression ratio is the poorest among the choices. The kernel
174681b3049SStephan Sperber	  size is about 10% bigger than gzip; however its speed
175cacb246fSAlbin Tonnerre	  (both compression and decompression) is the fastest.
176cacb246fSAlbin Tonnerre
177ab76f3d7SAlain Knaffendchoice
178