Discussion:
Stretch-based LinuxCNC images ready for testing
(too old to reply)
Jeff Epler
2017-07-21 12:25:41 UTC
Permalink
Raw Message
I've been working on a live+install image of Debian Stretch with
* The just-released LinuxCNC 2.7.10
* kernel 4.9.0-3-rt-amd64 or 4.9.0-3-rt-686-pae
* xfce desktop (same desktop we used on wheezy)
* goodies like hostmot2 firmwares, truetype-tracer, f-engrave

This image is based on the "PREEMPT RT" kernel, which typically
gives latencies good enough for FPGA-based systems, though often the
latency is too high for software encoder and stepgen systems.
Assuming you have a multi-core system, isolating the highest
numbered CPU with isolcpus=# on the kernel commandline may help
latency, just as with RTAI.

Unless you know your computer only supports 32-bit code, I recommend
using the -amd64 image, which works for both AMD and Intel 64-bit
CPUs.

Like the older images, you can either boot live to test your
hardware, or install to the hard disk, from the same iso image.

The Debian image is a "hybrid" iso, which means you can use the same
iso file for a USB stick or a DVD. (The image is bigger than a
traditional CD, so you can't install from regular CD anymore.)
Instructions for writing the image to a USB stick from Windows and
Linux are here:

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Hybrid_Iso

**NOTE** the Ubuntu "startup disk creator" and unetbootin do NOT
handle hybrid images. Use the above instructions instead, if you
want to install from USB. To install from DVD you can use any
traditional method to write the iso image.

You can find it at the temporary URL
http://www.linuxcnc.org/testing-stretch-rtpreempt/

For more notes and for the scripts used to build these images,
see https://github.com/jepler/stretch-live-build

The github repository has an "issues" section. Please use it only
to file bugs about the image itself, not about bugs in LinuxCNC,
even if the bug in LinuxCNC seems to be specific to Debian Stretch.
(but if you aren't sure, then file it in stretch-live-build and
we'll triage it)

Jeff
Sebastian Kuzminsky
2017-07-21 14:10:32 UTC
Permalink
Raw Message
Post by Jeff Epler
I've been working on a live+install image of Debian Stretch with
* The just-released LinuxCNC 2.7.10
* kernel 4.9.0-3-rt-amd64 or 4.9.0-3-rt-686-pae
* xfce desktop (same desktop we used on wheezy)
* goodies like hostmot2 firmwares, truetype-tracer, f-engrave
I installed this image onto my Bridgeport, which was running LinuxCNC 2.7 on Wheezy/RTAI before this.

The install was smooth, latency was comparable, and my config worked without any modifications at all (hm2 based).

Nice work Jeff, thanks for doing this!
--
Sebastian Kuzminsky
t***@bgp.nu
2017-07-21 15:01:45 UTC
Permalink
Raw Message
So if I am reading your message correctly, preempt’s latencies are not typically as good as RTAI? Will there be an RTAI kernel for Stretch at some point?
Thanks,
-Tom
Post by Jeff Epler
I've been working on a live+install image of Debian Stretch with
* The just-released LinuxCNC 2.7.10
* kernel 4.9.0-3-rt-amd64 or 4.9.0-3-rt-686-pae
* xfce desktop (same desktop we used on wheezy)
* goodies like hostmot2 firmwares, truetype-tracer, f-engrave
This image is based on the "PREEMPT RT" kernel, which typically
gives latencies good enough for FPGA-based systems, though often the
latency is too high for software encoder and stepgen systems.
Assuming you have a multi-core system, isolating the highest
numbered CPU with isolcpus=# on the kernel commandline may help
latency, just as with RTAI.
Unless you know your computer only supports 32-bit code, I recommend
using the -amd64 image, which works for both AMD and Intel 64-bit
CPUs.
Like the older images, you can either boot live to test your
hardware, or install to the hard disk, from the same iso image.
The Debian image is a "hybrid" iso, which means you can use the same
iso file for a USB stick or a DVD. (The image is bigger than a
traditional CD, so you can't install from regular CD anymore.)
Instructions for writing the image to a USB stick from Windows and
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Hybrid_Iso
**NOTE** the Ubuntu "startup disk creator" and unetbootin do NOT
handle hybrid images. Use the above instructions instead, if you
want to install from USB. To install from DVD you can use any
traditional method to write the iso image.
You can find it at the temporary URL
http://www.linuxcnc.org/testing-stretch-rtpreempt/
For more notes and for the scripts used to build these images,
see https://github.com/jepler/stretch-live-build
The github repository has an "issues" section. Please use it only
to file bugs about the image itself, not about bugs in LinuxCNC,
even if the bug in LinuxCNC seems to be specific to Debian Stretch.
(but if you aren't sure, then file it in stretch-live-build and
we'll triage it)
Jeff
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
Nicklas Karlsson
2017-07-21 15:42:27 UTC
Permalink
Raw Message
I use this version of the kernel and have for a while, latencies seems good then running for a short while. I know I tested earlier and think something happened with like a few minutes in between.

I am working in the direction to run real time on something else than ordinary computer for several reasons. These small raspberry or beagle bones might be a good option for several reasons: Price, power consumption, to some degree needed space and a few more.

The tasks are few: emctask, emcmot, emcio and upstream communication. I have started to look in the code and think the GUI is the most complex part. As is now there is NML communication in between but machinekit i heard have replaced with 0MQ. I have only been able to run NML locally.
Post by t***@bgp.nu
So if I am reading your message correctly, preempt’s latencies are not typically as good as RTAI? Will there be an RTAI kernel for Stretch at some point?
Thanks,
-Tom
Post by Jeff Epler
I've been working on a live+install image of Debian Stretch with
* The just-released LinuxCNC 2.7.10
* kernel 4.9.0-3-rt-amd64 or 4.9.0-3-rt-686-pae
* xfce desktop (same desktop we used on wheezy)
* goodies like hostmot2 firmwares, truetype-tracer, f-engrave
This image is based on the "PREEMPT RT" kernel, which typically
gives latencies good enough for FPGA-based systems, though often the
latency is too high for software encoder and stepgen systems.
Assuming you have a multi-core system, isolating the highest
numbered CPU with isolcpus=# on the kernel commandline may help
latency, just as with RTAI.
Unless you know your computer only supports 32-bit code, I recommend
using the -amd64 image, which works for both AMD and Intel 64-bit
CPUs.
Like the older images, you can either boot live to test your
hardware, or install to the hard disk, from the same iso image.
The Debian image is a "hybrid" iso, which means you can use the same
iso file for a USB stick or a DVD. (The image is bigger than a
traditional CD, so you can't install from regular CD anymore.)
Instructions for writing the image to a USB stick from Windows and
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Hybrid_Iso
**NOTE** the Ubuntu "startup disk creator" and unetbootin do NOT
handle hybrid images. Use the above instructions instead, if you
want to install from USB. To install from DVD you can use any
traditional method to write the iso image.
You can find it at the temporary URL
http://www.linuxcnc.org/testing-stretch-rtpreempt/
For more notes and for the scripts used to build these images,
see https://github.com/jepler/stretch-live-build
The github repository has an "issues" section. Please use it only
to file bugs about the image itself, not about bugs in LinuxCNC,
even if the bug in LinuxCNC seems to be specific to Debian Stretch.
(but if you aren't sure, then file it in stretch-live-build and
we'll triage it)
Jeff
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
EBo
2017-07-21 16:45:18 UTC
Permalink
Raw Message
Tom,

If you delve into the implementation details you will come to
understand that RT-Preempt (RTP) will probably never have as good
latency times as RTAI or RT-Linux (RTL) -- because RTAI/RTL run as
dedicated TSR processes that sit above the OS if I remember correctly,
whereas RTP is managed within the kernel itself. That said, RTP is
getting latencies down to the point that are good enough for most
applications. I guess what I am trying to say here is that if you focus
on just the raw numbers it is easy to fall into the trap of perfection
being the enemy of the good.

One other critical point for understanding why a lot of us want to see
RTP support is that RTP is now incorporated within the Linux kernel
source tree, and is supported/maintained by the kernel devs themselves.
I doubt that RTAI or RTL ever will because they hijack a normal kernel.
If you take a step back you will find that both RTAI and RTL support
chooses a kernel version to hack, releases patches, and half the time
they do not work with standard kernels. This ends up locking us into
very specific versions of the kernel, and is extremely fragile. But by
all means, run RTAI/RTL versions of the kernel for LCNC, but when you
want to upgrade your kernel you are either going to have to wait around
until someone with the skills and experience of kernel hacking dedicates
their time on this, or you will have to do so yourself.

Hope this is helpful and does not start a flame-war. I would love to
see RTAI integrated into the kernel, but given how Linus and other devs
feel about hard RT, I can only wish you luck with that.

EBo --
Post by t***@bgp.nu
So if I am reading your message correctly, preempt’s latencies are
not typically as good as RTAI? Will there be an RTAI kernel for
Stretch at some point?
Thanks,
-Tom
Post by Jeff Epler
I've been working on a live+install image of Debian Stretch with
* The just-released LinuxCNC 2.7.10
* kernel 4.9.0-3-rt-amd64 or 4.9.0-3-rt-686-pae
* xfce desktop (same desktop we used on wheezy)
* goodies like hostmot2 firmwares, truetype-tracer, f-engrave
This image is based on the "PREEMPT RT" kernel, which typically
gives latencies good enough for FPGA-based systems, though often the
latency is too high for software encoder and stepgen systems.
Assuming you have a multi-core system, isolating the highest
numbered CPU with isolcpus=# on the kernel commandline may help
latency, just as with RTAI.
Unless you know your computer only supports 32-bit code, I recommend
using the -amd64 image, which works for both AMD and Intel 64-bit
CPUs.
Like the older images, you can either boot live to test your
hardware, or install to the hard disk, from the same iso image.
The Debian image is a "hybrid" iso, which means you can use the same
iso file for a USB stick or a DVD. (The image is bigger than a
traditional CD, so you can't install from regular CD anymore.)
Instructions for writing the image to a USB stick from Windows and
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Hybrid_Iso
**NOTE** the Ubuntu "startup disk creator" and unetbootin do NOT
handle hybrid images. Use the above instructions instead, if you
want to install from USB. To install from DVD you can use any
traditional method to write the iso image.
You can find it at the temporary URL
http://www.linuxcnc.org/testing-stretch-rtpreempt/
For more notes and for the scripts used to build these images,
see https://github.com/jepler/stretch-live-build
The github repository has an "issues" section. Please use it only
to file bugs about the image itself, not about bugs in LinuxCNC,
even if the bug in LinuxCNC seems to be specific to Debian Stretch.
(but if you aren't sure, then file it in stretch-live-build and
we'll triage it)
Jeff
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
Jeff Epler
2017-07-22 13:08:35 UTC
Permalink
Raw Message
Post by t***@bgp.nu
Will there be an RTAI kernel for Stretch at some point?
Personally, I do not plan to work on an RTAI kernel.

In the event an RTAI kernel for Stretch reaches the point where it is
good enough for linuxcnc.org to ship it, it should not be difficult to
produce live images for it; it's a one-line change to the building
scripts for these images to change the kernel, and a second one-line
change to instal "linuxcnc" instead of "linuxcnc-uspace".

Jeff
Nicklas Karlsson
2017-07-22 13:20:34 UTC
Permalink
Raw Message
Post by Jeff Epler
Personally, I do not plan to work on an RTAI kernel.
In the event an RTAI kernel for Stretch reaches the point where it is
good enough for linuxcnc.org to ship it, it should not be difficult to
produce live images for it; it's a one-line change to the building
scripts for these images to change the kernel, and a second one-line
change to instal "linuxcnc" instead of "linuxcnc-uspace".
Jeff
I tried have tried it once, it worked but no ethernet, I think something was missing in the driver.

I will give raspberry or beagle bone a try for the real time part and add one more devices as user interface.
Valerio Bellizzomi
2017-07-22 13:49:08 UTC
Permalink
Raw Message
Post by Nicklas Karlsson
Post by Jeff Epler
Personally, I do not plan to work on an RTAI kernel.
In the event an RTAI kernel for Stretch reaches the point where it is
good enough for linuxcnc.org to ship it, it should not be difficult to
produce live images for it; it's a one-line change to the building
scripts for these images to change the kernel, and a second one-line
change to instal "linuxcnc" instead of "linuxcnc-uspace".
Jeff
I tried have tried it once, it worked but no ethernet, I think something was missing in the driver.
I will give raspberry or beagle bone a try for the real time part and add one more devices as user interface.
I take the occasion to remember: Linuxcnc comes without the e1000e
network driver, it is not available as a package so it must be compiled
and installed by hand
Nicklas Karlsson
2017-07-22 17:29:54 UTC
Permalink
Raw Message
Post by Valerio Bellizzomi
Post by Nicklas Karlsson
Post by Jeff Epler
In the event an RTAI kernel for Stretch reaches the point where it is
good enough for linuxcnc.org to ship it, it should not be difficult to
produce live images for it; it's a one-line change to the building
scripts for these images to change the kernel, and a second one-line
change to instal "linuxcnc" instead of "linuxcnc-uspace".
Jeff
I tried have tried it once, it worked but no ethernet, I think something was missing in the driver.
I will give raspberry or beagle bone a try for the real time part and add one more devices as user interface.
I take the occasion to remember: Linuxcnc comes without the e1000e
network driver, it is not available as a package so it must be compiled
and installed by hand
The rtai need some kind of special handling or driver and the ordinary does not work. I guess this is to get the best real time performance. It should not block higher priority and it should be able to interrupt lower priority or send higher priority first.
Loading...