Project

General

Profile

HTCDreamBuild » History » Version 26

Paul Kocialkowski, 02/05/2012 02:52 PM

1 26 Paul Kocialkowski
h1. HTC Dream Build
2 1 Denis 'GNUtoo' Carikli
3 26 Paul Kocialkowski
This explains how to build Replicant for the HTC Dream. 
4 1 Denis 'GNUtoo' Carikli
5 26 Paul Kocialkowski
h2. Prerequisites
6 1 Denis 'GNUtoo' Carikli
7 26 Paul Kocialkowski
Before building, you must make sure:
8
* You have installed the [[BuildDependencies]]
9
* You have downloaded Replicant 2.2 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 25 Paul Kocialkowski
h2. Warning
14 1 Denis 'GNUtoo' Carikli
15
*Do not build as root, always build as user.*
16
17 26 Paul Kocialkowski
h2. Building
18 1 Denis 'GNUtoo' Carikli
19 26 Paul Kocialkowski
Setup the build environment: 
20 1 Denis 'GNUtoo' Carikli
<pre>
21 26 Paul Kocialkowski
source build/envsetup.sh
22
lunch replicant_dream_sapphire-eng
23
export ANDROID_JAVA_HOME=$JAVA_HOME
24 1 Denis 'GNUtoo' Carikli
</pre>
25 26 Paul Kocialkowski
26
Start the build:
27 25 Paul Kocialkowski
<pre>
28 26 Paul Kocialkowski
parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
29
make -j$parallel_tasks distimages
30 1 Denis 'GNUtoo' Carikli
</pre>
31
32 26 Paul Kocialkowski
The -jn argument is to indicate the number of parallel tasks during the build. 
33
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@.
34 25 Paul Kocialkowski
35 26 Paul Kocialkowski
36
37 25 Paul Kocialkowski
h2. Each time you want to build replicant 2.2
38 1 Denis 'GNUtoo' Carikli
39
<pre>
40
cd ~/replicant-2.2
41 20 Denis 'GNUtoo' Carikli
 ../bin/repo sync
42 21 Paul Kocialkowski
source build/envsetup.sh
43 26 Paul Kocialkowski
44 25 Paul Kocialkowski
lunch replicant_dream_sapphire-eng 
45 26 Paul Kocialkowski
46 25 Paul Kocialkowski
</pre>
47 16 John Sullivan
<pre>
48 17 John Sullivan
<pre>
49
50 18 John Sullivan
You will find your built images in ./out/target/product/dream_sapphire/.
51
52 25 Paul Kocialkowski
You will also find fastboot, needed to install the images, in ./out/host/linux-x86/bin/.
53 1 Denis 'GNUtoo' Carikli
54
Now you are ready to "install!":http://trac.osuosl.org/trac/replicant/wiki/Installation