blob: 8eb96399f579a6db143aa53a95f13407721ffc66 [file] [log] [blame] [view]
Conley Owens7929ddf2012-01-05 16:06:15 -08001<!--
2 Copyright 2011 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
16
17# Building Kernels #
18
19If you are only interested in the kernel, you may use this guide
20to download and build the appropriate kernel.
21
22The following instructions assume that you have not downloaded all
23of AOSP. If you have downloaded all of AOSP, you may skip the git
24clone steps other than the step to download the actual kernel sources.
25
26We will use the Pandaboard kernel in all the following examples.
27
28
29## Figuring out which kernel to build ##
30
31You will want to look at the git log for the kernel in the device project that
32you are interested in.
33Device projects are of the form device/&lt;vendor&gt;/&lt;name&gt;.
34
35 $ git clone https://android.googlesource.com/device/ti/panda
36 $ cd panda
37 $ git log kernel
38
39The log should contain notes of the commit SHA1 for the appropriate
40kernel project. Keep this value at hand so that you can use it in
41a later step.
42
43## Downloading sources ##
44
45Depending on which kernel you want,
46
47 $ git clone https://android.googlesource.com/kernel/common.git
48 $ git clone https://android.googlesource.com/kernel/goldfish.git
49 $ git clone https://android.googlesource.com/kernel/msm.git
50 $ git clone https://android.googlesource.com/kernel/omap.git
51 $ git clone https://android.googlesource.com/kernel/samsung.git
52 $ git clone https://android.googlesource.com/kernel/tegra.git
53
54
55## Downloading a prebuilt gcc ##
56
57Ensure that the prebuilt toolchain is in your path.
58
59 $ git clone https://android.googlesource.com/platform/prebuilt
60 $ export PATH=$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
61
62
63## Building ##
64
65As an example, we would build the panda kernel using the following commands:
66
67 $ export ARCH=arm
68 $ export SUBARCH=arm
69 $ export CROSS_COMPILE=arm-eabi-
70 $ cd omap
71 $ git checkout <commit_from_first_step>
72 $ make panda_defconfig
73 $ make
74
75To build the tuna kernel, you may run the previous commands replacing all
76instances of "panda" with "tuna".
77
78The image is output as arch/arm/boot/zImage. You may copy it as
79device/<vendor>/<name>/kernel or device/ti/panda/kernel in the case of this
80example.