adf423de58
Signed-off-by: Alistair Francis <alistair@alistair23.me>
88 lines
2.6 KiB
Text
88 lines
2.6 KiB
Text
# Reference: <https://postmarketos.org/vendorkernel>
|
|
# Maintainer: Clayton Craft <clayton@craftyguy.net>
|
|
# Co-Maintainer: Alistair Francis <alistair@alistair23.me>
|
|
# Co-Maintainer: Newbyte <newbyte@postmarketos.org>
|
|
pkgname=linux-purism-librem5
|
|
pkgver=6.2.2
|
|
pkgrel=0
|
|
# NOTE: Don't forget to rebase the config! See prepare() for instructions.
|
|
_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"
|
|
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
|
|
|
|
####### Rebase config
|
|
# The kernel config needs to be periodically rebased to enable new
|
|
# modules/features that Purism has enabled in their defconfig. This is done
|
|
# by: 1) generate .config using librem5_defconfig, 2) diff that .config
|
|
# with the config in this package, 3) carefully going over the diff and
|
|
# selecting new things enabled in their config.
|
|
#
|
|
# This can be uncommented to help generate the defconfig using "pmbootstrap
|
|
# build linux-purism-librem5". The build will fail (exit 1) to let you grab
|
|
# the config before it starts building the kernel:
|
|
# make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
# defconfig KBUILD_DEFCONFIG=librem5_defconfig
|
|
# exit 1
|
|
}
|
|
|
|
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="
|
|
8ad100d1008607b0c6801bd5b8103183cac8685ee47debf106b6bed4d26a2aaf8646a414fddfcfd319b542042cff281e4bcf28404d7dc20065246a436367db1d linux-purism-librem5-6.2.2pureos1.tar.gz
|
|
a24467c64a8372815e0492dc47078121afd3e6ed27bfcd9e75ed2e34c3cb1abaeefa91d4180dd7ff22b5f96b0be1eb12cb355bcd5bc14a55898e504218da3b52 config-purism-librem5.aarch64
|
|
"
|