hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/base/firmware_loader/Kconfig
....@@ -1,3 +1,4 @@
1
+# SPDX-License-Identifier: GPL-2.0
12 menu "Firmware loader"
23
34 config FW_LOADER
....@@ -24,6 +25,9 @@
2425 enable built-in firmware (CONFIG_EXTRA_FIRMWARE).
2526
2627 if FW_LOADER
28
+
29
+config FW_LOADER_PAGED_BUF
30
+ bool
2731
2832 config EXTRA_FIRMWARE
2933 string "Build named firmware blobs into the kernel binary"
....@@ -66,6 +70,7 @@
6670
6771 config FW_LOADER_USER_HELPER
6872 bool "Enable the firmware sysfs fallback mechanism"
73
+ select FW_LOADER_PAGED_BUF
6974 help
7075 This option enables a sysfs loading facility to enable firmware
7176 loading to the kernel through userspace as a fallback mechanism
....@@ -143,13 +148,27 @@
143148 to be used for all firmware requests which explicitly do not disable a
144149 a fallback mechanism. Firmware calls which do prohibit a fallback
145150 mechanism is request_firmware_direct(). This option is kept for
146
- backward compatibility purposes given this precise mechanism can also
151
+ backward compatibility purposes given this precise mechanism can also
147152 be enabled by setting the proc sysctl value to true:
148153
149154 /proc/sys/kernel/firmware_config/force_sysfs_fallback
150155
151156 If you are unsure about this, say N here.
152157
158
+config FW_LOADER_COMPRESS
159
+ bool "Enable compressed firmware support"
160
+ select FW_LOADER_PAGED_BUF
161
+ select XZ_DEC
162
+ help
163
+ This option enables the support for loading compressed firmware
164
+ files. The caller of firmware API receives the decompressed file
165
+ content. The compressed file is loaded as a fallback, only after
166
+ loading the raw file failed at first.
167
+
168
+ Currently only XZ-compressed files are supported, and they have to
169
+ be compressed with either none or crc32 integrity check type (pass
170
+ "-C crc32" option to xz command).
171
+
153172 config FW_CACHE
154173 bool "Enable firmware caching during suspend"
155174 depends on PM_SLEEP