pmaports/device/community/linux-postmarketos-qcom-sdm845/APKBUILD

67 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.19.7
pkgrel=0
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="bash bison findutils flex installkernel openssl-dev perl"
_config="config-$_flavor.$arch"
_tag="sdm845-5.19.7"
# Source
source="
linux-$_tag.tar.gz::https://gitlab.com/sdm845-mainline/linux/-/archive/$_tag/linux-$_tag.tar.gz
$_config
"
builddir="$srcdir/linux-$_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="
efd6acd08d29490490fa81be57a302fffc04f14e060d0b7ed61371408c3a81749444f16349d2f803d491a2d4720c54bb34828d762c4e9d76dfb8b3084a8e8634 linux-sdm845-5.19.7.tar.gz
357c34d9853a95dd77e8f0b8265f7fdc8ac6c64cd9e15c4b86d37e88dc10bb69b8ca612f45304c8b6e956e41ff8dd3028171471af950a1af67f4eda22c9df03f config-postmarketos-qcom-sdm845.aarch64
"