Samsung Exynos 7
| Exynos (ARM64) Mainlining Community on Matrix. |
Samsung Exynos 7 is a family of mobile SoCs. The first SoC in this family was announced by Samsung in 2015. These SoCs power innumerable Samsung devices across all price points. There have been efforts to get the SoCs and its devices working in the upstream kernel.
SoCs
Samsung Exynos 7870
|
| |
| Manufacturer | Samsung |
|---|---|
| Name | Exynos 7870 |
| Codenames | joshua |
| Architecture | aarch64 |
| CPU | 8x ARM Cortex-A53 @ 1.6GHz |
| GPU | ARM Mali-T830 MP1 |
| Year | 2016 |
| Process | 14nm |
| Mainline | yes |
Community Page A link to a git{hub,lab} organisation/repo where development happens. |
https://gitlab.com/exynos7870-mainline |
CPU SMP (bring up secondary CPU cores), CPU frequency scaling, CPUidle |
Works
|
|---|---|
UART |
Works
|
Storage eMMC, SD cards, UFS, ... |
Works
|
USB |
Works
|
Display |
Works
|
GPU |
Works
|
Pinctrl |
Works
|
I²C |
Works
|
SPI Serial Peripheral Interface |
Broken
|
Audio |
Broken
|
Video Hardware-accelerated video de/encoding |
Broken
|
Thermal |
Broken
|
Modem Calls, SMS, Internet |
Broken
|
GPS |
Broken
|
Camera |
Broken
|
Suspend |
Broken
|
| The kernel was initially distributed as a close-to-mainline kernel fork. There may be some devices which are still relying on it. |
Devices
| Device | Codename | Category |
|---|---|---|
| Samsung Galaxy A2 Core | samsung-a2corelte | testing |
| Samsung Galaxy A3 (2017) | samsung-a3y17lte | downstream |
| Samsung Galaxy A6 (2018) | samsung-a6lte | testing |
| Samsung Galaxy J5 2017 | samsung-j5y17lte | testing |
| Samsung Galaxy J6 (2018) | samsung-j6lte | testing |
| Samsung Galaxy J7 (2016) | samsung-j7xelte | testing |
| Samsung Galaxy J7 Prime | samsung-on7xelte | testing |
| Samsung Galaxy J7 Pro | samsung-j7y17lte | downstream |
| Samsung Galaxy Tab A 10.1 (2016) | samsung-gtaxl, samsung-gtanotexl | downstream |
Contributors
Close-to-Mainline Linux
| This section serves as documentation on getting started with developing on the close-to-mainline kernels. |
Samsung Exynos 7870
Source code
Clone the git repository of the close-to-mainline fork:
$ git clone https://gitlab.com/exynos7870-mainline/linux.git
$ cd linux/
The default branch should be fine in most cases. It's usually the version which is present in upstream pmaports.
Setup a cross-compiler
This is not required if you're using a 64-bit ARM host.
For other architectures, a cross-compiler needs to be set up. Install aarch64-linux-gnu-gcc from the host's package manager (find out the corresponding package name), then run:
$ export CROSS_COMPILE=aarch64-linux-gnu-
Generate the kernel config and compile
The kernel config describes which parts of the kernel (features, drivers, etc.) are to be compiled. Generating it will require two config fragments:
exynos7870.config: This describes all drivers to be enabled, which are used by supported devices.postmarketos.config: Or whatever your target distribution is. These config options are mandated by said distribution. In case of postmarketOS, it adheres to kconfigcheck.toml.
$ make ARCH=arm64 O=.output/ defconfig exynos7870.config postmarketos.config
Now, the kernel can be compiled:
$ make ARCH=arm64 O=.output/ -j$(nproc)
Packaging
Creating a linux package is quite simple with the envkernel utility provided in pmbootstrap. Execute the following from the root of the kernel directory:
$ pmbootstrap build --envkernel linux-postmarketos-exynos7870
Flashing
The simplest method to flash is to use sideloading. It requires the device to be connected to host via USB, and booted into postmarketOS.
$ pmbootstrap sideload linux-postmarketos-exynos7870
However, they may be certain cases where this isn't possible (for instance, a new installation, or an unbootable kernel). In such scenarios, flash it using Heimdall:
$ pmbootstrap flasher flash_kernel
Do note that this method doesn't update the modules, so there is a chance of kernel version mismatch, which renders a lot of components non-functional. USB should work though, so a sideload operation followed by a reboot should fix it.