Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6684683
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: Android平台

2016-01-06 21:39:54




1. Download the Source for your current kernel version from "".





2. Extract the file "Kernel.tar.gz" (inside the downloaded zip) into a folder, for example "/home//androidkernel".

3. Open the README_Kernel.txt

4. Download the Android NDK containing the suggested toolchain, in our case "arm-eabi-4.4.3". The latest NDK package often does not contain older toolchains, so you have to make some experiments until you find the right one. All the NDKs are available from "http://developer.android.com/tools/sdk/ndk". Copy the URL and modify it according to the given version numbers.



5. For a 64bit operating system, you have to take the 64bit link, of course. Paste the URL into a text editor of your choice.



6. Now you have to find out, which NDK version contains the needed 4.4.3 toolchain. In our case, it is the version "8e".



7. Copy the modified link back to your browser and download the old NDK version.



8. Extract the archive, for example to "/home//androidbuild".

9. Modify "/home//androidkernel/Makefile" and change the following parts according to your environment. The "EXTRAVERSION" string has to be the one from your phone's system information.







10. Pay attention to the correct line ending "arm-linux-androideabi-". The build process will look for the compiler "gcc" inside the "bin" directory. The android NDK contains the compiler, but the filename always starts with "arm-linux-androideabi-". The NDK version, the toolchain version, and the system architecture (32/64bit) have to match your environment.

11. Move to the directory of your kernel in a command line interface, for example "cd /home//androidkernel/".

12. Enter "make arch=arm m0_00_defconfig".

13. Enter "make menuconfig".

14. Modify the kernel configuration according to your wishes. For example select "M" for "Device drivers -> Input device support -> Joystick interface" to create the module "joydev.ko".



15. Leave "menuconfig" and save.



14. Enter "make CFLAGS_MODULE=-fno-pic modules".

15. The modules will be compiled and stored in "/home//androidkernel/drivers/*/*.ko", according to each module's category.

16. If you like, you can comiple a completely new kernel for your phone with the command "make". The kernel image will be stored in "/home//androidkernel/arch/arm/boot/zImage" then.



阅读(801) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~