GPIO 'shutdown' Kernel module for the Raspberry Pi Model 1B and Model 2
The purpose of this module is to shut down all GPIOs prior to powering off
or rebooting a Raspberry Pi.
The main reason for this is due to there being no real indicators that the
shutdown process has completed. By doing a shutdown of all of the GPIOs (such
that they act like inputs without pullup resistors), you can detect the 'high
impedence' state either with an LED or using some kind of exernal board (such
as an 'ATX Raspi' board). An external board could then detect the shutdown,
and power off the Raspberry Pi safely, and you won't have to fix the file
system due to problems caused by powering it down before it's safe to do so.
raspberrypi-gpioshutdown kernel module:
This port installs a startup script in your ${LOCALBASE} etc/rc.d directory
called 'gpioshutdown'.
Once installed, either load the kernel module at boot time (using
/boot/loader.conf) or by adding the following entry to the /etc/rc.conf file
(recommended) by running this command:
sysrc gpioshutdown_enable="YES"
Or, you can simply load the module using the 'rc' system, by adding this
line to /etc/rc.conf instead:
kld_list=gpioshutdown
If you have other modules in 'kld_list' just add 'gpioshutdown' to the end of
that list.
For more detailed information, type 'man 4 gpioshutdown'.
misc/raspberrypi-gpioshutdown: fix build on recent FreeBSD
Due to -Werror being enabled for kernel modules these days, the build
of this module failed with a "variable set but not used" warning.
Remove the offending variable to fix the build.
Approved by: portmgr (build fix blanket)
MFH: 2024Q4
misc/raspberrypi-gpioshutdown: create port
GPIO 'shutdown' Kernel module for the Raspberry Pi Model 1B and Model 2
The purpose of this module is to shut down all GPIOs prior to powering off
or rebooting a Raspberry Pi.
PR: 226787
Submitted by: Bob Frazier <bobf@mrp3.com>