by CaoMinhVu » Fri Oct 24, 2008 3:53 am
Here all my work:
Enviroment : Ubuntu Linux
Needed package
o Gnu C 2.95.3 # gcc --version
o Gnu make 3.78 # make --version
o binutils 2.12 # ld -v
o util-linux 2.10o # fdformat --version
o module-init-tools 0.9.10 # depmod -V
o e2fsprogs 1.29 # tune2fs
o jfsutils 1.1.3 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
o xfsprogs 2.1.0 # xfs_db -V
o pcmcia-cs 3.1.21 # cardmgr -V
o quota-tools 3.09 # quota -V
o PPP 2.4.0 # pppd --version
o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version
o nfs-utils 1.0.5 # showmount --version
o procps 3.1.13 # ps --version
o oprofile 0.5.3 # oprofiled --version
+ Create working folder:
#mkdir Android
+ Copy these file to your working folder:
> arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
(Tool chain, used to support compile Android linux kernel)
> linux-2.6.25-android-1.0_r1.tar.gz
(Android linux kernel)
> android-sdk-linux_x86-1.0_r1.zip
(Android SDK)
+ Decompress them all:
#sudo tar -xzvf arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-
-gnu.tar.bz2
->Auto create folder : arm-2007q3
#sudo tar -xjvf linux-2.6.25-android-1.0_r1.tar.gz
->Auto create folder : kernel.git
+ Get device configuration (emulator configuration):
#export PATH=${PATH}:/{your working folder}/android-sdk/tools
#sudo nautilus -> Using photon window, go to working folder and change all
file in /android-sdk/tools to executable mode
#emulator (running emulator to get configuration)
#cd {your working folder}/kernel.git
#adb pull /proc/config.gz ./(get emulator configuration, if error occur, just
wait a second and try this command again)
#gunzip config.gz (Decompress configuration file)
#mv config .config (change file name to .config)
After the steps over, we have emulator configuration file at right location
to compile
+ Compile:
#sudo adt-get install libc6-dev (install missing packet for gcc)
#Copy all file and subfolder from {your working folder}/arm-2007q3/arm-none-linux-gnueabi
/libc/usr/include to /usr/include
#Change makefile in kernel.git :
+CROSS_COMPILE {your working folder}/arm-2007q3/bin/arm-none-linux-gnueabi-
#make
And new kernel image will be created in /kernel.git/arch/arm/boot