| <html devsite> |
| <head> |
| <title>Kernel</title> |
| <meta name="project_path" value="/_project.yaml" /> |
| <meta name="book_path" value="/_book.yaml" /> |
| </head> |
| <body> |
| <!-- |
| Copyright 2017 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <p>The Linux kernel is an extremely important part of the software on nearly |
| every Android device. This section describes Linux kernel development and |
| release models (below), |
| <a href="/devices/architecture/kernel/releases.html">stable and long-term |
| supported (LTS) kernels</a> (including why all Android devices should use stable |
| releases instead of cherry picking patches), kernel |
| <a href="/devices/architecture/kernel/config.html">configuration</a> and |
| <a href="/devices/architecture/kernel/hardening.html">hardening</a>, |
| requirements for |
| <a href="/devices/architecture/kernel/reqs-interfaces.html">interfaces</a> and |
| the |
| <a href="/devices/architecture/kernel/modular-kernels.html">modular kernels</a> |
| (introduced in Android O), kernel |
| <a href="/devices/architecture/kernel/lldb-debug.html">debugging</a> and |
| <a href="/devices/architecture/kernel/network_tests.html">network testing</a>, |
| and <a href="/devices/architecture/kernel/squashfs.html">SquashFS</a>.</p> |
| |
| <h2 id="linux-kernel-development">Linux kernel development</h2> |
| <p> |
| The Linux kernel is the largest collaborative software project ever. In 2016, |
| over 4,000 different developers from over 450 different companies contributed to |
| the project and there were 6 releases, each containing between 12,000 and 16,000 |
| different changes. At the end of 2016 the size of the Linux kernel was just over |
| 56 thousand files, consisting of 22 million lines of code, build scripts, and |
| documentation (kernel release 4.9). (For full Linux development statistics, |
| refer to |
| <a href="https://kernelnewbies.org/DevelopmentStatistics" class="external">https://kernelnewbies.org/DevelopmentStatistics</a>.) |
| </p> |
| <p> |
| While the Linux kernel contains code for all the different chip architectures |
| and hardware drivers it supports, an individual system runs only a fraction of |
| the codebase. An average laptop uses around 2 million lines of kernel code from |
| 5 thousand files to function properly, while the Pixel phone uses 3.2 million |
| lines of kernel code from 6 thousand files (due to the increased complexity of |
| an SoC). |
| </p> |
| |
| <h2 id="linux-kernel-releases">Linux kernel releases</h2> |
| <p>The Linux kernel uses a release model that differs substantially from |
| standard AOSP releases. With the release of the 2.6 kernel in December of 2003, |
| the kernel developer community switched from the previous model of having a |
| separate development and stable kernel branch, and moved to a <em>stable |
| only</em> branch model. In this model, a new release occurred every 2 to 3 |
| months, and that release was declared <em>stable</em> and recommended for all |
| users to run. This change in development model was due to the very long |
| release cycle prior to the 2.6 kernel (almost 3 years), and the struggle to |
| maintain two different branches of the codebase at the same time.</p> |
| |
| <p>The numbering of the kernel releases began at 2.6.x, where x was an |
| incrementing number that changed on every release (the value of the number has |
| no meaning, other than it is newer than the previous kernel release). The kernel |
| version since then has now moved to 4.x accounting for 2 major version changes. |
| These version numbers are chosen by the maintainer(s) only to avoid confusion |
| among users caused by higher minor release numbers.</p> |
| |
| </body> |
| </html> |