A kernel-mode device driver to set a GPIO pin to toggle according to the kernel clock.
Developed on Raspberry PI 3B+, Raspbian GNU/Linux 11 (bullseye), Linux 6.1.21-v7+.
apt install raspberrypi-kernel-headers
make
insmod ./led_clock.ko
make
xz led_clock.ko
cp led_clock.ko.xz "/lib/modules/$(uname -r)/"
depmod -a
This inserts the module which has been installed as above.
modprobe led_clock
To insert the module on boot, add led_clock
to the file /etc/modules
.
dmesg --follow
rmmod led_clock