# Maintainer: Richard Acayan # Stable Linux kernel with patches for SDM670 devices # Kernel config based on: arch/arm64/configs/{defconfig,sdm{670,845}.config} _flavor="postmarketos-qcom-sdm670" pkgname=linux-$_flavor pkgver=6.0.6 pkgrel=0 pkgdesc="Mainline Kernel fork for SDM670 devices" arch="aarch64" _carch="arm64" url="https://gitlab.com/sdm670-mainline/linux" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native" makedepends="bash bison findutils flex installkernel openssl-dev perl" _config="config-$_flavor.$arch" _tag="sdm670-v$pkgver" # Source source=" https://gitlab.com/sdm670-mainline/linux/-/archive/$_tag/linux-$_tag.tar.gz $_config " builddir="$srcdir/linux-$_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"/boot/dtbs 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=" d9e4dcf560a1e5f28ca03d75e42aa0c2921590bd30f54625609c209a542d841ed6c27af230d5cb4e98319bf667189789579f9c585cc11bd682628103331c4cbd linux-sdm670-v6.0.6.tar.gz d9516820991a9782b6b65e4ab4e3b032e6aabed8d94fa7187a996e0652cf65708502f9da1d7f56cc0bda6c66afbb1c5ade1cb21a3537a1914dab1a1473a055d9 config-postmarketos-qcom-sdm670.aarch64 "