# Maintainer: Minecrell # Co-Maintainer: Nikita Travkin # Kernel config based on: arch/arm64/configs/msm8916_defconfig _flavor="postmarketos-qcom-msm8916" pkgname=linux-$_flavor pkgver=5.15 pkgrel=0 pkgdesc="Mainline kernel fork for Qualcomm MSM8916 devices" arch="aarch64 armv7" url="https://github.com/msm8916-mainline/linux" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-anbox pmb:kconfigcheck-apparmor pmb:kconfigcheck-containers pmb:kconfigcheck-iwd pmb:kconfigcheck-nftables pmb:kconfigcheck-zram " makedepends=" bison findutils flex gmp-dev mpc1-dev mpfr-dev openssl-dev perl postmarketos-installkernel " # Architecture case "$CARCH" in aarch64) _carch="arm64" ;; arm*) _carch="arm" ;; esac # Source _tag=v${pkgver//_/-}-msm8916 source=" $pkgname-$_tag.tar.gz::$url/archive/$_tag.tar.gz config-$_flavor.aarch64 config-$_flavor.armv7 " builddir="$srcdir/linux-${_tag#v}" prepare() { default_prepare cp "$srcdir/config-$_flavor.$CARCH" .config } build() { unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION=$((pkgrel + 1 )) } 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=" 734d958bb9fa64e667e089aec0066a58526ae38fbf6fbd223a7bce746fe3ce7443ffe087f365a44f6892479186f2c0eb33abacd38eb7b0b8d40949602812e441 linux-postmarketos-qcom-msm8916-v5.15-msm8916.tar.gz edbb49af97c504bb0a1e1129e37aa83a032116a49405199a3c6513676173ebc69ab18cd1b00a22d6141937513e1e24c46c8431fd3513daba068c8b8fd8717979 config-postmarketos-qcom-msm8916.aarch64 cebebc2fccf434b189fe79f2d6114fd2d2191424a46538f68c30a41ecc95927ba242523cfd9ab272e1a86cca39402deaa6d7351156ed283dccd1b9c02b165c3e config-postmarketos-qcom-msm8916.armv7 "