firmware: Add the support for ZSTD-compressed firmware files
authorTakashi Iwai <tiwai@suse.de>
Thu, 21 Apr 2022 15:29:04 +0000 (17:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Apr 2022 06:51:16 +0000 (08:51 +0200)
commit23cfbc6ec44e5e80d5522976ff45ffcdcddfb230
treefeb745c7389ced5c23481d2e947cd43fe79c5c4c
parentce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e
firmware: Add the support for ZSTD-compressed firmware files

As the growing demand on ZSTD compressions, there have been requests
for the support of ZSTD-compressed firmware files, so here it is:
this patch extends the firmware loader code to allow loading ZSTD
files.  The implementation is fairly straightforward, it just adds a
ZSTD decompression routine for the file expander.  (And the code is
even simpler than XZ thanks to the ZSTD API that gives the original
decompressed size from the header.)

Link: https://lore.kernel.org/all/20210127154939.13288-1-tiwai@suse.de/
Tested-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220421152908.4718-2-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_loader/Kconfig
drivers/base/firmware_loader/main.c