pmaports/device/testing/linux-postmarketos-qcom-sdm670/APKBUILD

64 lines
2.2 KiB
Text

# Maintainer: Richard Acayan <mailingradian@gmail.com>
# 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.7.2
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 zstd"
_config="config-$_flavor.$arch"
_tag="sdm670-v$pkgver"
# Source
source="
https://gitlab.com/sdm670-mainline/linux/-/archive/$_tag/linux-$_tag.tar.gz
$_config
0001-drm-panel-samsung-s6e3fa7-move-dsi-commands-to-disab.patch
0002-drm-panel-samsung-s6e3fa7-correct-disable-callback-c.patch
"
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="
8d42ef069cd484dfc018e6134446654ed4727d6c1ea49b99bed1632904c281cbaf921994e04cae95718578897a8aa1d2fa3d4fcc60cadfabc53737b1f9bbd7be linux-sdm670-v6.7.2.tar.gz
1ea6537720e721e9ac4b4d3cc685e258c9704525ec141adfb42ccfae66b3c5c24f147ba2bcf0c9a4c3b1db0dd810447c332b7309e595bca34a3df974e9db77fd config-postmarketos-qcom-sdm670.aarch64
a18f6cfeb3370dd2d272e888a94318e93b6541257261558a6d1f3a76063eefa8fc77abb8691e50a577986139831fb397d50ac57f444cb57ddbfd829af6cf9799 0001-drm-panel-samsung-s6e3fa7-move-dsi-commands-to-disab.patch
3f09da7a8d9e097c73f5d27ffffd332fa587b481b1cc09116d042abaf966bbbe87f5d13b5c83a4d7a9a04d7c5777887c29e5870e543690b60058b69c29dbbb1f 0002-drm-panel-samsung-s6e3fa7-correct-disable-callback-c.patch
"