Raspberry and python rpi.gpio, /dev/mem

Hey.
I have installed Python 2 on a Raspberry B with OpenWrt, and also the pack rpi.gpio.

When I setup gpio pins in python I get:
"RuntimeError: No access to /dev/mem. Try running as root!"

But I am root and the real problem is, that "/dev/mem" dont exist!

I found this topic in the forum:

Where Flop says:
"CONFIG_KERNEL_DEVMEM=y were present in the config file.
So I have removed the config and restarted from scratch and added manually this line and this is ok !"

Can anyone here tell me, where I find the config file, and how I "restart from scratch"

Sorry, but I am rather new with Openwrt.....

Access to /dev/mem is a decided at build time (and a huge security risk!), if you want to allow it, you need to build from source and toggle the kernel configuration accordingly.

2 Likes

Hey slh
Thanks for your answer, and sorry for my late respons...
I have now done it, and it works! - thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.