The optee_linuxdriver git, containing the source code for the TEE driver
module in Linux.
It is distributed under the GPLv2 open-source license. For a general
overview of OP-TEE, please see the Notice.md file.
In this git, the module to build is optee.ko.
It allows communication between the Rich OS Client Application (unsecure
world), the Trusted OS (secure world) and the tee-supplicant (unsecure
world) which is a daemon serving the Trusted OS in secure world with
miscellaneous features, such as file system access.
The software is provided under the
GPL-2.0 license.
This software has hardware dependencies.
The software has been tested using:
We will strive to use the latest available compiler from Linaro. Start by
downloading and unpacking the compiler. Then export the PATH to the bin folder.
$ cd $HOME
$ mkdir toolchains
$ cd toolchains
$ wget http://releases.linaro.org/14.05/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz
$ tar xvf gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz
$ export PATH=$HOME/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin:$PATH
$ cd $HOME
$ mkdir devel
$ cd devel
$ tar xf linux-3.10.32.tar.xz
$ mv linux-3.10.32 linux
$ cd $HOME
$ cd devel
$ git clone https://github.com/OP-TEE/optee_linuxdriver.git
$ cd $HOME/devel/linux
$ make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
$ make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- defconfig
$ make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all
$ make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- M=$HOME/devel/optee_linuxdriver modules
To be able to see the full command when building you could build using following
flag:
$ make V=1
In this project we are trying to adhere to the same coding convention as used in
the Linux kernel (see
CodingStyle). We achieve this by running
checkpatch from Linux kernel.
However there are a few exceptions that we had to make since the code also
follows GlobalPlatform standards. The exceptions are as follows:
Since checkpatch is licensed under the terms of GNU GPL License Version 2, we
cannot include this script directly into this project. Therefore we have
written the Makefile so you need to explicitly point to the script by exporting
an environment variable, namely CHECKPATCH. So, suppose that the source code for
the Linux kernel is at $HOME/devel/linux
, then you have to export like follows:
$ export CHECKPATCH=$HOME/devel/linux/scripts/checkpatch.pl
thereafter it should be possible to use one of the different checkpatch targets
in the Makefile. There are targets for checking all files, checking
against latest commit, against a certain base-commit etc. For the details, read
the Makefile.