diff options
author | Simon Glass <sjg@chromium.org> | 2021-09-25 19:43:24 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-08 15:53:26 -0400 |
commit | e7d285b2f38202f9d7ffbdcae59283f08bafd8b9 (patch) | |
tree | fb0f32f97c2267949ca6146cc6c0ab94d3ffe8a2 /common/spl/Kconfig | |
parent | 2bbed3ff8c7fa0c0fa3fd28a9497bf7a99e3388b (diff) |
image: Use the correct checks for CRC32
Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32)
directly in the host build, so drop the unnecessary indirection.
Add a few more conditions to SPL_CRC32 to avoid build failures as well as
TPL_CRC32. Also update hash.c to make crc32 optional and to actually take
notice of SPL_CRC32.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'common/spl/Kconfig')
-rw-r--r-- | common/spl/Kconfig | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 8a8a971a91e..17ce2f6b615 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -419,7 +419,8 @@ config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION config SPL_CRC32 bool "Support CRC32" - default y if SPL_LEGACY_IMAGE_SUPPORT + default y if SPL_LEGACY_IMAGE_SUPPORT || SPL_EFI_PARTITION + default y if SPL_ENV_SUPPORT || TPL_BLOBLIST help Enable this to support CRC32 in uImages or FIT images within SPL. This is a 32-bit checksum value that can be used to verify images. @@ -1419,6 +1420,16 @@ config TPL_BOOTROM_SUPPORT BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the boot device list, if not implemented for a given board) +config TPL_CRC32 + bool "Support CRC32 in TPL" + default y if TPL_ENV_SUPPORT || TPL_BLOBLIST + help + Enable this to support CRC32 in uImages or FIT images within SPL. + This is a 32-bit checksum value that can be used to verify images. + For FIT images, this is the least secure type of checksum, suitable + for detected accidental image corruption. For secure applications you + should consider SHA1 or SHA256. + config TPL_DRIVERS_MISC bool "Support misc drivers in TPL" help |