Android and linux kernel

На каком Android работает ядро ​​Linux?

Есть ли список версий ядра, которые есть в каждой версии Android AOSP?

Или скажем, какую версию / proc / version выложат.

Версия для Linux в AOSP

Таблица составлена ​​из:

Примечание: другие «дистрибутивы» Android могут работать с разными версиями ядра.

Любой желающий может исправить и расширить эту таблицу. Пожалуйста, продолжайте форматирование.

Почему ОС Android / версия ядра не совпадают

OEM-производители, как правило, поставляют свои основные обновления Android с ядром, аналогичным тому, с которым устройство было выпущено изначально. Это, скорее всего, позволит избежать проблем несовместимости оборудования и драйверов с более новым ядром. Например, устройство, которое было обновлено для работы с Android 8.0 Oreo, но первоначально поставлялось с 6.0 Marshmallow, все еще может работать под управлением Linux 3.18.x вместо Linux 4.10.x.

Требования Vendor Test Suite (VTS) для версии Linux

Один аспект, который был до OEM — это версия ядра Linux, но это меняется с Android Oreo.

До тех пор, пока OEM-производитель мог проходить сертификационные тесты, которые выкладывает Google, им было все равно, какая версия ядра использовалась в новом устройстве. Как правило, это не было проблемой, так как большинство OEM-производителей использовали бы ту же версию ядра для того поколения, которую использовали другие OEM-производители, поскольку она сильно привязана к тому, что поддерживают драйверы оборудования. Тем не менее, некоторые провалились в трещины, и это стало причиной проблем с безопасностью. Это то, что Google воспринимает всерьез в последнее время, поэтому имеет смысл, что они захотят начать поручать это.

Начиная с этого года со смартфонами, которые поставляются с Android Oreo, Google требует, чтобы все SoC, выпущенные в 2017 году, были запущены с ядром 4.4 или новее.

В настоящее время существующие устройства, которые обновлены до Android Oreo, должны работать только на ядре версии 3.18 или новее, и их не нужно обновлять для поддержки Project Treble.

Источник

EduApps-CDG / Building Linux Kernel With Android.md

How to Build Linux Kernel with Android

This guide shows how to build Linux on a Android Device and was made for people that doesn’t have s Computer.

  • 4GB of free space (2GB if delete the temp files)
  • Android 5.0

Preparing the Environment

You need to install Termux from Google Play Store. Now we will download the Kernel so we need WGET:

The next step is decompress that tarball with UNXZ and TAR (integrated with Termux):

(Optional) Delete the Linux tarball:

Now we have the Linux Source on our Android, lets compile!

In Android, compile is a terror for Linux Kernel. First we need to create a config file.

Читайте также:  Linux ноутбук переключение видеокарт

The .config file dilemma

If you had an Linux PC you could simply do this:

But you dont have so we need to do this:

If you have a Rooted Potato Phone you can simply:

No Root mode (medium)

If else, first you need to download it from our repository:

No Root mode (hard)

If the file was not found, you must generate it. It has only one command, but this command is the worst! It’s the best choice if you are developing a new device. Complete the first command of Building and type:

Once solved the dilemma, you will not need to do it again. the next step is install the compilers:

This command will setup to build the Kernel with full power, if you have a single core device, it doesn’t help so much but works:

And finally, the Last Step is: Enjoy the building time and drink a coffee!

Источник

The Linux Kernel: Android?

DevynCJohnson

Guest

Aloha! Now that we have studied the Linux kernel very well and learned how to make our own, we will move on to a slightly different direction in this series. Many of you may be unaware of this, but Android is Linux. True, they are not quite the same, but Android is Linux. For example, Ubuntu is «GNU/Linux» while Android is «Dalvik/Linux». If an operating system uses the Linux kernel, then it is a Linux system. The userland (GNU and Dalvik) does not determine whether an OS is Linux or not. Android uses a modified Linux kernel. As we know, Android runs on phones. As you may remember from configuring the kernel, there were no drivers for phone devices (like small keypads, 3G/4G cards, SIM cards, etc.). The Linux kernel used in Android lacks drivers that would not be in phones and instead has drivers for phone devices. In other words, no Android system uses a Vanilla Kernel.

NOTE: Some people say «Android/Linux» instead of «Dalvik/Linux». However, both are valid.

Linux kernels for Android can be downloaded or viewed here — (https://android.googlesource.com/?format=HTML). Just like the Vanilla kernel, the Android kernel is open-source software (due to the GPL license on the Vanilla kernel). The generic Android kernel can be seen here — (https://android.googlesource.com/kernel/common.git/ /android-3.10) [for kernel v3.10] which looks very similar to the Vanilla kernel.

NOTE: In this article and series, «Android Kernel» will be used interchangeably with «Linux kernel for Android» and other similar phrases.

The ./android/ directory contains a configuration file for making the Android kernel. These files tell the configuration tool which features/modules/drivers to enable or disable (https://android.googlesource.com/kernel/common.git/ /android-3.10/android/configs/android-base.cfg).

Some proprietary or special hardware may have a kernel designed specifically for them. For instance, kernels for Samsung phones can be downloaded here (https://android.googlesource.com/kernel/samsung/).

DOWNLOAD: To download an Android kernel, look to the «tgz» hyperlink near «Commit» around the top of the screen. Here is a download link — https://android.googlesource.com/kernel/common.git/ archive/android-3.10.tar.gz

Читайте также:  Добавление статического маршрута linux

As seen in the ./security/ folder of the kernel’s source code, Android supports the same Linux Security Modules (LSMs) that a desktop/server kernel would. By looking at any part of the Android kernel, the Android and Vanilla kernel are nearly the same. For illustration, the same filesystems are seen in Android’s filesystem driver directory (./fs/) as in the Vanilla kernel.

To configure the kernel, do as you would for a Vanilla kernel — open a terminal in the source code directory and type «make

The developer libraries I mentioned can be installed like this (for RedHat-based systems, use «yum» instead of «apt-get») —

Also, make sure that the proper cross-compiler is installed on your system (arm-eabi).

Making a symbolic link for this library may help on some systems —

NOTE: Some other libraries or links may be needed. If so, the compiler will give an error that a library or file is missing. Install or link as needed.

If the configuration and compiling process went well, the Android kernel is ready for a device. The process of installing an Android kernel is a process that requires more knowledge in Android development and many more steps. So, I will not discuss the Android kernel that far.

Patches can be applied to the Android kernel’s source code the same way as the Vanilla kernel, except the patches must be Android patches. The patches on Kernel.org will not work. They may work in some instances, but you must know what you are doing and only apply them to drivers/modules that are still Vanilla (unaltered from the original).

There are a few different kinds of Android kernels as seen on the Android kernel’s Git page (https://android.googlesource.com/?format=HTML).
The Goldfish kernel (https://android.googlesource.com/kernel/goldfish/) is for emulated platforms like running a virtual Android system within a host system on a desktop computer.
The MSM kernel (https://android.googlesource.com/kernel/msm/) is for Qualcomm MSM chipsets.
The OMAP kernel is for the TI OMAP chipsets (https://android.googlesource.com/kernel/omap/).
Samsung hummingbird chipsets use the Samsung kernel (https://android.googlesource.com/kernel/samsung/).
The NVIDIA Tegra chipsets run on the Tegra chipset kernel (https://android.googlesource.com/kernel/tegra/).
The Exynos kernel is used by Samsung Exynos chipsets.
These various kernels mainly variety in their driver availability. For example, the Exynos kernel will have drivers for Exynos Samsung devices while the OMAP kernel does not.

Now, your understanding of Android should be larger than it was before. Feel free to send me more ideas on this article series or any Linux article in general. I hope to make this series continue for as long as I can. Mahalo!

Источник

Which Android runs which Linux kernel?

Is there a list of which kernel version comes in each Android AOSP version?

Or lets say, which version /proc/version would spit out.

1 Answer 1

Linux version in AOSP

Table compiled from:

Note: other “distributions” of Android might run different kernel versions.

Anyone is welcome to correct and expand this table. Please keep formatting.

Why Android OS/kernel version mismatches

OEMs tend to ship their major Android updates with a similar kernel to the one the device was initially released with. This is most likely to avoid hardware and driver incompatibility issues with a newer kernel. For example, a device that has been updated to run Android 8.0 Oreo but originally shipped with 6.0 Marshmallow may still be running Linux 3.18.x instead of Linux 4.10.x.

Читайте также:  Wallpapers mac os 2021

Vendor Test Suite (VTS) requirements on Linux version

One aspect that has been up to the OEM is the Linux kernel version but this is changing with Android Oreo.

As long as the OEM was able to pass the certification tests that Google lays out, then they didn’t care what kernel version was used in a new device. This generally wasn’t an issue as most OEMs would use the same version of the kernel for that generation that other OEMs were using, as it is tied heavily to what the hardware drivers support. However, some had been falling through the cracks and this started to cause security issues. This is something that Google has been taking seriously lately so it makes sense that they would want to start mandating this.

Starting this year with smartphones which ship with Android Oreo, Google is requiring that all SoCs productized in 2017 must launch with kernel 4.4 or newer.

Currently existing devices that are upgraded to Android Oreo are only required to run kernel version 3.18 or newer, and will not have to be upgraded to support Project Treble.

Источник

What is the difference between the Linux Kernel and the Android Kernel?

What are the modifications done in linux kernel to make it an android kernel ? By this question I mean what are the differences between linux kernel and android kernel ?

3 Answers 3

The differences change from version to version (both of Linux and of Android), and the exact kernel is different for each device. A kernel for Android is a mainstream Linux kernel, with additional drivers for the specific device, and other additional functionality, such as enhanced power management or faster graphics support.

Many features in the Android kernel are later added to upstream Linux after the open-source community has accepted (and perhaps modified) them, but others are never upstreamed, either because they’re not acceptable to the Linux kernel developers, or because they’re only applicable to Android or to specific hardware.

I think this Android Source is a great documentation for understanding it.

And here is a list of changes done from mainline kernel for android kernel 4.14.

The largest features include:

  • 19.8% Energy Aware Scheduling (kernel/sched)
  • 13.8% Networking (net/netfilter)
  • 13.5% Sdcardfs (fs/sdcardfs)
  • 9.4% USB (drivers/usb)
  • 7.2% SoC (arch/arm64, arch/x86)
  • 6.2% f2fs (fs/f2fs — backports from upstream)
  • 6.1% Input (drivers/input/misc)
  • 5.4% FIQ Debugger (drivers/staging/android/fiq_debugger)
  • 3.6% Goldfish Emulator (drivers/platform/goldfish)
  • 3.4% Verity (drivers/md)
  • 11.6% Other

Differences from LTS

When compared to LTS (4.14.0), the Android common kernel has 355 changes, 32266 insertions, and 1546 deletions (as of February 2018).

Источник

Оцените статью