diff options
author | Tom Rini <trini@konsulko.com> | 2021-08-30 10:01:43 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-30 10:01:43 -0400 |
commit | 1756f40225e803bc93a9905425dbfaa1abf1623d (patch) | |
tree | afee089c5d3e7a6839622493e8082378573f8c9d /include | |
parent | b9cb74a5aa256fc34a1b2b9dd847a985b91f34f6 (diff) | |
parent | abe1e1c968bb4b5db29a1412bfd55d5d76ca0454 (diff) | |
download | u-boot-1756f40225e803bc93a9905425dbfaa1abf1623d.tar.gz |
Merge branch '2021-08-30-fix-hash-algos-in-spl'WIP/30Aug2021
Quoting Alex:
Simon and I recently worked on killing a bunch extra definitions.
One of the side-effects is that certain hash algorithms won't work in
SPL when used in the context of FIT verification.
For example, in FIT verification, CONFIG_IS_ENABLED(SHA256) is used
(good), but there is no corresponding CONFIG_SPL_SHA256 (bad). This
will always be false for SPL, hence certain "hash" algos are broken.
This series resolves the selection by replacing the broken selection
with hash_lookup_algo(), which does not have the aforementioned problem.
This at the very least allows 'algo = "sha256"' FIT nodes to work in
SPL.
This series does not attempt to add individual SHA/CRC/MD5 configs for
SPL. Hash algo selection for SPL has been problematic even before. This
series is meant as an emergency fix, so it does not attempt to tackle
general refactoring issues.
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/xilinx_zynqmp.h | 2 | ||||
-rw-r--r-- | include/image.h | 23 |
2 files changed, 1 insertions, 24 deletions
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 262154cdff..42758ba758 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -258,7 +258,7 @@ #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU) # define CONFIG_SPL_ENV_SUPPORT -# define CONFIG_SPL_HASH_SUPPORT +# define CONFIG_SPL_HASH # define CONFIG_ENV_MAX_ENTRIES 10 #endif diff --git a/include/image.h b/include/image.h index e20f0b69d5..2d057d445c 100644 --- a/include/image.h +++ b/include/image.h @@ -31,9 +31,6 @@ struct fdt_region; #define IMAGE_ENABLE_OF_LIBFDT 1 #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_RSASSA_PSS 1 -#define CONFIG_FIT_SHA256 -#define CONFIG_FIT_SHA384 -#define CONFIG_FIT_SHA512 #define CONFIG_SHA1 #define CONFIG_SHA256 #define CONFIG_SHA384 @@ -62,26 +59,6 @@ struct fdt_region; #include <hash.h> #include <linux/libfdt.h> #include <fdt_support.h> -# ifdef CONFIG_SPL_BUILD -# ifdef CONFIG_SPL_CRC32 -# define IMAGE_ENABLE_CRC32 1 -# endif -# ifdef CONFIG_SPL_MD5 -# define IMAGE_ENABLE_MD5 1 -# endif -# else -# define IMAGE_ENABLE_CRC32 1 -# define IMAGE_ENABLE_MD5 1 -# endif - -#ifndef IMAGE_ENABLE_CRC32 -#define IMAGE_ENABLE_CRC32 0 -#endif - -#ifndef IMAGE_ENABLE_MD5 -#define IMAGE_ENABLE_MD5 0 -#endif - #endif /* IMAGE_ENABLE_FIT */ #ifdef CONFIG_SYS_BOOT_GET_CMDLINE |