Skip to contentSkip to conversation

configs/qemu_arm_vexpress_tz_defconfig: optee needs host-python3 w/ modules

PATCH New Romain Naour 2 participants 10 messages Mar 8, 2020 – Mar 15, 2020 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 configs/qemu_arm_vexpress_tz_defconfig: optee needs host-python3 w/ modules

optee-os needs host-python-pycrypto build for python3. The only way we can force building host-python modules for python3 is to select python3 package for the target.

Since we want to avoid adding more host-python3-<modules> (host-python-pycrypto host-python-pyelftools), select python3 package even if it's not used.

This problem will be fixed as soon as python2 is removed.

Fixes:
File "scripts/pem_to_pub_c.py", line 24, in main
from Crypto.PublicKey import RSA
ImportError: No module named 'Crypto'

https://gitlab.com/buildroot.org/buildroot/-/jobs/456818689

Cc Etienne Carriere <[email protected]>
---
 configs/qemu_arm_vexpress_tz_defconfig | 7 +++++++
 1 file changed, 7 insertions(+)
configs/qemu_arm_vexpress_tz_defconfig +7 -0
index ccc0dca3ec..374612e549 100644
@@ -38,6 +38,13 @@ BR2_PACKAGE_OPTEE_BENCHMARK=y
 BR2_PACKAGE_OPTEE_EXAMPLES=y
 BR2_PACKAGE_OPTEE_TEST=y
 
+# OP-TEE components needs host-python3 interpreter and it's modules
+BR2_PACKAGE_HOST_PYTHON3=y
+# Select python3 on the target to make sure Buildroot build host-python using
+# python3 and build all python modules for python3.
+BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
+BR2_PACKAGE_PYTHON3=y
+
 # U-boot for booting the dear Linux kernel
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
Signature · 1 line
2.24.1
#1 lore raw

PATCH 2/4 package/optee-test: use python3 instead of python

Fixes:
TypeError: cannot use a str to initialize an array with typecode 'B'
File "../../scripts/file_to_c.py", line 32, in main

    for x in array.array("B", inf.read()):
    for x in array.array("B", inf.read()):

TypeError: cannot use a str to initialize an array with typecode 'B'
TypeError: cannot use a str to initialize an array with typecode 'B'

---
 .../0001-use-python3-instead-of-python.patch  | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 package/optee-test/0001-use-python3-instead-of-python.patch
package/optee-test/0001-use-python3-instead-of-python.patch new file +50 -0
new file mode 100644
index 0000000000..2765a980db
@@ -0,0 +1,50 @@
+From cc3cb798375c5f47ea5c7579f32060933435e231 Mon Sep 17 00:00:00 2001
+From: Scott Branden <[email protected]>
+Date: Fri, 27 Dec 2019 12:54:28 -0800
+Subject: [PATCH] use python3 instead of python
+
+use python3 instead of python as python2 is EOL January 2020.
+
+Signed-off-by: Scott Branden <[email protected]>
+Reviewed-by: Jerome Forissier <[email protected]>
+Tested-by: Jerome Forissier <[email protected]> (QEMU, CFG_GCM_NIST_VECTORS=y)
+
+(cherry picked from commit 6271160639002a2580d80b75b5397a96d56329f2)
+Signed-off-by: Romain Naour <[email protected]>
+---
+ scripts/file_to_c.py       | 4 ++--
+ scripts/rsp_to_gcm_test.py | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/file_to_c.py b/scripts/file_to_c.py
+index ae16f52..b4ce2a2 100755
+--- a/scripts/file_to_c.py
++++ b/scripts/file_to_c.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-2-Clause
+ #
+ # Copyright (c) 2018, Linaro Limited
+@@ -29,7 +29,7 @@ def main():
+ 
+     f.write("const uint8_t " + args.name + "[] = {\n")
+     i = 0
+-    for x in array.array("B", inf.read()):
++    for x in array.array("B", map(ord, (inf.read()))):
+         f.write("0x" + '{0:02x}'.format(x) + ",")
+         i = i + 1
+         if i % 8 == 0:
+diff --git a/scripts/rsp_to_gcm_test.py b/scripts/rsp_to_gcm_test.py
+index 0543541..e4418be 100755
+--- a/scripts/rsp_to_gcm_test.py
++++ b/scripts/rsp_to_gcm_test.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ 
+ modes = {'encrypt': 0, 'decrypt': 1}
+ 
+-- 
+2.24.1
+
Signature · 1 line
2.24.1
#2 lore raw

PATCH 2/4 package/optee-test: use python3 instead of python

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Fixes:
TypeError: cannot use a str to initialize an array with typecode 'B'
File "../../scripts/file_to_c.py", line 32, in main

    for x in array.array("B", inf.read()):
    for x in array.array("B", inf.read()):

TypeError: cannot use a str to initialize an array with typecode 'B'
TypeError: cannot use a str to initialize an array with typecode 'B'

Reworded the commit message a bit and committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 2/4 package/optee-test: use python3 instead of python

In reply to Romain Naour
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Fixes:
TypeError: cannot use a str to initialize an array with typecode 'B'
File "../../scripts/file_to_c.py", line 32, in main

    for x in array.array("B", inf.read()):
    for x in array.array("B", inf.read()):

TypeError: cannot use a str to initialize an array with typecode 'B'
TypeError: cannot use a str to initialize an array with typecode 'B'

Committed to 2019.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 3/4 package/python-pycrypto: fix python3.8 compatibility

In reply to Romain Naour

As reported by [1], time clock was deprecated in Python 3.3 and removed in Python 3.8. Apply the patch from the PR [2] since there is no upstream activity.

Fixes:

Quoted 1 line
Quoted 1 line
Quoted 1 line

optee-os 3.7.0 Building

Traceback (most recent call last):
File "scripts/sign.py", line 234, in <module>

    main()
  File "scripts/sign.py", line 224, in main
    {
  File "scripts/sign.py", line 189, in sign_ta
    sig = signer.sign(h)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Signature/PKCS1_v1_5.py", line 112, in sign
    m = self._key.decrypt(em)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py", line 174, in decrypt
    return pubkey.pubkey.decrypt(self, ciphertext)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/PublicKey/pubkey.py", line 93, in decrypt
    plaintext=self._decrypt(ciphertext)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py", line 235, in _decrypt
    r = getRandomRange(1, self.key.n-1, randfunc=self._randfunc)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Util/number.py", line 123, in getRandomRange
    value = getRandomInteger(bits, randfunc)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Util/number.py", line 104, in getRandomInteger
    S = randfunc(N>>3)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 202, in read
    return self._singleton.read(bytes)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 178, in read
    return _UserFriendlyRNG.read(self, bytes)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 129, in read
    self._ec.collect()

File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 77, in collect
t = time.clock()
AttributeError: module 'time' has no attribute 'clock'

This issue could be reproduced on the target.

[1] https://github.com/dlitz/pycrypto/issues/283
[2] https://github.com/dlitz/pycrypto/pull/296

---
 ...ock-with-time.process_time-time-cloc.patch | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/python-pycrypto/0002-replaced-time.clock-with-time.process_time-time-cloc.patch
package/python-pycrypto/0002-replaced-time.clock-with-time.process_time-time-cloc.patch new file +35 -0
new file mode 100644
index 0000000000..b12b58ddf1
@@ -0,0 +1,35 @@
+From 6d76976527096cf0138d61fc25bd932d725f8436 Mon Sep 17 00:00:00 2001
+From: Fabian Topfstedt <[email protected]>
+Date: Mon, 18 Nov 2019 22:19:35 +0100
+Subject: [PATCH] replaced time.clock with time.process_time (time clock was
+ flagged as deprecated in Python 3.3 and got removed in Python 3.8)
+
+Downloaded from github pull request [1].
+Related to issue [2].
+
+[1] https://github.com/dlitz/pycrypto/pull/296
+[2] https://github.com/dlitz/pycrypto/issues/283
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ lib/Crypto/Random/_UserFriendlyRNG.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
+index 957e006..f389cfc 100644
+--- a/lib/Crypto/Random/_UserFriendlyRNG.py
++++ b/lib/Crypto/Random/_UserFriendlyRNG.py
+@@ -73,8 +73,8 @@ class _EntropyCollector(object):
+         t = time.time()
+         self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+ 
+-        # Add the fractional part of time.clock()
+-        t = time.clock()
++        # Add the fractional part of time.process_time()
++        t = time.process_time()
+         self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+ 
+ 
+-- 
+2.24.1
+
Signature · 1 line
2.24.1
#5 lore raw

PATCH 3/4 package/python-pycrypto: fix python3.8 compatibility

Quoted 72 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

As reported by [1], time clock was deprecated in Python 3.3 and removed in Python 3.8. Apply the patch from the PR [2] since there is no upstream activity.

Fixes:

Quoted 1 line
Quoted 1 line
Quoted 1 line

optee-os 3.7.0 Building

Traceback (most recent call last):
File "scripts/sign.py", line 234, in <module>

    main()
  File "scripts/sign.py", line 224, in main
    {
  File "scripts/sign.py", line 189, in sign_ta
    sig = signer.sign(h)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Signature/PKCS1_v1_5.py", line 112, in sign
    m = self._key.decrypt(em)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py", line 174, in decrypt
    return pubkey.pubkey.decrypt(self, ciphertext)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/PublicKey/pubkey.py", line 93, in decrypt
    plaintext=self._decrypt(ciphertext)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py", line 235, in _decrypt
    r = getRandomRange(1, self.key.n-1, randfunc=self._randfunc)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Util/number.py", line 123, in getRandomRange
    value = getRandomInteger(bits, randfunc)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Util/number.py", line 104, in getRandomInteger
    S = randfunc(N>>3)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 202, in read
    return self._singleton.read(bytes)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 178, in read
    return _UserFriendlyRNG.read(self, bytes)
  File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 129, in read
    self._ec.collect()

File "/home/naourr/buildroot/test/qemu_arm_vexpress_tz/host/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 77, in collect
t = time.clock()
AttributeError: module 'time' has no attribute 'clock'

This issue could be reproduced on the target.

[1] https://github.com/dlitz/pycrypto/issues/283
[2] https://github.com/dlitz/pycrypto/pull/296

---
 ...ock-with-time.process_time-time-cloc.patch | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/python-pycrypto/0002-replaced-time.clock-with-time.process_time-time-cloc.patch
package/python-pycrypto/0002-replaced-time.clock-with-time.process_time-time-cloc.patch new file +19 -0
new file mode 100644
index 0000000000..b12b58ddf1
@@ -0,0 +1,35 @@
+From 6d76976527096cf0138d61fc25bd932d725f8436 Mon Sep 17 00:00:00 2001
+From: Fabian Topfstedt <[email protected]>
+Date: Mon, 18 Nov 2019 22:19:35 +0100
+Subject: [PATCH] replaced time.clock with time.process_time (time clock was
+ flagged as deprecated in Python 3.3 and got removed in Python 3.8)
+
+Downloaded from github pull request [1].
+Related to issue [2].
+
+[1] https://github.com/dlitz/pycrypto/pull/296
+[2] https://github.com/dlitz/pycrypto/issues/283
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ lib/Crypto/Random/_UserFriendlyRNG.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
+index 957e006..f389cfc 100644

package/python-pycrypto/0002-replaced-time.clock-with-time.process_time-time-cloc.patch line 29

Quoted 10 lines
package/python-pycrypto/0002-replaced-time.clock-with-time.process_time-time-cloc.patch new file +10 -0
+--- a/lib/Crypto/Random/_UserFriendlyRNG.py
++++ b/lib/Crypto/Random/_UserFriendlyRNG.py
+@@ -73,8 +73,8 @@ class _EntropyCollector(object):
+         t = time.time()
+         self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+ 
+-        # Add the fractional part of time.clock()
+-        t = time.clock()
++        # Add the fractional part of time.process_time()
++        t = time.process_time()

This unfortunately does not work with python 2.x:

python
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

import time
time.process_time()

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'process_time'

Quoted 1 line
Quoted 1 line
Quoted 1 line

time.clock()

0.016955

So we will need to make it conditional as long as we support python 2.x.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 4/4 package/qemu: Fix a regression in semihosting

In reply to Romain Naour

From: Adrien Grassein <[email protected]>

The Buildroot's gitlab testing infra reported a build issue with the qemu_arm_vexpress_tz_defconfig due to host-python3 modules issues [1]. Thoses issues has been fixed by the previous patch.

But the defconfig doesn't boot with the current master (2020.02-rc3).

It turn out that is an Qemu 4.2.0 regression that was fixed upstream by [2]. This issue was found by using git bisect old/new.

Fixes:

$ ../host/bin/qemu-system-arm -machine virt -machine secure=on -cpu cortex-a15 -smp 1 -s -m 1024 -d unimp -serial stdio -netdev user,id=vmnic -device virtio-net-device,netdev=vmnic -semihosting-config enable,target=native -bios bl1.bin
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v2.0(release):2020.02-rc3-43-g9abf171ea6
NOTICE:  BL1: Built : 12:44:52, Mar  8 2020
ERROR:   Failed to load BL2 firmware.

After fixing host-python3 issue from [1]

[1] https://gitlab.com/buildroot.org/buildroot/-/jobs/456818689
[2] https://github.com/qemu/qemu/commit/21bf9b06cb6d07c6cc437dfd47b47b28c2bb79db

[Romain:
- improve commit log
- add upstream link
]

Cc Etienne Carriere <[email protected]>
Cc Gerome Burlats <[email protected]>
---
 ...emi-fix-SYS_OPEN-to-return-nonzero-f.patch | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 package/qemu/4.2.0/0003-target-arm-arm-semi-fix-SYS_OPEN-to-return-nonzero-f.patch
package/qemu/4.2.0/0003-target-arm-arm-semi-fix-SYS_OPEN-to-return-nonzero-f.patch new file +78 -0
new file mode 100644
index 0000000000..46652d8298
@@ -0,0 +1,78 @@
+From 318f83f387678a3c0a2a729b506613011c6830b2 Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <[email protected]>
+Date: Fri, 17 Jan 2020 14:09:30 +0000
+Subject: [PATCH] target/arm/arm-semi: fix SYS_OPEN to return nonzero
+ filehandle
+
+According to the specification "Semihosting for AArch32 and Aarch64",
+the SYS_OPEN operation should return:
+
+ - A nonzero handle if the call is successful
+ - -1 if the call is not successful
+
+So, it should never return 0.
+
+Prior to commit 35e9a0a8ce4b ("target/arm/arm-semi: Make semihosting
+code hand out its own file descriptors"), the guest fd matched to the
+host fd. It returned a nonzero handle on success since the fd 0 is
+already used for stdin.
+
+Now that the guest fd is the index of guestfd_array, it starts from 0.
+
+I noticed this issue particularly because Trusted Firmware-A built with
+PLAT=qemu is no longer working. Its io_semihosting driver only handles
+a positive return value as a valid filehandle.
+
+Basically, there are two ways to fix this:
+
+  - Use (guestfd - 1) as the index of guestfs_arrary. We need to insert
+    increment/decrement to convert the guestfd and the array index back
+    and forth.
+
+  - Keep using guestfd as the index of guestfs_array. The first entry
+    of guestfs_array is left unused.
+
+I thought the latter is simpler. We end up with wasting a small piece
+of memory for the unused first entry of guestfd_array, but this is
+probably not a big deal.
+
+Fixes: 35e9a0a8ce4b ("target/arm/arm-semi: Make semihosting code hand out its own file descriptors")
+Cc: qemu-stable at nongnu.org
+Signed-off-by: Masahiro Yamada <[email protected]>
+Reviewed-by: Richard Henderson <[email protected]>
+Message-id: 20200109041228.10131-1-masahiroy at kernel.org
+Signed-off-by: Peter Maydell <[email protected]>
+
+(cherry picked from commit 21bf9b06cb6d07c6cc437dfd47b47b28c2bb79db)
+Signed-off-by: Adrien Grassein <[email protected]>
+Signed-off-by: Romain Naour <[email protected]>
+---
+ target/arm/arm-semi.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/target/arm/arm-semi.c b/target/arm/arm-semi.c
+index 6f7b6d801b..4275dfc345 100644
+--- a/target/arm/arm-semi.c
++++ b/target/arm/arm-semi.c
+@@ -144,7 +144,8 @@ static int alloc_guestfd(void)
+         guestfd_array = g_array_new(FALSE, TRUE, sizeof(GuestFD));
+     }
+ 
+-    for (i = 0; i < guestfd_array->len; i++) {
++    /* SYS_OPEN should return nonzero handle on success. Start guestfd from 1 */
++    for (i = 1; i < guestfd_array->len; i++) {
+         GuestFD *gf = &g_array_index(guestfd_array, GuestFD, i);
+ 
+         if (gf->type == GuestFDUnused) {
+@@ -168,7 +169,7 @@ static GuestFD *do_get_guestfd(int guestfd)
+         return NULL;
+     }
+ 
+-    if (guestfd < 0 || guestfd >= guestfd_array->len) {
++    if (guestfd <= 0 || guestfd >= guestfd_array->len) {
+         return NULL;
+     }
+ 
+-- 
+2.24.1
+
Signature · 1 line
2.24.1
#7 lore raw

PATCH 4/4 package/qemu: Fix a regression in semihosting

Quoted 27 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

From: Adrien Grassein <[email protected]> The Buildroot's gitlab testing infra reported a build issue with the qemu_arm_vexpress_tz_defconfig due to host-python3 modules issues [1]. Thoses issues has been fixed by the previous patch.

But the defconfig doesn't boot with the current master (2020.02-rc3).

It turn out that is an Qemu 4.2.0 regression that was fixed upstream by [2]. This issue was found by using git bisect old/new.

Fixes:

$ ../host/bin/qemu-system-arm -machine virt -machine secure=on -cpu cortex-a15 -smp 1 -s -m 1024 -d unimp -serial stdio -netdev user,id=vmnic -device virtio-net-device,netdev=vmnic -semihosting-config enable,target=native -bios bl1.bin
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v2.0(release):2020.02-rc3-43-g9abf171ea6
NOTICE:  BL1: Built : 12:44:52, Mar  8 2020
ERROR:   Failed to load BL2 firmware.

After fixing host-python3 issue from [1]

[1] https://gitlab.com/buildroot.org/buildroot/-/jobs/456818689
[2] https://github.com/qemu/qemu/commit/21bf9b06cb6d07c6cc437dfd47b47b28c2bb79db

Quoted 8 lines

[Romain:
- improve commit log
- add upstream link
]

Cc Etienne Carriere <[email protected]>
Cc Gerome Burlats <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw

PATCH 1/4 configs/qemu_arm_vexpress_tz_defconfig: optee needs host-python3 w/ modules

In reply to Romain Naour
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

optee-os needs host-python-pycrypto build for python3. The only way we can force building host-python modules for python3 is to select python3 package for the target.

Since we want to avoid adding more host-python3-<modules> (host-python-pycrypto host-python-pyelftools), select python3 package even if it's not used.

This problem will be fixed as soon as python2 is removed.

Fixes:
File "scripts/pem_to_pub_c.py", line 24, in main
from Crypto.PublicKey import RSA
ImportError: No module named 'Crypto'

Quoted 4 lines

https://gitlab.com/buildroot.org/buildroot/-/jobs/456818689

Cc Etienne Carriere <[email protected]>

It isn't great, but I also don't see any other quick solutions - Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 1/4 configs/qemu_arm_vexpress_tz_defconfig: optee needs host-python3 w/ modules

In reply to Romain Naour
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

optee-os needs host-python-pycrypto build for python3. The only way we can force building host-python modules for python3 is to select python3 package for the target.

Since we want to avoid adding more host-python3-<modules> (host-python-pycrypto host-python-pyelftools), select python3 package even if it's not used.

This problem will be fixed as soon as python2 is removed.

Fixes:
File "scripts/pem_to_pub_c.py", line 24, in main
from Crypto.PublicKey import RSA
ImportError: No module named 'Crypto'

Quoted 4 lines

https://gitlab.com/buildroot.org/buildroot/-/jobs/456818689

Cc Etienne Carriere <[email protected]>

Committed to 2019.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard