blob: 120b1adb110c18e11325dfa3f0591516190b4818 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#!/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
add_binary /usr/lib/gbm/dri_gbm.so
[ -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:
|