# Maintainer: Caleb Connolly # Co-Maintainer: Uclydde # Stable Linux kernel with patches for SM8150 devices # Kernel config based on: arch/arm64/configs/defconfig and sm8150.config _flavor="postmarketos-qcom-sm8150" pkgname=linux-$_flavor pkgver=5.12 pkgrel=3 pkgdesc="Mainline Kernel fork for SM8150 devices" arch="aarch64" _carch="arm64" url="https://gitlab.com/sm8150-mainline/linux" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-nftables " makedepends="bison findutils flex installkernel openssl-dev perl" _repo="linux" _config="config-$_flavor.$arch" _commit="76851ee4194b4d85df168064cf380a4437b28b51" # Source source=" $_repo-$_commit.tar.gz::https://gitlab.com/sm8150-mainline/$_repo/-/archive/$_commit/$_repo-$_commit.tar.gz $_config " builddir="$srcdir/$_repo-$_commit" prepare() { default_prepare cp "$srcdir/config-$_flavor.$arch" .config } build() { unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor" } package() { mkdir -p "$pkgdir"/boot make zinstall modules_install dtbs_install \ ARCH="$_carch" \ INSTALL_PATH="$pkgdir"/boot/ \ INSTALL_MOD_PATH="$pkgdir" \ INSTALL_MOD_STRIP=1 \ INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source install -D "$builddir"/include/config/kernel.release \ "$pkgdir"/usr/share/kernel/$_flavor/kernel.release } sha512sums=" 1fc3ad729a1cb480bc457f10e2b249d17f0fdb72a6c77cc557024d20e28e7db410350e800090b81a8708d952a2b8faddeff9df71e62ee440f62f9fd77a0d195e linux-76851ee4194b4d85df168064cf380a4437b28b51.tar.gz 5065c192a18f1e10918011d500ec3a5d62fe19426fc28592036ab38149e04a9a0995624e55f02234f5c4a9cba8b2868a2ae3653e7296172e1a43086ceecf5470 config-postmarketos-qcom-sm8150.aarch64 "