[Home]RealtimeConfiguratonProposal

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Adapting LinuxCNC configure to multiple realtime environments

The current configuration options for LinuxCNC regarding 'real time environments' are:

I believe the underlying assumptions at the time were:

Several options for realtime Linux have appeared since, which are:

These two platforms provide new options:

Also, given reasonable latency of one of the user RT process schemes, it becomes entirely feasible to use user-mode device drivers.

It should be obvious that these new options cannot be consistently adressed with the current configuration assumptions. Realtime does not imply kernel threads exclusively anymore, and User process mode does not imply 'useless so no drivers' please. Also, user RT modules will do I/O, hence rtapi_app needs to be setuid root in this case.

As work progresses on different branches in parallel, configuration problems will likely be solved ad-hoc (ad-hack?) and conflicts will arise during merge, also with the consequence of an even more incoherent set of options.

The configuration options have been changed as

(for now, this only applies to http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/integration-configuration-dev as it is not merged yet):

--with-realtime will be deprecated in its current form, and replaced by:

--with-threads=<arg>, arg being one of:

Build system: there are two styles, 'kbuild' (kernel modules) and 'user-dso' (userland shared objects). The thread style implies a build system: posix, xenomai-user, rt-preempt-user imply 'user-dso', the others imply 'kbuild'.

Building hardware drivers can be controlled with --enable-drivers. It is default 'yes' except for --with-threads=posix. Some hardware drivers will build as kernel modules only, some as user shared objects, some may build as both; in that case the Submakefile needs to test for BUILD_SYS having the proper value.

The cpp symbols 'SIM', 'SIMULATOR', and 'RTAPI_SIM' have been removed as they do not make sense any more. A simulator configuration is '--with-threads=posix', which is now implied by --enable-simulator.

The shell/Makefile? variables are:

THREADS= one of: posix, rt-preempt-user,rt-preempt-kernel, xenomai-user, xenomai-kernel, rtai

BUILD_DRIVERS=yes or no

BUILD_SYSTEM=kbuild or user-dso

THREADS is reflected in config.h as one of the following defined:

RTAPI_POSIX

RTAPI_RT_PREEMPT_USER

RTAPI_RT_PREEMPT_KERNEL

RTAPI_XENOMAI_USER

RTAPI_XENOMAI_KERNEL

RTAPI_RTAI

BUILD_DRIVERS is conditionally defined in config.h too.

BUILD_SYSTEM is reflected in config.h as either

BUILD_SYSTEM_KBUILD or

BUILD_SYSTEM_USER_DSO defined.

hal_parport

The experimental usermode parport driver from master: src/hal/simdrivers has been integrated into the main hal_parport.c/.h code using conditionals from above.

Make setuid:

this has been adapted to take care of the case 'threads=posix and drivers enabled', which requires rtapi_app to be setuid root.

Michael Haberler


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited October 27, 2012 8:07 am by MichaelHaberler (diff)
Search:
Published under a Creative Commons License