Project

General

Profile

GTA04Build » History » Version 5

Paul Kocialkowski, 08/01/2012 03:24 PM

1 1 Denis 'GNUtoo' Carikli
h1. GTA04 Build
2
3
This explains how to build Replicant for the GTA04.
4
5
h2. Prerequisites
6
7
Before building, you must make sure:
8
* You have installed the [[BuildDependencies]]
9
* You have downloaded Replicant 2.3 sources: [[GettingReplicantSources]]
10
* Your sources are up to date: [[GettingReplicantSources#DownloadingUpdating-the-source-from-the-repos|Downloading/Updating the source from the repos]]
11
* You are 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
Setup the build environment: 
20
<pre>
21
source build/envsetup.sh
22
lunch replicant_gta04-eng
23
export ANDROID_JAVA_HOME=$JAVA_HOME
24
</pre>
25
26
Start the build:
27 4 Paul Kocialkowski
28
h3. Building for µSD card storage
29
30
<pre>
31
parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
32
make -j$parallel_tasks bootimage BOARD_SDCARD_INIT:=true
33 5 Paul Kocialkowski
make -j$parallel_tasks systemtarball
34 4 Paul Kocialkowski
make -j$parallel_tasks userdataimage
35
</pre>
36
37
h3. Building for NAND storage
38
39 1 Denis 'GNUtoo' Carikli
<pre>
40
parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
41 3 Paul Kocialkowski
make -j$parallel_tasks bootimage
42
make -j$parallel_tasks systemimage
43
make -j$parallel_tasks userdataimage
44 1 Denis 'GNUtoo' Carikli
</pre>
45
46
The -jn argument is to indicate the number of parallel tasks during the build. 
47
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@.
48
49
h2. Output files
50
51
Find the produced files:
52
* built target images: @out/target/product/gta04/@
53
* built host tools: @out/host/linux-x86/bin/@