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

62 lines
2 KiB
Text

# 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.4.4
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
0001-arm64-dts-qcom-sdm670-google-sargo-move-modem-firmwa.patch
"
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="
43e50793c4e5666f31cbd85703e52a5f7244956dd4e0d15f57ce344fcf87caa952e09b6929f36bc8babc9a1a3ed76f04c0e4745648e511c681c264f8b96f2460 linux-sdm670-v6.4.4.tar.gz
cc8b458808afd157b01e1f0381168a6be4b3ff9b3f3319a3e1958f8262cda2466c54ef4b43b28de2c03cf596093672ab6fff10aaba714a84800e93fc14a069d4 config-postmarketos-qcom-sdm670.aarch64
d3c50b8209cc7cb25622c750499925106a1dc85bcf9704a806b413d4f9a976719160f13b7a790ccb33409e96f9a7e5c448f98fb370a87a31a2bc0edf4fb0cddd 0001-arm64-dts-qcom-sdm670-google-sargo-move-modem-firmwa.patch
"