Can't access gpio mapped memory on focal armhf server on pi
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-raspi (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Invalid
|
Undecided
|
Unassigned |
Bug Description
On released (and apt updated) 20.04 armhf preinstalled server on Pi3B+, we cannot use pigpio C program to access memory map for gpio. Customer says the same code works fine on 18.04.
ubuntu@ubuntu:~$ sudo ./pigpio/kyle.o
2020-07-31 18:36:11 initPeripherals: mmap gpio failed (Operation not permitted)
Details on code below, but the executable is attached, and the customer says this fairly represents their code usage.
ubuntu@
Linux ubuntu 5.4.0-1015-raspi #15-Ubuntu SMP Fri Jul 10 05:37:25 UTC 2020 armv7l armv7l armv7l GNU/Linux
We thought perhaps these kernel configs were involved:
CONFIG_DEVMEM=y
CONFIG_
CONFIG_
... and we modified the kernel cmdline with the following, but the result was the same.
iomem=relaxed strict-devmem=0
The program is simply this https:/
then this c file:
#include <pigpio.h>
#include <stdio.h>
#include <stdlib.h>
int main(void){
gpioInitialise();
}
built with gcc -Wall -I/home/
Changed in linux-raspi (Ubuntu): | |
status: | New → Invalid |
Changed in linux-raspi (Ubuntu Focal): | |
status: | New → Triaged |
I've confirmed that 5.4 gives 'permission denied' and 5.3 seems to work fine. I suspect that this is due to the lockdown patches in 5.4.