Android kernel development: source version and branch
Source: Internet
Author: User
<span id="Label3"></p><p><p>I think a lot of beginners may be like me, after reading the android source download related articles, began to download the Android source of interest, But after downloading the source, there is no like me as follows a few confusion?</p></p><p><p><br></p></p><p><p><span style="color:rgb(0,0,0);">(1) What branches are available for Android version? What is the tag for each branch?</span></p></p><p><p><br></p></p><p><p><span style="color:rgb(0,0,0);">(2) when the Android source code is downloaded, how can I not see the Linux kernel? Can the Linux kernel be downloaded from the kernel.org website? What modifications does Android make to the standard Linux kernel?</span></p></p><p><p><br></p></p><p><p>(3) What is the correspondence between the Android source branch and the Linux version branch? Can I use a lower version of the Linux kernel for high-version android source? or low-version Android source can use the higher version of the Linux kernel?</p></p><p><p><br></p></p><p><p>(4) Development Board manufacturers to provide Android source code and AOSP official website to download the Android source code is what relationship?</p></p><p><p><br></p></p><p><p>As the third article in my "android kernel development" series, This article is mainly to answer some of the questions mentioned Above.</p></p><p><p><br></p></p><p><p><strong>1. What branches are available for Android version? What is the tag for each branch?</strong></p></p><p><p><br></p></p><p><p>The Android website details the current versions of android, version, corresponding API level, Branch TAG, and supported devices, which are as Follows:</p></p><p><p><br></p></p><p><p>Http://source.android.com/source/build-numbers.html</p></p><p><p><br></p></p><p><p>Because the official website is wall, Here I also gave a saved offline HTML document, you can download down to open the view with the browser, the address is as Follows:</p></p><p><p><br></p></p><p><p>Https://github.com/Jhuster/AOSP/tree/master/documents</p></p><p><p><br></p></p><p><p>of course, want to see the currently available Android source code branch and version, you can also download the good Android source code under the root directory to execute the following command:</p></p><p><p><br></p></p><pre class="brush:bash;toolbar:false"><pre class="brush:bash;toolbar:false">$ git--git-dir. repo/manifests/.git/branch-a or cd. repo/manifests$ git branch-a | Cut-d/f 3</pre></pre><p><p><br></p></p><p><p>Examples of the results obtained are as follows (only part of the interception):</p></p><p><p><br></p></p><p><p>650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6D/59/wKiom1Vhw2_jbHQjAAK3TWf8ZCI336.jpg "title=" 2015-05-22 085359 screen. png "alt=" wkiom1vhw2_jbhqjaak3twf8zci336.jpg "/></p></p><p><p><br></p></p><p><p>so, If you want to switch to another Android branch, you just need to re-execute repo init and repo sync, as shown in the following example:</p></p><p><p><br></p></p><pre class="brush:bash;toolbar:false"><pre class="brush:bash;toolbar:false">$ repo init-b android-4.2.2_r1 $ repo Sync</pre></pre><p><p><br></p></p><p><p><strong>2. What is the relationship between Android source code and Linux kernel?</strong></p></p><p><p><br></p></p><p><p>The second issue mentioned at the beginning of the article is mainly related to the relationship between Android source code and the Linux kernel, we should first understand an important concept:</p></p><p><p><br></p></p><p><p><strong>Android does not use the standard Linux kernel, but it makes a lot of changes.</strong></p></p><p><p><br></p></p><p><p>Android has done a lot of tailoring and optimization of standard Linux kernel code, and added many unique code, including: custom UI system, replacing GLIBC library with Bionic libc library, adding gold-fish platform, writing proprietary driver, such as binder , Logger, PowerManager and so On.</p></p><p><p><br></p></p><p><p>Due to copyright differences and other reasons, these changes are not merge into the main Linux branch, so we can not directly from the Linux Kernel's official website (kernel.org) to download the Linux kernel code for Android source, but to the Google website to provide the kernel URL to download the modified Linux kernel Code.</p></p><p><p><br></p></p><p><p>Google offers multiple versions of Linux Kernel, which correspond to different device or vendor versions, and you can complete the download with the git clone command as Follows:</p></p><p><p><br></p></p><p><p>650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6D/55/wKioL1VhxUijTV8kAARg-dNeQVw544.jpg "title=" 2015-05-22 094048 screen. png "alt=" wkiol1vhxuijtv8kaarg-dneqvw544.jpg "/><br></p></p><p><p>If you are just using the Android emulator to run the Android kernel, then you can choose the goldfish version as your Linux Kernel, if you have the above-mentioned kernel support device, then you will download the corresponding Kernel.</p></p><p><p><br></p></p><p><p>So what if your device or development board isn't on the list of supported lists?</p></p><p><p><br></p></p><p><p>Rest assured, in general, the Android Development Board manufacturers will be on the basis of the above Linux kernel for their own development Board to adapt a set of available Linux kernel, you just need to go to the Manufacturer's official website or forum to find the corresponding Code. For their own design and development of the board, you need to download similar kernel code (such as the same CPU model), and then targeted modification and Migration.</p></p><p><p><br></p></p><p><p><strong>3. The relationship between the Android branch and the Linux branch</strong></p></p><p><p><br></p></p><p><p>During the iteration of the Android version, the Linux kernel is also constantly being updated, so often the new Android version will use the newer Linux kernel branch, the specific branch correspondence I did not find on the Google official website, But a table was found on Wikipedia and stackoverflow, as Follows:</p></p><p><p><br></p></p><p><p>650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6D/59/wKiom1Vhw-qQFexwAAE9DtXdWqs887.jpg "title=" 2015-05-22 094048 screen. png "alt=" wkiom1vhw-qqfexwaae9dtxdwqs887.jpg "/><br></p></p><p><p><br></p></p><p><p>Wikipedia explains in more detail what changes are made to each of the Android branches, with the following address:</p></p><p><p><br></p></p><p><p>Http://en.wikipedia.org/wiki/Android_version_history</p></p><p><p><br></p></p><p><p>In general, different Android branches are best able to use the corresponding Linux kernel branch version, so as to ensure that the normal compilation of the system through and run correctly, but you can also learn more about the Linux kernel of an Android version of what has changed, And porting these changes to other versions of the Linux kernel, it is also possible to achieve a low version of Android running on the higher version of the Linux kernel, of course, the reverse is more difficult, because the general high version of the Android kernel will use the high version of the Linux kernel features, It's a lot of trouble to Transplant.</p></p><p><p><br></p></p><p><p><strong>4. The relationship between the Android version provided by the manufacturer and the AOSP</strong></p></p><p><p><br></p></p><p><p>Many manufacturers to provide special for the Development Board of the android source code, then, We can directly use from the AOSP official online download Android source code it?</p></p><p><p><br></p></p><p><p>Manufacturers will generally make changes to the official website of the Android source code, but the modified part of the general will make a patch package, so you only need to download the Manufacturer's patch package, and the official on-line download Android source code to the corresponding branch, patch can be patched.</p></p><p><p><br></p></p><p><p><strong>5. Summary</strong></p></p><p><p><br></p></p><p><p>About the version of the Android source and branch is introduced here, have any questions welcome message or letter [email protected] exchange, also welcome to follow my Sina Weibo @ Lou _ June get the latest articles and Information.</p></p><p><p><br></p></p><p><p>This article is from the "shadow three people" blog, please be sure to keep this source http://ticktick.blog.51cto.com/823160/1654759</p></p><p><p>Android kernel development: source version and branch</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service