spl: lib: Allow for decompression in any SPL build
authorSimon Glass <sjg@chromium.org>
Thu, 19 Dec 2024 18:29:03 +0000 (11:29 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 27 Dec 2024 21:16:10 +0000 (15:16 -0600)
Add Kconfig symbols and update the Makefile rules so that decompression
can be used in TPL and VPL

Signed-off-by: Simon Glass <sjg@chromium.org>
lib/Kconfig
lib/Makefile

index 0b08981..203f40e 100644 (file)
@@ -841,12 +841,36 @@ config SPL_LZ4
          fast compression and decompression speed. It belongs to the LZ77
          family of byte-oriented compression schemes.
 
+config TPL_LZ4
+       bool "Enable LZ4 decompression support in TPL"
+       depends on TPL
+       help
+         This enables support for the LZ4 decompression algorithm in TPL. LZ4
+         is a lossless data compression algorithm that is focused on
+         fast compression and decompression speed. It belongs to the LZ77
+         family of byte-oriented compression schemes.
+
+config VPL_LZ4
+       bool "Enable LZ4 decompression support in VPL"
+       depends on VPL
+       help
+         This enables support for the LZ4 decompression algorithm in VPL. LZ4
+         is a lossless data compression algorithm that is focused on
+         fast compression and decompression speed. It belongs to the LZ77
+         family of byte-oriented compression schemes.
+
 config SPL_LZMA
        bool "Enable LZMA decompression support for SPL build"
        depends on SPL
        help
          This enables support for LZMA compression algorithm for SPL boot.
 
+config TPL_LZMA
+       bool "Enable LZMA decompression support for TPL build"
+       depends on TPL
+       help
+         This enables support for LZMA compression algorithm for TPL boot.
+
 config VPL_LZMA
        bool "Enable LZMA decompression support for VPL build"
        default y if LZMA
@@ -865,11 +889,22 @@ config SPL_GZIP
        help
          This enables support for the GZIP compression algorithm for SPL boot.
 
+config TPL_GZIP
+       bool "Enable gzip decompression support for SPL build"
+       select TPL_ZLIB
+       help
+         This enables support for the GZIP compression algorithm for TPL
+
 config SPL_ZLIB
        bool
        help
          This enables compression lib for SPL boot.
 
+config TPL_ZLIB
+       bool
+       help
+         This enables compression lib for TPL
+
 config SPL_ZSTD
        bool "Enable Zstandard decompression support in SPL"
        depends on SPL
index d24ed62..5cb3278 100644 (file)
@@ -83,12 +83,12 @@ obj-$(CONFIG_$(XPL_)SHA512_LEGACY) += sha512.o
 obj-$(CONFIG_CRYPT_PW) += crypt/
 obj-$(CONFIG_$(XPL_)ASN1_DECODER_LEGACY) += asn1_decoder.o
 
-obj-$(CONFIG_$(XPL_)ZLIB) += zlib/
-obj-$(CONFIG_$(XPL_)ZSTD) += zstd/
-obj-$(CONFIG_$(XPL_)GZIP) += gunzip.o
-obj-$(CONFIG_$(XPL_)LZO) += lzo/
-obj-$(CONFIG_$(XPL_)LZMA) += lzma/
-obj-$(CONFIG_$(XPL_)LZ4) += lz4_wrapper.o
+obj-$(CONFIG_$(PHASE_)ZLIB) += zlib/
+obj-$(CONFIG_$(PHASE_)ZSTD) += zstd/
+obj-$(CONFIG_$(PHASE_)GZIP) += gunzip.o
+obj-$(CONFIG_$(PHASE_)LZO) += lzo/
+obj-$(CONFIG_$(PHASE_)LZMA) += lzma/
+obj-$(CONFIG_$(PHASE_)LZ4) += lz4_wrapper.o
 
 obj-$(CONFIG_$(XPL_)LIB_RATIONAL) += rational.o