Relationship between Android and Linux kernel versions
I. Relationship between Android and Linux Kernel
English name |
Chinese name |
Android version |
Linux Kernel version |
No |
None |
1.1 |
Cupcake |
Paper cup cake |
1.5 |
2.6.27 |
Donut |
Donut |
1.6 |
2.6.29 |
Eclair |
Muffins |
2.0 |
2.6.29 |
Eclair |
Muffins |
2.1 |
2.6.29 |
Froyo |
Frozen yogurt |
2.2 |
2.6.32 |
Gingerbread |
Ginger pie |
2.3 |
2.6.35 |
Honeycomb |
Honeycomb |
3.0 |
? |
2. the download source code is divided into two parts:
1. Android source code;
2. Android kernel (Android Linux kernel );
3. How to download the android Kernel
Git clone git: // android.git.kernel.org/kernel/common.git
4. How to view the android kernel version (Code-level view)
In the kernel code directory:
Run the command: git branch-
Running instances
[Root @ localhost common] # git branch-A (view Version)
* Android-2.6.36:
Remotes/ORIGIN/head-> origin/Android-2.6.36
Remotes/ORIGIN/Android-2.6.35
Remotes/ORIGIN/Android-2.6.36
Remotes/ORIGIN/archive/Android-2.6.25.
Remotes/ORIGIN/archive/Android-2.6.27.
Remotes/ORIGIN/archive/Android-2.6.29.
Remotes/ORIGIN/archive/Android-2.6.32.
Remotes/ORIGIN/archive/android-gldfish-2.6.29
Remotes/ORIGIN/archive/Android-goldfsh-2.6.27
5. How to obtain the specified version of Linux kernel
To download the 2.6.29 kernel, run the following command (enter the downloaded directory ):
Git checkout remotes/ORIGIN/archive/Android-2.6.29 (the version branch listed above)
The kernel version 2.6.29 is downloaded.
6. How to obtain the source code of a specific Android version
For example, obtain the source code of android1.5.
Repo init-u git: // android.git.kernel.org/platform/manifest.git-B cupcake
Repo sync
Android 1.5: Cupcake (cup cake)
Android 1.6: donut (donut)
Android 2.0/2.1: eclair (lightning puff)
Android 2.2: froyo (frozen)
Android 3.0: gingerbread (ginger pie)
Android 3.5: honeycomb (honeycomb)
Android 4.0: Ice Cream (ice cream)
Essentially:
To get a branch rather than the code on the main line, we need to use the-B parameter to specify the branch name.
7. How to obtain all sourcecodes in the latest version of the android trunk
Repo init-u git: // android.git.kernel.org/platform/manifest.git
8. How to obtain the code of a project
For example, kernel/common does not require Repo. You can simply use git.
Git clone git: // android.git.kernel.org/kernel/common.git
9. list all local branches
Git Branch
10. How to obtain the code of a branch
If you need a branch code, use git checkout.
For example, if we have just obtained the kernel/common code, we should first enter the common directory and then use the following command:
Git checkout origin/Android-goldfish-2.6.27-B goldfish
So we built a local Android-goldfish-2.6.27 branch named goldfish, and the code was synchronized with the android-goldgish-2.6.27.