how to compile kernel

In the part 1 I explained how to compile a new kernel, and here’s the explanation how to upload the newly compiled kernel to your device.

  1. make sure you really have arch/arm/boot/zImage file (about 2MB in case of HTC Desire/Eclair) present after your kernel compilation was over.
  2. download AnyKernel template by koush and unpack it somewhere
  3. copy your zImage file to the template /kernel directory, there supposed to be another zImage file there — just replace it
  4. go back to the template directory, you will see three subdirectories: META-INF, kernel & system
  5. zip them all (zip -r ../update.zip *)
  6. sign the update.zip and flash it to your device
  7. scripts included in the template will unpack your current boot.img, keep ramdisk, but replace the kermel
  8. enjoy!

Big thanks to Bartosz Ponurkiewicz, who gave me nice advices and warned about common problems on the way!

, ,

No Comments

How to compile kernel — part 1

Recently HTC released the kernel source for HTC Desire. Here’s how to compile the kernel source under Ubuntu:

  1. download and unpack source code
  2. install android SDK and NDK
  3. get kernel config from your device (adb pull /proc/config.gz; gunzip config.gz; mv config .config)
  4. put .config into the root directory where you unpacked kernel source
  5. run “make oldconfig”
  6. optionally, if you plan any changes, run “make menuconfig”
  7. run “make ARCH=arm CROSS_COMPILE=~/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-”, where long and complicated path points to the actual directory where you installed NDK

Wait about 10-20 minutes. You should get the following mesage:


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值