| commit | 7f16107c2aae2163d6e6e23cca304d2520c02a55 | [log] [tgz] |
|---|---|---|
| author | Andy Green <andy@warmcat.com> | Tue Jan 31 09:35:52 2017 +0800 |
| committer | Andy Green <andy@warmcat.com> | Tue Jan 31 09:35:52 2017 +0800 |
| tree | de7a495069464301118f25c604677757939860a1 | |
| parent | 3b4c507ce588ecc210ebd06939dcfceb450238b1 [diff] |
ree fs rpc: open with best-effort allowing RO data fs The REE handler for open always uses flags O_RDWR at the moment. This breaks the possibility to use read-only operations on a read-only mounted filesystem at /data. Change it to try to open with O_RDWR, if not possible fall back to O_RDONLY and only fail if that isn't workable either. If O_RDONLY isn't enough, then the TA should use another means to get the fs mounted rw for the duration of his write activity. He will get failures on the write action if not, but that is fair enough. Signed-off-by: Andy Green <andy@warmcat.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
The optee-client git, containing 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. For a general overview of OP-TEE, please see the Notice.md file.
In this git there are two main target/binaries to build. There is libteec.so, which is the library that contains that API for communication with the Trusted OS. Then the other target is the binary tee-supplicant 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 BSD 2-Clause license.
This software in this git doesn't directly have any dependencies to any particular hardware, since it's pure software library directly communicating with the Linux kernel. Currently the software has been tested using:
We will strive to use the latest available compiler from Linaro. This file refers to a list of toolchains we have used and know are working in our setups. Start by downloading and unpacking a compiler from it. Then export the PATH to the bin folder.
$ cd $HOME $ mkdir toolchains $ cd toolchains $ wget [url/to/gcc_tarball] $ tar xvf [gcc_tarball] $ export PATH=$HOME/toolchains/[gcc_extracted_dir]/bin:$PATH
$ cd $HOME $ mkdir devel $ cd devel $ git clone https://github.com/OP-TEE/optee_client.git
$ cd $HOME/devel/optee_client $ make
For a 64-bit build:
$ make CROSS_COMPILE=aarch64-linux-gnu-
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.