[oe] [PATCH] u-boot: Fix missing Python.h build failure

Alistair Francis alistair at alistair23.me
Tue Apr 16 04:00:49 UTC 2019


Signed-off-by: Alistair Francis <alistair at alistair23.me>
---
 ...rt-pylibfdt-Use-Python-2-in-Makefile.patch | 37 +++++++++++++++++++
 meta/recipes-bsp/u-boot/u-boot-common.inc     |  4 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/u-boot/files/0001-Revert-pylibfdt-Use-Python-2-in-Makefile.patch

diff --git a/meta/recipes-bsp/u-boot/files/0001-Revert-pylibfdt-Use-Python-2-in-Makefile.patch b/meta/recipes-bsp/u-boot/files/0001-Revert-pylibfdt-Use-Python-2-in-Makefile.patch
new file mode 100644
index 0000000000..a7c934d49e
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/0001-Revert-pylibfdt-Use-Python-2-in-Makefile.patch
@@ -0,0 +1,37 @@
+From 30f41eae3d7a3d07e1d62b98d11430d5b2d24513 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair at alistair23.me>
+Date: Sat, 13 Apr 2019 13:41:58 -0700
+Subject: [PATCH] Revert "pylibfdt: Use Python 2 in Makefile"
+
+This reverts commit 03e6151d5bb42fd055e9c1e571440359bd5b5282.
+
+Revert the patch to avoid:
+| scripts/dtc/pylibfdt/libfdt_wrap.c:149:11: fatal error: Python.h: No such file or directory
+|  # include <Python.h>
+|            ^~~~~~~~~~
+| compilation terminated.
+
+errors when buildling u-boot in OE.
+
+Signed-off-by: Alistair Francis <alistair at alistair23.me>
+Upstream-Status: Inappropriate [configuration]
+---
+ scripts/dtc/pylibfdt/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
+index 15e66ad44d..c769d7db06 100644
+--- a/scripts/dtc/pylibfdt/Makefile
++++ b/scripts/dtc/pylibfdt/Makefile
+@@ -21,7 +21,7 @@ quiet_cmd_pymod = PYMOD   $@
+ 		CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \
+ 		SOURCES="$(PYLIBFDT_srcs)" \
+ 		SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \
+-		$(PYTHON2) $< --quiet build_ext --inplace
++		$(PYTHON) $< --quiet build_ext --inplace
+ 
+ $(obj)/_libfdt.so: $(src)/setup.py $(PYLIBFDT_srcs) FORCE
+ 	$(call if_changed,pymod)
+-- 
+2.20.1
+
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
index a0212e1b6b..5e81cabdbd 100644
--- a/meta/recipes-bsp/u-boot/u-boot-common.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
@@ -10,6 +10,8 @@ PE = "1"
 # repo during parse
 SRCREV = "3c99166441bf3ea325af2da83cfe65430b49c066"
 
-SRC_URI = "git://git.denx.de/u-boot.git"
+SRC_URI = "git://git.denx.de/u-boot.git \
+           file://0001-Revert-pylibfdt-Use-Python-2-in-Makefile.patch \
+          "
 
 S = "${WORKDIR}/git"
-- 
2.20.1



More information about the Openembedded-devel mailing list