pmaports/device/community/linux-postmarketos-qcom-sdm845/APKBUILD

67 lines
1.9 KiB
Text
Raw Normal View History

# 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.19.0
2022-08-07 18:01:05 +00:00
pkgrel=1
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="bash bison findutils flex installkernel openssl-dev perl"
_config="config-$_flavor.$arch"
_tag="sdm845-5.19.0"
# Source
source="
linux-$_tag.tar.gz::https://gitlab.com/sdm845-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"/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="
90a6b7929cc120e3cc38a1b99544e70f762ec84d623c15a668f4dec0af8f099e6cdc591b08dcb93334470532d381920f6be23863cc9ab9383e7dc40c536a7db8 linux-sdm845-5.19.0.tar.gz
2022-08-07 18:01:05 +00:00
d33ad964017083707ed81b414dbc2982f110c5a376e4836269d476d34f53032553273038fdbd2068a9a4b85167c7e3621ff36fe921945c4366408d826a3d2213 config-postmarketos-qcom-sdm845.aarch64
"