pmaports/device/community/linux-pine64-pinephonepro/APKBUILD
Dylan Van Assche 3ec4e103fa
community/linux-pine64-pinephonepro: enable SPI flash (MR 3401)
SPI flash for Tow-Boot was enabled a long time ago, but the config was missing in pmaports.

Enables https://gitlab.com/pine64-org/linux/-/merge_requests/29
[ci:skip-build]: already built successfully in CI
2022-09-05 08:47:34 +02:00

81 lines
1.8 KiB
Text

# Maintainer: Martijn Braam <martijn@brixit.nl>
pkgname=linux-pine64-pinephonepro
pkgver=5.17.9
pkgrel=1
pkgdesc="Mainline kernel for the pinephone pro"
arch="aarch64"
_flavor="${pkgname#linux-}"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-anbox
pmb:kconfigcheck-nftables
pmb:kconfigcheck-containers
pmb:kconfigcheck-zram
"
makedepends="
bison
findutils
flex
gmp-dev
gzip
linux-headers
mpc1-dev
mpfr-dev
openssl-dev
perl
postmarketos-installkernel
rsync
xz
"
case "$CARCH" in
aarch64*) _carch="arm64" ;;
arm*) _carch="arm" ;;
esac
# Source
_config="config-$_flavor.$CARCH"
case $pkgver in
*.*.*) _kernver=${pkgver%.0};;
*.*) _kernver=$pkgver;;
esac
source="
https://gitlab.com/pine64-org/linux/-/archive/ppp-$pkgver/linux-ppp-$pkgver.tar.gz
config-$_flavor.aarch64
"
builddir="$srcdir/linux-ppp-$pkgver"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$CARCH" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))"
}
package() {
mkdir -p "$pkgdir"/boot
make zinstall modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_PATH="$pkgdir"/boot \
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs-$_flavor
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="
9508e0947a242f83b803e2667247c7a46aa9f602926096f8a98fa90ace297b4be6cd153eb75820c44d8dc2d94d1994560402e93dc2f771ad1719fc4f10c799e2 linux-ppp-5.17.9.tar.gz
687b3b04d1fa479aae3f5f351188364e13ea96cdcbd2785993379c3cb8da19ae74516f7db85847c0845f27f376a73623d1f6e4f964779c186f2f6cde87c58df8 config-pine64-pinephonepro.aarch64
"