OS: ubuntu 10.0.4 32bit
Processor: x86 Atom CPU N450
1. Add the following sources to /etc/apt/sources.list
deb http://tw.archive.Ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
deb-src http://tw.archive.Ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
or:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
2. Update sources list
apt-get update
3. Configure the build environment
apt-get install git-core gnupg flex bison gperf libsdl-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev gcc build-essential g++-multilib libreadline5-dev valgrind texinfo patch
apt-get install sun-java5-jdk (compile android 2.2 froyo-x86)
apt-get install sun-java6-jdk (compile android 2.3 gingerbread-x86)
4. Install repo
mkdir ~/bin
cd bin
curl http://Android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo
vi ~/.bashrc
add: export PATH=~/bin:$PATH
5. Download android code
mkdir ~/myandroid
cd ~/myandroid
repo init -u git://git.android-x86.org/manifest.git -b froyo-x86 (froyo-x86)
repo init -u git://git.android-x86.org/manifest.git -b gingerbread-x86 (gingerbread-x86)
repo sync
The site of "git://android.git.kernel.org/platform/manifest.git" is very very slow, you could replace it with "git://android-x86.git.sf.net/gitroot/android-x86/manifest.git"
6. Build
source build/envsetup.sh
lunch
make iso_img
you can find the iso file at "./out/target/product/generic_x86/".
----------------------------------------------------------------------------------------
For gingerbread-x86,if your build environment was 32bit, you should modify 5 files:
Android.mk:
./external/clearsilver/cgi/Android.mk
./external/clearsilver/java-jni/Android.mk
./external/clearsilver/util/Android.mk
./external/clearsilver/cs/Android.mk
change the following rows:
LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64
to:
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32
main.mk:
./build/core/main.mk
change the following row:
ifneq (64,$(findstring 64,$(build_arch)))
to:
ifneq (i686,$(findstring i686,$(build_arch)))