device-purism-librem5: use bq25890 ship mode support in kernel (MR 2032)

Ship mode via the mechanism used by purism doesn't work; it's either not
possible or outside my understanding to run an openrc runscript with a
busybox init on *poweroff* and *not reboot*, which is what is required
for this to work properly..

This module param requires a corresponding kernel patch to enable ship
mode support in the bq25890-charger module
This commit is contained in:
Clayton Craft 2021-03-15 15:15:03 -07:00 committed by Dylan Van Assche
parent ee89b6cb24
commit 0dc254adef
No known key found for this signature in database
GPG key ID: 8642571587897EA1
3 changed files with 7 additions and 11 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=device-purism-librem5
pkgdesc="Purism Librem 5 Phone"
pkgver=1.16
pkgver=1.17
pkgrel=0
_confver=36
_purismrel=1
@ -32,7 +32,7 @@ source="
77-mm-broadmobi-port-types.rules
deviceinfo
flash_script.lst
librem5-shipmode.initd
modprobe.d-ship_mode.conf
modprobe.d_rsi.conf
modules-load.d_librem5.conf
pcscd-librem5-reader.conf
@ -112,11 +112,9 @@ package() {
mkdir -p "$pkgdir"/usr/share/alsa/ucm2
cp -r "$builddir"/default/audio/ucm2 "$pkgdir"/usr/share/alsa/
# device-specific services
install -Dm755 "$builddir"/default/shipmode/l5-poweroff-shipmode \
"$pkgdir"/usr/bin/librem5-shipmode
install -Dm755 "$srcdir"/librem5-shipmode.initd \
"$pkgdir"/etc/init.d/librem5-shipmode
# enable bq25890_charger ship_mode
install -Dm644 "$srcdir"/modprobe.d-ship_mode.conf \
"$pkgdir"/etc/modprobe.d/bq25890_charger.conf
devicepkg_package $startdir $pkgname
}
@ -126,7 +124,7 @@ sha512sums="ef2cce6de4e85b14b4a7dee7fe8175d6ca455db38bfe4453b390ac15ad51240dec58
00355d9ad085a77e157f3c62eb4f1bcac2823d3b341e34d1128edbfb1444fba83e8eacd263ea61da9f6d853f1328ab7fbe5ea63bd08c8a1bc9b8eaf44ae1f1c6 77-mm-broadmobi-port-types.rules
647cd95872bfa3e533ce2a825f9215315f629c0f2835becd77e3acb07b748a2c662090197de59155ff6e8137165dea877a0b179db4bd8bee3dd3d205f390a656 deviceinfo
2703c7a4e7f32cf102dfed644a8213497828ae1fe9f3bd789663157f79c8c8ddb05672e5c9a0c6883e9dee42afcfe9578e611dd1d9fe6cd8129d8d7738d28ad2 flash_script.lst
76b06cc1ac82c3fc0e298c9d7d5c9139624b1269bf846fe3bc07b9af877d882362b60ba90028ad3182cb1d6426aacdb560fe060b026778a56e7f038d495eadd4 librem5-shipmode.initd
110630f959e3f3a2acc335d755defeb0f49fb40f46cb2423205511f43d1dfdbb91722271fac34a6cbf04a5f0406e6a34ed77e75555acc3f420041d32224027d6 modprobe.d-ship_mode.conf
9dc018f0de523cbfe5a49cbe831aa30e975a8dd34635197bb52582f072ac356ef2c02223fc794d970380091a69a83a74c3fbe34520190c8536e77f9ea98c7659 modprobe.d_rsi.conf
a0740e405781ec6ef765fdc9f5700c95adbb241c45c97b9384ba68cdece662cb216ca5918640042f6e65a5d1b1a9099936382c99b49a44303f7b6d77a075a471 modules-load.d_librem5.conf
8ef4ec7a9e9a4fb801d207e7d94b627aacc9243a93b0ec28e0823a6f44b8102416c040e4ddf499f87bb9dfa960cf6f627b008b79f197f6814b3fd881e18ae8ef pcscd-librem5-reader.conf

View file

@ -1,3 +0,0 @@
#!/sbin/openrc-run
description="Put the Librem 5 into 'ship mode' so that the battery does not drain when off."
command="/usr/bin/librem5-shipmode"

View file

@ -0,0 +1 @@
options bq25890-charger ship_mode=1