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

No /sys/class/gpio/gpio${num} with Raspberry PiOS #29

Open
redawl opened this issue Dec 3, 2024 · 2 comments
Open

No /sys/class/gpio/gpio${num} with Raspberry PiOS #29

redawl opened this issue Dec 3, 2024 · 2 comments

Comments

@redawl
Copy link

redawl commented Dec 3, 2024

It looks like this pin interface has been deprecated in the linux kernel for a while, and has finally been disabled in the latest version of PiOS:
https://www.thegoodpenguin.co.uk/blog/stop-using-sys-class-gpio-its-deprecated/

Any idea how to update JTAGEnum.sh to work with the new interface?
I took a stab at it, but haven't had any luck so far.

@cyphunk
Copy link
Owner

cyphunk commented Dec 4, 2024

I see 3 potential solutions but would recommend that the first, despite requiring a bit more code change, will be the easiest to complete because it requires the least amount of work on setting up dependencies and seems more likely to work across many versions of OS and platforms.

option 1: install wiringpi. see the blink.sh example. Every call to /sys/**/gpio in jtagenum.sh would need to be changed to use the gpio binary provided by wiringpi.

option 2: install the fuse library sysfs-gpio-shim which is wrapper that provides the /sys/**/gpio interface again. However, it requires libgpiod version 2 which you have to install from sources. libgpiod version 2 is in the pipeline for rapsberrypi os so maybe it can also be installed more easily in future.

option 3: use builtin gpioget, gpioset commands. There's a discussion here about some issues around values not being saved which might be worth reading before using this option.

I currently cannot implement or test any of these solutions due to work/life constraints. Would be happy to merge any pull requests though.

@redawl
Copy link
Author

redawl commented Dec 5, 2024

I went with the sysfs-gpio-shim, seems to work perfectly, thanks!

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