mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-30 18:05:48 +01:00 
			
		
		
		
	Refactor IMAGE_ENABLE_VERIFY to handle builds without SPL verification
If building with SPL_LOAD_FIT_FULL and FIT_SIGNATURE, but without SPL_FIT_SIGNATURE then the build fails with: common/built-in.o: In function `fit_image_verify_with_data': common/image-fit.c:1220: undefined reference to `fit_image_verify_required_sigs' common/image-fit.c:1244: undefined reference to `fit_image_check_sig' common/built-in.o: In function `fit_image_load': common/image-fit.c:1857: undefined reference to `fit_config_verify' Refactor so that host builds still depend on FIT_SIGNATURE, but target builds check FIT_SIGNATURE/SPL_FIT_SIGNATURE dependent on the build. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
		| @@ -1072,18 +1072,18 @@ int calculate_hash(const void *data, int data_len, const char *algo, | |||||||
|  * At present we only support signing on the host, and verification on the |  * At present we only support signing on the host, and verification on the | ||||||
|  * device |  * device | ||||||
|  */ |  */ | ||||||
| #if defined(CONFIG_FIT_SIGNATURE) | #if defined(USE_HOSTCC) | ||||||
| # ifdef USE_HOSTCC | # if defined(CONFIG_FIT_SIGNATURE) | ||||||
| #  define IMAGE_ENABLE_SIGN	1 | #  define IMAGE_ENABLE_SIGN	1 | ||||||
| #  define IMAGE_ENABLE_VERIFY	1 | #  define IMAGE_ENABLE_VERIFY	1 | ||||||
| # include  <openssl/evp.h> | #  include <openssl/evp.h> | ||||||
| #else | # else | ||||||
| #  define IMAGE_ENABLE_SIGN	0 | #  define IMAGE_ENABLE_SIGN	0 | ||||||
| #  define IMAGE_ENABLE_VERIFY	1 | #  define IMAGE_ENABLE_VERIFY	0 | ||||||
| # endif | # endif | ||||||
| #else | #else | ||||||
| # define IMAGE_ENABLE_SIGN	0 | # define IMAGE_ENABLE_SIGN	0 | ||||||
| # define IMAGE_ENABLE_VERIFY	0 | # define IMAGE_ENABLE_VERIFY	CONFIG_IS_ENABLED(FIT_SIGNATURE) | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #ifdef USE_HOSTCC | #ifdef USE_HOSTCC | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user