[oe-commits] [openembedded-core] 07/09: u-boot: Update to v2020.01-rc5

git at git.openembedded.org git at git.openembedded.org
Thu Jan 2 16:40:49 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 6c491181211b39e8082e73d9e87b5a99ee51261a
Author: Alistair Francis <alistair.francis at wdc.com>
AuthorDate: Tue Dec 31 07:55:40 2019 -0800

    u-boot: Update to v2020.01-rc5
    
    Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...001-include-env.h-Ensure-ulong-is-defined.patch |  6 +-
 ...lude-fix-ulong-definition-on-musl-targets.patch | 83 ++++++++++++++++++++++
 meta/recipes-bsp/u-boot/u-boot-common.inc          |  4 +-
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb |  4 +-
 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 b911816..4d623c1 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 @@
-From 0565a080d153d5baaaacfeb5045a832e126f4f9e Mon Sep 17 00:00:00 2001
+From 718170ff3a5e677db7212a86b129dacb28b1cac2 Mon Sep 17 00:00:00 2001
 From: Alistair Francis <alistair.francis at wdc.com>
 Date: Mon, 14 Oct 2019 17:37:30 -0700
 Subject: [PATCH] include/env.h: Ensure ulong is defined
@@ -14,7 +14,7 @@ Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
  1 file changed, 2 insertions(+)
 
 diff --git a/include/env.h b/include/env.h
-index b72239f6a5..5ca49a3456 100644
+index d6c2d751d6..6cf5053431 100644
 --- a/include/env.h
 +++ b/include/env.h
 @@ -13,6 +13,8 @@
@@ -27,5 +27,5 @@ index b72239f6a5..5ca49a3456 100644
  
  /* Value for environment validity */
 -- 
-2.23.0
+2.24.1
 
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 0000000..0d96581
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch
@@ -0,0 +1,83 @@
+From dccfea2e95cd3f26d1295e02d41012d014827dd9 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox at gentoo.org>
+Date: Mon, 16 Dec 2019 23:36:40 +0000
+Subject: [PATCH 2/2] include: fix 'ulong' definition on musl targets
+
+The build failure was originally reported on arm64-musl
+target at https://bugs.gentoo.org/703132. Here is the amd64-musl
+variant:
+
+```
+$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-only_defconfig -j$(nproc)
+$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-all            -j$(nproc)
+...
+In file included from tools/env/../../env/flags.c:7,
+                 from tools/env/env_flags.c:1:
+include/env.h:159:1: error: unknown type name 'ulong'; did you mean 'long'?
+  159 | ulong env_get_ulong(const char *name, int base, ulong default_val);
+      | ^~~~~
+      | long
+```
+
+Note: 'ulong' is not defined there.
+
+On glibc 'ulong' comes from <sys/types.h>:
+
+```c
+/* Old compatibility names for C types.  */
+typedef unsigned long int ulong;
+```
+
+On musl it comes from <sys/types.h> as well but from under different guards:
+
+```c
+typedef unsigned long u_long, ulong;
+```
+
+The change inlines 'ulong' define similar to 'uint' define.
+
+Upstream-Status: Pending
+Bug: https://bugs.gentoo.org/703132
+Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
+Message-Id: <20191216233640.518168-1-slyfox at gentoo.org>
+---
+ include/compiler.h   | 2 +-
+ include/u-boot/crc.h | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/compiler.h b/include/compiler.h
+index 29507f9840..90372f239c 100644
+--- a/include/compiler.h
++++ b/include/compiler.h
+@@ -46,7 +46,6 @@
+ # include <byteswap.h>
+ #elif defined(__MACH__) || defined(__FreeBSD__)
+ # include <machine/endian.h>
+-typedef unsigned long ulong;
+ #endif
+ #ifdef __FreeBSD__
+ # include <sys/endian.h> /* htole32 and friends */
+@@ -66,6 +65,7 @@ typedef uint8_t __u8;
+ typedef uint16_t __u16;
+ typedef uint32_t __u32;
+ typedef unsigned int uint;
++typedef unsigned long ulong;
+ 
+ #define uswap_16(x) \
+ 	((((x) & 0xff00) >> 8) | \
+diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h
+index 1086d2168c..b96b50d98b 100644
+--- a/include/u-boot/crc.h
++++ b/include/u-boot/crc.h
+@@ -8,6 +8,8 @@
+ #ifndef _UBOOT_CRC_H
+ #define _UBOOT_CRC_H
+ 
++#include <compiler.h> /* unit definition */
++
+ /**
+  * crc8() - Calculate and return CRC-8 of the data
+  *
+-- 
+2.24.1
+
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
index a0f9c41..4799948 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"
 PE = "1"
 
 # Drop this line when updating to 2020.01 final
-PV = "2020.01~rc3"
+PV = "2020.01~rc5"
 
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
-SRCREV = "d4a31e8ee5592072d8d5208b3e950cba2d89b6bd"
+SRCREV = "ef7c2af65966a57c98d3c47e6c2fe1ce2103b7f6"
 
 SRC_URI = "git://git.denx.de/u-boot.git \
           "
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 7de91ff..5d9b300 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
 SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
 DEPENDS += "mtd-utils"
 
-SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch"
+SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch \
+            file://0002-include-fix-ulong-definition-on-musl-targets.patch \
+	    "
 
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list