Skip to content
Snippets Groups Projects
Unverified Commit b4a84f5a authored by Clayton Craft's avatar Clayton Craft Committed by Sebastian Krzyszkowiak
Browse files

debian: add initramfs hook and boot scripts

parent 33c01a5b
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
case "$DPKG_ARCH" in
arm64)
libdir=/usr/lib/aarch64-linux-gnu
copy_exec "$libdir/dri/etnaviv_dri.so"
copy_exec "$libdir/dri/imx-drm_dri.so"
copy_exec "$libdir/dri/imx-dcss_dri.so"
copy_exec "$libdir/dri/mxsfb-drm_dri.so"
copy_exec "$libdir/dri/sun4i-drm_dri.so"
copy_exec "$libdir/dri/panfrost_dri.so"
;;
amd64)
libdir=/usr/lib/x86_64-linux-gnu
copy_exec "$libdir/dri/vmwgfx_dri.so"
copy_exec "$libdir/dri/virtio_gpu_dri.so"
copy_exec "$libdir/dri/i965_dri.so"
copy_exec "$libdir/dri/kms_swrast_dri.so"
;;
*)
echo "osk-sdl unsupported arch: $DPKG_ARCH"
exit 0
;;
esac
find -L "$libdir" -name "libGL*.so*" -o -name "libEGL*.so*" -o -name "libEGL_mesa.so*" -type f | while read -r so; do
copy_exec "$so"
done
if ! copy_exec /usr/bin/osk-sdl; then
echo "ERROR: Couldn't copy /bin/osk-sdl" >&2
exit 1
fi
if ! copy_file text /etc/osk.conf; then
echo "ERROR: Couldn't copy config file for osk-sdl: /etc/osk.conf"
exit 1
fi
copy_exec /sbin/dmsetup
# GLVND config needed for EGL
[ -f /usr/share/glvnd/egl_vendor.d/50_mesa.json ] && copy_file text /usr/share/glvnd/egl_vendor.d/50_mesa.json
ttf_font=$(grep "^keyboard-font" /etc/osk.conf|cut -f3 -d' ')
[ -f "$ttf_font" ] && copy_file font "$ttf_font"
# touchscreen drivers
manual_add_modules goodix
# crypto modules
manual_add_modules dm_mod
manual_add_modules dm_crypt
copy_modules_dir "kernel/crypto"
copy_modules_dir "kernel/arch/$DPKG_ARCH/crypto"
#!/bin/sh
PREREQ=""
prereqs()
{
echo $PREREQ
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
if [ -x /scripts/local-top/osk-sdl ]; then
exec /scripts/local-top/osk-sdl
fi
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
if [ ! -e /usr/bin/osk-sdl ]; then
exit 0
fi
. /scripts/functions
# get encrypted root from cmdline
# this parameter is required, so quit if it's not there
if ! grep -qE '^(.*\s)?osk-sdl-root=' /proc/cmdline; then
exit 0
fi
root_dev="$(tr ' ' '\n' < /proc/cmdline | sed -n 's/^osk-sdl-root=//p')"
if [ ! -b "$root_dev" ]; then
panic "Value for osk-sdl-root ($root_dev) is not a valid block device!"
fi
root_name="$(tr ' ' '\n' < /proc/cmdline | sed -n 's/^osk-sdl-root-name=//p')"
[ -z "$root_name" ] && root_name="root"
# TODO: some of these are specific to certain hardware...
export ETNA_MESA_DEBUG=no_supertile
export SDL_VIDEODRIVER=kmsdrm
plymouth hide-splash 2>/dev/null
log_begin_msg "osk-sdl starting."
/usr/bin/osk-sdl -d "$root_dev" -n "$root_name" -c /etc/osk.conf -v \
|| panic "Failure running osk-sdl. Good luck."
log_end_msg "osk-sdl done."
plymouth show-splash 2>/dev/null
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment