pmaports/device/community/linux-purism-librem5/APKBUILD
2020-06-24 10:12:13 +02:00

51 lines
1.7 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.7.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"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
}
sha512sums="0faaf984589ad4916b577b6a9353b0be20c163b60d88b4af4c7191bc1c59c490d25664b06c2f42900c9296d98361d3d3ae95b5e494778e4355ecb2e7ad4ad12d linux-purism-librem5-5.7.5+librem5.1.tar.gz
4d1f3b99c1f6ce3f95eab375403c6c4ca1ebb7131379ef3355e583993940b537d5026c9283289c1f512f0bfdbfad05c3153b4d5374ef8f13af74926f473b252c config-purism-librem5.aarch64"