You need to have a working realtime OS installed, either RT-Linux or RTAI. Generic instructions for patching a realtime kernel can be found on the RtaiSteps page. The realtime kernel is already installed on a BDI? or Puppy? distribution. There are .deb's of the patched kernel available [here] or [here]. There are no realtime kernel .rpm's available yet.
Once you have the source code, you should be able to compile it using the "standard" Linux method (note that you configure and compile from within the src/ directory, not from the top level emc2 directory):
cd emc2/src ./configure make
The configure script attempts to locate all the dependencies, such as your realtime OS installation, libraries, and so on. If your system has things in non-standard places, configure may not find them. There are command line options for configure that allow you to tell it where to look. To see the list of command line options, type:
(Note: If you have a BDI-4 system, go to the [BDI-4 Compile EMC2]? page for a more specific set of instructions.)
Additional information that may prove helpful is in docs/README and docs/INSTALL
Note that EMC2 currently does NOT have a "make install". Since it is still in beta test, we recommend that you do not install it on your system, simply run it from the directory in which you compiled it. To run EMC2, switch to the top level emc2 directory (one level up from the src/ directory where you compiled it) and type:
If you wish to change the configuration, make a copy of configs/emc.ini, edit it as needed, and specify it instead of the original emc.ini when you start EMC2.
To be able to compile the kernel-modules, you should use the same compiler which was used to compile the kernel you are using. In my case the compiler was updatet by "apt-get update; apt-get upgrade" from gcc-3.3 to gcc-4.0. EMC2 is guessing the compiler by querying "/usr/realtime/bin/rtai-config" for the used compiler, which results to gcc, the default compiler in the system, which changed by update.
If you already are running on the realtime kernel, you will get the used compiler by
which in this case was "gcc-Version 3.3.5".
the kernel modules where loadable.