Skip to contentSkip to conversation

zstd compressed firmware loading

PATCH Superseded Rene Rebe 1 participant 1 message Aug 21, 2020

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Rene Rebe

author
#0 lore raw

PATCH 1/1 zstd compressed firmware loading

Now with zstd compressed kernel & initrd upstream, we would rather compress everything with one type of compressor, so I added support for zstd compressed firmware loading, too.

Tested on x86-64, sparc64 and mips64.

drivers/base/firmware_loader/Kconfig +10 -0
index 5b24f3959255..30d440bec257 100644
@@ -169,6 +169,16 @@ config FW_LOADER_COMPRESS
 	  be compressed with either none or crc32 integrity check type (pass
 	  "-C crc32" option to xz command).
 
+config FW_LOADER_COMPRESS_ZSTD
+	bool "Enable Zstd compressed firmware support"
+	select FW_LOADER_PAGED_BUF
+	select ZSTD_DECOMPRESS
+	help
+	  This option enables the support for loading Zstd compressed firmware
+	  files. The caller of firmware API receives the decompressed file
+	  content. The compressed file is loaded as a fallback, only after
+	  loading the raw file failed at first.
+
 config FW_CACHE
 	bool "Enable firmware caching during suspend"
 	depends on PM_SLEEP
drivers/base/firmware_loader/main.c +141 -0

160 lines not on this page · raw message

Signature · 2 lines
  René Rebe, ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
  https://exactcode.com | https://t2sde.org | https://rene.rebe.de