2013年7月30日星期二

Android cupcake development environment

OS requirements
host: linux
x86 32bit OS, android does not support 64bit OS.
gcc version 4.2.3 (32 bit gcc)
our testing env : Mandriva 2008.1 x86-32, Linux 2.6.24.7

virtual machine: windows xp

Compiling Android
Set up compiling environment

Install EABI compatable cross compiler
cp arm-none-linux-gnueabi-4.3.2.tar.bz2 ~/tools/
cd ~/tools/
tar -jxvf arm-none-linux-gnueabi-4.3.2.tar.bz2

install JAVA sdk
cp jdk-1_5_0_17-linux-i586.bin ~/tools/
run the file to install

Note: since Android does not support Java 6 (jdk1.6), we have to install this package (jdk1.5) to compile cupcake.

install Android sdk
cp android-sdk-1.5.tar.bz2 ~/tools/
cd ~/tools
tar -jxvf android-sdk-1.5.tar.bz2

install Eclipse
cp eclipse-android.tar.bz2 ~/tools/
cd ~/tools
tar -jxvf eclipse-android.tar.bz2

Setup path, ie, in bash:

ARM_GCC_PATH=~/tools/arm-none-linux-gnueabi-4.3.2
ANDROID_SDK_PATH=~/tools/android-sdk-1.5
ECLIPSE_PATH=~/tools/eclipse
export JAVA_HOME=~/tools/jdk1.5.0_17
export ANDROID_JAVA_HOME=$JAVA_HOME
export PATH=$PATH:$ARM_GCC_PATH/bin:$JAVA_HOME/bin:$ANDROID_SDK_PATH/tools: $ECLIPSE_PATH

Copy the following souce code to the working place and extract them:
linux source : s3c-linux-2.6.28-Real6410.tar.bz2
u-boot source : s3c-u-boot-1.1.6-Real6410.tar.bz2
android source : cupcake-1.5.2.tar.bz2

Compile u-boot
cd s3c-u-boot-1.1.6-Real6410

edit Makefile, and make sure the compiler set as below
ifeq ($(ARCH),arm)
CROSS_COMPILE = arm-none-linux-gnueabi-
endif
one more line:
CROSS_COMPILE =arm-none-linux-gnueabi-
export CROSS_COMPILE

boot from nand flash : run ./make_nand_image → output is “u-boot.bin”
boot from SD card : run ./make_mmc_image → output is “u-boot_mmc.bin”

Compile Linux kernel
cd s3c-linux-2.6.28

edit Makefile, and make sure that the compiler set as below
ARCH ?= arm
CROSS_COMPILE ?= arm-none-linux-gnueabi-

make xconfig to configure the kernel (detailed configuration setup in another page)
make to compile

the compiled image locate in:
arch/arm/boot/zImage

change the name “zImage” to “zImage-android”.

Compile Android (make sure the machine has enough memory, min 1.5G RAM)
cd cupcake-1.5.2
make to compile

OS requirements
host: linux
x86 32bit OS, android does not support 64bit OS.
gcc version 4.2.3 (32 bit gcc)
our testing env : Mandriva 2008.1 x86-32, Linux 2.6.24.7

virtual machine: windows xp

Compiling Android
Set up compiling environment

Install EABI compatable cross compiler
cp arm-none-linux-gnueabi-4.3.2.tar.bz2 ~/tools/
cd ~/tools/
tar -jxvf arm-none-linux-gnueabi-4.3.2.tar.bz2

install JAVA sdk
cp jdk-1_5_0_17-linux-i586.bin ~/tools/
run the file to install

Note: since Android does not support Java 6 (jdk1.6), we have to install this package (jdk1.5) to compile cupcake.

install Android sdk
cp android-sdk-1.5.tar.bz2 ~/tools/
cd ~/tools
tar -jxvf android-sdk-1.5.tar.bz2

install Eclipse
cp eclipse-android.tar.bz2 ~/tools/
cd ~/tools
tar -jxvf eclipse-android.tar.bz2

Setup path, ie, in bash:

ARM_GCC_PATH=~/tools/arm-none-linux-gnueabi-4.3.2
ANDROID_SDK_PATH=~/tools/android-sdk-1.5
ECLIPSE_PATH=~/tools/eclipse
export JAVA_HOME=~/tools/jdk1.5.0_17
export ANDROID_JAVA_HOME=$JAVA_HOME
export PATH=$PATH:$ARM_GCC_PATH/bin:$JAVA_HOME/bin:$ANDROID_SDK_PATH/tools: $ECLIPSE_PATH

Copy the following souce code to the working place and extract them:
linux source : s3c-linux-2.6.28-Real6410.tar.bz2
u-boot source : s3c-u-boot-1.1.6-Real6410.tar.bz2
android source : cupcake-1.5.2.tar.bz2

Compile u-boot
cd s3c-u-boot-1.1.6-Real6410

edit Makefile, and make sure the compiler set as below
ifeq ($(ARCH),arm)
CROSS_COMPILE = arm-none-linux-gnueabi-
endif
one more line:
CROSS_COMPILE =arm-none-linux-gnueabi-
export CROSS_COMPILE

boot from nand flash : run ./make_nand_image → output is “u-boot.bin”
boot from SD card : run ./make_mmc_image → output is “u-boot_mmc.bin”

Compile Linux kernel
cd s3c-linux-2.6.28

edit Makefile, and make sure that the compiler set as below
ARCH ?= arm
CROSS_COMPILE ?= arm-none-linux-gnueabi-

make xconfig to configure the kernel (detailed configuration setup in another page)
make to compile

the compiled image locate in:
arch/arm/boot/zImage

change the name “zImage” to “zImage-android”.

Compile Android (make sure the machine has enough memory, min 1.5G RAM)
cd cupcake-1.5.2
make to compile