diff options
Diffstat (limited to 'meta/recipes-bsp/u-boot')
4 files changed, 91 insertions, 6 deletions
diff --git a/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch b/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch index b9118164df..4d623c1f34 100644 --- a/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch +++ b/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0565a080d153d5baaaacfeb5045a832e126f4f9e Mon Sep 17 00:00:00 2001 | 1 | From 718170ff3a5e677db7212a86b129dacb28b1cac2 Mon Sep 17 00:00:00 2001 |
2 | From: Alistair Francis <alistair.francis@wdc.com> | 2 | From: Alistair Francis <alistair.francis@wdc.com> |
3 | Date: Mon, 14 Oct 2019 17:37:30 -0700 | 3 | Date: Mon, 14 Oct 2019 17:37:30 -0700 |
4 | Subject: [PATCH] include/env.h: Ensure ulong is defined | 4 | Subject: [PATCH] include/env.h: Ensure ulong is defined |
@@ -14,7 +14,7 @@ Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | |||
14 | 1 file changed, 2 insertions(+) | 14 | 1 file changed, 2 insertions(+) |
15 | 15 | ||
16 | diff --git a/include/env.h b/include/env.h | 16 | diff --git a/include/env.h b/include/env.h |
17 | index b72239f6a5..5ca49a3456 100644 | 17 | index d6c2d751d6..6cf5053431 100644 |
18 | --- a/include/env.h | 18 | --- a/include/env.h |
19 | +++ b/include/env.h | 19 | +++ b/include/env.h |
20 | @@ -13,6 +13,8 @@ | 20 | @@ -13,6 +13,8 @@ |
@@ -27,5 +27,5 @@ index b72239f6a5..5ca49a3456 100644 | |||
27 | 27 | ||
28 | /* Value for environment validity */ | 28 | /* Value for environment validity */ |
29 | -- | 29 | -- |
30 | 2.23.0 | 30 | 2.24.1 |
31 | 31 | ||
diff --git a/meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch b/meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch new file mode 100644 index 0000000000..0d965813b0 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch | |||
@@ -0,0 +1,83 @@ | |||
1 | From dccfea2e95cd3f26d1295e02d41012d014827dd9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergei Trofimovich <slyfox@gentoo.org> | ||
3 | Date: Mon, 16 Dec 2019 23:36:40 +0000 | ||
4 | Subject: [PATCH 2/2] include: fix 'ulong' definition on musl targets | ||
5 | |||
6 | The build failure was originally reported on arm64-musl | ||
7 | target at https://bugs.gentoo.org/703132. Here is the amd64-musl | ||
8 | variant: | ||
9 | |||
10 | ``` | ||
11 | $ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-only_defconfig -j$(nproc) | ||
12 | $ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-all -j$(nproc) | ||
13 | ... | ||
14 | In file included from tools/env/../../env/flags.c:7, | ||
15 | from tools/env/env_flags.c:1: | ||
16 | include/env.h:159:1: error: unknown type name 'ulong'; did you mean 'long'? | ||
17 | 159 | ulong env_get_ulong(const char *name, int base, ulong default_val); | ||
18 | | ^~~~~ | ||
19 | | long | ||
20 | ``` | ||
21 | |||
22 | Note: 'ulong' is not defined there. | ||
23 | |||
24 | On glibc 'ulong' comes from <sys/types.h>: | ||
25 | |||
26 | ```c | ||
27 | /* Old compatibility names for C types. */ | ||
28 | typedef unsigned long int ulong; | ||
29 | ``` | ||
30 | |||
31 | On musl it comes from <sys/types.h> as well but from under different guards: | ||
32 | |||
33 | ```c | ||
34 | typedef unsigned long u_long, ulong; | ||
35 | ``` | ||
36 | |||
37 | The change inlines 'ulong' define similar to 'uint' define. | ||
38 | |||
39 | Upstream-Status: Pending | ||
40 | Bug: https://bugs.gentoo.org/703132 | ||
41 | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> | ||
42 | Message-Id: <20191216233640.518168-1-slyfox@gentoo.org> | ||
43 | --- | ||
44 | include/compiler.h | 2 +- | ||
45 | include/u-boot/crc.h | 2 ++ | ||
46 | 2 files changed, 3 insertions(+), 1 deletion(-) | ||
47 | |||
48 | diff --git a/include/compiler.h b/include/compiler.h | ||
49 | index 29507f9840..90372f239c 100644 | ||
50 | --- a/include/compiler.h | ||
51 | +++ b/include/compiler.h | ||
52 | @@ -46,7 +46,6 @@ | ||
53 | # include <byteswap.h> | ||
54 | #elif defined(__MACH__) || defined(__FreeBSD__) | ||
55 | # include <machine/endian.h> | ||
56 | -typedef unsigned long ulong; | ||
57 | #endif | ||
58 | #ifdef __FreeBSD__ | ||
59 | # include <sys/endian.h> /* htole32 and friends */ | ||
60 | @@ -66,6 +65,7 @@ typedef uint8_t __u8; | ||
61 | typedef uint16_t __u16; | ||
62 | typedef uint32_t __u32; | ||
63 | typedef unsigned int uint; | ||
64 | +typedef unsigned long ulong; | ||
65 | |||
66 | #define uswap_16(x) \ | ||
67 | ((((x) & 0xff00) >> 8) | \ | ||
68 | diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h | ||
69 | index 1086d2168c..b96b50d98b 100644 | ||
70 | --- a/include/u-boot/crc.h | ||
71 | +++ b/include/u-boot/crc.h | ||
72 | @@ -8,6 +8,8 @@ | ||
73 | #ifndef _UBOOT_CRC_H | ||
74 | #define _UBOOT_CRC_H | ||
75 | |||
76 | +#include <compiler.h> /* unit definition */ | ||
77 | + | ||
78 | /** | ||
79 | * crc8() - Calculate and return CRC-8 of the data | ||
80 | * | ||
81 | -- | ||
82 | 2.24.1 | ||
83 | |||
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc index a0f9c41469..4799948bb1 100644 --- a/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc | |||
@@ -11,11 +11,11 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" | |||
11 | PE = "1" | 11 | PE = "1" |
12 | 12 | ||
13 | # Drop this line when updating to 2020.01 final | 13 | # Drop this line when updating to 2020.01 final |
14 | PV = "2020.01~rc3" | 14 | PV = "2020.01~rc5" |
15 | 15 | ||
16 | # We use the revision in order to avoid having to fetch it from the | 16 | # We use the revision in order to avoid having to fetch it from the |
17 | # repo during parse | 17 | # repo during parse |
18 | SRCREV = "d4a31e8ee5592072d8d5208b3e950cba2d89b6bd" | 18 | SRCREV = "ef7c2af65966a57c98d3c47e6c2fe1ce2103b7f6" |
19 | 19 | ||
20 | SRC_URI = "git://git.denx.de/u-boot.git \ | 20 | SRC_URI = "git://git.denx.de/u-boot.git \ |
21 | " | 21 | " |
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb index 7de91ffbd7..5d9b300ae2 100644 --- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb +++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb | |||
@@ -3,7 +3,9 @@ require u-boot-common.inc | |||
3 | SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" | 3 | SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" |
4 | DEPENDS += "mtd-utils" | 4 | DEPENDS += "mtd-utils" |
5 | 5 | ||
6 | SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch" | 6 | SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch \ |
7 | file://0002-include-fix-ulong-definition-on-musl-targets.patch \ | ||
8 | " | ||
7 | 9 | ||
8 | INSANE_SKIP_${PN} = "already-stripped" | 10 | INSANE_SKIP_${PN} = "already-stripped" |
9 | EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' | 11 | EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' |