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>
|
2021-04-05 21:14:33 +00:00
|
|
|
# Co-Maintainer: Bhushan Shah <bshah@kde.org>
|
2020-04-25 09:51:42 +00:00
|
|
|
pkgname=linux-purism-librem5
|
2021-03-21 18:08:54 +00:00
|
|
|
pkgver=5.11.6
|
2021-03-24 18:52:19 +00:00
|
|
|
pkgrel=1
|
2021-02-18 00:21:50 +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"
|
2020-06-24 08:13:56 +00:00
|
|
|
url="https://source.puri.sm/Librem5/linux-next"
|
2019-01-10 03:47:19 +00:00
|
|
|
license="GPL-2.0-only"
|
2020-04-21 01:24:27 +00:00
|
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
2020-12-05 04:29:54 +00:00
|
|
|
makedepends="
|
|
|
|
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-09 05:32:09 +00:00
|
|
|
subpackages="$pkgname-dev"
|
2021-03-24 18:52:19 +00:00
|
|
|
install="$pkgname.post-upgrade"
|
2019-01-10 03:47:19 +00:00
|
|
|
|
|
|
|
# Source
|
2019-09-01 04:06:00 +00:00
|
|
|
_repository="linux-next"
|
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"
|
2019-01-10 03:47:19 +00:00
|
|
|
source="
|
2020-03-14 20:34:08 +00:00
|
|
|
$pkgname-$_purismver.tar.gz::https://source.puri.sm/Librem5/$_repository/-/archive/pureos/$_purismver/$_repository-pureos-$_purismver.tar.gz
|
2020-09-08 00:49:08 +00:00
|
|
|
8f11380ec32912370b8ae9134a0387a6f18862f7.patch
|
2021-02-18 00:21:50 +00:00
|
|
|
0001-Revert-arm64-dts-librem5-Drop-separte-DP-device-tree.patch
|
2021-03-15 22:13:45 +00:00
|
|
|
0002-bq25890_charger-enter-ship-mode-on-power-off.patch
|
2021-03-19 19:22:32 +00:00
|
|
|
0003-Revert-redpine-Clean-up-loop-in-the-interrupt-handler.patch
|
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
|
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" \
|
|
|
|
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
|
|
|
|
|
|
|
}
|
2021-03-09 05:32:09 +00:00
|
|
|
|
|
|
|
dev() {
|
|
|
|
provides="linux-headers"
|
|
|
|
replaces="linux-headers"
|
|
|
|
|
|
|
|
cd $builddir
|
|
|
|
|
|
|
|
# https://github.com/torvalds/linux/blob/master/Documentation/kbuild/headers_install.rst
|
|
|
|
make -j1 headers_install \
|
|
|
|
ARCH="$_carch" \
|
|
|
|
INSTALL_HDR_PATH="$subpkgdir"/usr
|
|
|
|
}
|
2021-03-21 18:08:54 +00:00
|
|
|
sha512sums="c79ca90f761cab9dd2806c91da2891a78f64c2a7c060a2dc2bd580235c991832f516ca8b23bf01d05d635f53a856aec9d7417baf611096599a7940aaea8c902a linux-purism-librem5-5.11.6pureos1.tar.gz
|
2020-09-08 00:49:08 +00:00
|
|
|
9870bff4b187188b519b23264c2634ee4232011fed6d2f66a7b4971db354ac3dffa0e1552bd0dc953c66ec622e18ce8899fdbcfba94f60867fc5004d6da96753 8f11380ec32912370b8ae9134a0387a6f18862f7.patch
|
2021-02-18 00:21:50 +00:00
|
|
|
5baae99010bde62e253fdd56f21ba096c217ba2ab9c367c80b34bc0f445a79a8fb8b5d14682f71ad6061d73c81fc16a608f4be037d792978dbbaf74267844260 0001-Revert-arm64-dts-librem5-Drop-separte-DP-device-tree.patch
|
2021-03-15 22:13:45 +00:00
|
|
|
1a12f74895b0fc710792e3881f23754a8eb92d25b11a2751db007a1b08f72729043d1e824096c97dc795b8e33300274887b428997ddaacf4b61f52ef3bd78ce5 0002-bq25890_charger-enter-ship-mode-on-power-off.patch
|
2021-03-19 19:22:32 +00:00
|
|
|
00286a7ea3d3167150eca1025f271bb76e05d8a47c481879b1322ec9e88250c365b1b0ddcc8140ccc9b8f6138ffec843f184645c0c7d4ff11f75c988f5c4945c 0003-Revert-redpine-Clean-up-loop-in-the-interrupt-handler.patch
|
2021-03-24 18:52:19 +00:00
|
|
|
71d2dd80757556ed450f4a8576986ef011c480d9c15234bb178a276f8b4b0b14e71a10c406d961ca166d5c4032a4c920804877b726aead0872d3debc0f6df9b2 config-purism-librem5.aarch64"
|