optee_client git contains the source code for the TEE client library in Linux. This component provides the TEE Client API as defined by the GlobalPlatform TEE standard. It is distributed under the BSD 2-clause open source license.
In this git there are two main targets/binaries to build. There is libteec.so
, which is the library that contains that API for communication with the Trusted OS. Then there is tee-supplicant
which is a daemon serving the Trusted OS in secure world with miscellaneous features, such as file system access.
https://github.com/OP-TEE/optee_client
Joakim: Necessary to state that here? Changing the "License headers" page to instead become a "License" page and add addtional sections.
The software is provided under the BSD 2-Clause license.
You can build the code in this git only or build it as part of the entire system, i.e. as a part of a full OP-TEE developer setup. For the latter, please refer to instructions at the build
page. For standalone builds we currently support building with both CMake as well as with regular GNU Makefiles.
First step is to download and configure a toolchain, see the toolchains
page for instructions.
$ git clone https://github.com/OP-TEE/optee_client
$ cd optee_client
$ mkdir build
$ cd build
$ cmake -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc ..
$ make
Note
This example uses the 32-bit toolchain (arm-linux-gnueabihf-), the same works using the 64-bit toolchain (aarch64-linux-gnu-).
After this step the compiled binaries can be sound in sub-folders of build
. If you have a need or preference to install the binaries at some specific location, then on the cmake line above add -DCMAKE_INSTALL_PREFIX=<my-install-path>
as an additional argument. With that you can then run make install
and the binaries etc will be copied to the location that you gave as an argument. In this example /tmp/optee_client
.
$ cmake -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_INSTALL_PREFIX=/tmp/optee_client ..
$ make
$ make install
The Makefile
is configured to use arm-linux-gnueabihf-
by default.
$ make
Note
For a 64-bit builds (or any other toolchain) you will need to use CROSS_COMPILE
.
$ make CROSS_COMPILE=aarch64-linux-gnu-
After this step the compiled binaries can be found in the sub-folder out
.
To be able to see all commands when building you could build using following flags:
GNU Make
$ make V=1
CMake
$ make VERBOSE=1
See coding_standards
.