hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/usr/Kconfig
....@@ -18,7 +18,7 @@
1818 When multiple directories and files are specified then the
1919 initramfs image will be the aggregate of all of them.
2020
21
- See <file:Documentation/early-userspace/README> for more details.
21
+ See <file:Documentation/driver-api/early-userspace/early_userspace_support.rst> for more details.
2222
2323 If you are not sure, leave it blank.
2424
....@@ -54,7 +54,6 @@
5454
5555 config RD_GZIP
5656 bool "Support initial ramdisk/ramfs compressed using gzip"
57
- depends on BLK_DEV_INITRD
5857 default y
5958 select DECOMPRESS_GZIP
6059 help
....@@ -64,7 +63,6 @@
6463 config RD_BZIP2
6564 bool "Support initial ramdisk/ramfs compressed using bzip2"
6665 default y
67
- depends on BLK_DEV_INITRD
6866 select DECOMPRESS_BZIP2
6967 help
7068 Support loading of a bzip2 encoded initial ramdisk or cpio buffer
....@@ -73,7 +71,6 @@
7371 config RD_LZMA
7472 bool "Support initial ramdisk/ramfs compressed using LZMA"
7573 default y
76
- depends on BLK_DEV_INITRD
7774 select DECOMPRESS_LZMA
7875 help
7976 Support loading of a LZMA encoded initial ramdisk or cpio buffer
....@@ -81,7 +78,6 @@
8178
8279 config RD_XZ
8380 bool "Support initial ramdisk/ramfs compressed using XZ"
84
- depends on BLK_DEV_INITRD
8581 default y
8682 select DECOMPRESS_XZ
8783 help
....@@ -91,7 +87,6 @@
9187 config RD_LZO
9288 bool "Support initial ramdisk/ramfs compressed using LZO"
9389 default y
94
- depends on BLK_DEV_INITRD
9590 select DECOMPRESS_LZO
9691 help
9792 Support loading of a LZO encoded initial ramdisk or cpio buffer
....@@ -100,16 +95,23 @@
10095 config RD_LZ4
10196 bool "Support initial ramdisk/ramfs compressed using LZ4"
10297 default y
103
- depends on BLK_DEV_INITRD
10498 select DECOMPRESS_LZ4
10599 help
106100 Support loading of a LZ4 encoded initial ramdisk or cpio buffer
107101 If unsure, say N.
108102
103
+config RD_ZSTD
104
+ bool "Support initial ramdisk/ramfs compressed using ZSTD"
105
+ default y
106
+ depends on BLK_DEV_INITRD
107
+ select DECOMPRESS_ZSTD
108
+ help
109
+ Support loading of a ZSTD encoded initial ramdisk or cpio buffer.
110
+ If unsure, say N.
111
+
109112 choice
110113 prompt "Built-in initramfs compression mode"
111
- depends on INITRAMFS_SOURCE!=""
112
- optional
114
+ depends on INITRAMFS_SOURCE != ""
113115 help
114116 This option allows you to decide by which algorithm the builtin
115117 initramfs will be compressed. Several compression algorithms are
....@@ -203,6 +205,17 @@
203205 If you choose this, keep in mind that most distros don't provide lz4
204206 by default which could cause a build failure.
205207
208
+config INITRAMFS_COMPRESSION_ZSTD
209
+ bool "ZSTD"
210
+ depends on RD_ZSTD
211
+ help
212
+ ZSTD is a compression algorithm targeting intermediate compression
213
+ with fast decompression speed. It will compress better than GZIP and
214
+ decompress around the same speed as LZO, but slower than LZ4.
215
+
216
+ If you choose this, keep in mind that you may need to install the zstd
217
+ tool to be able to compress the initram.
218
+
206219 config INITRAMFS_COMPRESSION_NONE
207220 bool "None"
208221 help
....@@ -215,21 +228,3 @@
215228 filesystem image will be present in memory simultaneously
216229
217230 endchoice
218
-
219
-config INITRAMFS_COMPRESSION
220
- depends on INITRAMFS_SOURCE!=""
221
- string
222
- default "" if INITRAMFS_COMPRESSION_NONE
223
- default ".gz" if INITRAMFS_COMPRESSION_GZIP
224
- default ".bz2" if INITRAMFS_COMPRESSION_BZIP2
225
- default ".lzma" if INITRAMFS_COMPRESSION_LZMA
226
- default ".xz" if INITRAMFS_COMPRESSION_XZ
227
- default ".lzo" if INITRAMFS_COMPRESSION_LZO
228
- default ".lz4" if INITRAMFS_COMPRESSION_LZ4
229
- default ".gz" if RD_GZIP
230
- default ".lz4" if RD_LZ4
231
- default ".lzo" if RD_LZO
232
- default ".xz" if RD_XZ
233
- default ".lzma" if RD_LZMA
234
- default ".bz2" if RD_BZIP2
235
- default ""