Otto Esko bf2d2eae4e recipes-bsp: Add support for gpio-shutdown
- Feature is enabled with ENABLE_GPIO_SHUTDOWN variable
- Include the gpio-shutdown overlay
- If using SysV init include the additional keymap and inittab entries
  to bind the KEY_POWER event
- Systemd init does not require any additional bindings

Signed-off-by: Otto Esko <otto.esko@gmail.com>
2022-01-04 11:39:18 +00:00

14 lines
253 B
Bash

#!/bin/sh
##
# Bind the gpio-shutdown keycode as Keyboard signal and load it to the
# keymap during startup.
##
case "$1" in
start)
# Inject the gpio keycode to keymap
echo "keycode 116 = KeyboardSignal" | loadkeys
;;
*)
;;
esac