Project

General

Profile

DeprecatedReplicant60GalaxyS2I9100Build » History » Version 5

Wolfgang Wiedmeyer, 04/30/2017 05:46 PM
produced target binaries in subdirectory of dist

1 1 Wolfgang Wiedmeyer
h1. Galaxy S 2 (I9100) build
2
3
h2. Prerequisites
4
5
The following are required to build Replicant for the Galaxy S 2 (I9100):
6
* [[BuildDependenciesInstallation|Build dependencies installation]]
7 3 Wolfgang Wiedmeyer
* [[Replicant60ReplicantSourceCode|Replicant 6.0 source code]]
8 1 Wolfgang Wiedmeyer
9
h2. Build
10
11
*There is no need to build as root*, building as a regular user should be preferred.
12
13 4 Wolfgang Wiedmeyer
All of the following build commands need to be run in the source tree root folder.
14 1 Wolfgang Wiedmeyer
15 4 Wolfgang Wiedmeyer
First, the toolchain needs to be built:
16 1 Wolfgang Wiedmeyer
<pre>
17 4 Wolfgang Wiedmeyer
./vendor/replicant/build-toolchain
18
</pre>
19
20
*If you have executed any of the commands below and you want to run the toolchain build again, you will need to open a new shell.*
21
22
Then, prepare the shell environment for the Replicant build:
23
24
<pre>
25 1 Wolfgang Wiedmeyer
. build/envsetup.sh
26
lunch replicant_i9100-userdebug
27
</pre>
28
29 4 Wolfgang Wiedmeyer
Now you can start the build:
30 2 Wolfgang Wiedmeyer
31 1 Wolfgang Wiedmeyer
<pre>
32
parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
33
make -j$parallel_tasks bacon
34
</pre>
35 2 Wolfgang Wiedmeyer
36 1 Wolfgang Wiedmeyer
The @-jn@ argument indicates the number of parallel tasks during the build (you can remove it from the command line to have only one task at a time).
37
@$parallel_tasks@ holds an optimized number of parallel tasks for your hardware. You may want to reduce this number if e.g. the computer runs out of RAM during the build.
38
39 2 Wolfgang Wiedmeyer
Finally, sign the resulting images:
40
41
<pre>
42
./vendor/replicant/sign-build i9100
43
</pre>
44
45
The first time you run the script, it will ask you a few questions that are needed to generate the necessary signing keys.
46
47 1 Wolfgang Wiedmeyer
h2. Produced binaries
48
49
The produced binaries are located at:
50 5 Wolfgang Wiedmeyer
* @out/dist/i9100/@ for the target
51 1 Wolfgang Wiedmeyer
* @out/host/linux-x86/bin/@ for the host