From 0036129b448905691f40ad01aecbd3c58572d22b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 13 Jan 2020 13:49:56 -0800 Subject: hatch_fp/nocturne_fp: Specify RSA_KEY_SIZE in RW and RO The rsa.h header can be included by any file, regardless of whether CONFIG_RSA is enabled. In that case we still want RSA_KEY_SIZE and CONFIG_RSA_EXPONENT_3 to be correct for the board. The following boards already set CONFIG_RSA_KEY_SIZE outside of RO/RW * kalista * endeavour * fizz * puff BRANCH=none BUG=b:144958737 TEST=make buildall -j TEST=diff build//ec.bin with and without the change => same Change-Id: I7e565e25b06b0d36e28ae32934b1f65b382e5b66 Signed-off-by: Tom Hughes Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1999606 Reviewed-by: Nicolas Boichat Reviewed-by: Craig Hesling Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607029 Tested-by: Chen-Tsung Hsieh Reviewed-by: Chen-Tsung Hsieh Commit-Queue: Chen-Tsung Hsieh --- board/hammer/board.h | 3 ++- board/hatch_fp/board.h | 5 +++-- board/nocturne_fp/board.h | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'board') diff --git a/board/hammer/board.h b/board/hammer/board.h index 447fe6e5eb..323db1a16b 100644 --- a/board/hammer/board.h +++ b/board/hammer/board.h @@ -287,9 +287,10 @@ /* Sign and switch to RW partition on boot. */ #define CONFIG_RWSIG #define CONFIG_RSA +#endif + #define CONFIG_RSA_KEY_SIZE 3072 #define CONFIG_RSA_EXPONENT_3 -#endif #define CONFIG_SHA256 #ifdef SECTION_IS_RO diff --git a/board/hatch_fp/board.h b/board/hatch_fp/board.h index c8b8bc726e..0c6cdbf1a3 100644 --- a/board/hatch_fp/board.h +++ b/board/hatch_fp/board.h @@ -133,10 +133,11 @@ #else /* SECTION_IS_RO */ /* RO verifies the RW partition signature */ #define CONFIG_RSA -#define CONFIG_RSA_KEY_SIZE 3072 -#define CONFIG_RSA_EXPONENT_3 #define CONFIG_RWSIG #endif + +#define CONFIG_RSA_KEY_SIZE 3072 +#define CONFIG_RSA_EXPONENT_3 #define CONFIG_RWSIG_TYPE_RWSIG /* RW does slow compute, RO does slow flash erase. */ diff --git a/board/nocturne_fp/board.h b/board/nocturne_fp/board.h index 82fa7805b7..065fdf35cb 100644 --- a/board/nocturne_fp/board.h +++ b/board/nocturne_fp/board.h @@ -118,10 +118,11 @@ #else /* SECTION_IS_RO */ /* RO verifies the RW partition signature */ #define CONFIG_RSA -#define CONFIG_RSA_KEY_SIZE 3072 -#define CONFIG_RSA_EXPONENT_3 #define CONFIG_RWSIG #endif + +#define CONFIG_RSA_KEY_SIZE 3072 +#define CONFIG_RSA_EXPONENT_3 #define CONFIG_RWSIG_TYPE_RWSIG /* RW does slow compute, RO does slow flash erase. */ -- cgit v1.2.1