From 79927b5631df6a2b8ca7ebeb353bbba31a1929ae Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 25 Nov 2024 14:03:45 -0800 Subject: [PATCH] Fixes for building Windows VS tools. --- include/delta.h | 3 ++- src/libwolfboot.c | 4 +++- tools/keytools/wolfBootKeygenTool.vcxproj | 11 +++++++---- tools/keytools/wolfBootSignTool.vcxproj | 11 +++++++---- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/include/delta.h b/include/delta.h index c60b85d01..b2b69a8c0 100644 --- a/include/delta.h +++ b/include/delta.h @@ -34,9 +34,10 @@ */ #ifndef WOLFBOOT_DELTA_H #define WOLFBOOT_DELTA_H -#include "target.h" +#ifndef DELTA_PATCH_BLOCK_SIZE #define DELTA_PATCH_BLOCK_SIZE 1024 +#endif struct wb_patch_ctx { uint8_t *src_base; diff --git a/src/libwolfboot.c b/src/libwolfboot.c index 93e27b19f..b22c9d6cf 100644 --- a/src/libwolfboot.c +++ b/src/libwolfboot.c @@ -117,8 +117,10 @@ static uint32_t ext_cache; #endif -#if defined(__WOLFBOOT) || defined (UNIT_TEST) +#if defined(__WOLFBOOT) || defined(UNIT_TEST) #define WOLFSSL_MISC_INCLUDED /* allow misc.c code to be inlined */ +#include +#include #include /* for ByteReverseWord32 */ #if defined(EXT_ENCRYPTED) || defined(UNIT_TEST) static uint32_t wb_reverse_word32(uint32_t x) diff --git a/tools/keytools/wolfBootKeygenTool.vcxproj b/tools/keytools/wolfBootKeygenTool.vcxproj index 95d61a458..8d729e005 100644 --- a/tools/keytools/wolfBootKeygenTool.vcxproj +++ b/tools/keytools/wolfBootKeygenTool.vcxproj @@ -72,6 +72,7 @@ true keygen + $(Platform)\$(Configuration)\$(ProjectName)\ true @@ -81,10 +82,12 @@ false keygen + $(Platform)\$(Configuration)\$(ProjectName)\ false keygen + $(Platform)\$(Configuration)\$(ProjectName)\ @@ -93,7 +96,7 @@ Level3 Disabled .;../../lib/wolfssl;../../include;%(AdditionalIncludeDirectories) - WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_USER_SETTINGS;WOLFSSL_HAVE_MIN;WOLFSSL_HAVE_MAX;%(PreprocessorDefinitions) Console @@ -107,7 +110,7 @@ Level3 Disabled .;../../lib/wolfssl;../../include;%(AdditionalIncludeDirectories) - WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_USER_SETTINGS;WOLFSSL_HAVE_MIN;WOLFSSL_HAVE_MAX;%(PreprocessorDefinitions) Console @@ -123,7 +126,7 @@ true true .;../../lib/wolfssl;../../include;%(AdditionalIncludeDirectories) - WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_USER_SETTINGS;WOLFSSL_HAVE_MIN;WOLFSSL_HAVE_MAX;%(PreprocessorDefinitions) Console @@ -141,7 +144,7 @@ true true .;../../lib/wolfssl;../../include;%(AdditionalIncludeDirectories) - WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + WOLFSSL_USER_SETTINGS;WOLFSSL_HAVE_MIN;WOLFSSL_HAVE_MAX;%(PreprocessorDefinitions) Console diff --git a/tools/keytools/wolfBootSignTool.vcxproj b/tools/keytools/wolfBootSignTool.vcxproj index fc5cdb2d4..18db45bf1 100755 --- a/tools/keytools/wolfBootSignTool.vcxproj +++ b/tools/keytools/wolfBootSignTool.vcxproj @@ -72,6 +72,7 @@ true sign + $(Platform)\$(Configuration)\$(ProjectName)\ true @@ -81,10 +82,12 @@ false sign + $(Platform)\$(Configuration)\$(ProjectName)\ false sign + $(Platform)\$(Configuration)\$(ProjectName)\ @@ -92,7 +95,7 @@ Level3 Disabled - WOLFSSL_USER_SETTINGS;DELTA_UPDATES;%(PreprocessorDefinitions) + WOLFSSL_USER_SETTINGS;DELTA_UPDATES;WOLFSSL_HAVE_MIN;WOLFSSL_HAVE_MAX;%(PreprocessorDefinitions) .;../../lib/wolfssl;../../include;%(AdditionalIncludeDirectories) @@ -106,7 +109,7 @@ Level3 Disabled - WOLFSSL_USER_SETTINGS;DELTA_UPDATES;%(PreprocessorDefinitions) + WOLFSSL_USER_SETTINGS;DELTA_UPDATES;WOLFSSL_HAVE_MIN;WOLFSSL_HAVE_MAX;%(PreprocessorDefinitions) .;../../lib/wolfssl;../../include;%(AdditionalIncludeDirectories) @@ -122,7 +125,7 @@ MaxSpeed true true - WOLFSSL_USER_SETTINGS;DELTA_UPDATES;%(PreprocessorDefinitions) + WOLFSSL_USER_SETTINGS;DELTA_UPDATES;WOLFSSL_HAVE_MIN;WOLFSSL_HAVE_MAX;%(PreprocessorDefinitions) .;../../lib/wolfssl;../../include;%(AdditionalIncludeDirectories) @@ -140,7 +143,7 @@ MaxSpeed true true - WOLFSSL_USER_SETTINGS;DELTA_UPDATES;%(PreprocessorDefinitions) + WOLFSSL_USER_SETTINGS;DELTA_UPDATES;WOLFSSL_HAVE_MIN;WOLFSSL_HAVE_MAX;%(PreprocessorDefinitions) .;../../lib/wolfssl;../../include;%(AdditionalIncludeDirectories)