Project

General

Profile

GalaxyS2I9100Build » History » Version 6

Wolfgang Wiedmeyer, 05/07/2017 07:27 PM
updates for Replicant 6.0

1 5 Paul Kocialkowski
h1. Galaxy S 2 (I9100) build
2 1 Paul Kocialkowski
3
h2. Prerequisites
4 2 Paul Kocialkowski
5 5 Paul Kocialkowski
The following are required to build Replicant for the Galaxy S 2 (I9100):
6
* [[BuildDependenciesInstallation|Build dependencies installation]]
7 6 Wolfgang Wiedmeyer
* [[ReplicantSourceCode|Replicant 6.0 source code]]
8 1 Paul Kocialkowski
9 5 Paul Kocialkowski
h2. Build
10 1 Paul Kocialkowski
11 5 Paul Kocialkowski
*There is no need to build as root*, building as a regular user should be preferred.
12 1 Paul Kocialkowski
13 6 Wolfgang Wiedmeyer
All of the following build commands need to be run in the source tree root folder.
14
15
First, the toolchain needs to be built:
16 1 Paul Kocialkowski
<pre>
17 6 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
. build/envsetup.sh
26 1 Paul Kocialkowski
lunch replicant_i9100-userdebug
27
</pre>
28
29 6 Wolfgang Wiedmeyer
Now you can start the build:
30
31 1 Paul Kocialkowski
<pre>
32 2 Paul Kocialkowski
parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
33 1 Paul Kocialkowski
make -j$parallel_tasks bacon
34
</pre>
35 6 Wolfgang Wiedmeyer
36 1 Paul Kocialkowski
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 6 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 5 Paul Kocialkowski
h2. Produced binaries
48 1 Paul Kocialkowski
49 5 Paul Kocialkowski
The produced binaries are located at:
50 6 Wolfgang Wiedmeyer
* @out/dist/i9100/@ for the target
51 5 Paul Kocialkowski
* @out/host/linux-x86/bin/@ for the host