diff options
Diffstat (limited to 'pkgbuilds/osk-sdl/osk-sdl-install')
-rw-r--r-- | pkgbuilds/osk-sdl/osk-sdl-install | 59 |
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: |