diff options
author | Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> | 2019-02-10 21:34:37 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-02-19 08:55:43 -0500 |
commit | dae5c2dcdc2bc826a4ee0a58b08fd004b6259373 (patch) | |
tree | cce328236d6aca49467c14efe6d8e7e06849d5dd /include/spl.h | |
parent | 8502fe84a4fc1eb5610b1dbb102ff11b02aee25f (diff) | |
download | u-boot-dae5c2dcdc2bc826a4ee0a58b08fd004b6259373.tar.gz |
spl: implement CRC check on U-Boot uImage
SPL currently does not check uImage CRCs when loading U-Boot.
This patch adds checking the uImage CRC when SPL loads U-Boot. It does
this by reusing the existing config option SPL_CRC32_SUPPORT to allow
leaving out the CRC check on boards where the additional code size or
boot time is a problem (adding the CRC check currently adds ~1.4 kByte
to flash).
The SPL_CRC32_SUPPORT config option now gets enabled by default if SPL
support for legacy images is enabled to check the CRC on all boards
that don't actively take countermeasures.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/spl.h')
-rw-r--r-- | include/spl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h index c82f2fd033..f09909e189 100644 --- a/include/spl.h +++ b/include/spl.h @@ -74,6 +74,11 @@ struct spl_image_info { u32 size; u32 flags; void *arg; +#ifdef CONFIG_SPL_LEGACY_IMAGE_CRC_CHECK + ulong dcrc_data; + ulong dcrc_length; + ulong dcrc; +#endif }; /* |