Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emc On Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Wed Jan 05, 2011 10:22 pm    Post subject: Emc On Gentoo Reply with quote

Hi,

I am just dabbling with setting up RTAI hard real time kernel on Gentoo.
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl/emcinfo.pl?EmcOnGentoo

So far I have my existing kernel patched up and running using the RTAI hal patchset. Pretty painless.

But now I get to building the rtai-libs , the provided ebuild above pulls cvs head and this does not seem to match the 2.6.32 kernel I built. Some missing symbol stuff seems a fairly clear indication that I have a version mismatch.

There is an env var to set to determine which cvs commit to build , however, I can't find any doc showing how that relates to various kernel vintages.

If someone put together and ebuild I guess there must be some gentooers using rtai.

Anyone know where I can find this info?

TIA, Gentree. 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
dusanc
Apprentice
Apprentice


Joined: 19 Sep 2005
Posts: 248
Location: Serbia

PostPosted: Fri Jan 07, 2011 1:22 pm    Post subject: Reply with quote

I like EMC2, but never messed with setting up full RTAI gentoo, only used simulator.
Used Ubuntu for full blown EMC2 machine, so it would be nice if we could get some nice ebuild rolling :D
_________________
Reiser4 Gentoo FAQ [25Dec2016]
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Fri Jan 07, 2011 8:23 pm    Post subject: Reply with quote

Well if you're interested have a go at the ebuilds on EmcOnGentoo.

I quickly added R4 patches to the kernel ebuild and it fired up with no effort.

After a comment on the rtai ML and a bit of digging, the problem I was having with emerge rtai does not seem to a versioning problem as I thought, but maybe a bug in one of the header files xn.h

Looking at this on two sets of hardware may be informative if you're interested in trying.

8)

[EDIT]
I've found out it's problem in the #else part of #ifdef CONFIG_SMP , it's lacking some function definitions.

With CONFIG_SMP set it builds fine. Though it crashes on the latency test on my x86. :(

I could try hacking it but hopefully I'll get a correction from rtai ML.

8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sat Jan 08, 2011 3:33 am    Post subject: Reply with quote

OK, sussed it. Apart from the SMP bug it went perfectly and I'm getting very good jitter test results on the athlon-xp.

I posted the code to the ML hoping someone who knows the code base will tidy it up and commit it.

EMC is a pretty heavy package and gave R4 a good run through on the RT kernel.

To stress test I did emerge --sync, an emerge , glxgears , a dd if=/dev/hda11 ..... and generally messed around with windows. With all that happening the system remained very responsive and I got max jitter of 8us and max interval of 33us.

That compares well with top-end results on the EMC data base. Running the Ubuntu liveCD to compare it with Gentoo it was close except I got 9us max jitter on Ubuntu , 12% down on Gentoo. So probably some gain from Gentoo custom CFLAGS and possibly the Ubuntu disk being built with CONFIG_SMP , not the best for unicore processors.

If you fancy trying it on Gentoo, it all went pretty well apart from the slight hiccough with the #ifdefs si I'd recommend testing the ebuilds.

Now I need to see what I can do with realtime linux.
8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun Jan 09, 2011 4:31 pm    Post subject: Reply with quote

Hmm. Slight backtrack on my earlier enthusiasm for R4 on RTAI.

Part of my stress test was emerge --sync . A subsequent emerge got an IOerror from the fs so I did a fsck. The file system was shot to bits to the point where fsck , although it completed was unable to restore it to a usable state.

I ended up having to bin this particular R4 partition and restore from back-up.

I have never seen this sort of thing in 5 years or so running the root partition and portage on R4.

It is not impossible that this somewhat old IDE drive is now showing signs of old age so I cannot firmly lay this at the door of R4, but a word of caution, nontheless.
:?
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
dusanc
Apprentice
Apprentice


Joined: 19 Sep 2005
Posts: 248
Location: Serbia

PostPosted: Tue Jan 11, 2011 11:53 am    Post subject: Reply with quote

Hey great for getting RTAI to work :D

And can you get more data on that R4 exploding to the m-l once you isolate that it's not HW. Every bit helps.

Thanks
_________________
Reiser4 Gentoo FAQ [25Dec2016]
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Tue Jan 11, 2011 8:10 pm    Post subject: Reply with quote

dusanc wrote:
Hey great for getting RTAI to work :D

And can you get more data on that R4 exploding to the m-l once you isolate that it's not HW. Every bit helps.

Thanks


what ML do you see that on ?

rtai will say R4 is not in mainline: not supported.
R4 will say RT is not in mainline: not supported.

So far I have not even had a polite recognition for having pointed out and fixed the SMP on UP bug in rtai.
:roll:
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
dusanc
Apprentice
Apprentice


Joined: 19 Sep 2005
Posts: 248
Location: Serbia

PostPosted: Tue Jan 11, 2011 8:22 pm    Post subject: Reply with quote

Yeah, I think I can see it on R4 m-l, as long it's not HW fault. :D

But true, you can get:"Whoever patched R4 on RTAI messed up locking" response :D
_________________
Reiser4 Gentoo FAQ [25Dec2016]
Back to top
View user's profile Send private message
ebo
n00b
n00b


Joined: 24 Mar 2008
Posts: 6
Location: Greenbelt, MD

PostPosted: Sat Feb 12, 2011 8:14 pm    Post subject: Re: Emc On Gentoo Reply with quote

Gentree wrote:
But now I get to building the rtai-libs , the provided ebuild above pulls cvs head and this does not seem to match the 2.6.32 kernel I built. Some missing symbol stuff seems a fairly clear indication that I have a version mismatch.

There is an env var to set to determine which cvs commit to build , however, I can't find any doc showing how that relates to various kernel vintages.


Is there any updates on the the version/cvs commit issue? I've hacked together a revision based ebuild that I'm trying to get working and I'm currently getting a:

fixdep: /var/tmp/portage/app-misc/rtai-1000/work/magma/base/arch/x86_64/calibration/.rtai_smi.mod.o.d: No such file or directory

when compiling against the CVS head, and a:

../../../base/include/asm/rtai_lxrt.h:35:29: error: asm/asm-offsets.h: No such file or directory

when compiling against the 3.8 base release.

So, does anyone know either the date of their working rtai-libs and the kernel version?
Back to top
View user's profile Send private message
ebo
n00b
n00b


Joined: 24 Mar 2008
Posts: 6
Location: Greenbelt, MD

PostPosted: Sat Feb 12, 2011 8:21 pm    Post subject: Reply with quote

Gentree wrote:
To stress test I did emerge --sync, an emerge , glxgears , a dd if=/dev/hda11 ..... and generally messed around with windows. With all that happening the system remained very responsive and I got max jitter of 8us and max interval of 33us.

That compares well with top-end results on the EMC data base. Running the Ubuntu liveCD to compare it with Gentoo it was close except I got 9us max jitter on Ubuntu , 12% down on Gentoo. So probably some gain from Gentoo custom CFLAGS and possibly the Ubuntu disk being built with CONFIG_SMP , not the best for unicore processors.


There are some kernel configuration tweaks that can make a lot of difference with the timing tests. Try playing with various configurations of lapic noapic acpi=off pci=noapic as kernel boot flags. Some have reported getting as much as 25% drop in their latency tests. Also, if you dig around the net you will find various versions of what kernel build flags need be set. Actually the documentation spans a decade or more, is inconsistent and contradictory. That is one of the reasons I want to try building emc on the preemptive kernel wich just works out of the box.
Back to top
View user's profile Send private message
chris...
Apprentice
Apprentice


Joined: 26 Sep 2006
Posts: 179
Location: Melbourne, AU

PostPosted: Tue Aug 02, 2011 10:12 pm    Post subject: Re: Emc On Gentoo Reply with quote

ebo wrote:


../../../base/include/asm/rtai_lxrt.h:35:29: error: asm/asm-offsets.h: No such file or directory

when compiling against the 3.8 base release.

So, does anyone know either the date of their working rtai-libs and the kernel version?


link asm-generic to asm in the kernel include directory

i had a working rtai-sources, rtai and emc ebuilds
I can compile rtai-sources-2.6.37 and rtai-9999 but not emc-9999

I'm going back to rtai-sources-2.6.32.11 as its the latest patch for the latest stable rtai-2.8.1
rtai-9999 compiles
emc-9999 works

now trying 2.6.35.9 sources
Back to top
View user's profile Send private message
Isomorph
n00b
n00b


Joined: 22 Sep 2002
Posts: 55
Location: Denmark

PostPosted: Sat Nov 05, 2011 2:04 am    Post subject: Error on error load in emc2 Reply with quote

When I try to load a image in emc2 I get this error.
I have tried to re-emerge python and dev-python/imaging but it don't seem to
help.

Code:

Traceback (most recent call last):
  File "/usr/bin/image-to-gcode", line 828, in <module>
    main()
  File "/usr/bin/image-to-gcode", line 764, in main
    options = ui(im, nim, im_name)
  File "/usr/bin/image-to-gcode", line 516, in ui
    ui_image = ImageTk.PhotoImage(ui_image, master = app)
  File "/usr/lib/python2.6/site-packages/PIL/ImageTk.py", line 116, in __init__
    self.paste(image)
  File "/usr/lib/python2.6/site-packages/PIL/ImageTk.py", line 181, in paste
    import _imagingtk
ImportError: No module named _imagingtk
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum