diff options
author | Tom Rini <trini@konsulko.com> | 2022-06-10 23:03:09 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-07-07 09:29:08 -0400 |
commit | b340199f828e7d57945785b698ff97469972d1ca (patch) | |
tree | 117ba774591d068ff037e4a2e6b1bca39d9fc037 /lib | |
parent | abba59f1155aa45daf37c59e248164387482a3c4 (diff) | |
download | u-boot-b340199f828e7d57945785b698ff97469972d1ca.tar.gz u-boot-b340199f828e7d57945785b698ff97469972d1ca.tar.bz2 u-boot-b340199f828e7d57945785b698ff97469972d1ca.zip |
spl: Ensure all SPL symbols in Kconfig have some SPL dependency
Tighten up symbol dependencies in a number of places. Ensure that a SPL
specific option has at least a direct dependency on SPL. In places
where it's clear that we depend on something more specific, use that
dependency instead. This means in a very small number of places we can
drop redundant dependencies.
Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig | 8 | ||||
-rw-r--r-- | lib/crypto/Kconfig | 4 | ||||
-rw-r--r-- | lib/ecdsa/Kconfig | 1 | ||||
-rw-r--r-- | lib/rsa/Kconfig | 1 |
4 files changed, 11 insertions, 3 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index c9f9ddce7d..7dd777b56a 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -239,6 +239,7 @@ config GENERATE_ACPI_TABLE config SPL_TINY_MEMSET bool "Use a very small memset() in SPL" + depends on SPL help The faster memset() is the arch-specific one (if available) enabled by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get @@ -557,6 +558,7 @@ config MD5 config SPL_MD5 bool "Support MD5 algorithm in SPL" + depends on SPL help This option enables MD5 support in SPL. MD5 is an algorithm designed in 1991 that produces a 16-byte digest (or checksum) from its input @@ -643,6 +645,7 @@ config ZSTD config SPL_LZ4 bool "Enable LZ4 decompression support in SPL" + depends on SPL help This enables support for the LZ4 decompression algorithm in SPL. LZ4 is a lossless data compression algorithm that is focused on @@ -651,6 +654,7 @@ config SPL_LZ4 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. @@ -662,6 +666,7 @@ config VPL_LZMA config SPL_LZO bool "Enable LZO decompression support in SPL" + depends on SPL help This enables support for LZO compression algorithm in the SPL. @@ -678,6 +683,7 @@ config SPL_ZLIB config SPL_ZSTD bool "Enable Zstandard decompression support in SPL" + depends on SPL select XXHASH help This enables Zstandard decompression library in the SPL. @@ -750,7 +756,7 @@ config SPL_OF_LIBFDT config SPL_OF_LIBFDT_ASSUME_MASK hex "Mask of conditions to assume for libfdt" - depends on SPL_OF_LIBFDT || FIT + depends on SPL_OF_LIBFDT || (FIT && SPL) default 0xff help Use this to change the assumptions made by libfdt in SPL about the diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 1c04a7ec5f..152eb2a9ca 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -28,7 +28,7 @@ config ASYMMETRIC_PUBLIC_KEY_SUBTYPE config SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE bool "Asymmetric public-key crypto algorithm subtype within SPL" - depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE + depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE && SPL help This option provides support for asymmetric public key type handling in the SPL. If signature generation and/or verification are to be used, @@ -48,7 +48,7 @@ config RSA_PUBLIC_KEY_PARSER config SPL_RSA_PUBLIC_KEY_PARSER bool "RSA public key parser within SPL" - depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE + depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE && SPL select SPL_ASN1_DECODER select ASN1_COMPILER select SPL_OID_REGISTRY diff --git a/lib/ecdsa/Kconfig b/lib/ecdsa/Kconfig index a95c4ff581..5c3d67d814 100644 --- a/lib/ecdsa/Kconfig +++ b/lib/ecdsa/Kconfig @@ -17,6 +17,7 @@ config ECDSA_VERIFY config SPL_ECDSA_VERIFY bool "Enable ECDSA verification support in SPL" + depends on SPL help Allow ECDSA signatures to be recognized and verified in SPL. diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig index b773f17c26..9033384e60 100644 --- a/lib/rsa/Kconfig +++ b/lib/rsa/Kconfig @@ -18,6 +18,7 @@ if RSA config SPL_RSA bool "Use RSA Library within SPL" + depends on SPL config SPL_RSA_VERIFY bool |