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

61 lines
1.8 KiB
Text
Raw Normal View History

# Maintainer: Caleb Connolly <caleb@connolly.tech>
# Co-Maintainer: Joel Selvaraj <joelselvaraj.oss@gmail.com>
# 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=6.4.0
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="!check !tracedeps
pmb:cross-native
pmb:kconfigcheck-community"
makedepends="bash bison findutils flex installkernel openssl-dev perl zstd"
_config="config-$_flavor.$arch"
_tag="sdm845-6.4-r1"
# 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() {
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"/boot/dtbs
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="
001c80f8f8e574047c1e34f397822a51259bd0cf729bcc2642b421789fdfde546670bcd3e1426a5ba82724e0e24458bcb7a902dc709afd37d7d2c7c53f23bc7a linux-sdm845-6.4-r1.tar.gz
3ac7129b965d8d2ca3126d6cf8960febb175f36fda5a3578be8bd35578bed1dc157c2c64af94d4cef882ee56de946155e3a74f0d7d5a3493f770da30c731b017 config-postmarketos-qcom-sdm845.aarch64
"