* [Buildroot] Fix OpTee PyCryptodomex Python 2 vs 3 issue
@ 2020-08-06 9:30 Jonatan Hatakeyama Zeidler
2020-08-06 19:43 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Jonatan Hatakeyama Zeidler @ 2020-08-06 9:30 UTC (permalink / raw)
To: buildroot
Hi there,
I am using buildroot.2020.05.1. I am building optee with these options:
BR2_TARGET_OPTEE_OS=y
BR2_TARGET_OPTEE_OS_PLATFORM="k3-am65x"
BR2_TARGET_OPTEE_OS_CORE_IMAGES="tee-*_v2.bin"
These leads to
Traceback (most recent call last):
File "scripts/pem_to_pub_c.py", line 61, in <module>
main()
File "scripts/pem_to_pub_c.py", line 24, in main
from Cryptodome.PublicKey import RSA
ModuleNotFoundError: No module named 'Cryptodome'
during build of optee-os. The script scripts/pem_to_pub_c.py is run with Python3, while optee-os has Python2 dependencies:
OPTEE_OS_DEPENDENCIES = host-openssl host-python-pycryptodomex host-python-pyelftools.
Thus, the Cryptodome module is not found.
What fixed that for me is to add a python3-pycryptodomex package and change `optee-os` dependencies to Python3 ones. The patches are attached.
Let me know whether adding these patches makes sense to you.
Kind regards and thanks for your great work on buildroot,
Jonatan
--
Jonatan Hatakeyama Zeidler
Software Engineer
Brainlab Robotics
T +49 89 99 15 68 ? 0
F +49 89 99 15 68 ? 5033
Medineering GmbH
Olof-Palme-Str. 1, 81829 M?nchen, Germany
Sitz d. Gesellschaft: M?nchen - Handelsregister: M?nchen HRB 212991
VAT.: DE296021936
Managing Director: Dr.-Ing. Maximilian Krinninger, Dr.-Ing. Stephan Nowatschin
This email, including its attachments, is intended only for the confidential use of the individual to whom it is addressed. If you are not the intended recipient, any use, dissemination, distribution or copying of this message or its attachments is prohibited. If you have received this message in error, please notify us immediately, and delete this message and its attachments permanently from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200806/66267a25/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-package-python3-pycryptodomex-add-python3-pycryptodomex-package.patch
Type: text/x-patch
Size: 2950 bytes
Desc: 0001-package-python3-pycryptodomex-add-python3-pycryptodomex-package.patch
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200806/66267a25/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-boot-optee-os-optee-os-mk-optee-op-use-python3-dependencies.patch
Type: text/x-patch
Size: 907 bytes
Desc: 0002-boot-optee-os-optee-os-mk-optee-op-use-python3-dependencies.patch
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200806/66267a25/attachment-0001.bin>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Fix OpTee PyCryptodomex Python 2 vs 3 issue
2020-08-06 9:30 [Buildroot] Fix OpTee PyCryptodomex Python 2 vs 3 issue Jonatan Hatakeyama Zeidler
@ 2020-08-06 19:43 ` Thomas Petazzoni
2020-08-07 7:12 ` Jonatan Hatakeyama Zeidler
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2020-08-06 19:43 UTC (permalink / raw)
To: buildroot
Hello Jonatan,
On Thu, 6 Aug 2020 09:30:00 +0000
Jonatan Hatakeyama Zeidler <jonatan.zeidler@brainlab.com> wrote:
> These leads to
>
> Traceback (most recent call last):
> File "scripts/pem_to_pub_c.py", line 61, in <module>
> main()
> File "scripts/pem_to_pub_c.py", line 24, in main
> from Cryptodome.PublicKey import RSA
> ModuleNotFoundError: No module named 'Cryptodome'
>
> during build of optee-os. The script scripts/pem_to_pub_c.py is run with Python3, while optee-os has Python2 dependencies:
>
> OPTEE_OS_DEPENDENCIES = host-openssl host-python-pycryptodomex host-python-pyelftools.
>
> Thus, the Cryptodome module is not found.
>
> What fixed that for me is to add a python3-pycryptodomex package and change `optee-os` dependencies to Python3 ones. The patches are attached.
I haven't reviewed your patch, nor the patch series I will point, but I
believe the patch series at:
https://patchwork.ozlabs.org/project/buildroot/list/?series=191437
should address this issue.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Fix OpTee PyCryptodomex Python 2 vs 3 issue
2020-08-06 19:43 ` Thomas Petazzoni
@ 2020-08-07 7:12 ` Jonatan Hatakeyama Zeidler
0 siblings, 0 replies; 3+ messages in thread
From: Jonatan Hatakeyama Zeidler @ 2020-08-07 7:12 UTC (permalink / raw)
To: buildroot
Hello Thomas,
On 06.08.20 21:43, Thomas Petazzoni wrote:
>
> I haven't reviewed your patch, nor the patch series I will point, but I
> believe the patch series at:
>
> https://patchwork.ozlabs.org/project/buildroot/list/?series=191437
>
> should address this issue.
this addresses the same issue indeed. Is there anything I can do to help
get that merged?
Best regards
Jonatan
--
Jonatan Hatakeyama Zeidler
Software Engineer
Brainlab Robotics
T +49 89 99 15 68 ? 0
F +49 89 99 15 68 ? 5033
Medineering GmbH
Olof-Palme-Str. 1, 81829 M?nchen, Germany
Sitz d. Gesellschaft: M?nchen - Handelsregister: M?nchen HRB 212991
VAT.: DE296021936
Managing Director: Dr.-Ing. Maximilian Krinninger, Dr.-Ing. Stephan Nowatschin
This email, including its attachments, is intended only for the confidential use of the individual to whom it is addressed. If you are not the intended recipient, any use, dissemination, distribution or copying of this message or its attachments is prohibited. If you have received this message in error, please notify us immediately, and delete this message and its attachments permanently from your system.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-07 7:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-06 9:30 [Buildroot] Fix OpTee PyCryptodomex Python 2 vs 3 issue Jonatan Hatakeyama Zeidler
2020-08-06 19:43 ` Thomas Petazzoni
2020-08-07 7:12 ` Jonatan Hatakeyama Zeidler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox