ARM64: dts: rk3368-tb-sheep: add grf offset property for dwc-control-usb
[firefly-linux-kernel-4.4.55.git] / security / optee_linuxdriver / README.md
1 # OP-TEE Linux Driver
2 The optee_linuxdriver git, containing the source code for the TEE driver 
3 module in Linux.
4 It is distributed under the GPLv2 open-source license. For a general
5 overview of OP-TEE, please see the [Notice.md](Notice.md) file.
6
7 In this git, the module to build is optee.ko.
8 It allows communication between the Rich OS Client Application (unsecure
9 world), the Trusted OS (secure world) and the tee-supplicant (unsecure
10 world) which is a daemon serving the Trusted OS in secure world with
11 miscellaneous features, such as file system access.
12
13 ## License
14 The software is provided under the
15 [GPL-2.0](http://opensource.org/licenses/GPL-2.0) license.
16
17 ## Platforms supported
18 This software has hardware dependencies.
19 The software has been tested using:
20
21 - STMicroelectronics b2020-h416 (orly-2) hardware (32-bits)
22 - Some initial testing has been done using
23 [Foundation FVP](http://www.arm.com/fvp), which can be downloaded free of
24 charge.
25
26 ## Get and build the software
27 ### Get the compiler
28 We will strive to use the latest available compiler from Linaro. Start by
29 downloading and unpacking the compiler. Then export the PATH to the bin folder.
30
31         $ cd $HOME
32         $ mkdir toolchains
33         $ cd toolchains
34         $ wget http://releases.linaro.org/14.05/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz
35         $ tar xvf gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz
36         $ export PATH=$HOME/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin:$PATH
37
38 ### Get the Linux kernel (from www.kernel.org)
39         $ cd $HOME
40         $ mkdir devel
41         $ cd devel
42         $ tar xf linux-3.10.32.tar.xz
43         $ mv linux-3.10.32 linux
44
45 ### Download the source code
46         $ cd $HOME
47         $ cd devel
48         $ git clone https://github.com/OP-TEE/optee_linuxdriver.git
49
50 ### Build
51         $ cd $HOME/devel/linux
52         $ make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
53         $ make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- defconfig
54         $ make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all
55         $ make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- M=$HOME/devel/optee_linuxdriver modules
56
57 #### Compiler flags
58 To be able to see the full command when building you could build using following
59 flag:
60
61 `$ make V=1`
62
63 ## Coding standards
64 In this project we are trying to adhere to the same coding convention as used in
65 the Linux kernel (see
66 [CodingStyle](https://www.kernel.org/doc/Documentation/CodingStyle)). We achieve this by running
67 [checkpatch](http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/checkpatch.pl) from Linux kernel.
68 However there are a few exceptions that we had to make since the code also
69 follows GlobalPlatform standards. The exceptions are as follows:
70
71 - CamelCase for GlobalPlatform types are allowed.
72 - And we also exclude checking third party code that we might use in this
73   project, such as LibTomCrypt, MPA, newlib (not in this particular git, but
74   those are also part of the complete TEE solution). The reason for excluding
75   and not fixing third party code is because we would probably deviate too much
76   from upstream and therefore it would be hard to rebase against those projects
77   later on (and we don't expect that it is easy to convince other software
78   projects to change coding style).
79
80 ### checkpatch
81 Since checkpatch is licensed under the terms of GNU GPL License Version 2, we
82 cannot include this script directly into this project. Therefore we have
83 written the Makefile so you need to explicitly point to the script by exporting
84 an environment variable, namely CHECKPATCH. So, suppose that the source code for
85 the Linux kernel is at `$HOME/devel/linux`, then you have to export like follows:
86
87         $ export CHECKPATCH=$HOME/devel/linux/scripts/checkpatch.pl
88 thereafter it should be possible to use one of the different checkpatch targets
89 in the [Makefile](Makefile). There are targets for checking all files, checking
90 against latest commit, against a certain base-commit etc. For the details, read
91 the [Makefile](Makefile).