Permission problem when loading custome hal module
- nauman
- Topic Author
- Offline
- New Member
- Posts: 12
- Thank you received: 0
I am trying to load/install one custom module using 'sudo halcompiler --install cncmod'
it is installing and I can see module in '/lib/linuxcnc/modules/cncmod.so'
But the problem is when I load this module in my config it is giving me permission problem but same module is working fine in debain linuxcnc official distribution.
Environment
Host OS: Fedora iot 38
Error:
Debug file information:
bcm2835_spi_begin failed. Are you running with root privlages??
cncmod: rtapi_app_main: Operation not permitted (-1)
./CNC-MOD.hal:10: waitpid failed /usr/bin/rtapi_app cncmod
./CNC-MOD.hal:10: /usr/bin/rtapi_app exited without becoming ready
./CNC-MOD.hal:10: insmod for cncmod failed, returned -1
11193
11206
Stopping realtime threads
Unloading hal components
cncmod: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Unexpected realtime delay on task 0 with period 25000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
<commandline>:0: unloadrt failed
And code where error is coming in my module is
if (!rt_bcm2835_init()) {
rtapi_print_msg(RTAPI_MSG_ERR,"rt_bcm2835_init failed. Are you running with root privlages??\n");
return -1;
}
How can I set the right permission in fedora same like linuxcnc debain
I also attach linuxcnc.report for more details.
Thank you
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19437
- Thank you received: 6508
Most software with direct kernel access will not run as root in most distros, due to potential to wreck havoc if misused.
the line should be sudo halcompileI am trying to load/install one custom module using 'sudo halcompiler --install cncmod'
notice the missing R .
Please Log in or Create an account to join the conversation.
- nauman
- Topic Author
- Offline
- New Member
- Posts: 12
- Thank you received: 0
more info
Install link
ls -l /dev/mem
crw-rw-rw-. 1 root kmem 1, 1 Oct 26 2023 /dev/mem
ls -l /dev/gpiomem
crw-rw-rw-. 1 root root 237, 0 Oct 26 2023 /dev/gpiomem
groups cncmod
cncmod wheel
Please Log in or Create an account to join the conversation.