<div dir="ltr">Please use --no-signature when updating the .patch files with git format-patch. It will make the diffs a bit smaller (next time).</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 31, 2019 at 5:09 PM Alistair Francis <<a href="mailto:alistair.francis@wdc.com">alistair.francis@wdc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Signed-off-by: Alistair Francis <<a href="mailto:alistair.francis@wdc.com" target="_blank">alistair.francis@wdc.com</a>><br>
---<br>
...nclude-env.h-Ensure-ulong-is-defined.patch | 6 +-<br>
...fix-ulong-definition-on-musl-targets.patch | 83 +++++++++++++++++++<br>
meta/recipes-bsp/u-boot/u-boot-common.inc | 4 +-<br>
.../u-boot/<a href="http://u-boot-fw-utils_2020.01.bb" rel="noreferrer" target="_blank">u-boot-fw-utils_2020.01.bb</a> | 4 +-<br>
4 files changed, 91 insertions(+), 6 deletions(-)<br>
create mode 100644 meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch<br>
<br>
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<br>
index b9118164df..4d623c1f34 100644<br>
--- a/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch<br>
+++ b/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch<br>
@@ -1,4 +1,4 @@<br>
-From 0565a080d153d5baaaacfeb5045a832e126f4f9e Mon Sep 17 00:00:00 2001<br>
+From 718170ff3a5e677db7212a86b129dacb28b1cac2 Mon Sep 17 00:00:00 2001<br>
From: Alistair Francis <<a href="mailto:alistair.francis@wdc.com" target="_blank">alistair.francis@wdc.com</a>><br>
Date: Mon, 14 Oct 2019 17:37:30 -0700<br>
Subject: [PATCH] include/env.h: Ensure ulong is defined<br>
@@ -14,7 +14,7 @@ Signed-off-by: Alistair Francis <<a href="mailto:alistair.francis@wdc.com" target="_blank">alistair.francis@wdc.com</a>><br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/include/env.h b/include/env.h<br>
-index b72239f6a5..5ca49a3456 100644<br>
+index d6c2d751d6..6cf5053431 100644<br>
--- a/include/env.h<br>
+++ b/include/env.h<br>
@@ -13,6 +13,8 @@<br>
@@ -27,5 +27,5 @@ index b72239f6a5..5ca49a3456 100644<br>
<br>
/* Value for environment validity */<br>
-- <br>
-2.23.0<br>
+2.24.1<br>
<br>
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<br>
new file mode 100644<br>
index 0000000000..0d965813b0<br>
--- /dev/null<br>
+++ b/meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch<br>
@@ -0,0 +1,83 @@<br>
+From dccfea2e95cd3f26d1295e02d41012d014827dd9 Mon Sep 17 00:00:00 2001<br>
+From: Sergei Trofimovich <<a href="mailto:slyfox@gentoo.org" target="_blank">slyfox@gentoo.org</a>><br>
+Date: Mon, 16 Dec 2019 23:36:40 +0000<br>
+Subject: [PATCH 2/2] include: fix 'ulong' definition on musl targets<br>
+<br>
+The build failure was originally reported on arm64-musl<br>
+target at <a href="https://bugs.gentoo.org/703132" rel="noreferrer" target="_blank">https://bugs.gentoo.org/703132</a>. Here is the amd64-musl<br>
+variant:<br>
+<br>
+```<br>
+$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-only_defconfig -j$(nproc)<br>
+$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-all -j$(nproc)<br>
+...<br>
+In file included from tools/env/../../env/flags.c:7,<br>
+ from tools/env/env_flags.c:1:<br>
+include/env.h:159:1: error: unknown type name 'ulong'; did you mean 'long'?<br>
+ 159 | ulong env_get_ulong(const char *name, int base, ulong default_val);<br>
+ | ^~~~~<br>
+ | long<br>
+```<br>
+<br>
+Note: 'ulong' is not defined there.<br>
+<br>
+On glibc 'ulong' comes from <sys/types.h>:<br>
+<br>
+```c<br>
+/* Old compatibility names for C types. */<br>
+typedef unsigned long int ulong;<br>
+```<br>
+<br>
+On musl it comes from <sys/types.h> as well but from under different guards:<br>
+<br>
+```c<br>
+typedef unsigned long u_long, ulong;<br>
+```<br>
+<br>
+The change inlines 'ulong' define similar to 'uint' define.<br>
+<br>
+Upstream-Status: Pending<br>
+Bug: <a href="https://bugs.gentoo.org/703132" rel="noreferrer" target="_blank">https://bugs.gentoo.org/703132</a><br>
+Signed-off-by: Sergei Trofimovich <<a href="mailto:slyfox@gentoo.org" target="_blank">slyfox@gentoo.org</a>><br>
+Message-Id: <<a href="mailto:20191216233640.518168-1-slyfox@gentoo.org" target="_blank">20191216233640.518168-1-slyfox@gentoo.org</a>><br>
+---<br>
+ include/compiler.h | 2 +-<br>
+ include/u-boot/crc.h | 2 ++<br>
+ 2 files changed, 3 insertions(+), 1 deletion(-)<br>
+<br>
+diff --git a/include/compiler.h b/include/compiler.h<br>
+index 29507f9840..90372f239c 100644<br>
+--- a/include/compiler.h<br>
++++ b/include/compiler.h<br>
+@@ -46,7 +46,6 @@<br>
+ # include <byteswap.h><br>
+ #elif defined(__MACH__) || defined(__FreeBSD__)<br>
+ # include <machine/endian.h><br>
+-typedef unsigned long ulong;<br>
+ #endif<br>
+ #ifdef __FreeBSD__<br>
+ # include <sys/endian.h> /* htole32 and friends */<br>
+@@ -66,6 +65,7 @@ typedef uint8_t __u8;<br>
+ typedef uint16_t __u16;<br>
+ typedef uint32_t __u32;<br>
+ typedef unsigned int uint;<br>
++typedef unsigned long ulong;<br>
+ <br>
+ #define uswap_16(x) \<br>
+ ((((x) & 0xff00) >> 8) | \<br>
+diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h<br>
+index 1086d2168c..b96b50d98b 100644<br>
+--- a/include/u-boot/crc.h<br>
++++ b/include/u-boot/crc.h<br>
+@@ -8,6 +8,8 @@<br>
+ #ifndef _UBOOT_CRC_H<br>
+ #define _UBOOT_CRC_H<br>
+ <br>
++#include <compiler.h> /* unit definition */<br>
++<br>
+ /**<br>
+ * crc8() - Calculate and return CRC-8 of the data<br>
+ *<br>
+-- <br>
+2.24.1<br>
+<br>
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc<br>
index a0f9c41469..4799948bb1 100644<br>
--- a/meta/recipes-bsp/u-boot/u-boot-common.inc<br>
+++ b/meta/recipes-bsp/u-boot/u-boot-common.inc<br>
@@ -11,11 +11,11 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"<br>
PE = "1"<br>
<br>
# Drop this line when updating to 2020.01 final<br>
-PV = "2020.01~rc3"<br>
+PV = "2020.01~rc5"<br>
<br>
# We use the revision in order to avoid having to fetch it from the<br>
# repo during parse<br>
-SRCREV = "d4a31e8ee5592072d8d5208b3e950cba2d89b6bd"<br>
+SRCREV = "ef7c2af65966a57c98d3c47e6c2fe1ce2103b7f6"<br>
<br>
SRC_URI = "git://<a href="http://git.denx.de/u-boot.git" rel="noreferrer" target="_blank">git.denx.de/u-boot.git</a> \<br>
"<br>
diff --git a/meta/recipes-bsp/u-boot/<a href="http://u-boot-fw-utils_2020.01.bb" rel="noreferrer" target="_blank">u-boot-fw-utils_2020.01.bb</a> b/meta/recipes-bsp/u-boot/<a href="http://u-boot-fw-utils_2020.01.bb" rel="noreferrer" target="_blank">u-boot-fw-utils_2020.01.bb</a><br>
index 7de91ffbd7..5d9b300ae2 100644<br>
--- a/meta/recipes-bsp/u-boot/<a href="http://u-boot-fw-utils_2020.01.bb" rel="noreferrer" target="_blank">u-boot-fw-utils_2020.01.bb</a><br>
+++ b/meta/recipes-bsp/u-boot/<a href="http://u-boot-fw-utils_2020.01.bb" rel="noreferrer" target="_blank">u-boot-fw-utils_2020.01.bb</a><br>
@@ -3,7 +3,9 @@ require u-boot-common.inc<br>
SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"<br>
DEPENDS += "mtd-utils"<br>
<br>
-SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch"<br>
+SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch \<br>
+ file://0002-include-fix-ulong-definition-on-musl-targets.patch \<br>
+ "<br>
<br>
INSANE_SKIP_${PN} = "already-stripped"<br>
EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'<br>
-- <br>
2.24.1<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>