Google is working to use the main version of the Linux Kernel on Android

Android KernelLinux

During the Linux Plumbers 201 conference9 (an annual meeting of top Linux developers), Google talked about the development of an initiative to transfer to the main Linux kernel the changes developed in the kernel version for the platform Android.

The ultimate goal is to allow Android to use the major version of the Linux Kernel, instead of having to prepare separate custom versions for each device based on the Android-specific Common Core branch of Android. This objective has already been partially achieved and at the conference the Android smartphone “Xiaomi Poco F1” with firmware based on the usual unmodified Linux kernel was demonstrated.

Once the project is ready, Suppliers will be asked to supply a central core based on the main Linux kernel. Hardware support components will be supplied by providers only in the form of additional kernel modules, without patching the kernel.

In modules, compatibility with the main kernel must be ensured at the kernel symbol namespace level. All changes that affect the main core will be promoted upwards.

In addition to to maintain compatibility with proprietary modules within the framework of LTS branches, aims to maintain a stable core API and ABI, which will allow to maintain the compatibility of the modules with the updates for each common branch of the kernel.

Throughout the year, features such as the PSI subsystem (pressure lock information) to analyze information about the timeout of various resources (CPU, memory, input and output devices), the BinderFS pseudo file system for the inter-process communication mechanism, were carried over to the main Linux kernel from the Android kernel, as well as the energy efficiency task planner EAS (Energy Aware Scheduling).

Importantly, so far the Android kernel has gone through several stages of preparation as currently, there are three main forks between the mainline Linux kernel and a shipping Android device.

  • First, Google takes the Linux LTS kernel and turns it into the "Android Common Kernel", in which the Linux kernel receives all the patches specific to the applied Android operating system.
  • Android Common ships to the SoC vendor (usually Qualcomm) where it gets its first round of hardware-specific additions, first targeting a particular SoC model.
  • This "SoC Kernel" is then shipped to a device manufacturer for even more hardware-specific code that supports any other piece of hardware, such as the display, camera, speakers, usb ports, and any additional hardware.

Based on the main LTS cores (3.18, 4.4, 4.9 and 4.14), the "Android Common Kernel" branch was created, in which Android-specific patches were transferred (previously the size of the changes reached several million lines, but recently the changes were reduced to several thousands of lines of code)

In addition to the fact that for each device its own nucleus was formed, which could not be used on other devices.

Such a scheme significantly complicates the delivery of updates with the elimination of vulnerabilities and the transition to new branches of the kernel. For example, the latest Pixel 4 smartphone released in October comes with the Linux 4.14 kernel, released two years ago.

Partly, Google tried to simplify maintenance by promoting the Treble system, which allows manufacturers to create universal hardware support components that are not tied to specific Android versions and the Linux kernel versions used. Treble allows you to use ready-made Google updates as a basis, integrating device-specific components into them.

While there is still work to be done to incorporate the Android ecosystem more broadly into the Kernel, in addition to requiring a lot of work on the part of device configurations for specific models, but Google says that things seem to be progressing good.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.