Project

General

Profile

GenericReplicant60Build » History » Version 10

Denis 'GNUtoo' Carikli, 09/09/2020 02:00 PM
wrap ls -l with @

1 2 Denis 'GNUtoo' Carikli
h1. Build Replicant 6.0
2 1 Denis 'GNUtoo' Carikli
3 2 Denis 'GNUtoo' Carikli
This page explains how to build Replicant 6.0 for supported devices.
4 1 Denis 'GNUtoo' Carikli
5
h2. Prerequisites
6
7
Before building, you must make sure that:
8 6 Denis 'GNUtoo' Carikli
* You have installed the build dependencies: [[Replicant60BuildDependenciesInstallation|Replicant 6.0 build dependencies installation]]
9 1 Denis 'GNUtoo' Carikli
* You have downloaded Replicant 6.0 sources: [[ReplicantSourceCode]]
10
* Your sources are up to date: [[ReplicantSourceCode#DownloadingUpdating-the-source-code|Downloading/Updating the source from the repos]]
11
* Your terminal is running in the directory where the sources were downloaded
12
 
13
h2. Warning
14
15
*Do not build as root, always build as user.*
16
17
See the [[BuildTips|build tips]] if you are facing issues.
18
19 4 Denis 'GNUtoo' Carikli
h2. Before building
20
21
* On Debian stretch, building the toolchain will fail. See [[Replicant60BuildTips#usrbinsed-usrbinmkdir-usrbinmkdir-No-such-file-or-directory]] for how to workaround that and make the build succeed.
22
23 1 Denis 'GNUtoo' Carikli
h2. Building
24
25
All of the following build commands need to be run in the source tree root folder.
26
27 5 Denis 'GNUtoo' Carikli
h3. Building the toolchain
28
29
First, the toolchain needs to be built for replicant 6. To do that *open a new shell* and run the following command:
30 1 Denis 'GNUtoo' Carikli
<pre>
31
./vendor/replicant/build-toolchain
32
</pre>
33
34 5 Denis 'GNUtoo' Carikli
h2. Building a Replicant image for a device
35 1 Denis 'GNUtoo' Carikli
36 7 Denis 'GNUtoo' Carikli
Once the toolchain has been built, you can then start building an image for a specific device.
37 1 Denis 'GNUtoo' Carikli
38 7 Denis 'GNUtoo' Carikli
Use the command corresponding to your device in this table to do that:
39 2 Denis 'GNUtoo' Carikli
40 7 Denis 'GNUtoo' Carikli
|_. Device(s) |_. Command |
41
| Galaxy S 2 (I9100) | ./vendor/replicant/build.sh i9100 |
42
| Galaxy S 3 (I9300) | ./vendor/replicant/build.sh i9300 |
43
| Galaxy S 3 4G (I9305) | ./vendor/replicant/build.sh i9305 |
44
| Galaxy Note (N7000) | ./vendor/replicant/build.sh n7000 |
45
| Galaxy Note 2 (N7100) | ./vendor/replicant/build.sh n7100 |
46
| Galaxy Nexus (I9250) | ./vendor/replicant/build.sh maguro |
47
| Galaxy Tab 2 7.0 (P3100) |/2. ./vendor/replicant/build.sh espresso3g |
48 2 Denis 'GNUtoo' Carikli
| Galaxy Tab 2 10.1 (P5100) |
49 7 Denis 'GNUtoo' Carikli
| Galaxy Tab 2 7.0 Wi-Fi (P3110) |/2. ./vendor/replicant/build.sh espressowifi |
50 2 Denis 'GNUtoo' Carikli
| Galaxy Tab 2 10.1 Wi-Fi (P5110) |
51 7 Denis 'GNUtoo' Carikli
| Galaxy Note 8.0 (N5100) | ./vendor/replicant/build.sh n5100 |
52
| Galaxy Note 8.0 Wi-Fi (N5110) | ./vendor/replicant/build.sh n5110 |
53 2 Denis 'GNUtoo' Carikli
54
For instance to build for the Galaxy S3 (I9300) you need to type the following command:
55 1 Denis 'GNUtoo' Carikli
<pre>
56 7 Denis 'GNUtoo' Carikli
./vendor/replicant/build.sh i9300
57 1 Denis 'GNUtoo' Carikli
</pre>
58
59 7 Denis 'GNUtoo' Carikli
The first time you build an image it might ask you a few questions at various points during the build process as it needs then to build the images and generate the necessary signing keys near the end of the building process.
60 1 Denis 'GNUtoo' Carikli
61
h2. Output files
62
63 3 Denis 'GNUtoo' Carikli
For the built host tools, the produced files are at: @out/host/linux-x86/bin/@
64
65
For the built target images, you can use the following table to find the directory that has the produced files:
66
67 8 Denis 'GNUtoo' Carikli
|_. Device(s) |_. Output directory |
68
| Galaxy S 2 (I9100) | out/dist/i9100/ |
69
| Galaxy S 3 (I9300) | out/dist/i9300/ |
70
| Galaxy S 3 4G (I9305) | out/dist/i9305/ |
71
| Galaxy Note (N7000)  | out/dist/n7000/ |
72
| Galaxy Note 2 (N7100) | out/dist/n7100/ |
73
| Galaxy Nexus (I9250) | out/dist/maguro/ |
74
| Galaxy Tab 2 7.0 (P3100)  |/2. out/dist/espresso3g/ |
75 3 Denis 'GNUtoo' Carikli
| Galaxy Tab 2 10.1 (P5100) |
76 8 Denis 'GNUtoo' Carikli
| Galaxy Tab 2 7.0 Wi-Fi (P3110) |/2. out/dist/espressowifi/ |
77 3 Denis 'GNUtoo' Carikli
| Galaxy Tab 2 10.1 Wi-Fi (P5110) |
78 8 Denis 'GNUtoo' Carikli
| Galaxy Note 8.0 (N5100) | out/dist/n5100/ |
79
| Galaxy Note 8.0 Wi-Fi (N5110) | out/dist/n5110/ |
80
81 1 Denis 'GNUtoo' Carikli
For instance, for the Galaxy S 3 (I9300), the built target images are in @out/dist/i9300/@
82 9 Denis 'GNUtoo' Carikli
83
The file names can change from version to version.
84
85
For @Replicant 6.0 0004 RC2@ the zip file name is @replicant-6.0-0004-rc2-i9300.zip@, whereas for @replicant-6.0-dev@ branch or other previous releases the resulting zip file name will be @replicant-6.0-i9300.zip@.
86
87 10 Denis 'GNUtoo' Carikli
A way to be sure of what file was just built is to use @ls -l@ to show the time which represents the last time of modification:
88 9 Denis 'GNUtoo' Carikli
89
For instance:
90
<pre>
91
[...]out/dist/i9300$ ls -latr
92
total 1113288
93
[...]   6660096 Jan  1  2009 recovery-i9300.img
94
[...]      4096 Jul 22 00:50 ..
95
[...] 278175479 Aug 21 04:13 replicant-6.0-0004-rc2-i9300.zip
96
[...] 565995550 Sep  8 20:01 signed-target_files-i9300.zip
97
[...] 278261021 Sep  8 20:02 replicant-6.0-i9300.zip
98
[...]  10889357 Sep  8 20:02 signed-img-i9300.zip
99
[...]      4096 Sep  8 20:02 .
100
</pre>
101
102
At the time of writing, it's the 9th September 2020, and I built images yesterday, so the resulting file is @replicant-6.0-i9300.zip@ and not @replicant-6.0-0004-rc2-i9300.zip@.