下載android的linux內核的方法


1、安裝git

       android的linux內核可以從http://android.git.kernel.org/下載,但下載需要使用git,windows版的git可以從http://code.google.com/p/msysgit/下載,有完全安裝版和便攜版(portable)兩個版本可供選擇,不常用git的話選portable版就可以了。

      下載portable版的git后,解壓縮,然后運行git-bash,會出現一個console窗口。

2、android的kernel有多個部分,可根據需要運行以下命令下載需要的內容。

      在git的console窗口中執行以下命令即可下載內核:

    $ git clone https://android.googlesource.com/kernel/common.git  //這個是linux內核,也可以是git clone http://android.git.kernel.org/kernel/common,網上許多地方介紹的命令是git clone git://android.git.kernel.org/kernel/common,但現在似乎是不能用了。

    $ git clone https://android.googlesource.com/kernel/goldfish.git

    $ git clone https://android.googlesource.com/kernel/msm.git

    $ git clone https://android.googlesource.com/kernel/omap.git

    #git clone https://android.googlesource.com/kernel/samsung.git

    $ git clone https://android.googlesource.com/kernel/tegra.git

3、checkout出對應的內核

   進入samsung目錄

   $git branch -a    //列出所有可用的內核版本

   $git checkout  remotes/origin/android-samsung-3.0-ics-mr1   //checkout出想要使用的內核

如果要下載所有的android源文件,下載方法見http://source.android.com/source/downloading.html

 

補充:關於android安裝開發過程中的需要的一些開發包,在終端執行以下命令:

          sudo apt-get install git-core gnupg valgrind flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM