2019-01-10 03:47:19 +00:00
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
2024-06-10 17:58:42 +00:00
|
|
|
# Maintainer: Alistair Francis <alistair@alistair23.me>
|
2023-02-06 14:12:11 +00:00
|
|
|
# Co-Maintainer: Newbyte <newbyte@postmarketos.org>
|
2024-06-10 17:58:42 +00:00
|
|
|
# Contributor: Clayton Craft <clayton@craftyguy.net>
|
2020-04-25 09:51:42 +00:00
|
|
|
pkgname=linux-purism-librem5
|
2024-07-28 10:06:49 +00:00
|
|
|
pkgver=6.6.40
|
2024-07-30 10:26:02 +00:00
|
|
|
pkgrel=1
|
2023-02-24 08:27:06 +00:00
|
|
|
# NOTE: Don't forget to rebase the config! See prepare() for instructions.
|
2024-06-13 10:37:53 +00:00
|
|
|
_purismrel=2
|
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
|
2024-06-21 11:54:00 +00:00
|
|
|
#
|
|
|
|
# After that run the following
|
|
|
|
# cp <chroot_native/home/pmos/build/src/linux-pureos-6.6.32pureos2/.config> \
|
|
|
|
# device/main/linux-purism-librem5/config-purism-librem5.aarch64
|
|
|
|
# pmbootstrap kconfig edit linux-purism-librem5
|
|
|
|
# pmbootstrap kconfig check linux-purism-librem5
|
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="
|
2024-07-28 10:06:49 +00:00
|
|
|
b16f6d040024d826d4ac7a33ad23137fafbf1ac7ac8adeef3fd80a80dc308b70cf572de6e4a451eb607b1d18ad58c03493108c7a1ff9b26fa2bd03a475002903 linux-purism-librem5-6.6.40pureos2.tar.gz
|
2024-07-30 10:26:02 +00:00
|
|
|
2982f5950820153cef5167b2cfebff7310b682266fda67fa370cebb8b6a93877f331a0f0877b127fc5ad186a72c9e6ed8b181ceeb6eb9ce74a56a4e9e4805ad2 config-purism-librem5.aarch64
|
2021-05-07 07:15:58 +00:00
|
|
|
"
|