Android源码国内源下载

来源:互联网 发布:电子电路软件哪个好 编辑:程序博客网 时间:2024/05/29 14:46

1.Android源码下载

1.  新建用于存放repo的文件夹:

•     mkdir ~/bin
•     PATH=~/bin:$PATH

2.  下载repo脚本:

•     cd ~/bin
•     curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo 或 wget https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
•     chmod +x repo

3.  更新repo更新地址:

•     vi ~/.bashrc 
•     加入 export REPO_URL=‘https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/’

1.1Android系统源代码

1. 新建保存Android源代码的文件夹

•     mkdir ~/AOSP
•     cd ~/AOSP

2. 下载 manifest:

•     下载最新源代码:repo init -u git://aosp.tuna.tsinghua.edu.cn/platform/manifest
•     下载最新源代码:repo init -u git://aosp.tuna.tsinghua.edu.cn/platform/manifest –b 版本号

3. 同步源代码:

•     repo sync
注:然后进入漫长的等待,中途可能会因为网络原因中断,这时只需重新执行repo sync

1.2Android Kernel源代码

1.2.1 Kernel类别

名称

清华服务器地址

描述

common

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

通用内核

exynos

https://aosp.tuna.tsinghua.edu.cn/kernel/exynos.git

包含供 Nexus 10 的核心源码,也可以被当做一个起始点给 Samsung Exynos 芯片组使用

goldfish

https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish.git

包含为模拟器平台使用的内核源码

hikey-linaro

https://aosp.tuna.tsinghua.edu.cn/kernel/hikey-linaro.git

项目用于 HiKey参考板,可用作使用 HiSilicon 620芯片组的起点。

lk

https://aosp.tuna.tsinghua.edu.cn/kernel/lk.git

Little Kernel 它是 appsbl (Applications ARM Boot Loader)流程代码  ,little kernel 是小内核小操作系统。

msm

https://aosp.tuna.tsinghua.edu.cn/kernel/msm.git

可供 ADP1,ADP2,Nexus One,Nexus 4,Nexus 5,Nexus 6,也可以被当做一个起始点给 Qualcomm MSM 芯片组使用。

omap

https://aosp.tuna.tsinghua.edu.cn/kernel/omap.git

用于 PandaBoard 和 Galaxy Nexus,也可以被当做一个起始点给 TIOMAP 芯片组使用

samsung

https://aosp.tuna.tsinghua.edu.cn/kernel/samsung.git

是为了 Xoom,Nexus 7,Nexus 9,也可以被当做一个起始点给 Samsung Hummingbird 芯片组使用。

tegra

https://aosp.tuna.tsinghua.edu.cn/kernel/tegra.git

是给 Xoom,Nexus 7,Nexus 9,也可以被当做一个起始点给 NVIDIA Tegra 芯片组使用

x86_64

https://aosp.tuna.tsinghua.edu.cn/k

包含有 Nexus Players 的核心源码,也可以被当做一个起始点给 Intel x86_64 芯片组

 

1.2.2 源代码下载

Android源代码中是使用预编译的内核,若需要对kernel进行修改或学习,需要单独进行下载。下面介绍如何通过清华大学的开源服务器下载AOSP内核的源码。

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

2. git check out“branchName”

原创粉丝点击