[Home]NewRTInstall

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Showing revision 6

Installing the 'new Realtime Operating system' development branch

LinuxCNC can now be run under the Xenomai and RT_PREEMPT kernels as well as RTAI. This work however has not been integrated and packaged yet, so some assembly is required. This wiki page is meant as a temporary guideline until the code is merged and installation can proceed through normal package installation.

Platforms

As of now, the following platforms are supported:

For the ARM platform, there's one choice only.

As for PC/X86 platforms the rule of thumb is: Xenomai will give better real time performance, and RT_PREEMPT will be easier to be upgrade downstream. If you use a soft stepper configuration, I'd suggest trying with Xenomai first.

Required steps

Installing on PC/X86 platforms

I assume the machine is running either Ubuntu 10.04 LTS or Ubuntu Precise (12.04) fresh install which did not have LinuxCNC installed or built on it before; if you are using an install which already has been used to compile LinuxCNC before, most of the prerequisite packages are likely installed already; see under 'Installing LinuxCNC' below.

Steps for other distros should be very similar.

This post might be useful: http://www.anderswallin.net/2012/12/linuxcnc-on-ubuntu-12-04lts/ - note some package names have been update since.

fetch and install the required packages

The instructions for installing the Xenomai kernel are at XenomaiKernelPackages .

a basic Xenomai health check

login, and run this command to verify the Xenomai kernel is running:

 $ dmesg | grep Xenomai

The output should look like so:

[    2.826169] I-pipe: head domain Xenomai registered.
[    2.912094] Xenomai: hal/i386 started.
[    3.184246] Xenomai: scheduling class idle registered.
[    3.241571] Xenomai: scheduling class rt registered.
[    3.290277] Xenomai: real-time nucleus v2.6.1 (Light Years Away) loaded.
[    3.317241] Xenomai: debug mode enabled.
[    3.414937] Xenomai: starting native API services.
[    3.458010] Xenomai: starting POSIX services.
[    3.518369] Xenomai: starting RTDM services.

If it doesnt, you likely started the wrong kernel from grub.

Installing LinuxCNC

In case you are running on a pristine Ubuntu 10.04LTS or 12.04 install which hasnt seen any use of git, first install the git tools and a helper to pull in dependencies:

 $  sudo apt-get install git-core git-gui dpkg-dev

Now, fetch the development branch from Michael's git repository:

 $ git clone git://git.mah.priv.at/emc2-dev.git linuxcnc-rtos

This puts the project in the directory 'linuxcnc-rtos'. To put the local copy of the project in a different location, just change the last argument of the 'git clone' command. You should only have to do this once.

The commands below generally assume you have now changed to the directory created by the git clone command, so cd into it:

  $ cd linuxcnc-rtos

By default, you will get files from "master", which is not what we want - there are two possible branches to choose from:

 rtos-integration-preview3  - this is based on v2.5_branch
 rtos-integration-preview3-merged-into-master  - this should track current master functionality very closely.

Decide which one you want, and check it out - we assume rtos-integration-preview3 for this example:

 $ git branch --track rtos-integration-preview3 origin/rtos-integration-preview3
 $ git checkout rtos-integration-preview3

Install the build dependencies - this will pull in all packages required to compile linuxcnc:

 $ cd debian
 $ ./configure sim
 $ cd ..
 $ dpkg-checkbuilddeps

This will show a list of packages missing (if any); install those with

 $ sudo apt-get install ....list of missing packages...

Once this is complete, we now configure and build linuxcnc:

 $ cd src
 $ sh autogen.sh
 $ ./configure 
 $  make
 $ sudo make setuid

To run all packaged unit tests:

 $  . ./scripts/rip-environment
 $ runtests       # this should complete without errors

To get an idea of the latency behaviour:

 $ latency-test

Before running any parallel-port based configuration, make sure the 'lp' kernel module is not loaded. Verify it isnt:

 $ lsmod | grep lp

If the lp module shows up, remove it:

 $ sudo rmmod lp

To prevent 'lp' being loaded on next reboot, comment out the line listing 'lp' in the file /etc/modules.

You should now be able to run any existing linuxcnc configuration as usual, pending driver support - see below.

If you get any permission errors reported during startup (or runtests), the following should help - you need to add the linuxcnc user to the xenomai and kmem groups:

 $ sudo adduser <yourlogin> xenomai
 $ sudo adduser <yourlogin> kmem

Please log out and log in to effect the change.

Status of hardware driver support

The Mesanet drivers have been adapted; while in theory all of them should work fine, only the following are positively known to work at this point in time:

The hal_parport driver should run as expected.

Other drivers are of unknown status; the ISA-based cards are supposed to work, or get working with minimal changes; please try and report back.


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions | View current revision
Edited February 13, 2013 11:44 pm by Zultron (diff)
Search:
Published under a Creative Commons License