summaryrefslogtreecommitdiff
path: root/pkgbuilds/osk-sdl/osk-sdl-install
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2024-12-16 18:44:05 -0800
committerXiao Pan <xyz@flylightning.xyz>2024-12-16 18:48:49 -0800
commitcf6365c0957253940b8fae7e1a606105c6a2754c (patch)
treedf259da4c45432c0fc3d2d2b496d226664ca94ce /pkgbuilds/osk-sdl/osk-sdl-install
parent75c587ea9c4b8bf19ef6eec11a6e0aed508f3dac (diff)
Add osk-sdl PKGBUILD from danctnix Pine64-Arch
https://github.com/dreemurrs-embedded/Pine64-Arch
Diffstat (limited to 'pkgbuilds/osk-sdl/osk-sdl-install')
-rw-r--r--pkgbuilds/osk-sdl/osk-sdl-install59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgbuilds/osk-sdl/osk-sdl-install b/pkgbuilds/osk-sdl/osk-sdl-install
new file mode 100644
index 0000000..a1df1d2
--- /dev/null
+++ b/pkgbuilds/osk-sdl/osk-sdl-install
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+build() {
+ local mod
+
+ add_module "lima"
+ add_module "panfrost"
+
+ add_module "dm-crypt"
+ add_module 'dm-integrity'
+ if [[ $CRYPTO_MODULES ]]; then
+ for mod in $CRYPTO_MODULES; do
+ add_module "$mod"
+ done
+ else
+ add_all_modules "/crypto/"
+ fi
+
+ add_binary 'cryptsetup'
+
+ map add_udev_rule \
+ '10-dm.rules' \
+ '13-dm-disk.rules' \
+ '95-dm-notify.rules' \
+ '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
+
+ # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
+ add_binary '/usr/lib/libgcc_s.so.1'
+
+ add_binary /usr/bin/osk-sdl
+ add_file /etc/osk.conf
+
+ # add DRI drivers so we can have hw accel
+ add_binary /usr/lib/dri/sun4i-drm_dri.so
+
+ # HACK: mkinitcpio does not understand hardlinks, symlink those DRI libs
+ add_symlink /usr/lib/dri/rockchip_dri.so /usr/lib/dri/sun4i-drm_dri.so
+
+ add_binary /usr/lib/libGL.so.1
+ add_binary /usr/lib/libEGL.so.1
+ add_binary /usr/lib/libEGL_mesa.so.0
+
+ [ -f /usr/share/glvnd/egl_vendor.d/50_mesa.json ] && add_file /usr/share/glvnd/egl_vendor.d/50_mesa.json
+
+ ttf_font=$(grep "^keyboard-font\s" /etc/osk.conf|cut -f3 -d' ')
+ [ -f "$ttf_font" ] && add_file "$ttf_font"
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook loads osk-sdl to decrypt the filesystem. Used on touchscreen devices like tablets and phones to provide an on screen keyboard in order to enter in a passphrase for decrypting encrypted systems when an keyboard is not present.
+
+Users should specify the device to be unlocked using 'cryptdevice=device:dmname' on the kernel command line, where 'device' is the path to the raw device, and 'dmname' is the name given to the device after unlocking, and will be available as /dev/mapper/dmname.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et: