76 lines
2 KiB
Text
76 lines
2 KiB
Text
# Reference: <https://postmarketos.org/vendorkernel>
|
|
# Maintainer: Clayton Craft <clayton@craftyguy.net>
|
|
# Co-Maintainer: Alistair Francis <alistair@alistair23.me>
|
|
pkgname=linux-purism-librem5
|
|
pkgver=6.1.8
|
|
pkgrel=1
|
|
_purismrel=1
|
|
# <kernel ver>.<purism kernel release>
|
|
_purismver=${pkgver}pureos$_purismrel
|
|
pkgdesc="Purism Librem 5 phone kernel fork"
|
|
arch="aarch64"
|
|
_carch="arm64"
|
|
_flavor="purism-librem5"
|
|
url="https://source.puri.sm/Librem5/linux-next"
|
|
license="GPL-2.0-only"
|
|
options="!strip !check !tracedeps
|
|
pmb:cross-native
|
|
pmb:kconfigcheck-community
|
|
"
|
|
makedepends="
|
|
bash
|
|
bison
|
|
devicepkg-dev
|
|
findutils
|
|
flex
|
|
installkernel
|
|
openssl-dev
|
|
perl
|
|
rsync
|
|
xz
|
|
"
|
|
install="$pkgname.post-upgrade"
|
|
|
|
# Source
|
|
_repository="linux"
|
|
# 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/linux/-/archive/pureos/$_purismver/linux-pureos-$_purismver.tar.gz
|
|
$_config
|
|
"
|
|
builddir="$srcdir/$_repository-pureos-$_purismver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
REPLACE_GCCH=0 \
|
|
. downstreamkernel_prepare
|
|
|
|
# NOTE: only for generating a config based on Purism's defconfig, for rebasing...
|
|
# make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
# defconfig KBUILD_DEFCONFIG=librem5_defconfig
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
|
LOCALVERSION=".$_purismrel"
|
|
}
|
|
|
|
package() {
|
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
|
|
|
make modules_install dtbs_install \
|
|
ARCH="$_carch" \
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
|
|
|
|
}
|
|
|
|
sha512sums="
|
|
5f4510b859a59cb8e52280c8609c15ec8a14b857616ff55b0505b1492ad566845143997ce04bcab3011e04f06d4de5574673d62dbe8ce28b3b66a4a9321113bd linux-purism-librem5-6.1.8pureos1.tar.gz
|
|
c8a47bddfe5134d171efc4e7211667f3b554edb867f36232b2018afb5a0980cf35aaafb11b40ecaa0057dd23adccfc5992d2f0df9b018e206d2a9af70adc3533 config-purism-librem5.aarch64
|
|
"
|