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

57 lines
1.8 KiB
Text
Raw Normal View History

# Maintainer: Minecrell <minecrell@minecrell.net>
# Kernel config based on: arch/arm64/configs/msm8916_defconfig
_flavor="postmarketos-qcom-msm8916"
pkgname=linux-$_flavor
pkgver=5.7
pkgrel=0
pkgdesc="Mainline kernel fork for Qualcomm MSM8916 devices"
arch="aarch64 armv7"
url="https://github.com/msm8916-mainline/linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-anbox"
makedepends="bison findutils flex installkernel openssl-dev perl"
# Architecture
case "$CARCH" in
aarch64) _carch="arm64" ;;
arm*) _carch="arm" ;;
esac
# Source
_tag=v${pkgver//_/-}-msm8916
source="
$pkgname-$_tag.tar.gz::$url/archive/$_tag.tar.gz
config-$_flavor.aarch64
config-$_flavor.armv7
"
builddir="$srcdir/linux-${_tag#v}"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$CARCH" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION=$((pkgrel + 1 ))
}
package() {
mkdir -p "$pkgdir"/boot
make zinstall modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot \
INSTALL_MOD_PATH="$pkgdir" \
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="329385ee63cb88a2f96baf55338cb5cd2dd3b3cc974bf38013d212c9e9e8b25a0da23d1e1d7a8b1677f5526dd8d8b93fc6ca2b6e24f363fe3416d1abe336e563 linux-postmarketos-qcom-msm8916-v5.7-msm8916.tar.gz
f65dcd1f3c74ace5e14f23690860467e6c0ee065dd0fb4fcb5f36eac28c722697c0940ec2fd936d9acaac6d5c87fbe9f3fbdfd1e5becc4c9ef077c738206ecba config-postmarketos-qcom-msm8916.aarch64
6e3f1a2ab14e6af80f89f3b9d782f4afef6a703143b287b660b0554f89b5bccaf365bc6788a885b1c877207b66b2ae760456ffe62bc6ee4f3983936d977b104d config-postmarketos-qcom-msm8916.armv7"