PDA

View Full Version : Eclair on Ubuntu 9.10 (x64) - Build Instructions


OzJD
15th February 2010, 09:36 AM
I notice that there is quiet a few people around that are having issues building the source, due to the lack on Sun-Java5 (1.5 JDK) in the Ubuntu Repositories.

In a hope it will encourage more developers, I'll post the following, which will build a full eclair system, on a new Ubuntu 9.10 x64 system.

$ mkdir ~/mydroid
$ mkdir mydroid/java5-packages
$ cd ~mydroid/java5-packages
$ wget http://mirror.pacific.net.au/linux/ubuntu/pool/multiverse/s/sun-java5/sun-java5-jre_1.5.0-18-1_all.deb
$ wget http://mirror.pacific.net.au/linux/ubuntu/pool/multiverse/s/sun-java5/sun-java5-bin_1.5.0-18-1_amd64.deb
$ wget http://mirror.pacific.net.au/linux/ubuntu/pool/multiverse/s/sun-java5/sun-java5-demo_1.5.0-18-1_amd64.deb
$ wget http://mirror.pacific.net.au/linux/ubuntu/pool/multiverse/s/sun-java5/sun-java5-jdk_1.5.0-18-1_amd64.deb
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev java-common unixodbc
$ sudo dpkg -i --ignore-depends=sun-java5-bin sun-java5-jre_1.5.0-18-1_all.deb
$ sudo dpkg -i sun-java5-bin_1.5.0-18-1_amd64.deb
$ sudo dpkg -i --ignore-depends=sun-java5-jdk sun-java5-demo_1.5.0-18-1_amd64.deb
$ sudo dpkg -i sun-java5-jdk_1.5.0-18-1_amd64.deb
$ sudo update-java-alternatives -s java-1.5.0-sun
$ cd ..
$ wget http://android.git.kernel.org/repo
$ sudo mv repo /usr/bin/
$ chmod a+x /usr/bin/repo
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
$ rep sync
$ cd external/webkit/
$ git cherry-pick 18342a41ab72e2c21931afaaab6f1b9bdbedb9fa
$ cd ../../
$ wget --referer=http://developer.htc.com/google-io-device.html http://member.america.htc.com/download/RomCode/ADP/signed-google_ion-ota-14721.zip?
$ cd vendor/htc/sapphire-open/
$ ./unzip-files.sh
$ cd ../../../
$ . build/envsetup.sh
$ lunch aosp_sapphire_us-eng
$ make

That's it? Ok, So it was a lot... Hope this helps someone get the 1.5 JDK on their Ubuntu system (and build eclair)

dferreira
15th February 2010, 10:26 AM
Hey OzJD,

Thanks for the lines, actually I did prepare two bash script that does something similar for me, everytime I want to compile the stuff. One builds from the source, the other one just compiles whatever is in the local repo (good for creating personal custom roms). As soon as I get home, I'll post them here ;)

I would suggest using "make -j8" in the end, that compiles with 2GB of RAM in under 20minutes :D if you don't have 2GB of RAM in your computer, use "make -j4".

OzJD
15th February 2010, 11:09 AM
Wow, I didn't think it was that much of an increase, seems to take forever using just make.
I've got 4GB ram btw.

st0kes
15th February 2010, 11:58 AM
make -j4 makes my laptop REALLY hot, and causes a lot of swap to be used (I have a dual core 2.2Ghz CPU and 1Gb of ram). I always have to reboot after doing a build as everything gets very slow :)

Some guy called Steve Ryner posted this on my blog, which I found useful:

The -j2 argument for make specifies the number of threads. You'll get away with at most n+1 threads, where n is the number of CPU cores you have. And you'll want a gig of ram for each thread. So if you have a dual-core machine with at least 2GB of RAM -j2 will do fine. The -j4 assumes a quad-core 4GB machine in my opinion, which speaks to Google's development environment perhaps.

OzJD
15th February 2010, 12:04 PM
To be honest, I thought it was a throttle, Limiting to a maxinum of n threads.

I guess you learn something new every day.


Edit:
It seems to be limited by CPU, not RAM.
I'm using 1.7GB of 4GB RAM, and 2.1MB of 10.6 GB swap
Although both CPU cores are sitting near 100%

This is using -j4 on my laptop (2.1GHz AMD Athlon64 X2)

Edit2: My CPU is set to 50% frequency, So the cores were both running at 1.05GHz