mirror of
https://git.yoctoproject.org/meta-raspberrypi
synced 2026-06-01 00:59:54 +00:00
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>
This commit is contained in:
committed by
Andrei Gherzan
parent
58cc662539
commit
bf2d2eae4e
@@ -0,0 +1,2 @@
|
||||
# Action on special keypress (Key Power)
|
||||
kb::kbrequest:/sbin/shutdown -t1 -a -h -P now
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user