Hi guys,

I have a problem on compiling my kernel,  

I follow the http://source.android.com/source/building-kernels.html to 
build my kernel
The kernel version is 3.4.0-gadb2201
my steps:

git clone https://android.googlesource.com/kernel/msm.git

export PATH=$PATH:~/nexus5/arm-eabi-4.6/bin

$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
$ cd msm
$ git checkout 3.4.0-gadb2201
$ make hammerhead_defconfig
$ make -j4

I used the original code to test my methods. after successfully compiling. 
I tried several ways to install the zImage to the device
1) AnyKernel method, replace zImage file in the zip file and use the 
recovery mode to install the update. 
2) within the AOSP project use 

export TARGET_PREBUILT_KERNEL=$your_kernel_path/arch/arm/boot/zImage

and then make bootimg to generate the boot.img
3) use the bootimg_tools to unpack the factory boot.img to get the 
ramdisk.gz and paramters and then mkbootimg to make myboot.img
I followed this tutorial. 
http://pete.akeo.ie/2013/10/compiling-and-running-your-own-android.html

dzhou@ubuntu:~/nexus5/workspace$ unmkbootimg -i boot.img 
kernel written to 'kernel' (8331496 bytes)
ramdisk written to 'ramdisk.cpio.gz' (498796 bytes)

To rebuild this boot image, you can use the command:
  mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x00008000 
--ramdisk_offset 0x02900000 --second_offset 0x00f00000 --tags_offset 0x02700000 
--cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead 
user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1' --kernel kernel --ramdisk 
ramdisk.cpio.gz -o boot.img

mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 
0x02900000 --second_offset 0x00f00000 --tags_offset 0x02700000 --cmdline 
'console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 
maxcpus=2 msm_watchdog_v2.enable=1' --kernel myzImage --ramdisk ramdisk.cpio.gz 
-o myboot.img

fastboot flash boot myboot.img

All of these methods make the boot.img or update.zip without error. But I 
can't turn on or reboot the device after flash the boot.img 
I have tried downloaded boot.img and the nexus 5 restart successfully, 
Thus, I guess I miss something at compiling step.

I have successfully run my own kernel code with goldfish on emulator and I 
encountered the wrong defconfig problem at the beginning, So I also tried 
msm8974_defconfig but failed again.

Can anyone help me to figure out my problem ? 
thanks for any help, I am seriously need this environment to conduct my 
experiment. 

Deng 

-- 
-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel
--- 
You received this message because you are subscribed to the Google Groups 
"Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to