Downloading a kernel source for Nexus 10


# git clone https://android.googlesource.com/kernel/exynos.git


# cd exynos


# git checkout android-exynos-manta-3.4-jb-mr1-fr



Ensure that the prebuilt toolchain is in your path


# export PATH=~/aosp_android-4.2.1_r1.2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH



Building a manta kernel


we would build the manta kernel using the following commands:


# export ARCH=arm
# export SUBARCH=arm
# export CROSS_COMPILE=arm-eabi-

# make manta_defconfig
# make



The kernel for mantaray is device/samsung/manta/kernel


The image is output as arch/arm/boot/zImage. You may copy it as device/samsung/manta/kernel.



Creating a boot.img


Copy a image to ~/aosp_android-4.2.1_r1.2/out/target/product/manta directory.


# cp zImage ~/aosp_android-4.2.1_r1.2/out/target/product/manta/


Ensure that the mkbootimg binary is in your path


# export PATH=~/aosp_android-4.2.1_r1.2/out/host/linux-x86/bin:$PATH



Move to ~/aosp_android-4.2.1_r1.2/out/target/product/manta/ directory.


# cd ~/aosp_android-4.2.1_r1.2/out/target/product/manta/



Create a boot.img


# mkbootimg --kernel zImage --ramdisk ramdisk.img -o new-boot.img



Flashing a device


Once the device is in fastboot mode, run


# fastboot boot new-boot.img


Posted by eoseontaek