android 内核编译--官网指南翻译
2013-01-05 00:03
260 查看
Building Kernels
编译内核
If you are only interested in the kernel, you may use this guide to download and build the appropriate kernel.如果你只对内核感兴趣,你可以用这个指南下载和编译适合的内核
The following instructions assume that you have not downloaded all of AOSP.
以下说明假定你没有下载所有的andriod开放源代码项目,
If you have downloaded all of AOSP, you may skip the git clone steps other than the step to download the actual kernel sources.
如果你已经下载了所有的android开放源代码项目,你可以跳过git clone步骤,而不用去下载现在的内核源代码。
We will use the Pandaboard kernel in all the following examples.
下面的说明都以熊猫开发版(Pandaboard)内核为例
Figuring out which kernel to build
搞清楚构建哪个内核
你将想查看你感兴趣的设备项目的内核 git 日志。设备项目的形式 device/<供应商>/<名字>。You will want to look at the git log for the kernel in the device project that you are interested in. Device projects are of the form device/<vendor>/<name>.
$ git clone https://android.googlesource.com/device/ti/panda $ cd panda $ git log kernel
The log should contain notes of the commit SHA1 for the appropriate kernel project. Keep this value at hand so that you can use it in a later step.
Downloading sources
将下载的资源
Depending on which kernel you want,依赖哪个内核
$ git clone https://android.googlesource.com/kernel/common.git $ git clone https://android.googlesource.com/kernel/exynos.git $ git clone https://android.googlesource.com/kernel/goldfish.git $ git clone https://android.googlesource.com/kernel/msm.git $ git clone https://android.googlesource.com/kernel/omap.git $ git clone https://android.googlesource.com/kernel/samsung.git $ git clone https://android.googlesource.com/kernel/tegra.git
The
goldfishproject contains the kernel sources for the emulated platforms.
The
msmproject has the sources for ADP1, ADP2, Nexus One, and can be used as a starting point for work on Qualcomm MSM chipsets.
The
omapproject is used for PandaBoard and Galaxy Nexus, and can be used as a starting point for work on TI OMAP chipsets.
The
samsungproject is used for Nexus S and can be used as a starting point for work on Samsung Hummingbird chipsets.
The
tegraproject is for Xoom and Nexus 7, and can be used as a starting point for work on NVIDIA Tegra chipsets.
The
exynosproject can be used as a starting point for work on Samsung Exynos chipsets.
goldfish项目包含模拟平台内核源。
msm项目有 ADP1,ADP2 ,Nexus One的源,和能被用作一个开始点工作在美国高通公司 Qualcomm MSM 芯片。
omap项目是被用于 PandaBoard 和 Galaxy Nexus,和能被用作一个开始点工作在 TI OMAP 芯片。
samsung工程是被用于 Nexus S 和能被用作一个开始点工作在 Samsung 峰鸟芯片。
tegra工程是为 Xoom,和能备用作一个开始点工作在 NVIDIA Tegra 芯片。
exynos工程能被用作一个开始点工作在 Samsung Exynos 芯片。
Downloading a prebuilt gcc
下载预编译gcc
Ensure that the prebuilt toolchain is in your path.
保证预编译 toolchain 是在你的环境变量。
$ git clone https://android.googlesource.com/platform/prebuilt $ export PATH=$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
Building
编译
As an example, we would build the panda kernel using the following commands:作为一个例子,我们将构建 panda kernel 内核用下面的命令
$ export ARCH=arm $ export SUBARCH=arm $ export CROSS_COMPILE=arm-eabi- $ cd omap $ git checkout <commit_from_first_step> $ make panda_defconfig $ make
To build the tuna kernel, you may run the previous commands replacing all instances of "panda" with "tuna".
构建 tuna 内核,你可能运行以前的命令替换所有 "panda" 随着 "tuna"的实例。
maguro 和 toro 的内核是
device/samsung/tuna/kernel
crespo 和 crespo4g 的内核是
device/samsung/crespo/kernel
stingray 和 wingray 的内核是
device/moto/wingray/kernel
镜像输出The image is output as
arch/arm/boot/zImage。你可能复制它作为
device/<供应商>/<名字>/kernel或
device/ti/panda/kernel在这个例子的情况。
The kernel for maguro and toro is
device/samsung/tuna/kernel
The kernel for crespo and crespo4g is
device/samsung/crespo/kernel
The kernel for stingray and wingray is
device/moto/wingray/kernel
The image is output as
arch/arm/boot/zImage. You may copy it as
device/<vendor>/<name>/kernelor
device/ti/panda/kernelin the case of this example.
相关文章推荐
- 编译Android内核 For nexus 5 以及绕过Android的反调试
- 1.android内核编译方法
- Android中kernel内核模块编译执行
- 在Android上编译linux内核驱动程序
- 编译android内核和文件系统,已经安装jdk,提示build/core/config.mk:268: *** Error: could not find jdk tools.jar
- Android I9100 源码编译 Step.7----编译内核
- Android内核编译(支持netfilter/iptalbes)(can't initialize iptables table `filter': iptables who)
- Android内核编译过程遇到的问题
- Ubuntu 6.06 dapper 内核编译初级指南
- MTK android内核独立模块编译与加载
- Android内核开发:系统编译输出的镜像文件
- android之Fragment(官网资料翻译)
- android内核源码编译个人方法和错误记录
- Android内核的编译和调试
- android之Fragment(官网资料翻译)
- 如何在32位ubuntu11.10 下编译android 4.0.1源码和goldfish内核
- 编译Android源码与内核总结
- 编译内核操作流程 ──为新手指南
- Fedora 内核编译指南