diff options
author | Ting Liu <ting.liu@nxp.com> | 2020-05-07 19:50:51 +0800 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2020-05-08 10:11:36 -0300 |
commit | fa5c18a91cfd0fa3478fb6ead2898ac9e1942bd9 (patch) | |
tree | 3a0d4b66d595c0820e01108007b2de95a27c0181 /recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch | |
parent | 6ef0f40c2542655872e76c8cdd5cbe3c37c4c8db (diff) | |
download | meta-freescale-fa5c18a91cfd0fa3478fb6ead2898ac9e1942bd9.tar.gz |
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 <ting.liu@nxp.com>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch | 79 |
1 files changed, 79 insertions, 0 deletions
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 00000000..e530b7ca --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From b6ee0cf89f9405094cbb6047076a13e14ebc030b Mon Sep 17 00:00:00 2001 | ||
2 | From: Simon Glass <sjg@chromium.org> | ||
3 | Date: Thu, 31 Oct 2019 07:43:03 -0600 | ||
4 | Subject: [PATCH] binman: Convert a few tests to Python 3 | ||
5 | |||
6 | Some tests have crept in with Python 2 strings and constructs. Convert | ||
7 | then. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | |||
11 | Signed-off-by: Simon Glass <sjg@chromium.org> | ||
12 | --- | ||
13 | tools/binman/ftest.py | 14 +++++++------- | ||
14 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
15 | |||
16 | diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py | ||
17 | index 93507993a0..80df0e3ca9 100644 | ||
18 | --- a/tools/binman/ftest.py | ||
19 | +++ b/tools/binman/ftest.py | ||
20 | @@ -2113,7 +2113,7 @@ class TestFunctional(unittest.TestCase): | ||
21 | data = self.data = self._DoReadFileRealDtb('115_fdtmap.dts') | ||
22 | fdtmap_data = data[len(U_BOOT_DATA):] | ||
23 | magic = fdtmap_data[:8] | ||
24 | - self.assertEqual('_FDTMAP_', magic) | ||
25 | + self.assertEqual(b'_FDTMAP_', magic) | ||
26 | self.assertEqual(tools.GetBytes(0, 8), fdtmap_data[8:16]) | ||
27 | |||
28 | fdt_data = fdtmap_data[16:] | ||
29 | @@ -2156,7 +2156,7 @@ class TestFunctional(unittest.TestCase): | ||
30 | dtb = fdt.Fdt.FromData(fdt_data) | ||
31 | fdt_size = dtb.GetFdtObj().totalsize() | ||
32 | hdr_data = data[-8:] | ||
33 | - self.assertEqual('BinM', hdr_data[:4]) | ||
34 | + self.assertEqual(b'BinM', hdr_data[:4]) | ||
35 | offset = struct.unpack('<I', hdr_data[4:])[0] & 0xffffffff | ||
36 | self.assertEqual(fdtmap_pos - 0x400, offset - (1 << 32)) | ||
37 | |||
38 | @@ -2165,7 +2165,7 @@ class TestFunctional(unittest.TestCase): | ||
39 | data = self.data = self._DoReadFileRealDtb('117_fdtmap_hdr_start.dts') | ||
40 | fdtmap_pos = 0x100 + len(U_BOOT_DATA) | ||
41 | hdr_data = data[:8] | ||
42 | - self.assertEqual('BinM', hdr_data[:4]) | ||
43 | + self.assertEqual(b'BinM', hdr_data[:4]) | ||
44 | offset = struct.unpack('<I', hdr_data[4:])[0] | ||
45 | self.assertEqual(fdtmap_pos, offset) | ||
46 | |||
47 | @@ -2174,7 +2174,7 @@ class TestFunctional(unittest.TestCase): | ||
48 | data = self.data = self._DoReadFileRealDtb('118_fdtmap_hdr_pos.dts') | ||
49 | fdtmap_pos = 0x100 + len(U_BOOT_DATA) | ||
50 | hdr_data = data[0x80:0x88] | ||
51 | - self.assertEqual('BinM', hdr_data[:4]) | ||
52 | + self.assertEqual(b'BinM', hdr_data[:4]) | ||
53 | offset = struct.unpack('<I', hdr_data[4:])[0] | ||
54 | self.assertEqual(fdtmap_pos, offset) | ||
55 | |||
56 | @@ -2435,9 +2435,9 @@ class TestFunctional(unittest.TestCase): | ||
57 | ' section 100 %x section 100' % section_size, | ||
58 | ' cbfs 100 400 cbfs 0', | ||
59 | ' u-boot 138 4 u-boot 38', | ||
60 | -' u-boot-dtb 180 10f u-boot-dtb 80 3c9', | ||
61 | +' u-boot-dtb 180 105 u-boot-dtb 80 3c9', | ||
62 | ' u-boot-dtb 500 %x u-boot-dtb 400 3c9' % fdt_size, | ||
63 | -' fdtmap %x 3b4 fdtmap %x' % | ||
64 | +' fdtmap %x 3bd fdtmap %x' % | ||
65 | (fdtmap_offset, fdtmap_offset), | ||
66 | ' image-header bf8 8 image-header bf8', | ||
67 | ] | ||
68 | @@ -2522,7 +2522,7 @@ class TestFunctional(unittest.TestCase): | ||
69 | data = self._RunExtractCmd('section') | ||
70 | cbfs_data = data[:0x400] | ||
71 | cbfs = cbfs_util.CbfsReader(cbfs_data) | ||
72 | - self.assertEqual(['u-boot', 'u-boot-dtb', ''], cbfs.files.keys()) | ||
73 | + self.assertEqual(['u-boot', 'u-boot-dtb', ''], list(cbfs.files.keys())) | ||
74 | dtb_data = data[0x400:] | ||
75 | dtb = self._decompress(dtb_data) | ||
76 | self.assertEqual(EXTRACT_DTB_SIZE, len(dtb)) | ||
77 | -- | ||
78 | 2.24.0 | ||
79 | |||