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
|
2022-04-16 05:59:46 +00:00
|
|
|
pkgver=5.17.2
|
2021-11-16 19:58:06 +00:00
|
|
|
pkgrel=0
|
|
|
|
_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"
|
2021-06-24 01:28:42 +00:00
|
|
|
options="!strip !check !tracedeps
|
|
|
|
pmb:cross-native pmb:kconfigcheck-nftables
|
|
|
|
pmb:kconfigcheck-zram
|
|
|
|
"
|
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
|
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"
|
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
|
2021-05-07 07:15:58 +00:00
|
|
|
0001-bq25890_charger-enter-ship-mode-on-power-off.patch
|
|
|
|
0002-arm64-dts-imx8mq-librem5.dtsi-adjust-the-usdhc-bus-s.patch
|
|
|
|
0003-imx8mq-librem5-r3-Set-the-CPU-voltage-to-1.0V-when-r.patch
|
2022-04-16 05:59:46 +00:00
|
|
|
0004-usb-quirks-hub_slow_reset-for-usb2642.patch
|
|
|
|
0005-usb-xhci-increase-XHCI_MAX_REXIT_TIMEOUT_MS.patch
|
|
|
|
0006-hack-usb-add-quirk-to-skip-reset_resume-in-hub_activ.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-05-07 07:15:58 +00:00
|
|
|
sha512sums="
|
2022-04-16 05:59:46 +00:00
|
|
|
9de286055c41df840901640ec21b75de0676050dd46bfee72a7d3c3bc7880228e05fcffd62ac4de5953bf276b062e24261375bf09afa9d97ce0e7d857f0eb3d3 linux-purism-librem5-5.17.2pureos1.tar.gz
|
2021-05-26 00:17:37 +00:00
|
|
|
0e3caf6275247e31b874b94330dc4f991837a4b62f3c15a1f8ad39a7edd02ae499679bcd7ddc9463bb1c1a5073ea5980fa144a2ece804d72a6b2fc8c76c50766 0001-bq25890_charger-enter-ship-mode-on-power-off.patch
|
|
|
|
1dbf2adaf097bcce3ee179cd6b0f10d2ebefdc82191d34fffea8cb336c9dcbc66b717bf97a2e264b8068f178c0254f2b1281a09ae72d4825fd7b4a39916c0461 0002-arm64-dts-imx8mq-librem5.dtsi-adjust-the-usdhc-bus-s.patch
|
|
|
|
c52f9e7e17f876697000a0c3b959a0d571ca506ba55ee5158e30ac00e148372097c88951a354190f669137a955405c87042a925c1bbe3cd91df40721650d45d3 0003-imx8mq-librem5-r3-Set-the-CPU-voltage-to-1.0V-when-r.patch
|
2022-04-16 05:59:46 +00:00
|
|
|
e449c1213fa49bbb5cb5c73b9a18f7506ac6e4305ebfc5bb2315a7a6cb5110d0138214dc0168a0078a8f98c2d442e117826b78d98a0ca7247b606c7119e3d6b2 0004-usb-quirks-hub_slow_reset-for-usb2642.patch
|
|
|
|
79f12e245d0f3ca962a559a1b3112855284c9315c031bf6e1f51c59309a9f588f4e86b6cbb121856e588e5d48d43f4ad1c5235049afa0d19fb638a0ce27c6896 0005-usb-xhci-increase-XHCI_MAX_REXIT_TIMEOUT_MS.patch
|
|
|
|
2f0c69e90c2270e517abccd97cc7ab2bbef0d69f5aae6004944f9a534e3983765a3f2b5b6e8779dc0ce44d2eada00b04f9b38a44e6fa630978d591ea83527155 0006-hack-usb-add-quirk-to-skip-reset_resume-in-hub_activ.patch
|
|
|
|
68a5a0e530df543a444ced60ecca6a07ed70824ea23fd89d01240426127a3017b97c06605876196199e9f1d9c035156825fad1ed84cfbf6db8dc8c25fbeb3a20 config-purism-librem5.aarch64
|
2021-05-07 07:15:58 +00:00
|
|
|
"
|