EMC2 running on Raspberry Pi?

More
13 Aug 2012 16:33 #23094 by cmorley
AFAIK
sudo make setuid
gives the important part sudo permission so everything doesn't need sudo.

If you hacked the make file maybe you hacked this part out? or didn't try the command at all.
maybe you can figure it out by looking at the make file. i try and stay away from it :) ...

Chris M

Please Log in or Create an account to join the conversation.

More
13 Aug 2012 19:48 #23111 by mungkie
andypugh wrote:

mungkie wrote:

I have already written a very basic test hal driver in c, it works with linuxcnc and the test LED is blinking when it should


In that case:
sudo comp --install path/to/my/filename.c
ought to compile and install the module with the required permissions.



Interesting tip about using comp, I did not know about that thanks andy, unfortunatly it does not help with the actual problem I have but is still very useful :D

I should also say that I tried it and it has same effect as I originally made by hand (I also tried changing permissions and adding sticky bit to rtlib/hal_rpi.so). I should possible double check this again as I think after I tried with 'sudo comp --install' the error message when running scripts/linuxcnc did change and there maybe a problem with group ID also??

What I am really enquiring about is if linuxcnc loads modules via some SUID system or is this cause I am running linuxcnc in simulator mode.

I know X runs as root with some wrapper so it can access low level video hardware, is this how linuxcnc loads drivers?

Please Log in or Create an account to join the conversation.

More
13 Aug 2012 23:13 - 13 Aug 2012 23:14 #23126 by cmorley
As I said, look in the make file:

setuid:
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper
chown root ../bin/pci_write
chmod 4750 ../bin/pci_write
chown root ../bin/pci_read
chmod 4750 ../bin/pci_read
Last edit: 13 Aug 2012 23:14 by cmorley.

Please Log in or Create an account to join the conversation.

More
19 Aug 2012 21:27 #23405 by mungkie
cmorley wrote:

As I said, look in the make file:

setuid:
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper
chown root ../bin/pci_write
chmod 4750 ../bin/pci_write
chown root ../bin/pci_read
chmod 4750 ../bin/pci_read



Thanks for the reply, I will get round to looking at all that stuff eventually, but am putting off any further work until I have worked out what to do about real time kernel support.

I pretty much finished up with hardware and driver hacking and put a youtube video of the RPI running a stepper system without realtime kernel support.



I get the feeling realtime kernel hacking could be a little bit too taxing for me, but will give it a try when I get the free time.

Please Log in or Create an account to join the conversation.

More
20 Aug 2012 22:17 #23449 by andypugh
mungkie wrote:

I get the feeling realtime kernel hacking could be a little bit too taxing for me, but will give it a try when I get the free time.

I hope to have a fiddle when my Pi arrives. Should be less than 8 weeks now <grrr>

Please Log in or Create an account to join the conversation.

More
22 Aug 2012 11:13 #23541 by andypugh
powet.eu/2012/07/25/raspberry-pi-xenomai/

Seems to indicate that Xenomai works. I am unclear what the relationship of rtai and xenomai is.

Please Log in or Create an account to join the conversation.

More
22 Aug 2012 12:10 #23543 by ArcEye
Andy Pugh wrote:

powet.eu/2012/07/25/raspberry-pi-xenomai/

Seems to indicate that Xenomai works. I am unclear what the relationship of rtai and xenomai is.


Well its interesting enough for me to order one through Farnells. I can spend my time trying to build real time kernels for something else, now the NCBOX is sorted!

Please Log in or Create an account to join the conversation.

More
23 Aug 2012 11:05 #23571 by mungkie
I think RTAI and xenomai merged and then split again at some point in the past and the two systems have slightly different goals, RTAI attempts to have the best latency, xenomai attempts to be extensible and have wide compatability. xenomai used to have a RTAI compatability skin but apparently this is buggy and deprecated speedwise RTAI is best followed by xenomai followed by RT_PREEMPT.

I have not been able to get xenomai to boot on my pi, but I think this maybe due to my own stupidity and problems with my cross compile environment.

I just the other day managed to get RT_PREEMPT with the newest kernel to compile and boot on my pi, so I hope to compile the RT_PREEMPT version of linuxcnc this weekend.

Please note I am very much a newbie with RT systems and know nothing about the lower level kernel stuff, I am just hacking things together and seeing what happens.

Please Log in or Create an account to join the conversation.

More
23 Aug 2012 11:21 #23573 by mungkie
I just thought maybe I should post another link as I posted comment at cnczone, and the thread may have some relevant information.

www.cnczone.com/forums/showthread.php?p=...posted=1#post1157702

I am really just a skillless hack so am posting lots of comments to any relevant forums in the hope that people with more expertise than I have will get involved and do the hard work which I am not able to do.

I think if you check most of these interlinked threads almost everything I know is available in them, though I think some newer xenomai stuff may not be in them as I have been concentrating on RT_PREEMPT as it looks simpler from a linuxcnc point of view.

I will hopefully also have some time this weekend to tidy up the driver and configs I made for linuxcnc and post them somewhere for people to rip to shreds :lol: .

If anyone has any advice or expertise to offer please feel free to comment, and realise that everything that I post may not be 100% correct.

Please Log in or Create an account to join the conversation.

More
23 Aug 2012 17:08 #23583 by mungkie
As I have the RT_PREEMPT kernel running I have actually taken a proper look at the RT_PREEMPT version of linuxcnc and become very confused???????



I have been working from the following page :

wiki.linuxcnc.org/cgi-bin/wiki.pl?Debian...-Rt_Compile_LinuxCNC

I only ever tried to compile as sim as I did not until now have a RT_PREEMPT kernel, the page mentions preempt_rt but now I try to follow the wiki instructions to compile I find that possibly the instructions are wrong and the wiki page is actually using RTLinux not linux with RT_PREEMPT patch??????

But the pages referenced on the wiki suggest that the patch is for RT_PREEMPT (www.bitmuster.org/projects/emc.html)

WTF is the solution???

Are there extra RTLinux sources I should add in /usr/rtlinux-rt??? where do I get them??? is the wiki page correct or am I making some mistake??

I am totally confused :blush:

Please Log in or Create an account to join the conversation.

Time to create page: 0.109 seconds
Powered by Kunena Forum