qu1x / leds-apu2

Kernel module driver for the APU2 LEDs and button
3 stars 1 forks source link

gpio-keys-polled in Debian Stretch #1

Open yawor opened 6 years ago

yawor commented 6 years ago

Hi,

I don't see gpio-keys-polled module in Debian Stretch. How did you obtain it? Did you recompile the kernel?

yawor commented 6 years ago

I've found your debian-kernel-apu2 project. I'm now trying to build it.

n3vu0r commented 6 years ago

Hi,

forgot to mention that. I copied it from the Linux sources and built it as separate module with the dkms.conf and Makefile of this project but adjusted module name and module location kernel/drivers/input/keyboard. I don't remember if I had to build leds-gpio as well or if it was automatically loaded as a module dependency.

Afterwards I figured out that the statistic requests of the ledtrig-netdev module caused the e1000e network driver to hang the kernel and I had to recompile it anyway with a patch from an ipfire branch (which seems to not exist anymore) resulting in debian-kernel-apu2. I consider to remove this project in favor of debian-kernel-apu2, let me know if that works for you.

yawor commented 6 years ago

I've successfully built latest 4.9.82 kernel on Debian Stretch using your debian-kernel-apu2. Everything seems to work well. I've been able to set triggers for LEDs 2 and 3 to netdev :).

Maybe it's not an ideal place to ask this, but is it possible to use leds-apu2 module from initramfs? My idea is to do something similar to what latest LEDE 17.01 snapshots do - blink the LED1 during booting. I've added required modules to /etc/initramfs-tools/modules and I've created a script in /etc/initramfs-tools/scripts/init-top to set LED1 trigger to timer. I've updated the initramfs and rebooted, but nothing has happened. It seems that there's no /sys/class/leds/apu2:green:led1 etc. I've confirmed that the modules for leds and ledtrig-timer were loaded from initramfs. Maybe I've tried accessing them too soon (from init-top)? Do you know if initramfs has access to /sys?

n3vu0r commented 6 years ago

Great :)

I dunno much about initramfs. I would also like to have the LEDs under control during boot. At the moment I cannot reboot my devices to test it, but next week.