diff options
author | Tom Rini <trini@konsulko.com> | 2024-05-22 08:55:35 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-05-22 08:55:35 -0600 |
commit | 377e91c162ab09ec20f96f966f380cb55c590edd (patch) | |
tree | bbbda225be105805c857f65c9e57c67aa20dc669 /lib | |
parent | 7d24c3e06fa9a3b53cea593d4579886ef0eb4fe8 (diff) | |
parent | cb73fe9eeae0d71a74eef811b0ba34aaf5513dbe (diff) | |
download | u-boot-WIP/22May2024-next.zip u-boot-WIP/22May2024-next.tar.gz u-boot-WIP/22May2024-next.tar.bz2 |
Merge patch series "Clean-up patch set for MbedTLS integration"WIP/22May2024-next
Raymond Mao <raymond.mao@linaro.org> says:
This patch set is picked from the previously posted serie:
"[RFC] Integrate MbedTLS v3.6 LTS with U-Boot"
They are not directly related to MbedTLS integration, but the
prerequisite for a few clean-up, refactoring and minor fixes.
For V2, the linker script patch is dropped and added one patch
to move the snprintf to stdio.h
Diffstat (limited to 'lib')
-rw-r--r-- | lib/display_options.c | 1 | ||||
-rw-r--r-- | lib/efi_loader/efi_signature.c | 1 | ||||
-rw-r--r-- | lib/efi_loader/efi_tcg2.c | 3 | ||||
-rw-r--r-- | lib/fwu_updates/fwu_mtd.c | 2 | ||||
-rw-r--r-- | lib/hexdump.c | 2 | ||||
-rw-r--r-- | lib/md5.c | 10 | ||||
-rw-r--r-- | lib/vsprintf.c | 1 |
7 files changed, 9 insertions, 11 deletions
diff --git a/lib/display_options.c b/lib/display_options.c index d6b9355..d5df53a 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -12,6 +12,7 @@ #include <linux/ctype.h> #include <linux/kernel.h> #include <asm/io.h> +#include <stdio.h> #include <vsprintf.h> char *display_options_get_banner_priv(bool newlines, const char *build_tag, diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c index f338e73..184eac8 100644 --- a/lib/efi_loader/efi_signature.c +++ b/lib/efi_loader/efi_signature.c @@ -17,7 +17,6 @@ #include <linux/oid_registry.h> #include <u-boot/hash-checksum.h> #include <u-boot/rsa.h> -#include <u-boot/sha256.h> const efi_guid_t efi_guid_sha256 = EFI_CERT_SHA256_GUID; const efi_guid_t efi_guid_cert_rsa2048 = EFI_CERT_RSA2048_GUID; diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index b07e009..ac056dc 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -19,9 +19,6 @@ #include <tpm-v2.h> #include <tpm_api.h> #include <u-boot/hash-checksum.h> -#include <u-boot/sha1.h> -#include <u-boot/sha256.h> -#include <u-boot/sha512.h> #include <linux/unaligned/be_byteshift.h> #include <linux/unaligned/le_byteshift.h> #include <linux/unaligned/generic.h> diff --git a/lib/fwu_updates/fwu_mtd.c b/lib/fwu_updates/fwu_mtd.c index 69cd3d7..4a52834 100644 --- a/lib/fwu_updates/fwu_mtd.c +++ b/lib/fwu_updates/fwu_mtd.c @@ -11,7 +11,7 @@ #include <malloc.h> #include <mtd.h> #include <uuid.h> -#include <vsprintf.h> +#include <stdio.h> #include <dm/ofnode.h> diff --git a/lib/hexdump.c b/lib/hexdump.c index 33e3e6e..2bc508f 100644 --- a/lib/hexdump.c +++ b/lib/hexdump.c @@ -10,7 +10,7 @@ #include <hexdump.h> #include <mapmem.h> -#include <vsprintf.h> +#include <stdio.h> #include <linux/ctype.h> #include <linux/compat.h> #include <linux/log2.h> @@ -55,7 +55,7 @@ byteReverse(unsigned char *buf, unsigned longs) * initialization constants. */ void -MD5Init(struct MD5Context *ctx) +MD5Init(MD5Context *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; @@ -71,7 +71,7 @@ MD5Init(struct MD5Context *ctx) * of bytes. */ void -MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) +MD5Update(MD5Context *ctx, unsigned char const *buf, unsigned int len) { register __u32 t; @@ -120,7 +120,7 @@ MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) * 1 0* (64-bit count of bits processed, MSB-first) */ void -MD5Final(unsigned char digest[16], struct MD5Context *ctx) +MD5Final(unsigned char digest[16], MD5Context *ctx) { unsigned int count; unsigned char *p; @@ -269,7 +269,7 @@ MD5Transform(__u32 buf[4], __u32 const in[16]) void md5 (unsigned char *input, int len, unsigned char output[16]) { - struct MD5Context context; + MD5Context context; MD5Init(&context); MD5Update(&context, input, len); @@ -286,7 +286,7 @@ void md5_wd(const unsigned char *input, unsigned int len, unsigned char output[16], unsigned int chunk_sz) { - struct MD5Context context; + MD5Context context; #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) const unsigned char *end, *curr; int chunk; diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 27ea9c9..cfd1f19 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -19,6 +19,7 @@ #include <hexdump.h> #include <stdarg.h> #include <uuid.h> +#include <stdio.h> #include <vsprintf.h> #include <linux/ctype.h> #include <linux/err.h> |