<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 &lt;<a href="mailto:alistair.francis@wdc.com">alistair.francis@wdc.com</a>&gt; 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 &lt;<a href="mailto:alistair.francis@wdc.com" target="_blank">alistair.francis@wdc.com</a>&gt;<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 &lt;<a href="mailto:alistair.francis@wdc.com" target="_blank">alistair.francis@wdc.com</a>&gt;<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 &lt;<a href="mailto:alistair.francis@wdc.com" target="_blank">alistair.francis@wdc.com</a>&gt;<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 &lt;<a href="mailto:slyfox@gentoo.org" target="_blank">slyfox@gentoo.org</a>&gt;<br>
+Date: Mon, 16 Dec 2019 23:36:40 +0000<br>
+Subject: [PATCH 2/2] include: fix &#39;ulong&#39; 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 &#39;ulong&#39;; did you mean &#39;long&#39;?<br>
+  159 | ulong env_get_ulong(const char *name, int base, ulong default_val);<br>
+      | ^~~~~<br>
+      | long<br>
+```<br>
+<br>
+Note: &#39;ulong&#39; is not defined there.<br>
+<br>
+On glibc &#39;ulong&#39; comes from &lt;sys/types.h&gt;:<br>
+<br>
+```c<br>
+/* Old compatibility names for C types.  */<br>
+typedef unsigned long int ulong;<br>
+```<br>
+<br>
+On musl it comes from &lt;sys/types.h&gt; as well but from under different guards:<br>
+<br>
+```c<br>
+typedef unsigned long u_long, ulong;<br>
+```<br>
+<br>
+The change inlines &#39;ulong&#39; define similar to &#39;uint&#39; 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 &lt;<a href="mailto:slyfox@gentoo.org" target="_blank">slyfox@gentoo.org</a>&gt;<br>
+Message-Id: &lt;<a href="mailto:20191216233640.518168-1-slyfox@gentoo.org" target="_blank">20191216233640.518168-1-slyfox@gentoo.org</a>&gt;<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 &lt;byteswap.h&gt;<br>
+ #elif defined(__MACH__) || defined(__FreeBSD__)<br>
+ # include &lt;machine/endian.h&gt;<br>
+-typedef unsigned long ulong;<br>
+ #endif<br>
+ #ifdef __FreeBSD__<br>
+ # include &lt;sys/endian.h&gt; /* 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) &amp; 0xff00) &gt;&gt; 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 &lt;compiler.h&gt; /* 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 = &quot;file://Licenses/README;md5=30503fd321432fc713238f582193b78e&quot;<br>
 PE = &quot;1&quot;<br>
<br>
 # Drop this line when updating to 2020.01 final<br>
-PV = &quot;2020.01~rc3&quot;<br>
+PV = &quot;2020.01~rc5&quot;<br>
<br>
 # We use the revision in order to avoid having to fetch it from the<br>
 # repo during parse<br>
-SRCREV = &quot;d4a31e8ee5592072d8d5208b3e950cba2d89b6bd&quot;<br>
+SRCREV = &quot;ef7c2af65966a57c98d3c47e6c2fe1ce2103b7f6&quot;<br>
<br>
 SRC_URI = &quot;git://<a href="http://git.denx.de/u-boot.git" rel="noreferrer" target="_blank">git.denx.de/u-boot.git</a> \<br>
           &quot;<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 = &quot;U-Boot bootloader fw_printenv/setenv utilities&quot;<br>
 DEPENDS += &quot;mtd-utils&quot;<br>
<br>
-SRC_URI += &quot;file://0001-include-env.h-Ensure-ulong-is-defined.patch&quot;<br>
+SRC_URI += &quot;file://0001-include-env.h-Ensure-ulong-is-defined.patch \<br>
+            file://0002-include-fix-ulong-definition-on-musl-targets.patch \<br>
+           &quot;<br>
<br>
 INSANE_SKIP_${PN} = &quot;already-stripped&quot;<br>
 EXTRA_OEMAKE_class-target = &#39;CROSS_COMPILE=${TARGET_PREFIX} CC=&quot;${CC} ${CFLAGS} ${LDFLAGS}&quot; HOSTCC=&quot;${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}&quot; V=1&#39;<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>