Op donderdag 14 juni 2018 21:06:03 CEST schreef Freek de Kruijf:
> Op donderdag 14 juni 2018 17:56:41 CEST schreef Brüns, Stefan:
> > On Donnerstag, 14. Juni 2018 17:50:56 CEST Alexander Graf wrote:
> > > On 06/14/2018 05:43 PM, Freek de Kruijf wrote:
> > > > Op woensdag 13 juni 2018 15:58:25 CEST schreef Alexander Graf:
> > > >> On 13.06.18 14:27, Freek de Kruijf wrote:
> > > > I used the strace and found that in fact the equivalent bash command:
> > > > echo "4" > /sys/class/gpio/export
> > > > gives the error message:
> > > > -bash: echo: write error: Invalid argument
> > > > This command should create new devices /sys/class/gpio/gpio4/* which
> > > > one
> > > > can use to change the behavior of the GPIO pins.
> > > > 
> > > > What can be done to make this basic bash command work.
> > > > Below some more information as root:
> > > > # ls -l /sys/class/gpio/
> > > > total 0
> > > > --w------- 1 root root 4096 jun 14 17:41 export
> > > > lrwxrwxrwx 1 root root    0 apr 23 09:40 gpiochip298 -> ../../devices/
> > > > platform/soc/20200000.gpio/gpio/gpiochip298
> > > > --w------- 1 root root 4096 jun 14 16:34 unexport
> > > 
> > > Sounds like the library doesn't realize that there is an offset for GPIO
> > > numbers on the system. The DT usually indicates what the respective
> > > offset is.
> > 
> > Unfortunately the RPi foundation kernel is patched to hardcode the offset
> > to 0, so any of these simplistic wrappers only work with the foundation
> > kernel, but not with the upstream kernel, or on any other boards.
> 
> This made me think about a patch I made to generate a proper version og
> RPi.GPIO for openSUSE, which is needed to compensate for the fact that
> raspbian uses gpiochip0, where as you can see above, openSUSE uses a
> non-zero value, namely 298.
> 
> To get the RPi.GPIO packet I used pip, which is apparently a version that
> assumes gpiochip0.
> 
> I inspected build.opensuse.org and found that in the project hardware /
> python-RPi.GPIO the patch is included. However generating it for armv6l,
> armv7l, and aarch64 in openSUSE_Factory_ARM is disabled. It is not mentioned
> for these architectures for Leap 42.3 and 15.0 and for Tumbleweed.
> 
> Could this be enabled, such that the package appears in a repository,
> preferably the standard repository for Leap 42.3, 15.0 and Tumbleweed?

Some time ago I already generated versions for the three architectures and for 
python 2 and 3. Must have slipped my older brain. I did a "pip uninstall 
RPi.GPIO" and installed my packet for python2 and armv6hl. Problem solved for 
me.

Two years ago I already made a ticked for the product on sourceforge providing 
the patch, which should also work for /sys/class/gpio/gpiochip0

-- 
fr.gr.

member openSUSE
Freek de Kruijf



--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to