Project

General

Profile

DeprecatedNative64BitBuild » History » Version 4

Paul Kocialkowski, 04/18/2011 10:43 AM

1 2 Paul Kocialkowski
= Replicant Native 64 Bit Build =
2
3 1 Paul Kocialkowski
This page explains how to configure a 64b native build. The goal is to build Replicant without the need of 32b compatibility libs and to produce 64b host binaries (adb, fastboot, emulator, etc).
4
5
'''Note: This is a quite experimental and long process. Although you don't risk any damage to your computer while trying to set this up, you should better already have basic knowledge about building gcc, dealing with Makefiles and other related stuff, since some errors may append.''' 
6 2 Paul Kocialkowski
7 3 Paul Kocialkowski
Note for the whole page: when a line is prefixed with #, that means that you have to run the command as root. Don't copy the # on the shell. 
8
9 2 Paul Kocialkowski
== Required tools ==
10
11
(Basic building tools)
12
13
== Building the toolchain ==
14 1 Paul Kocialkowski
15 4 Paul Kocialkowski
=== Downloading the files ===
16
17 3 Paul Kocialkowski
First, you'll need to download binutils, gcc-core, gcc-g++, gmp and mpfr:
18 2 Paul Kocialkowski
19
{{{
20
mkdir replicant-toolchain
21
cd replicant-toolchain
22
wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2
23
wget http://ftp.gnu.org/gnu/gcc/gcc-4.4.3/gcc-core-4.4.3.tar.bz2
24
wget http://ftp.gnu.org/gnu/gcc/gcc-4.4.3/gcc-g++-4.4.3.tar.bz2
25
wget http://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2
26
wget http://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.bz2
27
tar -xf binutils-2.21.tar.bz2
28
tar -xf gcc-core-4.4.3.tar.bz2
29
tar -xf gcc-g++-4.4.3.tar.bz2
30
tar -xf gmp-4.3.2.tar.bz2
31 1 Paul Kocialkowski
tar -xf mpfr-3.0.1.tar.bz2
32 3 Paul Kocialkowski
mv gmp-4.3.2 gcc-4.4.3/
33
mv mpfr-3.0.1 gcc-4.4.3/
34
}}}
35 1 Paul Kocialkowski
36 4 Paul Kocialkowski
Now, you have to build binutils and gcc for the arm-eabi target.
37
38
=== Building binutils ===
39
40 3 Paul Kocialkowski
{{{
41
cd binutils-2.21
42
./configure --target=arm-eabi --prefix=/usr/local
43
make
44 1 Paul Kocialkowski
# make install
45 4 Paul Kocialkowski
}}}
46
47
=== Building gcc ===
48
49
{{{
50 3 Paul Kocialkowski
cd ../gcc-4.4.3
51
mkdir build
52
cd build
53
../configure --target=arm-eabi --prefix=/usr/local --with-mpfr=../mpfr-3.0.1/ --with-gmp=../gmp-4.3.2/ --enable-shared
54
make
55
# make install
56 2 Paul Kocialkowski
}}}