Google is working on using a regular Linux kernel in Android

At the last Linux Plumbers 2019 conference, Google said Olga, about the development initiatives to transfer to the main Linux kernel changes developed in kernel variant for Android platform. The end goal is to allow Android to use one common core, instead of preparing separate builds for each device based on an Android-specific branch. Android Common Kernel. This goal has already been partially achieved, and the Xiaomi Poco F1 Android smartphone with firmware based on the usual unmodified Linux kernel was demonstrated at the conference.

Once the project is ready, vendors will be asked to supply a base kernel based on the main Linux kernel. Components for hardware support will be supplied by vendors only as additional kernel modules, without applying patches to the kernel. Modules must necessarily ensure compatibility with the main kernel at the level of the kernel symbol namespace. All changes affecting the main core will be promoted upstream. In order to maintain compatibility with proprietary modules within the LTS branches, it is proposed to maintain a stable form of the API and ABI of the kernel, which will preserve the compatibility of modules with updates for each common kernel branch.

Google is working on using a regular Linux kernel in Android

Over the year, features such as the PSI (Pressure Stall Information) subsystem for analyzing information about the waiting time for obtaining various resources (CPU, memory, I / O), the BinderFS pseudo-file system for the interprocess communication mechanism were transferred to the main Linux kernel from the Android kernel edition Binder and energy-efficient task scheduler EAS (Energy Aware Scheduling). In the future, Android is planned to be transferred from the specific SchedTune scheduler to the new UtilClamp subsystem developed in ARM, based on cgroups2 and standard kernel mechanisms.

Google is working on using a regular Linux kernel in Android

Recall that until now the kernel for the Android platform has gone through several stages of preparation:

  • On the basis of the main LTS kernels (3.18, 4.4, 4.9 and 4.14), a branch "Android Common Kernel" was created, into which Android-specific patches were transferred (previously the size of changes reached several million lines, but recently the changes have been reduced to several thousand lines of code ).
  • Based on the "Android Common Kernel", chip manufacturers such as Qualcomm formed the "SoC Kernel", including add-ons to support the hardware.
  • Based on the "SoC Kernel", device manufacturers created the "Device Kernel", including changes related to support for additional hardware, screens, cameras, sound systems, etc.

Google is working on using a regular Linux kernel in Android

In fact, for each device, its own kernel 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 kernel branches. For example, the latest Pixel 4 smartphone, released in October, comes with the Linux 4.14 kernel, which was released two years ago. In part, Google tried to simplify maintenance by promoting the system Treble, which allows manufacturers to create universal hardware support components that are not tied to specific versions of Android and Linux kernel releases in use. Treble makes it possible to use ready-made updates from Google as a basis, integrating device-specific components into them.


Source: opennet.ru

Add a comment