pmaports/main/linux-postmarketos-qcom-sdm845/APKBUILD

68 lines
1.9 KiB
Text
Raw Normal View History

# Maintainer: Caleb Connolly <caleb@connolly.tech>
# Co-Maintainer: Joel Selvaraj <jo@jsfamily.in>
# Stable Linux kernel with patches for SDM845 devices
# Kernel config based on: arch/arm64/configs/defconfig and sdm845.config
_flavor="postmarketos-qcom-sdm845"
pkgname=linux-$_flavor
pkgver=5.16.0_rc5
pkgrel=1
pkgdesc="Mainline Kernel fork for SDM845 devices"
arch="aarch64"
_carch="arm64"
url="https://gitlab.com/sdm845-mainline/linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-nftables
pmb:kconfigcheck-containers
pmb:kconfigcheck-zram
pmb:kconfigcheck-anbox
pmb:kconfigcheck-iwd"
makedepends="bison findutils flex installkernel openssl-dev perl"
_repo="linux"
_config="config-$_flavor.$arch"
_tag="sdm845-5.16-rc5"
# Source
source="
$_repo-$_tag.tar.gz::https://gitlab.com/sdm845-mainline/$_repo/-/archive/$_tag/$_repo-$_tag.tar.gz
$_config
"
builddir="$srcdir/$_repo-$_tag"
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
install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \
"$pkgdir/boot/vmlinuz"
make 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="
1498b1cc2acc298ee02681291093cd824b83c0fa08d951f68befe3cadd8aea67940a80ca8af9029f6c0a0ce01ed1818fddd748db897811acb226ba0b9a997b39 linux-sdm845-5.16-rc5.tar.gz
020284659cf017fff7aad38adda39b0cab9a11a5520827c1771dbe1a480dae2614377d7e085be39c14cd633e96ebd671ab6d0f9a1c4c4af96d31533b21df0571 config-postmarketos-qcom-sdm845.aarch64
"