Project

General

Profile

GalaxyNote2N7100Build » History » Version 6

Wolfgang Wiedmeyer, 05/07/2017 07:47 PM
add note that commands need to be run in source tree root folder

1 1 Paul Kocialkowski
h1. Galaxy Note 2 (N7100) Build
2
3 5 Wolfgang Wiedmeyer
This page explains how to build Replicant for the Galaxy Note 2 (N7100).
4 1 Paul Kocialkowski
5
h2. Prerequisites
6
7
Before building, you must make sure that:
8 2 Paul Kocialkowski
* You have installed the build dependencies: [[BuildDependenciesInstallation]]
9 4 Wolfgang Wiedmeyer
* 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 1 Paul Kocialkowski
* 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
h2. Building
18
19 6 Wolfgang Wiedmeyer
All of the following build commands need to be run in the source tree root folder.
20
21 4 Wolfgang Wiedmeyer
First, the toolchain needs to be built:
22 1 Paul Kocialkowski
<pre>
23 4 Wolfgang Wiedmeyer
./vendor/replicant/build-toolchain
24
</pre>
25
26
*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.*
27
28
Then, prepare the shell environment for the Replicant build:
29
30
<pre>
31
. build/envsetup.sh
32 1 Paul Kocialkowski
lunch replicant_n7100-userdebug
33
</pre>
34
35
Start the build:
36
<pre>
37
parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
38
make -j$parallel_tasks bacon
39
</pre>
40
41
The -jn argument is to indicate the number of parallel tasks during the build. 
42
You can remove it from the command line to have only one task at a time. With fast hardware, best results will come with @-j9@, @-j16@ and @-j32@.
43
44 4 Wolfgang Wiedmeyer
Finally, sign the resulting images:
45
46
<pre>
47
./vendor/replicant/sign-build n7100
48
</pre>
49
50
The first time you run the script, it will ask you a few questions that are needed to generate the necessary signing keys. 
51
52 1 Paul Kocialkowski
h2. Output files
53
54
The produced files are located at:
55 4 Wolfgang Wiedmeyer
* built target images: @out/dist/n7100/@
56 1 Paul Kocialkowski
* built host tools: @out/host/linux-x86/bin/@