Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpio-keys-polled in Debian Stretch #1

Open
yawor opened this issue Apr 18, 2018 · 4 comments
Open

gpio-keys-polled in Debian Stretch #1

yawor opened this issue Apr 18, 2018 · 4 comments

Comments

@yawor
Copy link

yawor commented Apr 18, 2018

Hi,

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

@yawor
Copy link
Author

yawor commented Apr 18, 2018

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

@n3vu0r
Copy link
Member

n3vu0r commented Apr 19, 2018

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
Copy link
Author

yawor commented Apr 19, 2018

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
Copy link
Member

n3vu0r commented Apr 26, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants