xref: /linux/usr/Kconfig (revision ab76f3d771590d5c89faa3219559c5d3fc0ce0c2)
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
49fb9a4ca9SH. Peter Anvin	bool "Initial ramdisk compressed using gzip"
50fb9a4ca9SH. Peter Anvin	default y
51fb9a4ca9SH. Peter Anvin	depends on BLK_DEV_INITRD=y
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
58fb9a4ca9SH. Peter Anvin	bool "Initial ramdisk compressed using bzip2"
59fb9a4ca9SH. Peter Anvin	default n
60fb9a4ca9SH. Peter Anvin	depends on BLK_DEV_INITRD=y
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
67fb9a4ca9SH. Peter Anvin	bool "Initial ramdisk compressed using lzma"
68fb9a4ca9SH. Peter Anvin	default n
69fb9a4ca9SH. Peter Anvin	depends on BLK_DEV_INITRD=y
70fb9a4ca9SH. Peter Anvin	select DECOMPRESS_LZMA
71fb9a4ca9SH. Peter Anvin	help
72fb9a4ca9SH. Peter Anvin	  Support loading of a lzma encoded initial ramdisk or cpio buffer
73fb9a4ca9SH. Peter Anvin	  If unsure, say N.
74*ab76f3d7SAlain Knaff
75*ab76f3d7SAlain Knaffchoice
76*ab76f3d7SAlain Knaff	prompt "Built-in initramfs compression mode"
77*ab76f3d7SAlain Knaff	help
78*ab76f3d7SAlain Knaff	  This setting is only meaningful if the INITRAMFS_SOURCE is
79*ab76f3d7SAlain Knaff	  set. It decides by which algorithm the INITRAMFS_SOURCE will
80*ab76f3d7SAlain Knaff	  be compressed.
81*ab76f3d7SAlain Knaff	  Several compression algorithms are available, which differ
82*ab76f3d7SAlain Knaff	  in efficiency, compression and decompression speed.
83*ab76f3d7SAlain Knaff	  Compression speed is only relevant when building a kernel.
84*ab76f3d7SAlain Knaff	  Decompression speed is relevant at each boot.
85*ab76f3d7SAlain Knaff
86*ab76f3d7SAlain Knaff	  If you have any problems with bzip2 or lzma compressed
87*ab76f3d7SAlain Knaff	  initramfs, mail me (Alain Knaff) <alain@knaff.lu>.
88*ab76f3d7SAlain Knaff
89*ab76f3d7SAlain Knaff	  High compression options are mostly useful for users who
90*ab76f3d7SAlain Knaff	  are low on disk space (embedded systems), but for whom ram
91*ab76f3d7SAlain Knaff	  size matters less.
92*ab76f3d7SAlain Knaff
93*ab76f3d7SAlain Knaff	  If in doubt, select 'gzip'
94*ab76f3d7SAlain Knaff
95*ab76f3d7SAlain Knaffconfig INITRAMFS_COMPRESSION_NONE
96*ab76f3d7SAlain Knaff	bool "None"
97*ab76f3d7SAlain Knaff	help
98*ab76f3d7SAlain Knaff	  Do not compress the built-in initramfs at all. This may
99*ab76f3d7SAlain Knaff	  sound wasteful in space, but, you should be aware that the
100*ab76f3d7SAlain Knaff	  built-in initramfs will be compressed at a later stage
101*ab76f3d7SAlain Knaff	  anyways along with the rest of the kernel, on those
102*ab76f3d7SAlain Knaff	  architectures that support this.
103*ab76f3d7SAlain Knaff	  However, not compressing the initramfs may lead to slightly
104*ab76f3d7SAlain Knaff	  higher memory consumption during a short time at boot, while
105*ab76f3d7SAlain Knaff	  both the cpio image and the unpacked filesystem image will
106*ab76f3d7SAlain Knaff	  be present in memory simultaneously
107*ab76f3d7SAlain Knaff
108*ab76f3d7SAlain Knaffconfig INITRAMFS_COMPRESSION_GZIP
109*ab76f3d7SAlain Knaff	bool "Gzip"
110*ab76f3d7SAlain Knaff	depends on RD_GZIP
111*ab76f3d7SAlain Knaff	help
112*ab76f3d7SAlain Knaff	  The old and tried gzip compression. Its compression ratio is
113*ab76f3d7SAlain Knaff	  the poorest among the 3 choices; however its speed (both
114*ab76f3d7SAlain Knaff	  compression and decompression) is the fastest.
115*ab76f3d7SAlain Knaff
116*ab76f3d7SAlain Knaffconfig INITRAMFS_COMPRESSION_BZIP2
117*ab76f3d7SAlain Knaff	bool "Bzip2"
118*ab76f3d7SAlain Knaff	depends on RD_BZIP2
119*ab76f3d7SAlain Knaff	help
120*ab76f3d7SAlain Knaff	  Its compression ratio and speed is intermediate.
121*ab76f3d7SAlain Knaff	  Decompression speed is slowest among the three.  The initramfs
122*ab76f3d7SAlain Knaff	  size is about 10% smaller with bzip2, in comparison to gzip.
123*ab76f3d7SAlain Knaff	  Bzip2 uses a large amount of memory. For modern kernels you
124*ab76f3d7SAlain Knaff	  will need at least 8MB RAM or more for booting.
125*ab76f3d7SAlain Knaff
126*ab76f3d7SAlain Knaffconfig INITRAMFS_COMPRESSION_LZMA
127*ab76f3d7SAlain Knaff	bool "LZMA"
128*ab76f3d7SAlain Knaff	depends on RD_LZMA
129*ab76f3d7SAlain Knaff	help
130*ab76f3d7SAlain Knaff	  The most recent compression algorithm.
131*ab76f3d7SAlain Knaff	  Its ratio is best, decompression speed is between the other
132*ab76f3d7SAlain Knaff	  two. Compression is slowest.	The initramfs size is about 33%
133*ab76f3d7SAlain Knaff	  smaller with LZMA in comparison to gzip.
134*ab76f3d7SAlain Knaff
135*ab76f3d7SAlain Knaffendchoice
136