Build on Ubuntu 8.04

53 views
Skip to first unread message

Troy Bennett

unread,
Oct 24, 2008, 12:53:03 PM10/24/08
to android-platform
Reposted from http://forum.xda-developers.com/showthread.php?t=396782&page=127

$ sudo apt-get install python2.5
$ sudo apt-get install sun-java6-jdk sun-java6-bin sun-java6-jre
Add/Edit /etc/bash.bashrc
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.07
$ sudo apt-get install flex
$ sudo apt-get install bison
$ sudo apt-get install gperf
$ sudo apt-get install libsdl-dev
$ sudo apt-get install libesd0-dev
$ sudo apt-get install libwxgtk2.6-dev
$ sudo apt-get install build-essential
If you encounter error in installing build-essential
$ sudo apt-get install g++
$ sudo apt-get install zip
$ sudo apt-get install curl
$ sudo apt-get install valgrind
$ sudo apt-get install zlib1g-dev
Need to be verified: $ sudo apt-get install libncurses5-dev

Create bin directory in your home
$ cd ~
$ mkdir bin

Add ~/bin to your PATH
Add/Edit /etc/bash.bashrc
export PATH=$PATH:~/bin

$ sudo apt-get install git-core gnupg

Logout and do
$ echo $PATH
$ echo $JAVA_HOME

$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo

Create an empty directory to hold your working files:
$ mkdir mydroid
$ cd mydroid

$ repo init -u git://android.git.kernel.org/platform/manifest.git

When prompted, configure Repo with your real name and email address.
If you plan to submit code, use an email address that is associated
with a Google account.

A successful initialization will end with a message such as
$ repo initialized in /mydroid

Run
$ repo sync

Building the code
To build the files, run make from within your working directory:
$ cd ~/mydroid
$ make

If your build fails, complaining about a missing "run-java-tool", try
setting the ANDROID_JAVA_HOME env var to $JAVA_HOME before making.
E.g.,

$ export ANDROID_JAVA_HOME=$JAVA_HOME

Building zImage
Go into kernel directory
$ cd ~/mydroid/kernel
$ make msm_defconfig ARCH=arm
$ make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-
eabi-4.2.1/bin/arm-eabi-

Troy Bennett

unread,
Oct 27, 2008, 1:00:22 PM10/27/08
to android-platform
To insure you have the correct version of java selected do:
$ update-java-alternatives -l
$ sudo update-java-alternatives -s java-6-sun

Also edit /etc/jvm and move the selected java to the top of the list

BradChow

unread,
Oct 28, 2008, 10:58:55 AM10/28/08
to android-platform
Why you use Python 2.5 ? It should be Python 2.4 according to
http://source.android.com/download, shouldn't it ?
Are you build android successfully on Python 2.5 ?

Thanks.


On Oct 25, 12:53 am, Troy Bennett <troy.benn...@gmail.com> wrote:
> Reposted fromhttp://forum.xda-developers.com/showthread.php?t=396782&page=127
> $ curlhttp://android.git.kernel.org/repo>~/bin/repo

Mikael Bourges-Sevenier

unread,
Oct 28, 2008, 12:48:48 PM10/28/08
to android-...@googlegroups.com
Yes it works with Python 2.5.

BradChow

unread,
Oct 31, 2008, 12:02:28 AM10/31/08
to android-platform
I have also built successfully with Python 2.5. Thanks.

However, I can not find below steps on Android official website.
Does anyone can explain what the below steps for ?
========================================================
Building zImage
Go into kernel directory
$ cd ~/mydroid/kernel
$ make msm_defconfig ARCH=arm
$ make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-
eabi-4.2.1/bin/arm-eabi-
========================================================

Thanks.

On 10月29日, 上午12時48分, "Mikael Bourges-Sevenier" <mikese...@gmail.com>
wrote:

dan

unread,
Oct 31, 2008, 7:04:41 PM10/31/08
to android-platform
I have gone through these steps upto
When I execute this command I get the following error

Getting repo ...
from git://android.kernel.org/tools/repo.git
android.kernel.org[0: 204.152.191.45]: errno=Connection refused
android.kernel.org[0: 204.152.191.13]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)

Can anyone tell me why repo init fails?


On Oct 24, 10:53 am, Troy Bennett <troy.benn...@gmail.com> wrote:
> Reposted fromhttp://forum.xda-developers.com/showthread.php?t=396782&page=127
> $ curlhttp://android.git.kernel.org/repo>~/bin/repo

tagore

unread,
Nov 1, 2008, 2:07:22 AM11/1/08
to android-platform
I have a problem. The following is the building log:

tagore@tagore-desktop:~/mydroid$ make
build/core/product_config.mk:229: WARNING: adding test OTA key
host C: libneo_cgi <= external/clearsilver/cgi/cgi.c
external/clearsilver/cgi/cgi.c:22:18: error: zlib.h: No such file or
directory
external/clearsilver/cgi/cgi.c: In function ‘cgi_compress’:
external/clearsilver/cgi/cgi.c:885: error: ‘z_stream’ undeclared
(first use in this function)
external/clearsilver/cgi/cgi.c:885: error: (Each undeclared identifier
is reported only once
external/clearsilver/cgi/cgi.c:885: error: for each function it
appears in.)
external/clearsilver/cgi/cgi.c:885: error: expected ‘;’ before
‘stream’
external/clearsilver/cgi/cgi.c:888: error: ‘stream’ undeclared (first
use in this function)
external/clearsilver/cgi/cgi.c:888: error: ‘Bytef’ undeclared (first
use in this function)
external/clearsilver/cgi/cgi.c:888: error: expected expression before
‘)’ token
external/clearsilver/cgi/cgi.c:889: error: ‘uInt’ undeclared (first
use in this function)
external/clearsilver/cgi/cgi.c:889: error: expected ‘;’ before ‘str’
external/clearsilver/cgi/cgi.c:890: error: expected expression before
‘)’ token
external/clearsilver/cgi/cgi.c:892: error: ‘uLong’ undeclared (first
use in this function)
external/clearsilver/cgi/cgi.c:892: error: expected ‘)’ before
‘stream’
external/clearsilver/cgi/cgi.c:895: error: ‘alloc_func’ undeclared
(first use in this function)
external/clearsilver/cgi/cgi.c:895: error: expected ‘;’ before numeric
constant
external/clearsilver/cgi/cgi.c:896: error: ‘free_func’ undeclared
(first use in this function)
external/clearsilver/cgi/cgi.c:896: error: expected ‘;’ before numeric
constant
external/clearsilver/cgi/cgi.c:897: error: ‘voidpf’ undeclared (first
use in this function)
external/clearsilver/cgi/cgi.c:897: error: expected ‘;’ before numeric
constant
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_COMPRESSION’
undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFLATED’ undeclared
(first use in this function)
external/clearsilver/cgi/cgi.c:900: error: ‘MAX_WBITS’ undeclared
(first use in this function)
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_STRATEGY’
undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:901: error: ‘Z_OK’ undeclared (first
use in this function)
external/clearsilver/cgi/cgi.c:904: error: ‘Z_FINISH’ undeclared
(first use in this function)
external/clearsilver/cgi/cgi.c:905: error: ‘Z_STREAM_END’ undeclared
(first use in this function)
external/clearsilver/cgi/cgi.c: In function ‘cgi_output’:
external/clearsilver/cgi/cgi.c:1200: error: ‘Z_NULL’ undeclared (first
use in this function)
external/clearsilver/cgi/cgi.c:1201: error: expected ‘)’ before
‘Bytef’
external/clearsilver/cgi/cgi.c:1218: error: ‘Z_DEFLATED’ undeclared
(first use in this function)
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/
libneo_cgi_intermediates/cgi.o] Error 1



Please tell me what the matter is. How to resolve it?
Thanks!

Tagore

On Oct 25, 12:53 am, Troy Bennett <troy.benn...@gmail.com> wrote:
> Reposted fromhttp://forum.xda-developers.com/showthread.php?t=396782&page=127
> $ curlhttp://android.git.kernel.org/repo>~/bin/repo

Ben Leslie

unread,
Nov 1, 2008, 5:41:40 PM11/1/08
to android-...@googlegroups.com
You need to install zlib development libraries because it can't find zlib.h

Benno

Evan JIANG

unread,
Nov 2, 2008, 11:42:43 PM11/2/08
to android-...@googlegroups.com
I suggest that do not use sun-java6-*, but use sun-java5-jdk, or you
may meet error when do "make sdk"
Here is what I did on a clean ubuntu linux 8.10

$ sudo apt-get install git-core gnupg
$ sudo apt-get install flex bison gperf libsdl-dev libesd0-dev
libwxgtk2.6-dev build-essential zip curl

$ sudo apt-get install valgrind
$ sudo apt-get install python2.5
$ sudo apt-get install sun-java5-jdk


Copy from: http://www.evan129.com/2008/11/02/android-platform-study-tips-eng/

Best regards,
Evan JIANG

tagore

unread,
Nov 4, 2008, 1:25:10 AM11/4/08
to android-platform
There is a file in the open source package:
~/mydroid/external/zlib/zlib.h
It seems that this file is not referred by the cgi.c

how to solve this problem?

Thanks!

Tagore

On Nov 2, 8:42 pm, "Evan JIANG" <first...@gmail.com> wrote:
> I suggest that do not use sun-java6-*, but use sun-java5-jdk, or you
> may meet error when do "make sdk"
> Here is what I did on a clean ubuntu linux 8.10
> $ sudo apt-get install git-core gnupg
> $ sudo apt-get install flex bison gperf libsdl-dev libesd0-dev
> libwxgtk2.6-dev build-essential zip curl
> $ sudo apt-get install valgrind
> $ sudo apt-get install python2.5
> $ sudo apt-get install sun-java5-jdk
>
> Copy from:http://www.evan129.com/2008/11/02/android-platform-study-tips-eng/
>
> Best regards,
> Evan JIANG
>
> On Sat, Oct 25, 2008 at 12:53 AM, Troy Bennett <troy.benn...@gmail.com> wrote:
>
> > Reposted fromhttp://forum.xda-developers.com/showthread.php?t=396782&page=127
> > $ curlhttp://android.git.kernel.org/repo>~/bin/repo

Evan JIANG

unread,
Nov 4, 2008, 1:27:21 AM11/4/08
to android-...@googlegroups.com
You need to install zlib
sudo apt-get install zlib1g-dev

Best regards,
Evan

shenna...@gmail.com

unread,
Nov 5, 2008, 4:05:43 AM11/5/08
to android-platform
check your gateway

tagore

unread,
Nov 5, 2008, 7:37:28 AM11/5/08
to android-platform
Yes, the zlib1g-dev is needed.
Thanks.

Tagore

On Nov 5, 5:05 pm, "shennan.z...@gmail.com" <shennan.z...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages