pmaports/device/testing/linux-purism-librem5/APKBUILD
2020-05-23 17:38:20 +02:00

57 lines
1.8 KiB
Text

# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/librem5-devkit_defconfig
pkgname=linux-purism-librem5
# <kernel ver>.<purism kernel release>
pkgver=5.6.5
_purismver=${pkgver}+librem5.1
pkgrel=0
pkgdesc="Purism Librem 5 phone kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="purism-librem5"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev
devicepkg-dev bison flex openssl-dev"
# Source
_repository="linux-next"
# imx8-current-librem5 branch:
# kconfig generated with: ARCH=arm64 make defconfig KBUILD_DEFCONFIG=librem5_defconfig
_config="config-$_flavor.$arch"
source="
$pkgname-$_purismver.tar.gz::https://source.puri.sm/Librem5/$_repository/-/archive/pureos/$_purismver/$_repository-pureos-$_purismver.tar.gz
$_config
"
builddir="$srcdir/$_repository-pureos-$_purismver"
prepare() {
default_prepare
REPLACE_GCCH=0 \
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
local _install
case "$CARCH" in
aarch64*|arm*) _install="modules_install dtbs_install" ;;
*) _install="modules_install" ;;
esac
make -j1 $_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
}
sha512sums="dcfb78b87f46e03c1c3ed070ac85693f00534c113715279ac2848e8ff4d7a615bc853faaf5b8b02979e7e058ca1297bcab9ac633612ae399104d1b49a38e644d linux-purism-librem5-5.6.5+librem5.1.tar.gz
1edff35701c61acd82243550ed9cf63e344e32ca0c13d87524e64918b3b712736f44862188990fa2be6fe5e582a8e9b9d9e13a96fcd4b956ee8eea93a3ca2d81 config-purism-librem5.aarch64"