One World One Dream

Love and Peace

2009-09-04

基于2.6.29内核的x86平台Android编译过程

注:此文是在patch-hosting-for-android-x86-support项目的基础上,将内核版本改为2.6.29而来
patch-hosting-for-android-x86-support项目主页:http://code.google.com/p/patch-hosting-for-android-x86-support/

主要步骤
按照patch-hosting-for-android-x86-support的Wiki页面中的BuildAndroidForX86Platform中说明步骤,先利用repo得到完整的android源码以及eee_701平台相关的编译脚本,但先不要开始编译。
利用git获得android的2.6.29版内核。执行
#git clone git://android.git.kernel.org/kernel/common.git android-kernel-2.6.29
建立本地的代码仓库。完成后,进入android-kernel-2.6.29目录,执行
#git checkout origin/android-2.6.29 -b android-kernel-2.6.29
,签出我们需要的内核源码
为内核打补丁。从patch-hosting-for-android-x86-support的下载页下载alarm.patch,在内核目录执行
#patch -Np1 < alarm.patch
打上补丁
配置并编译2.6.29内核。从patch-hosting-for-android-x86-support项目的下载页下到kernel.config文件,放到刚刚获得的2.6.29版内核根目录,并重命名为.config。然后执行make menuconfig。这里主要需要打开android的staging driver功能。打开device drivers->staging drivers,然后关闭device drivers->Exclude Staging drivers from being built,这时最底下会出现Android菜单,进去把所有都选上(有些可能不需要,根据具体需要配置)。然后保存退出。进行编译
#make bzImage -j4
如果编译顺利,将arch/x86/boot/bzImage复制到前面获得的android源码目录中vendor/asus/eee_701/目录,并改名为kernel(覆盖原有的kernel文件)
剩下步骤与patch-hosting-for-android-x86-support的Wiki说明相同,最后可以做出一个vdi镜像用virtualbox跑跑试试。bless~
原文:http://blog.chinaunix.net/u3/92408/showart_2030101.html

标签:

0 条评论:

发表评论

订阅 博文评论 [Atom]

<< 主页