device-samsung-exynos9820: add a generic mainline port for Exynos 9820 devices

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8999>
This commit is contained in:
chiffa 2026-07-11 09:22:38 +03:00 committed by The Friendly Meow (merge) Bot
parent d94ed97ca6
commit b530ce6db6
No known key found for this signature in database
5 changed files with 8025 additions and 0 deletions

View file

@ -0,0 +1,41 @@
# Reference: <https://postmarketos.org/devicepkg>
maintainer="chiffa <chiffathefoxx@gmail.com>"
pkgname=device-samsung-exynos9820
pkgdesc="Samsung Exynos 9820 Generic Device"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
arch="aarch64"
license="MIT"
depends="
linux-postmarketos-exynos9820
postmarketos-base
reboot-mode
systemd-boot
"
makedepends="devicepkg-dev"
source="
deviceinfo
kernel-cmdline.conf
"
options="
!archcheck
!check
"
provides="
device-samsung-beyond1lte=$pkgver-r$pkgrel
device-samsung-beyond2lte=$pkgver-r$pkgrel
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
26a5734a312ea7653d721691b1044e985e2edf16559ec1ddaa4075da8eb838dd4c4fdef75e2c48e07ab11c5418504e7bd6224039725b192190e373dced90f2ff deviceinfo
997c829a5a4b187ebeda33c708caa5524561219f087697e5263171567a66c265739e8fe925dc612eb10920ec6d8facd936acd783d02e2e270446e8382904c341 kernel-cmdline.conf
"

View file

@ -0,0 +1,22 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Exynos 9820 Generic Device"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-exynos9820"
deviceinfo_year="2019"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_drm="true"
deviceinfo_external_storage="true"
# Bootloader related
deviceinfo_boot_filesystem="fat32"
# Heimdall fails mid-transfer when flashing rootfs. Use TWRP instead
deviceinfo_flash_method="none"
deviceinfo_initfs_compression="zstd:fast"
deviceinfo_rootfs_image_sector_size="4096"

View file

@ -0,0 +1 @@
maxcpus=6

View file

@ -0,0 +1,75 @@
# Kernel config based on: downstream arch/arm64/configs/exynos9820-beyond1lte_defconfig
maintainer="chiffa <chiffathefoxx@gmail.com>"
pkgname=linux-postmarketos-exynos9820
pkgver=7.2.0
pkgrel=0
_commit="0aeca03f7acddd3aacdf25b01fede0ee3c724d48"
pkgdesc="Close-to-mainline kernel for Samsung Exynos 9820 devices"
url="https://github.com/chiffathefox/exynos-9820-mainline-linux"
arch="aarch64"
_carch="arm64"
_flavor="${pkgname#linux-}"
license="GPL-2.0-only"
makedepends="
bc
bison
clang
elfutils-dev
findutils
flex
linux-headers
lld
llvm
openssl-dev
pahole
perl
postmarketos-installkernel
python3
zstd
"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz
$_config
"
options="
!check
!strip
!tracedeps
pmb:cross-native
"
builddir="$srcdir/$pkgname-$_commit"
builddir="$srcdir/exynos-9820-mainline-linux-$_commit"
prepare() {
default_prepare
cp "$srcdir/$_config" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" LLVM=1 \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
mkdir -p "$pkgdir"/boot
# No point in compressing the image because it's stored on UFS
make install modules_install dtbs_install \
ARCH="$_carch" \
LLVM=1 \
INSTALL_MOD_STRIP=1 \
INSTALL_PATH="$pkgdir"/boot \
INSTALL_MOD_PATH="$pkgdir"/usr \
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
rm -f "$pkgdir"/usr/lib/modules/*/build "$pkgdir"/usr/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
}
sha512sums="
c63f7a3ff89ee6485918f40129398f20443c0fed83daeac5d4a6a099fd5420fa9439563546240520f8b740af32f02ed928db0d5148657209fd01e89dc9b2f268 linux-postmarketos-exynos9820-0aeca03f7acddd3aacdf25b01fede0ee3c724d48.tar.gz
0500ea232afb949646769f1d1c45146250e15f3fa338e981ba842a9392682821fb44aaa035dd5b82a358bafec7235440695bfca1fffebece97952b8648f469cd config-postmarketos-exynos9820.aarch64
"