2019-01-10 03:47:19 +00:00
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
2023-04-29 10:25:09 +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-06-13 15:25:58 +00:00
|
|
|
pkgver=6.3.7
|
2023-05-14 08:16:26 +00:00
|
|
|
pkgrel=0
|
2023-02-24 08:27:06 +00:00
|
|
|
# NOTE: Don't forget to rebase the config! See prepare() for instructions.
|
2023-05-14 08:16:26 +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-06-13 15:25:58 +00:00
|
|
|
a748f8f330e4e34155e80a4cc1e5e1366855cd09ebcb320782d27e32b4a9557a0584b8580efc062899270ddc9c22f3ec102197a37d9adb0664602996c27175ed linux-purism-librem5-6.3.7pureos1.tar.gz
|
|
|
|
6f579c82ed4627982a3803e6a251c8acba1ba51a3836db28fef289f2f6f8334f887b58eb0f34a5b0bb6b8936ffc2f65bb68dd3642c3862e4c285d5f15dbfb944 config-purism-librem5.aarch64
|
2021-05-07 07:15:58 +00:00
|
|
|
"
|