aboutsummaryrefslogtreecommitdiff
path: root/en/security/trusty/download-and-build.html
blob: bd1c2697d35c483c274db95dcbda5e0c93e7cb02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<html devsite>
  <head>
    <title>Download and Build</title>
    <meta name="project_path" value="/_project.yaml" />
    <meta name="book_path" value="/_book.yaml" />
  </head>
  <body>
  <!--
      Copyright 2017 The Android Open Source Project

      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  -->
<p>The <a href="https://android-review.googlesource.com/admin/repos/q/filter:trusty"
          class="external">Trusty repositories</a>  are available in the Android Open
Source Project (AOSP).</p>

<p>Use these links to find the appropriate Trusty kernel branches in AOSP:</p>

<ul>
  <li><a class="external"
  href="https://android.googlesource.com/kernel/common/+/android-trusty-4.4">4.4</a></li>
  <li><a class="external"
  href="https://android.googlesource.com/kernel/common/+/android-trusty-4.9">4.9</a></li>
  <li><a class="external"
  href="https://android.googlesource.com/kernel/common/+/android-trusty-4.14">4.14</a></li>
</ul>

    <h2 id="installing_repo">Installing Repo</h2>
<p>To download Trusty, first <a
href="/setup/build/downloading#installing-repo">download and install Repo</a>.</p>

<p>After Repo has been successfully installed you can clone the Android Trusty repository.</p>
<pre class="prettyprint">
<code class="devsite-terminal">mkdir trusty</code>
<code class="devsite-terminal">cd trusty</code>
<code class="devsite-terminal">repo init -u https://android.googlesource.com/trusty/manifest -b master</code>
<code class="devsite-terminal">repo sync -j32</code>
</pre>

<h3 id="build">Build</h3>
<p>Use the following to build the generic arm64 image for Trusty.

<pre class="devsite-terminal devsite-click-to-copy">
./trusty/vendor/google/aosp/scripts/build.py generic-arm64
</pre>

<p>Build results will be under <code>build-root/build-generic-arm64/.</code>
  Look for lk.bin which is a TEE image with all apps compiled in:
</p>

<pre class="devsite-terminal devsite-click-to-copy">
ls build-root/build-generic-arm64/lk.bin
</pre>

<h3 id="install">Install</h3>
     <p>You can assemble lk.bin into a firmware image and flash it to the device.
Generating firmware images varies depending on the board being used.
       Contact your board manufacturer for instructions.</p>
  </body>
</html>