[PATCH RFC 0/4] firmware: Add ZSTD-compressed file support

From: Takashi Iwai
Date: Wed Jan 27 2021 - 10:51:44 EST


Hi,

it seems that ZSTD format is getting popular, and I've been asked
about the firmware loader support. So I took a quick glance, and it
turned out that it's fairly easy thanks to the existing ZSTD API.
Now high time to submit something.

The first patch adds a new Kconfig CONFIG_FW_LOADER_COMPRESS_ZSTD and
the corresponding decompression function to the firmware loader code.
For the already supported XZ-compression, CONFIG_FW_LOADER_COMPRESS_XZ
is added to make it selectable explicitly, too.

The rest three patches are for selftest: a cleanup, a fix and the
additional support of ZSTD format.

Currently, I have no idea whether any distro would use ZSTD files for
firmware files in near future, though. That's the reason of this
patch set being an RFC for now.


thanks,

Takashi

===

Takashi Iwai (4):
firmware: Add the support for ZSTD-compressed firmware files
selftests: firmware: Simplify test patterns
selftest: firmware: Fix the request_firmware_into_buf() test for XZ
format
selftest: firmware: Add ZSTD compressed file tests

drivers/base/firmware_loader/Kconfig | 21 ++-
drivers/base/firmware_loader/main.c | 74 +++++++-
.../selftests/firmware/fw_filesystem.sh | 167 +++++++++---------
tools/testing/selftests/firmware/fw_lib.sh | 12 +-
4 files changed, 175 insertions(+), 99 deletions(-)

--
2.26.2