pmaports/device/testing/linux-postmarketos-qcom-sdm670/APKBUILD

61 lines
1.7 KiB
Text
Raw Normal View History

# Maintainer: Richard Acayan <mailingradian@gmail.com>
# Stable Linux kernel with patches for SDM670 devices
# Kernel config based on: arch/arm64/configs/{defconfig,sdm{670,845}.config}
_flavor="postmarketos-qcom-sdm670"
pkgname=linux-$_flavor
pkgver=6.6.3
pkgrel=0
pkgdesc="Mainline Kernel fork for SDM670 devices"
arch="aarch64"
_carch="arm64"
url="https://gitlab.com/sdm670-mainline/linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native"
makedepends="bash bison findutils flex installkernel openssl-dev perl zstd"
_config="config-$_flavor.$arch"
_tag="sdm670-v$pkgver"
# Source
source="
https://gitlab.com/sdm670-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"/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="
5c07a3e7715db89f1fa9ccc4cd7f0d523526d94d1f736ff10667adbf2ac819bd90d117f5dfef0aa516e7df1eddccdb29416814d38726691b66d62ddde649b492 linux-sdm670-v6.6.3.tar.gz
e8d442148d6547447152160eaeff9c3ab1deea22c9dc2475868e29e0333043d1c3bff22710cb04e6481f270c35e323bb291cf1bf4c04d578babfc3501a130274 config-postmarketos-qcom-sdm670.aarch64
"