uboot: fix build when libfdt-devel is installed system-wide
PATCH 1/2 uboot: fix build when libfdt-devel is installed system-wide
When libfdt-devel is installed system-wide, the build of U-Boot host programs currently fails with lots of:
HOSTCC tools/aisimage.o
In file included from tools/../include/../lib/libfdt/libfdt.h:10:0,
from tools/../include/libfdt.h:1,
from tools/fdt_host.h:11,
from tools/imagetool.h:24,
from tools/aisimage.c:8:
/usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t?
typedef uint64_t FDT_BITWISE fdt64_t;
^~~~~~~
In file included from <command-line>:0:0:
././include/libfdt_env.h:19:16: note: previous declaration of ?fdt64_t? was here
typedef __be64 fdt64_t;
^~~~~~~
In file included from ././include/libfdt_env.h:12:0,
from <command-line>:0:
/usr/include/libfdt_env.h:90:24: error: expected ?)? before ?x?
static inline uint32_t fdt32_to_cpu(fdt32_t x)
^This commit adds a fixup in the U-Boot code to fix this problem. The fixup is equivalent to applying upstream commit
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a,
but we can't use a patch for the uboot package, since people are using arbitrary versions.
--- boot/uboot/uboot.mk | 8 ++++++++ 1 file changed, 8 insertions(+)
boot/uboot/uboot.mk +8 -0
@@ -188,6 +188,14 @@ define UBOOT_APPLY_LOCAL_PATCHES endef UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES +# This is equivalent to upstream commit +# http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a. It +# fixes a build failure when libfdt-devel is installed system-wide. +define UBOOT_FIXUP_LIBFDT_INCLUDE + $(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile +endef +UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE + ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) define UBOOT_CONFIGURE_CMDS $(TARGET_CONFIGURE_OPTS) \
Signature · 1 line
2.14.3
PATCH 2/2 uboot-tools: backport patch fixing build failure with libfdt-devel installed
U-Boot host programs fail to build when libfdt-devel is installed system-wide, with errors like this:
HOSTCC tools/aisimage.o
In file included from tools/../include/../lib/libfdt/libfdt.h:10:0,
from tools/../include/libfdt.h:1,
from tools/fdt_host.h:11,
from tools/imagetool.h:24,
from tools/aisimage.c:8:
/usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t?
typedef uint64_t FDT_BITWISE fdt64_t;
^~~~~~~
In file included from <command-line>:0:0:
././include/libfdt_env.h:19:16: note: previous declaration of ?fdt64_t? was here
typedef __be64 fdt64_t;
^~~~~~~
In file included from ././include/libfdt_env.h:12:0,
from <command-line>:0:
/usr/include/libfdt_env.h:90:24: error: expected ?)? before ?x?
static inline uint32_t fdt32_to_cpu(fdt32_t x)
^This commit backports an upstream patch that fixes this problem.
--- ...de-U-Boot-libfdt-headers-from-their-actua.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/uboot-tools/0004-tools-Include-U-Boot-libfdt-headers-from-their-actua.patch
package/uboot-tools/0004-tools-Include-U-Boot-libfdt-headers-from-their-actua.patch new file +33 -0
@@ -0,0 +1,33 @@ +From e0d20dc1521e74b82dbd69be53a048847798a90a Mon Sep 17 00:00:00 2001 +From: Paul Kocialkowski <[email protected]> +Date: Fri, 2 Mar 2018 23:13:42 +0100 +Subject: [PATCH] tools: Include U-Boot libfdt headers from their actual path + +There are no headers for libfdt in lib/libfdt, as they are instead +located in scripts/dtc/libfdt. Specifying lib/libfdt for headers +inclusion in host tools results in using the system libfdt headers, +which is not what we want. Change this to the proper path. + +Signed-off-by: Paul Kocialkowski <[email protected]> +[Backport from upstream commit e0d20dc1521e74b82dbd69be53a048847798a90a] +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + tools/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/Makefile b/tools/Makefile +index d3387fad69..f38f68ee47 100644 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -244,7 +244,7 @@ endif # !LOGO_BMP + # + HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ + $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \ +- -I$(srctree)/lib/libfdt \ ++ -I$(srctree)/scripts/dtc/libfdt \ + -I$(srctree)/tools \ + -DUSE_HOSTCC \ + -D__KERNEL_STRICT_NAMES \ +-- +2.14.3 +
Signature · 1 line
2.14.3
PATCH 2/2 uboot-tools: backport patch fixing build failure with libfdt-devel installed
Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
U-Boot host programs fail to build when libfdt-devel is installed system-wide, with errors like this:
HOSTCC tools/aisimage.o In file included from tools/../include/../lib/libfdt/libfdt.h:10:0, from tools/../include/libfdt.h:1, from tools/fdt_host.h:11, from tools/imagetool.h:24, from tools/aisimage.c:8: /usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t? typedef uint64_t FDT_BITWISE fdt64_t; ^~~~~~~ In file included from <command-line>:0:0: ././include/libfdt_env.h:19:16: note: previous declaration of ?fdt64_t? was here typedef __be64 fdt64_t; ^~~~~~~ In file included from ././include/libfdt_env.h:12:0, from <command-line>:0: /usr/include/libfdt_env.h:90:24: error: expected ?)? before ?x? static inline uint32_t fdt32_to_cpu(fdt32_t x) ^
Quoted 3 lines
This commit backports an upstream patch that fixes this problem.
Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 uboot-tools: backport patch fixing build failure with libfdt-devel installed
In reply to Thomas PetazzoniQuoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
U-Boot host programs fail to build when libfdt-devel is installed system-wide, with errors like this:
HOSTCC tools/aisimage.o In file included from tools/../include/../lib/libfdt/libfdt.h:10:0, from tools/../include/libfdt.h:1, from tools/fdt_host.h:11, from tools/imagetool.h:24, from tools/aisimage.c:8: /usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t? typedef uint64_t FDT_BITWISE fdt64_t; ^~~~~~~ In file included from <command-line>:0:0: ././include/libfdt_env.h:19:16: note: previous declaration of ?fdt64_t? was here typedef __be64 fdt64_t; ^~~~~~~ In file included from ././include/libfdt_env.h:12:0, from <command-line>:0: /usr/include/libfdt_env.h:90:24: error: expected ?)? before ?x? static inline uint32_t fdt32_to_cpu(fdt32_t x) ^
Quoted 3 lines
This commit backports an upstream patch that fixes this problem.
Signed-off-by Thomas Petazzoni <[email protected]>
Committed to 2018.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 uboot: fix build when libfdt-devel is installed system-wide
In reply to Thomas PetazzoniQuoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
When libfdt-devel is installed system-wide, the build of U-Boot host programs currently fails with lots of:
HOSTCC
tools/aisimage.o
In file included fromtools/../include/../lib/libfdt/libfdt.h:10:0,from tools/../include/libfdt.h:1, from tools/fdt_host.h:11, from tools/imagetool.h:24, from tools/aisimage.c:8: /usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t? typedef uint64_t FDT_BITWISE fdt64_t; ^~~~~~~ In file included from <command-line>:0:0: ././include/libfdt_env.h:19:16: note: previous declaration of ?fdt64_t? was here typedef __be64 fdt64_t; ^~~~~~~ In file included from ././include/libfdt_env.h:12:0, from <command-line>:0: /usr/include/libfdt_env.h:90:24: error: expected ?)? before ?x? static inline uint32_t fdt32_to_cpu(fdt32_t x) ^
Quoted 7 lines
This commit adds a fixup in the U-Boot code to fix this problem. The fixup is equivalent to applying upstream commit
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a,
but we can't use a patch for the uboot package, since people are using arbitrary versions.Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 uboot: fix build when libfdt-devel is installed system-wide
In reply to Thomas PetazzoniQuoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
When libfdt-devel is installed system-wide, the build of U-Boot host programs currently fails with lots of:
HOSTCC
tools/aisimage.o
In file included fromtools/../include/../lib/libfdt/libfdt.h:10:0,from tools/../include/libfdt.h:1, from tools/fdt_host.h:11, from tools/imagetool.h:24, from tools/aisimage.c:8: /usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t? typedef uint64_t FDT_BITWISE fdt64_t; ^~~~~~~ In file included from <command-line>:0:0: ././include/libfdt_env.h:19:16: note: previous declaration of ?fdt64_t? was here typedef __be64 fdt64_t; ^~~~~~~ In file included from ././include/libfdt_env.h:12:0, from <command-line>:0: /usr/include/libfdt_env.h:90:24: error: expected ?)? before ?x? static inline uint32_t fdt32_to_cpu(fdt32_t x) ^
Quoted 7 lines
This commit adds a fixup in the U-Boot code to fix this problem. The fixup is equivalent to applying upstream commit
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a,
but we can't use a patch for the uboot package, since people are using arbitrary versions.Signed-off-by Thomas Petazzoni <[email protected]>
Committed to 2018.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard