Commit 089df18bfe9dd6e98f34807247ec77e0e1b5f7a2
lib: move hash CONFIG options to Kconfig
Commit 94e3c8c4fd7b ("crypto/fsl - Add progressive hashing support using hardware acceleration.") created entries for CONFIG_SHA1, CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and CONFIG_SHA_PROG_HW_ACCEL. However, no defconfig has migrated to it. Complete the move by first adding additional logic to various Kconfig files to select this when required and then use the moveconfig tool. In many cases we can select these because they are required to implement other drivers. We also correct how we include the various hashing algorithms in SPL. This commit was generated as follows (after Kconfig additions): [1] tools/moveconfig.py -y SHA1 SHA256 SHA_HW_ACCEL [2] tools/moveconfig.py -y SHA_PROG_HW_ACCEL Note: We cannot move SHA_HW_ACCEL and SHA_PROG_HW_ACCEL simultaneously because there is dependency between them. Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com> Cc: Naveen Burmi <NaveenBurmi@freescale.com> Cc: Po Liu <po.liu@freescale.com> Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com> Cc: Priyanka Jain <Priyanka.Jain@freescale.com> Cc: Shaohui Xie <Shaohui.Xie@freescale.com> Cc: Chunhe Lan <Chunhe.Lan@freescale.com> Cc: Chander Kashyap <k.chander@samsung.com> Cc: Steve Rae <steve.rae@raedomain.com> Cc: Dirk Eibach <eibach@gdsys.de> Cc: Feng Li <feng.li_2@nxp.com> Cc: Alison Wang <alison.wang@freescale.com> Cc: Sumit Garg <sumit.garg@nxp.com> Cc: Mingkai Hu <Mingkai.Hu@freescale.com> Cc: York Sun <york.sun@nxp.com> Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Akshay Saraswat <akshay.s@samsung.com> Cc: Heiko Schocher <hs@denx.de> Cc: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
Showing 49 changed files with 31 additions and 66 deletions Side-by-side Diff
- Kconfig
- README
- arch/arm/include/asm/fsl_secure_boot.h
- arch/arm/mach-exynos/Kconfig
- arch/powerpc/include/asm/fsl_secure_boot.h
- board/freescale/common/Kconfig
- common/spl/Kconfig
- configs/bcm911360_entphn-ns_defconfig
- configs/bcm911360_entphn_defconfig
- configs/bcm911360k_defconfig
- configs/bcm958300k-ns_defconfig
- configs/bcm958300k_defconfig
- configs/bcm958305k_defconfig
- configs/bcm958622hr_defconfig
- configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig
- configs/controlcenterd_TRAILBLAZER_defconfig
- drivers/crypto/fsl/Kconfig
- include/configs/B4860QDS.h
- include/configs/BSC9131RDB.h
- include/configs/BSC9132QDS.h
- include/configs/C29XPCIE.h
- include/configs/P1010RDB.h
- include/configs/P2041RDB.h
- include/configs/T102xQDS.h
- include/configs/T102xRDB.h
- include/configs/T1040QDS.h
- include/configs/T104xRDB.h
- include/configs/T208xQDS.h
- include/configs/T208xRDB.h
- include/configs/T4240QDS.h
- include/configs/T4240RDB.h
- include/configs/bcm_ep_board.h
- include/configs/controlcenterd.h
- include/configs/corenet_ds.h
- include/configs/exynos5-common.h
- include/configs/ids8313.h
- include/configs/imx6qdl_icore.h
- include/configs/imx6qdl_icore_rqs.h
- include/configs/imx6ul_geam.h
- include/configs/imx6ul_isiot.h
- include/configs/ls1021aiot.h
- include/configs/ls1021aqds.h
- include/configs/ls1021atwr.h
- include/configs/ls1043a_common.h
- include/configs/ls1046a_common.h
- include/configs/ls2080a_common.h
- include/configs/sandbox.h
- include/image.h
- lib/Makefile
... | ... | @@ -145,6 +145,7 @@ |
145 | 145 | config FIT |
146 | 146 | bool "Support Flattened Image Tree" |
147 | 147 | select MD5 |
148 | + select SHA1 | |
148 | 149 | help |
149 | 150 | This option allows you to boot the new uImage structure, |
150 | 151 | Flattened Image Tree. FIT is formally a FDT, which can include |
... | ... | @@ -159,6 +160,7 @@ |
159 | 160 | |
160 | 161 | config FIT_ENABLE_SHA256_SUPPORT |
161 | 162 | bool "Support SHA256 checksum of FIT image contents" |
163 | + select SHA256 | |
162 | 164 | default y |
163 | 165 | help |
164 | 166 | Enable this to support SHA256 checksum of FIT image contents. A |
... | ... | @@ -2756,19 +2756,6 @@ |
2756 | 2756 | Enable the hash verify command (hash -v). This adds to code |
2757 | 2757 | size a little. |
2758 | 2758 | |
2759 | - CONFIG_SHA1 - This option enables support of hashing using SHA1 | |
2760 | - algorithm. The hash is calculated in software. | |
2761 | - CONFIG_SHA256 - This option enables support of hashing using | |
2762 | - SHA256 algorithm. The hash is calculated in software. | |
2763 | - CONFIG_SHA_HW_ACCEL - This option enables hardware acceleration | |
2764 | - for SHA1/SHA256 hashing. | |
2765 | - This affects the 'hash' command and also the | |
2766 | - hash_lookup_algo() function. | |
2767 | - CONFIG_SHA_PROG_HW_ACCEL - This option enables | |
2768 | - hardware-acceleration for SHA1/SHA256 progressive hashing. | |
2769 | - Data can be streamed in a block at a time and the hashing | |
2770 | - is performed in hardware. | |
2771 | - | |
2772 | 2759 | Note: There is also a sha1sum command, which should perhaps |
2773 | 2760 | be deprecated in favour of 'hash sha1'. |
2774 | 2761 |
... | ... | @@ -187,6 +187,7 @@ |
187 | 187 | config SPL_SHA1_SUPPORT |
188 | 188 | bool "Support SHA1" |
189 | 189 | depends on SPL_FIT |
190 | + select SHA1 | |
190 | 191 | help |
191 | 192 | Enable this to support SHA1 in FIT images within SPL. A SHA1 |
192 | 193 | checksum is a 160-bit (20-byte) hash value used to check that the |
... | ... | @@ -198,6 +199,7 @@ |
198 | 199 | config SPL_SHA256_SUPPORT |
199 | 200 | bool "Support SHA256" |
200 | 201 | depends on SPL_FIT |
202 | + select SHA256 | |
201 | 203 | help |
202 | 204 | Enable this to support SHA256 in FIT images within SPL. A SHA256 |
203 | 205 | checksum is a 256-bit (32-byte) hash value used to check that the |
... | ... | @@ -229,6 +231,8 @@ |
229 | 231 | |
230 | 232 | config SPL_HASH_SUPPORT |
231 | 233 | bool "Support hashing drivers" |
234 | + select SHA1 | |
235 | + select SHA256 | |
232 | 236 | depends on SPL |
233 | 237 | help |
234 | 238 | Enable hashing drivers in SPL. These drivers can be used to |
... | ... | @@ -26,7 +26,6 @@ |
26 | 26 | |
27 | 27 | /* Enable ACE acceleration for SHA1 and SHA256 */ |
28 | 28 | #define CONFIG_EXYNOS_ACE_SHA |
29 | -#define CONFIG_SHA_HW_ACCEL | |
30 | 29 | |
31 | 30 | /* Power Down Modes */ |
32 | 31 | #define S5P_CHECK_SLEEP 0x00000BAD |
... | ... | @@ -139,8 +138,6 @@ |
139 | 138 | /* SHA hashing */ |
140 | 139 | #define CONFIG_CMD_HASH |
141 | 140 | #define CONFIG_HASH_VERIFY |
142 | -#define CONFIG_SHA1 | |
143 | -#define CONFIG_SHA256 | |
144 | 141 | |
145 | 142 | /* Enable Time Command */ |
146 | 143 |
... | ... | @@ -306,13 +306,8 @@ |
306 | 306 | #define CONFIG_MISC_INIT_R |
307 | 307 | |
308 | 308 | /* Hash command with SHA acceleration supported in hardware */ |
309 | - | |
310 | 309 | #ifdef CONFIG_FSL_CAAM |
311 | - | |
312 | 310 | #define CONFIG_CMD_HASH |
313 | - | |
314 | -#define CONFIG_SHA_HW_ACCEL | |
315 | - | |
316 | 311 | #endif |
317 | 312 | |
318 | 313 | #include <asm/fsl_secure_boot.h> |
... | ... | @@ -30,6 +30,8 @@ |
30 | 30 | #define IMAGE_ENABLE_OF_LIBFDT 1 |
31 | 31 | #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ |
32 | 32 | #define CONFIG_FIT_ENABLE_SHA256_SUPPORT |
33 | +#define CONFIG_SHA1 | |
34 | +#define CONFIG_SHA256 | |
33 | 35 | |
34 | 36 | #define IMAGE_ENABLE_IGNORE 0 |
35 | 37 | #define IMAGE_INDENT_STRING "" |
... | ... | @@ -65,8 +67,6 @@ |
65 | 67 | # endif |
66 | 68 | # else |
67 | 69 | # define CONFIG_CRC32 /* FIT images need CRC32 support */ |
68 | -# define CONFIG_SHA1 /* and SHA1 */ | |
69 | -# define CONFIG_SHA256 /* and SHA256 */ | |
70 | 70 | # define IMAGE_ENABLE_CRC32 1 |
71 | 71 | # define IMAGE_ENABLE_MD5 1 |
72 | 72 | # define IMAGE_ENABLE_SHA1 1 |
... | ... | @@ -86,7 +86,6 @@ |
86 | 86 | |
87 | 87 | #if defined(CONFIG_FIT_ENABLE_SHA256_SUPPORT) || \ |
88 | 88 | defined(CONFIG_SPL_SHA256_SUPPORT) |
89 | -#define CONFIG_SHA256 | |
90 | 89 | #define IMAGE_ENABLE_SHA256 1 |
91 | 90 | #else |
92 | 91 | #define IMAGE_ENABLE_SHA256 0 |
... | ... | @@ -44,9 +44,9 @@ |
44 | 44 | obj-y += list_sort.o |
45 | 45 | endif |
46 | 46 | |
47 | -obj-$(CONFIG_$(SPL_)RSA) += rsa/ | |
48 | -obj-$(CONFIG_$(SPL_)SHA1) += sha1.o | |
49 | -obj-$(CONFIG_$(SPL_)SHA256) += sha256.o | |
47 | +obj-$(CONFIG_RSA) += rsa/ | |
48 | +obj-$(CONFIG_SHA1) += sha1.o | |
49 | +obj-$(CONFIG_SHA256) += sha256.o | |
50 | 50 | |
51 | 51 | obj-$(CONFIG_SPL_SAVEENV) += qsort.o |
52 | 52 | obj-$(CONFIG_$(SPL_)OF_LIBFDT) += libfdt/ |
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775
-
mentioned in commit 78eda8
-
mentioned in commit 1b2775
-
mentioned in commit 1b2775