Android10 kernel源码下载

376 阅读1分钟

安卓各版本API、内核对照表参考:blog.csdn.net/Yu1441/arti…

下面是官方下载地址以及git库的版本区别,国内下载还得使用清华源进行下载:

git clone http://android.googlesource.com/kernel/common.git # 通用的Linux内核,后面6套都是以该源码为基础;
git clone http://android.googlesource.com/kernel/exynos.git # 用于使用三星Exynos芯片的Android设备,典型代表是Nexus 10;
git clone http://android.googlesource.com/kernel/goldfish.git # 用于Android模拟器的内核源码;
git clone http://android.googlesource.com/kernel/msm.git # 用于使用高通MSM芯片的Android设备,典型代表是ADP1(G1)、ADP2(G2)、Nexus One和Nexus  4;
git clone http://android.googlesource.com/kernel/omap.git # 用于使用德州仪器(TI)OMAP芯片Android设备,典型代表是PandaBoard和Galaxy Nexus;
git clone http://android.googlesource.com/kernel/samsung.git # 用于使用三星Hummingbird芯片的Android设备,典型代表是Nexus S;
git clone http://android.googlesource.com/kernel/tegra.git # 用于使用NVIDIA (Tefra)芯片Android设备,典型代表是Xoom和Nexus 7。

我们的主要目的是看binder驱动源码,因此与厂商等无关,所以下载通用内核

git clone https://aosp.tuna.tsinghua.edu.cn/kernel/common.git

如果下载完成之后,你可能会看不到具体的代码,需要先查看所有分支

git branch -a

查看所有分支.png

我们这里下载Andrid10的内核

内核版本.png 最接近的是 4.19-stable,因此我们直接使用它

git checkout remotes/origin/android-4.19-stable

common.png