# Maintainer: Alexey Min # Kernel config based on: arch/arm64/configs/defconfig _flavor="postmarketos-qcom-sdm660" pkgname=linux-$_flavor pkgver=5.17.0 pkgrel=0 pkgdesc="Close to mainline linux kernel for Qualcomm Snapdragon 660 SoC" arch="aarch64" url="https://kernel.org/" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-nftables " makedepends="bison findutils flex installkernel openssl-dev perl" _tag="v5.17.0-sdm660" source=" linux-$_tag.tar.gz::https://github.com/sdm660-mainline/linux/archive/refs/tags/$_tag.tar.gz config-$_flavor.aarch64 " _carch="arm64" # for some reason, the directory inside .tar.gz does not match tag name: leading # "v" is missing, so we can't use $_tag here builddir="$srcdir/linux-5.17.0-sdm660" prepare() { default_prepare cp -v "$srcdir/config-$_flavor.$CARCH" "$builddir"/.config } build() { unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor" } package() { # bootloader requires compressed kernel install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \ "$pkgdir/boot/vmlinuz" install -D "$builddir/include/config/kernel.release" \ "$pkgdir/usr/share/kernel/$_flavor/kernel.release" make modules_install dtbs_install \ ARCH="$_carch" \ INSTALL_MOD_PATH="$pkgdir" \ INSTALL_MOD_STRIP=1 \ INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb" } sha512sums=" 55a43cf8db2089b9e72796d176bf03805b38ad6433ea1a6db3350da4f829f380f4c6ec5ed2bb189867c44b9369b9b74d53039a887a5ce23a9f7761b057c8e783 linux-v5.17.0-sdm660.tar.gz c1724eeb6e17a02c5eeb1eb76d1ed27bc24063a8c397fbf3415e0fb696152a98733711031e266cc6e54d8a2bf8bfdab34e5fce9584429ebab18fc4016bf6e041 config-postmarketos-qcom-sdm660.aarch64 "