|
| 1 | +Fix header clash with system /usr/include/sha1.h and sha256.h when libmd |
| 2 | +is installed. |
| 3 | + |
| 4 | +Backport of u-boot commit "includes: move openssl headers to include/u-boot" |
| 5 | +https://github.com/u-boot/u-boot/commit/2b9912e6a7df7b1f60beb7942bd0e6fa5f9d0167 |
| 6 | + |
| 7 | +--- a/board/gdsys/p1022/controlcenterd-id.c |
| 8 | ++++ b/board/gdsys/p1022/controlcenterd-id.c |
| 9 | +@@ -30,7 +30,7 @@ |
| 10 | + #include <i2c.h> |
| 11 | + #include <mmc.h> |
| 12 | + #include <tpm.h> |
| 13 | +-#include <sha1.h> |
| 14 | ++#include <u-boot/sha1.h> |
| 15 | + #include <asm/byteorder.h> |
| 16 | + #include <asm/unaligned.h> |
| 17 | + #include <pca9698.h> |
| 18 | +--- a/board/pcs440ep/pcs440ep.c |
| 19 | ++++ b/board/pcs440ep/pcs440ep.c |
| 20 | +@@ -13,7 +13,7 @@ |
| 21 | + #include <asm/processor.h> |
| 22 | + #include <spd_sdram.h> |
| 23 | + #include <status_led.h> |
| 24 | +-#include <sha1.h> |
| 25 | ++#include <u-boot/sha1.h> |
| 26 | + #include <asm/io.h> |
| 27 | + #include <net.h> |
| 28 | + #include <ata.h> |
| 29 | +--- a/common/cmd_sha1sum.c |
| 30 | ++++ b/common/cmd_sha1sum.c |
| 31 | +@@ -11,7 +11,7 @@ |
| 32 | + #include <common.h> |
| 33 | + #include <command.h> |
| 34 | + #include <hash.h> |
| 35 | +-#include <sha1.h> |
| 36 | ++#include <u-boot/sha1.h> |
| 37 | + |
| 38 | + int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
| 39 | + { |
| 40 | +--- a/common/hash.c |
| 41 | ++++ b/common/hash.c |
| 42 | +@@ -14,8 +14,8 @@ |
| 43 | + #include <command.h> |
| 44 | + #include <hw_sha.h> |
| 45 | + #include <hash.h> |
| 46 | +-#include <sha1.h> |
| 47 | +-#include <sha256.h> |
| 48 | ++#include <u-boot/sha1.h> |
| 49 | ++#include <u-boot/sha256.h> |
| 50 | + #include <asm/io.h> |
| 51 | + #include <asm/errno.h> |
| 52 | + |
| 53 | +--- a/common/image-fit.c |
| 54 | ++++ b/common/image-fit.c |
| 55 | +@@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR; |
| 56 | + #endif /* !USE_HOSTCC*/ |
| 57 | + |
| 58 | + #include <bootstage.h> |
| 59 | +-#include <sha1.h> |
| 60 | ++#include <u-boot/sha1.h> |
| 61 | + #include <u-boot/crc.h> |
| 62 | + #include <u-boot/md5.h> |
| 63 | + |
| 64 | +--- a/common/image.c |
| 65 | ++++ b/common/image.c |
| 66 | +@@ -34,7 +34,7 @@ |
| 67 | + #endif |
| 68 | + |
| 69 | + #include <u-boot/md5.h> |
| 70 | +-#include <sha1.h> |
| 71 | ++#include <u-boot/sha1.h> |
| 72 | + #include <asm/errno.h> |
| 73 | + #include <asm/io.h> |
| 74 | + |
| 75 | +--- a/drivers/crypto/ace_sha.c |
| 76 | ++++ b/drivers/crypto/ace_sha.c |
| 77 | +@@ -5,8 +5,8 @@ |
| 78 | + * SPDX-License-Identifier: GPL-2.0+ |
| 79 | + */ |
| 80 | + #include <common.h> |
| 81 | +-#include <sha256.h> |
| 82 | +-#include <sha1.h> |
| 83 | ++#include <u-boot/sha256.h> |
| 84 | ++#include <u-boot/sha1.h> |
| 85 | + #include <asm/errno.h> |
| 86 | + #include "ace_sha.h" |
| 87 | + |
| 88 | +--- /dev/null |
| 89 | ++++ b/include/u-boot/sha1.h |
| 90 | +@@ -0,0 +1 @@ |
| 91 | ++#include "../sha1.h" |
| 92 | +--- /dev/null |
| 93 | ++++ b/include/u-boot/sha256.h |
| 94 | +@@ -0,0 +1 @@ |
| 95 | ++#include "../sha256.h" |
| 96 | +--- a/lib/rsa/rsa-verify.c |
| 97 | ++++ b/lib/rsa/rsa-verify.c |
| 98 | +@@ -7,7 +7,7 @@ |
| 99 | + #include <common.h> |
| 100 | + #include <fdtdec.h> |
| 101 | + #include <rsa.h> |
| 102 | +-#include <sha1.h> |
| 103 | ++#include <u-boot/sha1.h> |
| 104 | + #include <asm/byteorder.h> |
| 105 | + #include <asm/errno.h> |
| 106 | + #include <asm/unaligned.h> |
| 107 | +--- a/lib/sha1.c |
| 108 | ++++ b/lib/sha1.c |
| 109 | +@@ -36,7 +36,7 @@ |
| 110 | + #include <string.h> |
| 111 | + #endif /* USE_HOSTCC */ |
| 112 | + #include <watchdog.h> |
| 113 | +-#include "sha1.h" |
| 114 | ++#include <u-boot/sha1.h> |
| 115 | + |
| 116 | + /* |
| 117 | + * 32-bit integer manipulation macros (big endian) |
| 118 | +--- a/lib/sha256.c |
| 119 | ++++ b/lib/sha256.c |
| 120 | +@@ -11,7 +11,7 @@ |
| 121 | + #endif /* USE_HOSTCC */ |
| 122 | + #include <watchdog.h> |
| 123 | + #include <linux/string.h> |
| 124 | +-#include <sha256.h> |
| 125 | ++#include <u-boot/sha256.h> |
| 126 | + |
| 127 | + /* |
| 128 | + * 32-bit integer manipulation macros (big endian) |
| 129 | +--- a/lib/tpm.c |
| 130 | ++++ b/lib/tpm.c |
| 131 | +@@ -7,7 +7,7 @@ |
| 132 | + |
| 133 | + #include <common.h> |
| 134 | + #include <stdarg.h> |
| 135 | +-#include <sha1.h> |
| 136 | ++#include <u-boot/sha1.h> |
| 137 | + #include <tpm.h> |
| 138 | + #include <asm/unaligned.h> |
| 139 | + |
| 140 | +--- a/tools/imls/imls.c |
| 141 | ++++ b/tools/imls/imls.c |
| 142 | +@@ -24,7 +24,7 @@ |
| 143 | + #include <mtd/mtd-user.h> |
| 144 | + #endif |
| 145 | + |
| 146 | +-#include <sha1.h> |
| 147 | ++#include <u-boot/sha1.h> |
| 148 | + #include <libfdt.h> |
| 149 | + #include <fdt_support.h> |
| 150 | + #include <image.h> |
| 151 | +--- a/tools/mkimage.h |
| 152 | ++++ b/tools/mkimage.h |
| 153 | +@@ -18,7 +18,7 @@ |
| 154 | + #include <sys/stat.h> |
| 155 | + #include <time.h> |
| 156 | + #include <unistd.h> |
| 157 | +-#include <sha1.h> |
| 158 | ++#include <u-boot/sha1.h> |
| 159 | + #include "fdt_host.h" |
| 160 | + |
| 161 | + #undef MKIMAGE_DEBUG |
| 162 | +--- a/tools/ubsha1.c |
| 163 | ++++ b/tools/ubsha1.c |
| 164 | +@@ -13,7 +13,7 @@ |
| 165 | + #include <errno.h> |
| 166 | + #include <string.h> |
| 167 | + #include <sys/stat.h> |
| 168 | +-#include "sha1.h" |
| 169 | ++#include <u-boot/sha1.h> |
| 170 | + |
| 171 | + int main (int argc, char **argv) |
| 172 | + { |
0 commit comments