From fa5c18a91cfd0fa3478fb6ead2898ac9e1942bd9 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 7 May 2020 19:50:51 +0800 Subject: u-boot-qoriq: fix pylibfdt build with Python3 Backport patches to fix build failure on powerpc machines: | /bin/sh: 1: python2: not found | make[4]: *** [scripts/dtc/pylibfdt/_libfdt.so] Error 127 | make[3]: *** [scripts/dtc/pylibfdt] Error 2 Signed-off-by: Ting Liu --- ...01-binman-Convert-a-few-tests-to-Python-3.patch | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch (limited to 'recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch') diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch new file mode 100644 index 000000000..e530b7ca2 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch @@ -0,0 +1,79 @@ +From b6ee0cf89f9405094cbb6047076a13e14ebc030b Mon Sep 17 00:00:00 2001 +From: Simon Glass +Date: Thu, 31 Oct 2019 07:43:03 -0600 +Subject: [PATCH] binman: Convert a few tests to Python 3 + +Some tests have crept in with Python 2 strings and constructs. Convert +then. + +Upstream-Status: Backport + +Signed-off-by: Simon Glass +--- + tools/binman/ftest.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py +index 93507993a0..80df0e3ca9 100644 +--- a/tools/binman/ftest.py ++++ b/tools/binman/ftest.py +@@ -2113,7 +2113,7 @@ class TestFunctional(unittest.TestCase): + data = self.data = self._DoReadFileRealDtb('115_fdtmap.dts') + fdtmap_data = data[len(U_BOOT_DATA):] + magic = fdtmap_data[:8] +- self.assertEqual('_FDTMAP_', magic) ++ self.assertEqual(b'_FDTMAP_', magic) + self.assertEqual(tools.GetBytes(0, 8), fdtmap_data[8:16]) + + fdt_data = fdtmap_data[16:] +@@ -2156,7 +2156,7 @@ class TestFunctional(unittest.TestCase): + dtb = fdt.Fdt.FromData(fdt_data) + fdt_size = dtb.GetFdtObj().totalsize() + hdr_data = data[-8:] +- self.assertEqual('BinM', hdr_data[:4]) ++ self.assertEqual(b'BinM', hdr_data[:4]) + offset = struct.unpack('