pmaports/device/community/linux-postmarketos-qcom-sdm845/APKBUILD
Caleb Connolly e820b4171d
community/linux-postmarketos-qcom-sdm845: upgrade to 5.18.0 (MR 3143)
[ci:skip-build]: already built successfully in CI
2022-06-03 09:24:27 +02:00

67 lines
1.9 KiB
Text

# Maintainer: Caleb Connolly <caleb@connolly.tech>
# Co-Maintainer: Joel Selvaraj <jo@jsfamily.in>
# Stable Linux kernel with patches for SDM845 devices
# Kernel config based on: arch/arm64/configs/defconfig and sdm845.config
_flavor="postmarketos-qcom-sdm845"
pkgname=linux-$_flavor
pkgver=5.18.0
pkgrel=0
pkgdesc="Mainline Kernel fork for SDM845 devices"
arch="aarch64"
_carch="arm64"
url="https://gitlab.com/sdm845-mainline/linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-nftables
pmb:kconfigcheck-containers
pmb:kconfigcheck-zram
pmb:kconfigcheck-anbox
pmb:kconfigcheck-iwd"
makedepends="bison findutils flex installkernel openssl-dev perl"
_repo="linux"
_config="config-$_flavor.$arch"
_tag="sdm845-5.18.0"
# Source
source="
$_repo-$_tag.tar.gz::https://gitlab.com/sdm845-mainline/$_repo/-/archive/$_tag/$_repo-$_tag.tar.gz
$_config
"
builddir="$srcdir/$_repo-$_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"/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="
758fe0ae2cf2143a6bda187f36b8e0fd4ae34c6b0a1b38bd84741763c064ae95c6f9fabf678fc8b99a77409c5c3bd2048e4eee9579be28c5083c03516eb1e7df linux-sdm845-5.18.0.tar.gz
647045a8e6fa30992202b262a65df39a7969841b8942835460914190c22aa58e5a36950a6b68d2c8b8a071ec6b4eb7ea64a67af02e0d5eb146880be2e79457cd config-postmarketos-qcom-sdm845.aarch64
"