From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/5] boot/optee-os: OP-TEE secure world
Date: Fri, 23 Nov 2018 12:05:45 +0200 [thread overview]
Message-ID: <87r2fcds7a.fsf@tkos.co.il> (raw)
In-Reply-To: <CAN5uoS_NmE9yup0vd-39aqbF9BoCkPE-LZ+=NAmeWkef_n-wpA@mail.gmail.com>
Hi Etienne,
Etienne Carriere writes:
> On Thu, 22 Nov 2018 at 21:18, Baruch Siach <baruch@tkos.co.il> wrote:
>> Thanks for your contribution. I have a few comments below.
>>
>> Etienne Carriere writes:
>> > OP-TEE OS is maintained by the OP-TEE project. It provides an
>> > open source solution for development and integration of secure
>> > services for Armv7-A and Armv8-A CPU based platforms supporting
>> > the TrustZone technology. This technology enables CPUs to
>> > concurrently host a secure world as the OP-TEE OS and a non-secure
>> > world as a Linux based OS.
>> >
>> > The OP-TEE project maintains other packages to leverage OP-TEE on
>> > Linux kernel based OSes. An OP-TEE interface driver is available
>> > in the Linux kernel since 4.12 upon CONFIG_OPTEE.
>> >
>> > https://www.op-tee.org/
>> > https://github.com/OP-TEE/optee_os
>> >
>> > Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
>>
>> ...
>>
>> > diff --git a/boot/optee-os/Config.in b/boot/optee-os/Config.in
>> > new file mode 100644
>> > index 0000000..5968531
>> > --- /dev/null
>> > +++ b/boot/optee-os/Config.in
>> > @@ -0,0 +1,102 @@
>> > +config BR2_TARGET_OPTEE_OS
>> > + bool "optee_os"
>> > + depends on BR2_aarch64 || BR2_arm
>> > + select BR2_PACKAGE_OPENSSL # host tool
>>
>> Which host? Is that the host below which OPTEE OS runs? This is usually
>> called target in the Buildroot lingo. Please clarify in a comment.
>
> I see. Well, it is really the host here: OpenSSL is required to build
> the OPTEE OS binaries, it is not required in the target.
> I found such "# host tool" comment in some packages and though it was
> the shortest explicit way to highlight the deps.
Your 'select' enables the target OpenSSL, which is not what you
need. You only need to add host-openssl to the _DEPENDENCIES of your
package. No need to 'select' the host package.
Make sure to test on a host that has no openssl tools installed by the
distro. Your build test succeeds because your package is actually using
your distro installed tools. That didn't work for your other dependency
...
> By the way, I have a questions on
> optee-os also requires the Crypto module from python to build the
> optee-os target binaries.
> It failed with trace:
> File "scripts/pem_to_pub_c.py", line 23, in main
> from Crypto.PublicKey import RSA
> ImportError: No module named Crypto.PublicKey
>
> I tried to resolve this by adding "select BR2_PACKAGE_PYTHON_PYCRYPTO"
> here but it did not solve the issue.
> Moreover, I had to also enable some configs to get pycrypto to build:
> BR2_PACKAGE_PYTHON=y
> BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
> BR2_USE_WCHAR=y
> Finally, i worked around the issue by patching optee-os filetree: port
> related scripts to python3
>
> How do you think should have I done to get Crypto module supported for
> optee-os build?
Here again BR2_PACKAGE_PYTHON_PYCRYPTO enables the target package, while
you need the host package. The solutions is the same. Add
host-python-pycrypto to your _DEPENDENCIES.
>> Is that a build time dependency? If so you need to add openssl to
>> _DEPENDENCIES.
>
> Ok. I understand I need both: BR2_<dep>=y + add
> <package>_DEPENDENCIES+= <dep>.
For target package you need both. For host packages you don't need BR2_<dep>.
>> > + help
>> > + OP-TEE OS provides the secure world boot image and the trust
>> > + application development kit of the OP-TEE project. OP-TEE OS
>> > + also provides generic trusted application one can embedded
>> > + into its system.
>> > +
>> > + http://github.org/OP-TEE/optee_os
>> > +
>> > +if BR2_TARGET_OPTEE_OS
>> > +
>> > +choice
>> > + prompt "OP-TEE OS version"
>> > + default BR2_TARGET_OPTEE_OS_LATEST
>> > + help
>> > + Select the version of OP-TEE OS you want to use
>>
>> Is there a practical need to support selection separate version
>> selection for each OPTEE component? If not then I think this version
>> selection should apply to all other components.
>
> Your absolutely right. I will see how to handle that.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
next prev parent reply other threads:[~2018-11-23 10:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 15:22 [Buildroot] [PATCH 1/5] boot/optee-os: OP-TEE secure world Etienne Carriere
2018-11-22 15:22 ` [Buildroot] [PATCH 2/5] optee-client: new package Etienne Carriere
2018-11-23 11:48 ` Shyam Saini
2018-11-23 18:10 ` [Buildroot] [PATCH v2 " Etienne Carriere
2018-11-22 15:22 ` [Buildroot] [PATCH 3/5] optee-benchmark: " Etienne Carriere
2018-11-23 18:10 ` [Buildroot] [PATCH v2 " Etienne Carriere
2018-11-22 15:22 ` [Buildroot] [PATCH 4/5] optee-examples: " Etienne Carriere
2018-11-23 11:48 ` Shyam Saini
2018-11-23 18:11 ` [Buildroot] [PATCH v2 " Etienne Carriere
2018-11-22 15:22 ` [Buildroot] [PATCH 5/5] optee-test: " Etienne Carriere
2018-11-23 3:06 ` Carlos Santos
2018-11-23 10:10 ` Etienne Carriere
2018-11-23 11:49 ` Shyam Saini
2018-11-23 18:11 ` [Buildroot] [PATCH v2 " Etienne Carriere
2018-11-22 20:18 ` [Buildroot] [PATCH 1/5] boot/optee-os: OP-TEE secure world Baruch Siach
2018-11-23 8:21 ` Etienne Carriere
2018-11-23 10:05 ` Baruch Siach [this message]
2018-11-23 10:13 ` Etienne Carriere
2018-11-23 3:01 ` Carlos Santos
2018-11-23 7:33 ` Etienne Carriere
2018-11-23 8:35 ` Shyam Saini
2018-11-23 9:05 ` Etienne Carriere
2018-11-23 15:08 ` Etienne Carriere
2018-11-23 18:09 ` [Buildroot] [PATCH v2 1/5] boot/optee-os: new package Etienne Carriere
2019-01-07 10:24 ` [Buildroot] [PATCH v3 1/7] " Etienne Carriere
2019-01-07 10:24 ` [Buildroot] [PATCH v3 2/7] optee-client: " Etienne Carriere
2019-01-07 10:24 ` [Buildroot] [PATCH v3 3/7] optee-examples: " Etienne Carriere
2019-01-07 10:24 ` [Buildroot] [PATCH v3 4/7] optee-test: " Etienne Carriere
2019-01-07 10:24 ` [Buildroot] [PATCH v3 5/7] optee-benchmark: " Etienne Carriere
2019-01-07 10:24 ` [Buildroot] [PATCH v3 6/7] configs/qemu_armv7a_tz_virt: Armv7-A emulation with TrustZone services Etienne Carriere
2019-01-07 10:24 ` [Buildroot] [PATCH v3 7/7] configs/qemu_aarch64_tz_virt: AArch64 " Etienne Carriere
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r2fcds7a.fsf@tkos.co.il \
--to=baruch@tkos.co.il \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox