summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2020-02-03 14:10:50 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2020-02-03 14:16:52 +0100
commitb370f27fd618a00bfa3fe7ae745f04b2508a915d (patch)
tree0d4f424e5769c13415a98708ce72895c3e3883b2
parente243db2b4d1ae31e4e7f89364d60ed246aa46702 (diff)
u-boot-toradex-tk1: use python3 for build
OE post zeus dropped Python 2. Provide a workaround so that one can still build the TK1 U-Boot. When we update U-Boot to 2020.01 or later Python 3 will be supported and this patch can be reverted. Completes '691b446 u-boot.inc: use python3 for build'. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--recipes-bsp/u-boot/files/0001-u-boot-tk1-make-it-build-with-python3-only-installat.patch44
-rw-r--r--recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc1
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/files/0001-u-boot-tk1-make-it-build-with-python3-only-installat.patch b/recipes-bsp/u-boot/files/0001-u-boot-tk1-make-it-build-with-python3-only-installat.patch
new file mode 100644
index 0000000..b17818a
--- /dev/null
+++ b/recipes-bsp/u-boot/files/0001-u-boot-tk1-make-it-build-with-python3-only-installat.patch
@@ -0,0 +1,44 @@
+From d70da04905d284f9b5423bf297830451c62a777b Mon Sep 17 00:00:00 2001
+From: root <root@linuxdev2.toradex.int>
+Date: Sun, 2 Feb 2020 19:58:32 +0100
+Subject: [PATCH] u-boot: tk1: make it build with python3 only installation
+
+- Build libfdt with the python3 binary rather than using the inexistent
+ python2 binary.
+- Fallback to the hardcoded U-Boot assembly rather than using the
+ python2 only BINMAN functionality.
+
+Signed-off-by: root <root@linuxdev2.toradex.int>
+---
+ arch/arm/mach-tegra/Kconfig | 1 -
+ scripts/dtc/pylibfdt/Makefile | 2 +-
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
+index 97e22ead59..9f49e87829 100644
+--- a/arch/arm/mach-tegra/Kconfig
++++ b/arch/arm/mach-tegra/Kconfig
+@@ -41,7 +41,6 @@ config TEGRA_PMC_SECURE
+
+ config TEGRA_COMMON
+ bool "Tegra common options"
+- select BINMAN
+ select BOARD_EARLY_INIT_F
+ select CLK
+ select DM
+diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
+index 15e66ad44d..42342c75bb 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
++ $(PYTHON3) $< --quiet build_ext --inplace
+
+ $(obj)/_libfdt.so: $(src)/setup.py $(PYLIBFDT_srcs) FORCE
+ $(call if_changed,pymod)
+--
+2.20.1
+
diff --git a/recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc b/recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc
index 70cd0a9..84c8e71 100644
--- a/recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc
+++ b/recipes-bsp/u-boot/u-boot-toradex-common-tk1.inc
@@ -17,5 +17,6 @@ SRCREV_use-head-next = "${AUTOREV}"
SRCBRANCH_use-head-next = "toradex_2019.07-next"
SRC_URI = "git://git.toradex.com/u-boot-toradex.git;protocol=https;branch=${SRCBRANCH}"
+SRC_URI += "file://0001-u-boot-tk1-make-it-build-with-python3-only-installat.patch"
S = "${WORKDIR}/git"