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>
|
2022-12-09 12:13:27 +00:00
|
|
|
# Co-Maintainer: Alistair Francis <alistair@alistair23.me>
|
2023-02-06 14:12:11 +00:00
|
|
|
# Co-Maintainer: Newbyte <newbyte@postmarketos.org>
|
2020-04-25 09:51:42 +00:00
|
|
|
pkgname=linux-purism-librem5
|
2023-03-01 01:19:38 +00:00
|
|
|
pkgver=6.2.1
|
2023-02-20 09:48:03 +00:00
|
|
|
pkgrel=0
|
2023-02-24 08:27:06 +00:00
|
|
|
# NOTE: Don't forget to rebase the config! See prepare() for instructions.
|
2021-11-16 19:58:06 +00:00
|
|
|
_purismrel=1
|
2020-06-24 08:13:56 +00:00
|
|
|
# <kernel ver>.<purism kernel release>
|
2021-02-18 00:21:50 +00:00
|
|
|
_purismver=${pkgver}pureos$_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"
|
2023-02-09 17:41:07 +00:00
|
|
|
url="https://source.puri.sm/Librem5/linux"
|
2019-01-10 03:47:19 +00:00
|
|
|
license="GPL-2.0-only"
|
2021-06-24 01:28:42 +00:00
|
|
|
options="!strip !check !tracedeps
|
2022-09-07 20:43:05 +00:00
|
|
|
pmb:cross-native
|
|
|
|
pmb:kconfigcheck-community
|
2021-06-24 01:28:42 +00:00
|
|
|
"
|
2020-12-05 04:29:54 +00:00
|
|
|
makedepends="
|
2022-10-02 03:13:47 +00:00
|
|
|
bash
|
2020-12-05 04:29:54 +00:00
|
|
|
bison
|
|
|
|
devicepkg-dev
|
|
|
|
findutils
|
|
|
|
flex
|
|
|
|
installkernel
|
|
|
|
openssl-dev
|
|
|
|
perl
|
2021-03-09 05:32:09 +00:00
|
|
|
rsync
|
|
|
|
xz
|
2020-12-05 04:29:54 +00:00
|
|
|
"
|
2021-03-24 18:52:19 +00:00
|
|
|
install="$pkgname.post-upgrade"
|
2019-01-10 03:47:19 +00:00
|
|
|
|
|
|
|
# Source
|
2022-02-28 09:58:48 +00:00
|
|
|
_repository="linux"
|
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"
|
2022-10-02 03:13:47 +00:00
|
|
|
|
|
|
|
|
2019-01-10 03:47:19 +00:00
|
|
|
source="
|
2022-02-28 09:58:48 +00:00
|
|
|
$pkgname-$_purismver.tar.gz::https://source.puri.sm/Librem5/linux/-/archive/pureos/$_purismver/linux-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
|
2022-10-02 03:13:47 +00:00
|
|
|
|
2023-02-24 08:27:06 +00:00
|
|
|
####### 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
|
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" \
|
2022-07-30 18:11:01 +00:00
|
|
|
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
|
2019-01-10 03:47:19 +00:00
|
|
|
|
|
|
|
}
|
2021-03-09 05:32:09 +00:00
|
|
|
|
2021-05-07 07:15:58 +00:00
|
|
|
sha512sums="
|
2023-03-01 01:19:38 +00:00
|
|
|
6260775c67c51934811a70dda2998ef73b62ae9a2e22ee9439251f94ba87bad523cd94369c4500f6e8fddd435022565d19d9c101d7a656f0a00d94df03e191fb linux-purism-librem5-6.2.1pureos1.tar.gz
|
2023-02-21 10:55:26 +00:00
|
|
|
7580f134cf83d16fc805d39ab10f2c8de54eba0647b810488a12d8d3e064e70e46ee58752a2fe6d87172ee29ea94d51f95954448185b4af3e382ff4d534b1516 config-purism-librem5.aarch64
|
2021-05-07 07:15:58 +00:00
|
|
|
"
|