On 2/2/21 8:57 AM, Siddons, David wrote:
> Hi David,
> Yes, I saw that. Changing it doesn't seem to help:
>
> sudo chmod g+w /dev/mem
> ls -l /dev/mem
> crw-rw---- 1 root kmem 1, 1 Feb 1 21:05 /dev/mem
>
> ./regrw R 1 ( a program which maps the FPGA registers to userspace)
> Reading Register 1
> Can't open /dev/mem
Have you tried chmod 0666 to make sure this is really a permission problem?
The "Can't open" could also print 'errno'.
Also, I feel obligated to repeat myself in recommending against using
/dev/mem in any kind of long term solution. There are safer ways
to grant access to specific MMIO ranges.
https://epics.anl.gov/tech-talk/2020/msg02201.php