From: Jeroen Hofstee Date: Thu, 12 Jun 2014 20:27:12 +0000 (+0200) Subject: includes: move openssl headers to include/u-boot X-Git-Tag: v2014.07-rc4~32 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b9912e6a7df7b1f60beb7942bd0e6fa5f9d0167;p=u-boot includes: move openssl headers to include/u-boot commit 18b06652cd "tools: include u-boot version of sha256.h" unconditionally forced the sha256.h from u-boot to be used for tools instead of the host version. This is fragile though as it will also include the host version. Therefore move it to include/u-boot to join u-boot/md5.h etc which were renamed for the same reason. cc: Simon Glass Signed-off-by: Jeroen Hofstee --- diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 3fca3c53b2..7e13c9051c 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/pcs440ep/pcs440ep.c b/board/pcs440ep/pcs440ep.c index f90e809d15..267c001435 100644 --- a/board/pcs440ep/pcs440ep.c +++ b/board/pcs440ep/pcs440ep.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/cmd_sha1sum.c b/common/cmd_sha1sum.c index 644b9a0e66..783ea2e32d 100644 --- a/common/cmd_sha1sum.c +++ b/common/cmd_sha1sum.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { diff --git a/common/hash.c b/common/hash.c index 3d953784af..12d67594ab 100644 --- a/common/hash.c +++ b/common/hash.c @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/common/image-fit.c b/common/image-fit.c index 3311343be6..c61be65133 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -21,10 +21,10 @@ DECLARE_GLOBAL_DATA_PTR; #endif /* !USE_HOSTCC*/ #include -#include -#include #include #include +#include +#include /*****************************************************************************/ /* New uImage format routines */ diff --git a/common/image-sig.c b/common/image-sig.c index 48788f9100..8601edaca3 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -13,8 +13,8 @@ DECLARE_GLOBAL_DATA_PTR; #endif /* !USE_HOSTCC*/ #include -#include -#include +#include +#include #define IMAGE_MAX_HASHED_NODES 100 diff --git a/common/image.c b/common/image.c index 828b0af6d2..11b3cf58e6 100644 --- a/common/image.c +++ b/common/image.c @@ -34,7 +34,7 @@ #endif #include -#include +#include #include #include diff --git a/drivers/crypto/ace_sha.c b/drivers/crypto/ace_sha.c index ed4f541823..efef491123 100644 --- a/drivers/crypto/ace_sha.c +++ b/drivers/crypto/ace_sha.c @@ -8,8 +8,8 @@ #include "ace_sha.h" #ifdef CONFIG_SHA_HW_ACCEL -#include -#include +#include +#include #include /* SHA1 value for the message of zero length */ diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c index 4bb1d60e5a..8a04af557d 100644 --- a/drivers/misc/cros_ec_sandbox.c +++ b/drivers/misc/cros_ec_sandbox.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mmc/rpmb.c b/drivers/mmc/rpmb.c index 05936f5d1f..9d0b8bc0c8 100644 --- a/drivers/mmc/rpmb.c +++ b/drivers/mmc/rpmb.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "mmc_private.h" /* Request codes */ diff --git a/include/image.h b/include/image.h index ab93eb6333..0a072f5336 100644 --- a/include/image.h +++ b/include/image.h @@ -886,7 +886,7 @@ struct image_region { }; #if IMAGE_ENABLE_VERIFY -# include +# include #endif struct checksum_algo { const char *name; diff --git a/include/rsa-checksum.h b/include/rsa-checksum.h deleted file mode 100644 index 612db85fe0..0000000000 --- a/include/rsa-checksum.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2013, Andreas Oetken. - * - * SPDX-License-Identifier: GPL-2.0+ -*/ - -#ifndef _RSA_CHECKSUM_H -#define _RSA_CHECKSUM_H - -#include -#include -#include -#include - -extern const uint8_t padding_sha256_rsa4096[]; -extern const uint8_t padding_sha256_rsa2048[]; -extern const uint8_t padding_sha1_rsa2048[]; - -void sha256_calculate(const struct image_region region[], int region_count, - uint8_t *checksum); -void sha1_calculate(const struct image_region region[], int region_count, - uint8_t *checksum); - -#endif diff --git a/include/rsa.h b/include/rsa.h deleted file mode 100644 index 325751ab7e..0000000000 --- a/include/rsa.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2013, Google Inc. - * - * (C) Copyright 2008 Semihalf - * - * (C) Copyright 2000-2006 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#ifndef _RSA_H -#define _RSA_H - -#include -#include - -/** - * struct rsa_public_key - holder for a public key - * - * An RSA public key consists of a modulus (typically called N), the inverse - * and R^2, where R is 2^(# key bits). - */ - -struct rsa_public_key { - uint len; /* len of modulus[] in number of uint32_t */ - uint32_t n0inv; /* -1 / modulus[0] mod 2^32 */ - uint32_t *modulus; /* modulus as little endian array */ - uint32_t *rr; /* R^2 as little endian array */ -}; - -#if IMAGE_ENABLE_SIGN -/** - * sign() - calculate and return signature for given input data - * - * @info: Specifies key and FIT information - * @data: Pointer to the input data - * @data_len: Data length - * @sigp: Set to an allocated buffer holding the signature - * @sig_len: Set to length of the calculated hash - * - * This computes input data signature according to selected algorithm. - * Resulting signature value is placed in an allocated buffer, the - * pointer is returned as *sigp. The length of the calculated - * signature is returned via the sig_len pointer argument. The caller - * should free *sigp. - * - * @return: 0, on success, -ve on error - */ -int rsa_sign(struct image_sign_info *info, - const struct image_region region[], - int region_count, uint8_t **sigp, uint *sig_len); - -/** - * add_verify_data() - Add verification information to FDT - * - * Add public key information to the FDT node, suitable for - * verification at run-time. The information added depends on the - * algorithm being used. - * - * @info: Specifies key and FIT information - * @keydest: Destination FDT blob for public key data - * @return: 0, on success, -ENOSPC if the keydest FDT blob ran out of space, - other -ve value on error -*/ -int rsa_add_verify_data(struct image_sign_info *info, void *keydest); -#else -static inline int rsa_sign(struct image_sign_info *info, - const struct image_region region[], int region_count, - uint8_t **sigp, uint *sig_len) -{ - return -ENXIO; -} - -static inline int rsa_add_verify_data(struct image_sign_info *info, - void *keydest) -{ - return -ENXIO; -} -#endif - -#if IMAGE_ENABLE_VERIFY -/** - * rsa_verify() - Verify a signature against some data - * - * Verify a RSA PKCS1.5 signature against an expected hash. - * - * @info: Specifies key and FIT information - * @data: Pointer to the input data - * @data_len: Data length - * @sig: Signature - * @sig_len: Number of bytes in signature - * @return 0 if verified, -ve on error - */ -int rsa_verify(struct image_sign_info *info, - const struct image_region region[], int region_count, - uint8_t *sig, uint sig_len); -#else -static inline int rsa_verify(struct image_sign_info *info, - const struct image_region region[], int region_count, - uint8_t *sig, uint sig_len) -{ - return -ENXIO; -} -#endif - -#define RSA2048_BYTES (2048 / 8) -#define RSA4096_BYTES (4096 / 8) - -/* This is the minimum/maximum key size we support, in bits */ -#define RSA_MIN_KEY_BITS 2048 -#define RSA_MAX_KEY_BITS 4096 - -/* This is the maximum signature length that we support, in bits */ -#define RSA_MAX_SIG_BITS 4096 - -#endif diff --git a/include/sha1.h b/include/sha1.h deleted file mode 100644 index da09dab976..0000000000 --- a/include/sha1.h +++ /dev/null @@ -1,118 +0,0 @@ -/** - * \file sha1.h - * based from http://xyssl.org/code/source/sha1/ - * FIPS-180-1 compliant SHA-1 implementation - * - * Copyright (C) 2003-2006 Christophe Devine - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License, version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ -/* - * The SHA-1 standard was published by NIST in 1993. - * - * http://www.itl.nist.gov/fipspubs/fip180-1.htm - */ -#ifndef _SHA1_H -#define _SHA1_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define SHA1_SUM_POS -0x20 -#define SHA1_SUM_LEN 20 - -/** - * \brief SHA-1 context structure - */ -typedef struct -{ - unsigned long total[2]; /*!< number of bytes processed */ - unsigned long state[5]; /*!< intermediate digest state */ - unsigned char buffer[64]; /*!< data block being processed */ -} -sha1_context; - -/** - * \brief SHA-1 context setup - * - * \param ctx SHA-1 context to be initialized - */ -void sha1_starts( sha1_context *ctx ); - -/** - * \brief SHA-1 process buffer - * - * \param ctx SHA-1 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void sha1_update(sha1_context *ctx, const unsigned char *input, - unsigned int ilen); - -/** - * \brief SHA-1 final digest - * - * \param ctx SHA-1 context - * \param output SHA-1 checksum result - */ -void sha1_finish( sha1_context *ctx, unsigned char output[20] ); - -/** - * \brief Output = SHA-1( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output SHA-1 checksum result - */ -void sha1_csum(const unsigned char *input, unsigned int ilen, - unsigned char *output); - -/** - * \brief Output = SHA-1( input buffer ), with watchdog triggering - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output SHA-1 checksum result - * \param chunk_sz watchdog triggering period (in bytes of input processed) - */ -void sha1_csum_wd(const unsigned char *input, unsigned int ilen, - unsigned char *output, unsigned int chunk_sz); - -/** - * \brief Output = HMAC-SHA-1( input buffer, hmac key ) - * - * \param key HMAC secret key - * \param keylen length of the HMAC key - * \param input buffer holding the data - * \param ilen length of the input data - * \param output HMAC-SHA-1 result - */ -void sha1_hmac(const unsigned char *key, int keylen, - const unsigned char *input, unsigned int ilen, - unsigned char *output); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int sha1_self_test( void ); - -#ifdef __cplusplus -} -#endif - -#endif /* sha1.h */ diff --git a/include/sha256.h b/include/sha256.h deleted file mode 100644 index beadab35ff..0000000000 --- a/include/sha256.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _SHA256_H -#define _SHA256_H - -#define SHA256_SUM_LEN 32 - -/* Reset watchdog each time we process this many bytes */ -#define CHUNKSZ_SHA256 (64 * 1024) - -typedef struct { - uint32_t total[2]; - uint32_t state[8]; - uint8_t buffer[64]; -} sha256_context; - -void sha256_starts(sha256_context * ctx); -void sha256_update(sha256_context *ctx, const uint8_t *input, uint32_t length); -void sha256_finish(sha256_context * ctx, uint8_t digest[SHA256_SUM_LEN]); - -void sha256_csum_wd(const unsigned char *input, unsigned int ilen, - unsigned char *output, unsigned int chunk_sz); - -#endif /* _SHA256_H */ diff --git a/include/u-boot/rsa-checksum.h b/include/u-boot/rsa-checksum.h new file mode 100644 index 0000000000..c996fb3e4c --- /dev/null +++ b/include/u-boot/rsa-checksum.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013, Andreas Oetken. + * + * SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef _RSA_CHECKSUM_H +#define _RSA_CHECKSUM_H + +#include +#include +#include +#include + +extern const uint8_t padding_sha256_rsa4096[]; +extern const uint8_t padding_sha256_rsa2048[]; +extern const uint8_t padding_sha1_rsa2048[]; + +void sha256_calculate(const struct image_region region[], int region_count, + uint8_t *checksum); +void sha1_calculate(const struct image_region region[], int region_count, + uint8_t *checksum); + +#endif diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h new file mode 100644 index 0000000000..325751ab7e --- /dev/null +++ b/include/u-boot/rsa.h @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2013, Google Inc. + * + * (C) Copyright 2008 Semihalf + * + * (C) Copyright 2000-2006 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _RSA_H +#define _RSA_H + +#include +#include + +/** + * struct rsa_public_key - holder for a public key + * + * An RSA public key consists of a modulus (typically called N), the inverse + * and R^2, where R is 2^(# key bits). + */ + +struct rsa_public_key { + uint len; /* len of modulus[] in number of uint32_t */ + uint32_t n0inv; /* -1 / modulus[0] mod 2^32 */ + uint32_t *modulus; /* modulus as little endian array */ + uint32_t *rr; /* R^2 as little endian array */ +}; + +#if IMAGE_ENABLE_SIGN +/** + * sign() - calculate and return signature for given input data + * + * @info: Specifies key and FIT information + * @data: Pointer to the input data + * @data_len: Data length + * @sigp: Set to an allocated buffer holding the signature + * @sig_len: Set to length of the calculated hash + * + * This computes input data signature according to selected algorithm. + * Resulting signature value is placed in an allocated buffer, the + * pointer is returned as *sigp. The length of the calculated + * signature is returned via the sig_len pointer argument. The caller + * should free *sigp. + * + * @return: 0, on success, -ve on error + */ +int rsa_sign(struct image_sign_info *info, + const struct image_region region[], + int region_count, uint8_t **sigp, uint *sig_len); + +/** + * add_verify_data() - Add verification information to FDT + * + * Add public key information to the FDT node, suitable for + * verification at run-time. The information added depends on the + * algorithm being used. + * + * @info: Specifies key and FIT information + * @keydest: Destination FDT blob for public key data + * @return: 0, on success, -ENOSPC if the keydest FDT blob ran out of space, + other -ve value on error +*/ +int rsa_add_verify_data(struct image_sign_info *info, void *keydest); +#else +static inline int rsa_sign(struct image_sign_info *info, + const struct image_region region[], int region_count, + uint8_t **sigp, uint *sig_len) +{ + return -ENXIO; +} + +static inline int rsa_add_verify_data(struct image_sign_info *info, + void *keydest) +{ + return -ENXIO; +} +#endif + +#if IMAGE_ENABLE_VERIFY +/** + * rsa_verify() - Verify a signature against some data + * + * Verify a RSA PKCS1.5 signature against an expected hash. + * + * @info: Specifies key and FIT information + * @data: Pointer to the input data + * @data_len: Data length + * @sig: Signature + * @sig_len: Number of bytes in signature + * @return 0 if verified, -ve on error + */ +int rsa_verify(struct image_sign_info *info, + const struct image_region region[], int region_count, + uint8_t *sig, uint sig_len); +#else +static inline int rsa_verify(struct image_sign_info *info, + const struct image_region region[], int region_count, + uint8_t *sig, uint sig_len) +{ + return -ENXIO; +} +#endif + +#define RSA2048_BYTES (2048 / 8) +#define RSA4096_BYTES (4096 / 8) + +/* This is the minimum/maximum key size we support, in bits */ +#define RSA_MIN_KEY_BITS 2048 +#define RSA_MAX_KEY_BITS 4096 + +/* This is the maximum signature length that we support, in bits */ +#define RSA_MAX_SIG_BITS 4096 + +#endif diff --git a/include/u-boot/sha1.h b/include/u-boot/sha1.h new file mode 100644 index 0000000000..da09dab976 --- /dev/null +++ b/include/u-boot/sha1.h @@ -0,0 +1,118 @@ +/** + * \file sha1.h + * based from http://xyssl.org/code/source/sha1/ + * FIPS-180-1 compliant SHA-1 implementation + * + * Copyright (C) 2003-2006 Christophe Devine + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License, version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +/* + * The SHA-1 standard was published by NIST in 1993. + * + * http://www.itl.nist.gov/fipspubs/fip180-1.htm + */ +#ifndef _SHA1_H +#define _SHA1_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define SHA1_SUM_POS -0x20 +#define SHA1_SUM_LEN 20 + +/** + * \brief SHA-1 context structure + */ +typedef struct +{ + unsigned long total[2]; /*!< number of bytes processed */ + unsigned long state[5]; /*!< intermediate digest state */ + unsigned char buffer[64]; /*!< data block being processed */ +} +sha1_context; + +/** + * \brief SHA-1 context setup + * + * \param ctx SHA-1 context to be initialized + */ +void sha1_starts( sha1_context *ctx ); + +/** + * \brief SHA-1 process buffer + * + * \param ctx SHA-1 context + * \param input buffer holding the data + * \param ilen length of the input data + */ +void sha1_update(sha1_context *ctx, const unsigned char *input, + unsigned int ilen); + +/** + * \brief SHA-1 final digest + * + * \param ctx SHA-1 context + * \param output SHA-1 checksum result + */ +void sha1_finish( sha1_context *ctx, unsigned char output[20] ); + +/** + * \brief Output = SHA-1( input buffer ) + * + * \param input buffer holding the data + * \param ilen length of the input data + * \param output SHA-1 checksum result + */ +void sha1_csum(const unsigned char *input, unsigned int ilen, + unsigned char *output); + +/** + * \brief Output = SHA-1( input buffer ), with watchdog triggering + * + * \param input buffer holding the data + * \param ilen length of the input data + * \param output SHA-1 checksum result + * \param chunk_sz watchdog triggering period (in bytes of input processed) + */ +void sha1_csum_wd(const unsigned char *input, unsigned int ilen, + unsigned char *output, unsigned int chunk_sz); + +/** + * \brief Output = HMAC-SHA-1( input buffer, hmac key ) + * + * \param key HMAC secret key + * \param keylen length of the HMAC key + * \param input buffer holding the data + * \param ilen length of the input data + * \param output HMAC-SHA-1 result + */ +void sha1_hmac(const unsigned char *key, int keylen, + const unsigned char *input, unsigned int ilen, + unsigned char *output); + +/** + * \brief Checkup routine + * + * \return 0 if successful, or 1 if the test failed + */ +int sha1_self_test( void ); + +#ifdef __cplusplus +} +#endif + +#endif /* sha1.h */ diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h new file mode 100644 index 0000000000..beadab35ff --- /dev/null +++ b/include/u-boot/sha256.h @@ -0,0 +1,22 @@ +#ifndef _SHA256_H +#define _SHA256_H + +#define SHA256_SUM_LEN 32 + +/* Reset watchdog each time we process this many bytes */ +#define CHUNKSZ_SHA256 (64 * 1024) + +typedef struct { + uint32_t total[2]; + uint32_t state[8]; + uint8_t buffer[64]; +} sha256_context; + +void sha256_starts(sha256_context * ctx); +void sha256_update(sha256_context *ctx, const uint8_t *input, uint32_t length); +void sha256_finish(sha256_context * ctx, uint8_t digest[SHA256_SUM_LEN]); + +void sha256_csum_wd(const unsigned char *input, unsigned int ilen, + unsigned char *output, unsigned int chunk_sz); + +#endif /* _SHA256_H */ diff --git a/lib/rsa/rsa-checksum.c b/lib/rsa/rsa-checksum.c index 32d6602e97..8d8b59f779 100644 --- a/lib/rsa/rsa-checksum.c +++ b/lib/rsa/rsa-checksum.c @@ -13,9 +13,9 @@ #else #include "fdt_host.h" #endif -#include -#include -#include +#include +#include +#include /* PKCS 1.5 paddings as described in the RSA PKCS#1 v2.1 standard. */ diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index 587da5b470..bcb906368d 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -17,9 +17,9 @@ #include "mkimage.h" #include #endif -#include -#include -#include +#include +#include +#include #define UINT64_MULT32(v, multby) (((uint64_t)(v)) * ((uint32_t)(multby))) diff --git a/lib/sha1.c b/lib/sha1.c index a121224855..0a5f68864c 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -36,7 +36,7 @@ #include #endif /* USE_HOSTCC */ #include -#include "sha1.h" +#include /* * 32-bit integer manipulation macros (big endian) diff --git a/lib/sha256.c b/lib/sha256.c index b1085ea791..bb338baefa 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -13,7 +13,7 @@ #include #endif /* USE_HOSTCC */ #include -#include +#include /* * 32-bit integer manipulation macros (big endian) diff --git a/lib/tpm.c b/lib/tpm.c index 967c8e6515..d9789b022a 100644 --- a/lib/tpm.c +++ b/lib/tpm.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include diff --git a/tools/Makefile b/tools/Makefile index 949b6c6c38..3a1180f433 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -192,7 +192,6 @@ endif # !LOGO_BMP # Define _GNU_SOURCE to obtain the getline prototype from stdio.h # HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \ - -include $(srctree)/include/sha256.h \ $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \ -I$(srctree)/lib/libfdt \ -I$(srctree)/tools \ diff --git a/tools/dumpimage.h b/tools/dumpimage.h index d78523ded7..e415f14e14 100644 --- a/tools/dumpimage.h +++ b/tools/dumpimage.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include "fdt_host.h" #include "imagetool.h" diff --git a/tools/imagetool.h b/tools/imagetool.h index c480687ec1..c8af0e82f8 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include "fdt_host.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) diff --git a/tools/mkimage.h b/tools/mkimage.h index d5491b6e60..3f369b748e 100644 --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include "fdt_host.h" #include "imagetool.h" diff --git a/tools/ubsha1.c b/tools/ubsha1.c index 1041588d0b..4a17246da7 100644 --- a/tools/ubsha1.c +++ b/tools/ubsha1.c @@ -13,7 +13,7 @@ #include #include #include -#include "sha1.h" +#include int main (int argc, char **argv) {