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_rc2
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"
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="5329ef196b4a66d5831ba5addf3c132b1b2ccd0ff92a3f52228a46fa6b0e89b8fc7c8f59b9835f7bcfbb8c3cf1c49c0f3eccfbad10184d6c5cd2d9ef7ecaa5e5 linux-postmarketos-qcom-msm8916-v5.7-rc2-msm8916.tar.gz
e9a1a6016b363f1cb1630bed821975749fce37561e922a552cb42285438463984f2318bb25d7c01befd85d78c3c99dd3ece7790d5df8170bebbaecc7158494cf config-postmarketos-qcom-msm8916.aarch64
ff7ffaf453df420fb7f0206b05e8388f7f8ef18fc0b2418e480c09eac3abfb11885584a61330ee055d951532acefed80cf79e9293e9c408621ac49cdcdf2803b config-postmarketos-qcom-msm8916.armv7"