diff options
author | Ting Liu <ting.liu@nxp.com> | 2020-04-18 22:55:34 +0800 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2020-05-06 15:52:35 -0300 |
commit | ff3ad8e7b7d1df81d979fff987c4b3a6c855a617 (patch) | |
tree | 936b1e0117d5a08d8dfd4fb105d39feaa4a0e689 /recipes-security/optee | |
parent | 1fdfe9b50710a04e076fffa6dc766b01466c4f92 (diff) | |
download | meta-freescale-ff3ad8e7b7d1df81d979fff987c4b3a6c855a617.tar.gz |
optee-test-qoriq: add patch to use python3
python2 is EOL January 2020. This fixes build failure due to python2.
Signed-off-by: Ting Liu <ting.liu@nxp.com>
Diffstat (limited to 'recipes-security/optee')
-rw-r--r-- | recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch | 48 | ||||
-rw-r--r-- | recipes-security/optee/optee-test-qoriq_git.bb | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch b/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch new file mode 100644 index 00000000..20f190af --- /dev/null +++ b/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 6271160639002a2580d80b75b5397a96d56329f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Scott Branden <scott.branden@broadcom.com> | ||
3 | Date: Fri, 27 Dec 2019 12:54:28 -0800 | ||
4 | Subject: [PATCH] use python3 instead of python | ||
5 | |||
6 | use python3 instead of python as python2 is EOL January 2020. | ||
7 | |||
8 | Signed-off-by: Scott Branden <scott.branden@broadcom.com> | ||
9 | Reviewed-by: Jerome Forissier <jerome@forissier.org> | ||
10 | Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU, CFG_GCM_NIST_VECTORS=y) | ||
11 | Upstream-Status: Backport from v3.8.0 | ||
12 | --- | ||
13 | scripts/file_to_c.py | 4 ++-- | ||
14 | scripts/rsp_to_gcm_test.py | 2 +- | ||
15 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/scripts/file_to_c.py b/scripts/file_to_c.py | ||
18 | index ae16f52..b4ce2a2 100755 | ||
19 | --- a/scripts/file_to_c.py | ||
20 | +++ b/scripts/file_to_c.py | ||
21 | @@ -1,4 +1,4 @@ | ||
22 | -#!/usr/bin/env python | ||
23 | +#!/usr/bin/env python3 | ||
24 | # SPDX-License-Identifier: BSD-2-Clause | ||
25 | # | ||
26 | # Copyright (c) 2018, Linaro Limited | ||
27 | @@ -29,7 +29,7 @@ def main(): | ||
28 | |||
29 | f.write("const uint8_t " + args.name + "[] = {\n") | ||
30 | i = 0 | ||
31 | - for x in array.array("B", inf.read()): | ||
32 | + for x in array.array("B", map(ord, (inf.read()))): | ||
33 | f.write("0x" + '{0:02x}'.format(x) + ",") | ||
34 | i = i + 1 | ||
35 | if i % 8 == 0: | ||
36 | diff --git a/scripts/rsp_to_gcm_test.py b/scripts/rsp_to_gcm_test.py | ||
37 | index 0543541..e4418be 100755 | ||
38 | --- a/scripts/rsp_to_gcm_test.py | ||
39 | +++ b/scripts/rsp_to_gcm_test.py | ||
40 | @@ -1,4 +1,4 @@ | ||
41 | -#!/usr/bin/env python | ||
42 | +#!/usr/bin/env python3 | ||
43 | |||
44 | modes = {'encrypt': 0, 'decrypt': 1} | ||
45 | |||
46 | -- | ||
47 | 2.7.4 | ||
48 | |||
diff --git a/recipes-security/optee/optee-test-qoriq_git.bb b/recipes-security/optee/optee-test-qoriq_git.bb index 7205e9de..b66725c7 100644 --- a/recipes-security/optee/optee-test-qoriq_git.bb +++ b/recipes-security/optee/optee-test-qoriq_git.bb | |||
@@ -10,6 +10,7 @@ inherit python3native | |||
10 | 10 | ||
11 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test;nobranch=1 \ | 11 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test;nobranch=1 \ |
12 | file://0001-fix-build-failure-with-GCC-9.patch \ | 12 | file://0001-fix-build-failure-with-GCC-9.patch \ |
13 | file://0001-use-python3-instead-of-python.patch \ | ||
13 | " | 14 | " |
14 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
15 | 16 | ||