Archive for 2009 年 11 月

how to config android kernel

十一月 30, 2009

1. Make sure you have uboot-mkimage installed

$ sudo apt-get install uboot-mkimage

2. Set Cross Compile toolchain to path

export PATH=${PATH}:/"path to android source"/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin

3. Configure kernel

make menuconfig ARCH=arm

4. Compile kernel

make uImage ARCH=arm CROSS_COMPILE=arm-eabi-

CONFIG_INITRAMFS_SOURCE =""

CONFIG_CMDLINE =

CONFIG_BLK_DEV_INITRD=y

———————–

How to load ramdisk.img

1.Compile in to kernel

Uncompress ramdisk.img to kernel root dir

CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="root"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0

2.Write to nand flash partition (bootimage type)

http://omappedia.org/wiki/Android_Getting_Started

http://elinux.org/BeagleBoard

http://code.google.com/p/android-development-environment/wiki/Android1_6r1onBeagleBoard

CONFIG_BLK_DEV_INITRD=y

How to clone android kernel and check out kernel branches

十一月 30, 2009

//clone whole git repository from android common kernel repository

git clone git://android.git.kernel.org/kernel/common.git kernel

//show remote repository If you wanted to see remote branches:

git branch -r

//Check remote branch

git checkout -b android-2.6.29 origin/android-2.6.29

//A convenient way of check out remote branch

git checkout –track -t origin/android-2.6.29

// import build commands
source build/envsetup.sh

//