Download Android kernel source code

久未见 提交于 2019-12-06 09:27:44

问题


I have been trying to download goldfish kernel source code but no luck.

Upon hitting the following command I end up with the source code of sized 1GB:

git clone https://android.googlesource.com/kernel/common

However we I pressed on following command,

git checkout -t origin/android-goldfish-2.6.29 -b goldfish

it prompt me:

Fatal error: git repository not found.

Even though,

git branch -r

is also giving me same error.


回答1:


git clone git://android.git.kernel.org/kernel/common.git

and then

cd common  ==============>>> this is the step u missed.

git branch -a 

git checkout -t  remotes/origin/android-2.6.38 -b mygoldfish2_6_38 

git branch -r 

git checkout -t  origin/android-2.6.35 -b mygoldfish_2_6_35

and then the following command gives:

git branch
  android-2.6.36
  mygoldfish2_6_38
* mygoldfish_2_6_35



回答2:


Well if you just need the source, but not local git repo, then just take a snapshot that you need, i.e. this one.
Similary you can download any git tree snapshot, just notice tags links over the https://android.googlesource.com



来源:https://stackoverflow.com/questions/5178386/download-android-kernel-source-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!