2019-01-10 03:47:19 +00:00
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
2020-06-24 08:13:56 +00:00
|
|
|
# Maintainer: Clayton Craft <clayton@craftyguy.net>
|
2020-04-25 09:51:42 +00:00
|
|
|
pkgname=linux-purism-librem5
|
2020-06-24 08:13:56 +00:00
|
|
|
# Note: _p#, where # is the purism version, e.g. the '2' in 'librem5.2'
|
2020-08-09 18:23:32 +00:00
|
|
|
pkgver=5.8.0_p1
|
2020-05-13 02:51:44 +00:00
|
|
|
pkgrel=0
|
2020-06-24 08:13:56 +00:00
|
|
|
_kernver=${pkgver%_p*}
|
|
|
|
_purismrel=${pkgver#*_p}
|
|
|
|
# <kernel ver>.<purism kernel release>
|
|
|
|
_purismver=${_kernver}+librem5.$_purismrel
|
2020-01-12 02:51:36 +00:00
|
|
|
pkgdesc="Purism Librem 5 phone kernel fork"
|
2019-01-10 03:47:19 +00:00
|
|
|
arch="aarch64"
|
|
|
|
_carch="arm64"
|
2020-01-12 02:51:36 +00:00
|
|
|
_flavor="purism-librem5"
|
2020-06-24 08:13:56 +00:00
|
|
|
url="https://source.puri.sm/Librem5/linux-next"
|
2019-01-10 03:47:19 +00:00
|
|
|
license="GPL-2.0-only"
|
2020-04-21 01:24:27 +00:00
|
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
2019-01-10 03:47:19 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev
|
|
|
|
devicepkg-dev bison flex openssl-dev"
|
|
|
|
|
|
|
|
# Source
|
2019-09-01 04:06:00 +00:00
|
|
|
_repository="linux-next"
|
2020-02-02 20:16:38 +00:00
|
|
|
# kconfig generated with: ARCH=arm64 make defconfig KBUILD_DEFCONFIG=librem5_defconfig
|
2020-01-12 02:51:36 +00:00
|
|
|
_config="config-$_flavor.$arch"
|
2019-01-10 03:47:19 +00:00
|
|
|
source="
|
2020-03-14 20:34:08 +00:00
|
|
|
$pkgname-$_purismver.tar.gz::https://source.puri.sm/Librem5/$_repository/-/archive/pureos/$_purismver/$_repository-pureos-$_purismver.tar.gz
|
2019-01-10 03:47:19 +00:00
|
|
|
$_config
|
|
|
|
"
|
2020-03-14 20:34:08 +00:00
|
|
|
builddir="$srcdir/$_repository-pureos-$_purismver"
|
2019-01-10 03:47:19 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
default_prepare
|
2019-01-29 08:50:55 +00:00
|
|
|
REPLACE_GCCH=0 \
|
2020-04-01 07:09:30 +00:00
|
|
|
. downstreamkernel_prepare
|
2019-01-10 03:47:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2020-06-24 08:13:56 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
|
|
|
LOCALVERSION=".$_purismrel"
|
2019-01-10 03:47:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2020-02-18 08:34:06 +00:00
|
|
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
2019-01-10 03:47:19 +00:00
|
|
|
|
2020-06-16 02:16:01 +00:00
|
|
|
make modules_install dtbs_install \
|
2019-01-10 03:47:19 +00:00
|
|
|
ARCH="$_carch" \
|
|
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
|
|
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
|
|
|
|
|
|
|
}
|
2020-08-09 18:23:32 +00:00
|
|
|
sha512sums="e257f39a653b146d6e5d85df7bd657153ed540f002e52c7567e3545aa27d349e0adad3a0e7ebed22a819094033e45651968f8c7937f80231acd9e741570b4b79 linux-purism-librem5-5.8.0+librem5.1.tar.gz
|
|
|
|
13e6d08201b839318c9f0da8d26e5b6d1cecfcba82ff1a2cd5e589e92461b5685b89a802dddaa86dcd1f0d22b7d1a7b728150b7a0479bf3a8584b6562902be48 config-purism-librem5.aarch64"
|