Recent developments has made it possible to run LinuxCNC on the latest LTS release of Ubuntu. This is experimental work, so not recommended for controlling a real machine just yet. The main obstacle for moving LinuxCNC from 10.04LTS to a more recent distribution has been the RTAI real-time kernel, which has not been kept up-to-date with development of the normal Linux kernel. Fortunately there are alternatives such as Xenomai or RT_PREEMPT.
Here is a step-by-step description of the install/build process, if you want to experiment with this.
- Download and install a normal 32-bit 12.04LTS Ubuntu (ubuntu-12.04.1-desktop-i386.iso). Note that the 64-bit version is not supported for the steps that follow further down. I could not get Ubuntu's startup-disk-creator to work, so I used unetbootin to write the ISO-file to a USB-stick.
- It's possible to compile the xenomai-kernel from scratch, along with the runtime etc., but I used pre-compiled deb-packages by Michael Haberler from here: http://static.mah.priv.at/public/xenomai-debs/
- Install the xenomai kernel:
sudo dpkg -i linux-headers-3.2.21-xenomai+_0.1_i386.deb
sudo dpkg -i linux-image-3.2.21-xenomai+_0.1_i386.deb
- make sure it will show up as a GRUB-entry when booting:
sudo update-initramfs -c -k 3.2.21-xenomai+
- reboot. uname -r should now show: 3.2.21-xenomai+
- now install the xenomai runtime:
sudo dpkg -i libxenomai1_2.6.1_i386.deb
sudo dpkg -i libxenomai-dev_2.6.1_i386.deb
sudo dpkg -i xenomai-runtime_2.6.1_i386.deb
This installs the xenomai system on top of which a recently available version of LinuxCNC can be built. There are probably many ways to now obtain the tools/dependencies that are required. I used the following:
- sudo apt-get install synaptic
sudo apt-get install git
- Now using synaptic, install the following packages (I found these are required for a minimal linuxcnc build):
- Get Michael's version of LinuxCNC that can be compiled for Xenomai:
git clone git://git.mah.priv.at/emc2-dev emc2-dev
git branch --track rtos origin/rtos-integration-preview1
git checkout rtos
- Configure and build for Xenomai:
./configure --with-threads=xenomai-user --enable-run-in-place
sudo make setuid
This new version of LinuxCNC can be built without a real-time kernel (previously called "simulator" or "sim") or with any of the real-time kernel alternatives: RTAI, Xenomai, RT_PREEMPT. It should be possible to compare real-time performance in the form of latency-numbers with different hardware and kernels.