Compare commits

...
Author SHA1 Message Date
Clayton Craft aa09dac237 pine64-pinebookpro: add phys-keyboard-present script (MR 2327)
Keyboard is always present, so this script just exits with retcode 0
2021-07-07 15:36:15 -07:00
Clayton Craft 76309a2b09 main/postmarketos-mkinitfs: add support for keyboard detect script (MR 2327)
This uses a script, /usr/bin/phys-keyboard-present, that is added to the
initfs for determining whether or not to run osk-sdl with -x to hide the
on-screen keyboard.

phys-keyboard-present is an (optional) script provided by device
packages, since the implementation for detecting whether or not a
keyboard is present will likely differ across different devices. The
script exit with a return code of 0 if a physical keyboard is present,
or non-zero if one is *not* present.

This patch requires osk-sdl >=0.65

Note: shellcheck set to ignore SC2086 because we actually want to split
on spaces here since each item is a separate parameter to osk-sdl.
See: https://github.com/koalaman/shellcheck/wiki/SC2086#exceptions
2021-07-07 15:36:15 -07:00
5 changed files with 25 additions and 5 deletions

No files matched your search

@@ -1,8 +1,8 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-pine64-pinebookpro
pkgdesc="PINE64 Pinebook Pro"
pkgver=2
pkgrel=1
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@@ -24,6 +24,7 @@ source="
10-pinebookpro.hwdb
mem_sleep.conf
nvme-powersave.initd
phys-keyboard-present
ucm/rockchip,es8316-codec.conf
ucm/HiFi
"
@@ -54,6 +55,8 @@ package() {
install -D -m755 "$srcdir"/nvme-powersave.initd \
"$pkgdir"/etc/init.d/nvme-powersave
install -D -m755 "$srcdir"/phys-keyboard-present \
"$pkgdir"/usr/bin/phys-keyboard-present
}
nonfree_firmware() {
@@ -68,6 +71,7 @@ cdcb1d36440c29d411691990c1170d9665b13b1c551b35825720d23b6ae40311ce91c3b2b7a089de
d3988fe83c54228d743f4a8c190e9530404a436a7fbc0b004bf20d3986b502d864717d8cc9c76812e599266bf84cb08f9a86e1bfd220875799c5a022aea588ec 10-pinebookpro.hwdb
bcae155e24a151d3c098833680b83b6004a329962f115480d560ebe19257eab87286b8a4c194e456c067ca54fb53e59a5a16b022cea13c11135b0855145db563 mem_sleep.conf
2abfa31fa56028339efc6d2b6cb838f310990d7110ac4dd996bc4cfcf90f0a8770e70f28f77f7b6929d110e494bc33731302f16b9717729f991c2732be0731d5 nvme-powersave.initd
46f4256b2af1a749b0b91b3e834018f17b14ed61a07b31dc20d1507d3d35fe53f8a7579ffdd7bb8ade3d8c460c07ce35b78556217da5f30f6261279212051b6c phys-keyboard-present
846384cab3e9581a03007cf4f39f8538315e804d1573903dd223d22d5ca0b6f260e348467aead5124689288fb7d2ec22c1e9aba8e89683efdbd33ddfe10de852 rockchip,es8316-codec.conf
558f08b56425e0ceeea8d4815eeb862a2b801ba1b26b4dc28f4d0ec991ed9dfef14113172a224191eb2de5d0b57a741e4c48f1307bda2a69595944bd58731be1 HiFi
"
@@ -0,0 +1,4 @@
#!/bin/sh
# physical keybaord on the PBP is always present
exit 0
+3 -3
View File
@@ -1,6 +1,6 @@
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
pkgname=postmarketos-mkinitfs
pkgver=0.27
pkgver=0.28
pkgrel=0
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org"
@@ -54,8 +54,8 @@ check() {
sha512sums="
4717bf24bd13fd4d90f3ab000ab43f7d61529515de224ebc86458ae709ebe0b5065655457e34f5952126bac6ab45143a91cddb09a8ad2d0a55c5cecd564a0135 00-default.modules
1a267dd958609263a4f24657f602ac0e4e0c724bf1284adec85e82d05c9b07553085edea5a56f7fa09d1652af232c72d4d39a06858c2a580ff830577b5f37d67 init.sh.in
393791a7db328d45db7c3b7836ed93208f8b64a6c08a219d31f5a51a167b75ac32407179ae33ef3f72e33fae35c48f676cf526dae190b231d1a766b9a0ad0fb6 init_functions.sh
8a7b1d33ee7c14f36f29ff02b2c5a57d7b8363fce88e5847e1e292808ffd6d98c8bfeff56962c0d8c26884818dc11fce692ed00e67544a4d9e2bf079928f4976 init_functions.sh
54c8ea6c4b5313c0ca82bbc40498a35d4b5cbcdbf950dc01b5025238ea6b8caa2f9a9ee57a269fb78673fbcac186c33243188458ecda45deb3354d5d8a77fdfe mkinitfs.sh
6b8de5dc13aef9c8090bc4e307b142887e4e3bf1851fe498845be64f7d1ba65d243c1bcb29fbd1b108be2a5067349be1461838573505c9d23e06a680265a4ec3 mkinitfs_functions.sh
dd81cb7a3649be61c56592a11416d8ff195a5e5752a5606f55cbe4ddaf21f6e13f2cca8afa2a5b7750e31040b387ab6c1e18ae9f743099eda0aa8a0c35d4dfe3 mkinitfs_functions.sh
c7a3c33daeb12b33ac72207191941c4d634f15c22958273b52af381a70ebaba1d3a9299483f0c447d9e66c560151fe7b9588bb4bbef2c8914f83185984ee4622 mkinitfs_test.sh
"
@@ -506,6 +506,11 @@ run_osk_sdl() {
;;
esac
if [ -x /usr/bin/phys-keyboard-present ] && [ ! "$(/usr/bin/phys-keyboard-present)" ]; then
OSK_EXTRA_ARGS="$OSK_EXTRA_ARGS -x"
fi
# shellcheck disable=SC2086
osk-sdl $OSK_EXTRA_ARGS -n root -d "$partition" -c /etc/osk.conf \
-o /boot/osk.conf -v > /osk-sdl.log 2>&1
}
@@ -242,6 +242,13 @@ get_binaries_extra()
/usr/lib/xorg/modules/dri/${deviceinfo_mesa_driver}_dri.so
"
fi
if [ -x /usr/bin/phys-keyboard-present ]; then
BINARIES_EXTRA="
$BINARIES_EXTRA
/usr/bin/phys-keyboard-present
"
fi
fi
tmp1=$(mktemp /tmp/mkinitfs.XXXXXX)