首页 > 其他 > 详细

Building and booting Nexus 5 kernel

时间:2017-12-26 12:58:13      阅读:205      评论:0      收藏:0      [点我收藏+]

1. Downloading toolchain and setup.

git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/

2. Downloading kernel source code :

$git clone https://android.googlesource.com/kernel/msm.git
looking into kernel version : 3.4.0-gd59db4e
$git checkout -b android-msm-hammerhead-3.4-kitkat-mr1 origin/android-msm-hammerhead-3.4-kitkat-mr1

switch to this branch; otherwise doesn't compile yet.
$make ARCH=arm SUBARCH=arm hammerhead_defconfig
$make -j16 ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-eabi- 2>&1 |tee kernel_make.out
alias makenexus5="make -j16 ARCH=arm KCFLAGS=-ggdb3 CROSS_COMPILE=arm-eabi-"

```
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
CAT     arch/arm/boot/zImage-dtb
Kernel: arch/arm/boot/zImage-dtb is ready
```

3. Repacking Android image:

https://github.com/xiaolu/mkbootimg_tools.git

4. Flashing the custom kernel

let's try and check if it works or not.
Connect your phone using USB cable to your PC, 
be sure that you have USB debugging enabled.

$ adb start-server
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
$ adb reboot bootloader
$ fastboot flash boot boot.img

ref :

http://marcin.jabrzyk.eu/posts/2014/05/building-and-booting-nexus-5-kernel
http://pete.akeo.ie/2013/10/compiling-and-running-your-own-android.html

Building and booting Nexus 5 kernel

原文:https://www.cnblogs.com/bittorrent/p/8117174.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!