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.9_rc7
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="f07a6518e007bc9f816ef285b408424c85cfae3c80c26dd35d530da448fa364521a5b90a15f05a6476004c718380b1c37c7da14213ccfb9f487e9cddf1b6bccd linux-postmarketos-qcom-msm8916-v5.9-rc7-msm8916.tar.gz
316e25652a881b80a066bbd2d9e33b6cf7acc9c6dea7401b94ef9470b87d6a0b90a0a10634eca18722c812ed50e760ec4150a9f95cfa58893af528bd61360eef config-postmarketos-qcom-msm8916.aarch64
cc82953dfb16d217699b8e9702743cd2a94e8ee4118f4031b01ecfbca9368d64d743432a801ae649642d3654b61576c1b7ccf41837b284f4b0ec746c9bc508f5 config-postmarketos-qcom-msm8916.armv7"