After spending some time with systemd and udec documentation and playing 
with udevadm I managed to find a solution.
No need to modify the sgx-startup.sh script, I just added a permission a 
sgx-permissions.rule to /etc/udev/rules.d with the folowing line 
- SUBSYSTEM=="pvr", GROUP="video", MODE="0660".

I am not sure, maybe somebody can clarify - I think the chmod 666 
/dev/pvrsrvkm has no effect since when modprobe is called, kernel and udev 
events will trigger and the default permissions for udev on devices is 600.

Regards

Rob


On Tuesday, 29 November 2016 15:46:28 UTC, Moscowbob wrote:
>
> After hours of reading all sorts and my brain blowing up, I think I might 
> have found the reason for the problem. However, as a Linux noob, I am now 
> stuck and hope one of our gurus will shed light on this.
>
> This is where I am now:
>
> 1. Copied the "start" section of sgx-startup.sh to a new file and started 
> fiddling.
> 2. Found that there appears to be some delay between modprobe pvrsrvkm , 
> deleting the /dev/pvrsrvkm file and what I assume is the kernel module 
> setting permissions on the file.
> 3. When I moved the delete and mknod to after the /usr/local/bin/pvrsrvctl 
> --start --no-module and added a sleep 1, the file permissions were set 
> correctly.
>
> Unfortunately this only work when I run the script manually, it doe not 
> work with reboot (maybe sleep cannot be used)
>
> So, I am still trying to find a solution, but I am running out of things 
> to try 
>
> Thanks
>
> Rob
>
> On Sunday, 27 November 2016 21:59:06 UTC, Moscowbob wrote:
>>
>>
>> I have just built fresh kernel, dtb, u-boot and sgx as per RCN eewiki 
>> <https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-LinuxKernel>
>>  and 
>> I have also built Qt 5.6.2.
>> Everything is working correctly except for one problem which I do not 
>> understand and hope somebody could explain.
>>
>> After installing sgx drivers and a reboot I have everything as per 
>> instructions:
>>
>> lsmod | grep omaplfb
>>
>> omaplfb                12356  0 
>> tilcdc                 26717  1 omaplfb
>> pvrsrvkm              157212  1 omaplfb
>>
>> but my Qt Quick programs only work when run as root (sudo).
>>
>> Looking at the sgx-startup script, /dev/pvrsvrkm should be set with 666 
>> permissions, but after startup this is what I get:
>> ls -al /dev/pvrsrvkm 
>> crw------- 1 root root 247, 0 Nov 27 20:54 /dev/pvrsrvkm
>>
>> When I run:
>> sudo /etc/init.d/sgx-startup.sh stop
>> sudo /etc/init.d/sgx-startup.sh start
>>
>> I get:
>> sgx: Starting PVR
>> /usr/local/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=129)
>>  
>> ls -al /dev/pvrsrvkm 
>> crw-rw-rw- 1 root root 247, 0 Nov 27 21:48 /dev/pvrsrvkm
>> Permissions are now correct for running program as normal user.
>>
>> my programs run correctly with platform eglfs - which is what I want.
>>
>> My questions:
>>
>> 1. Why does sgx-startup.sh not set the permissions correctly on boot and 
>> is there a way to solve this?
>>
>> Thanks in advance
>>
>> Rob
>>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7a87b2ed-140d-4674-9e83-5bb598618b6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to