This worked for me and there are surely things to improve. None of the other ways I found on the web and in this wiki worked anymore with a recent Gentoo distribution since I tried in 2016. So I made this stuff now - December 2017 on a Thinkpad T43p (2GHz, 1GB RAM, Parport, ATI, 1600x1200). If you are not familiar with Gentoo you better take the standart Ubuntu based distribution. There you can remove the blinky stuff too and get it run with 256MB RAM. (I've done that but had to recompile kernel, rtai and emc as they where not compatible to my P III CPU as they where built for machines with lapic(s) and I only had a apic - so my hope to just drop in Ubuntu based LinuxCNC CD and use it was dissappointed and my hate to Ubuntu grew stronger. Well I guess LinuxCNC not running on pre SMP Processors should be fixed.)
As the performance differences between preemptrt, rtai and xenomai are small and the preemptrt kernel is easy to build I used this way.
emerge -av sys-kernel/rt-sources
copy .config of a working kernel to this directory
cp ../linux/.config .
answer the stuff and enable all the things needed for realtime make sure your .config contains
CONFIG_PREEMPT=y CONFIG_PREEMPT_RT_BASE=y CONFIG_PREEMPT_RT_FULL=y CONFIG_HIGH_RES_TIMERS=y
build the kernel
install the modules
copy the bzImage to /boot and make grub or whatever you use find it
reboot the new kernel and make sure it works
update the link to the kernel source where linux-4.13.13-rt5 has to be set according to the Version you use e.g.
cd /usr/src && rm linux && ln -s linux-4.13.13-rt5 linux
cd to /usr/local and untar the Download there
cd /usr/local && tar Jxvf /PATH/TO/THE/DOWNLOAD/linuxcnc-ebuilds-2.7.11.tar.xz
make sure your make.conf contains a line like
if you need modbus (If you don't know what it is, you don't need it.) for your machine add the useflag to linuxcnc e.g. add the following line to /usr/portage/package.use or a file in /usr/portage/package.use/
add the following line to your /etc/portage/make.conf You should remove this line when you are done. Anyways I couldn't find a way to get the ebuild preventing portage from bzip2ing the minimal sample files and this is a problem as the linuxcncgui is making heavy use of them and can't read them when they are zipped.
unmask sci-misc/linuxcnc and depencies and emerge
emerge -av sci-misc/linuxcnc
if you forgot to unmask something the latter command will ask you to do this automatic. You can let it do that. It will not write the changes to the real files yet. You can use
etc-updateinteractive to make those changes real. Be carefull, with this tool. Be patient and don't mix commands with - with numbers e.g. -1 is not the same as 1 !
read the messages I've put in the ebuild.
when you're done remember the make.conf line
I knew the stuff when I wrote this manual here and the ebuilds. It's mostly obsolete for use but maybe helpfull for improve the ebuild.
EmcOnGentoo https://sourceforge.net/projects/gentoocnc/ http://gpo.zugaina.org/Overlays/booboo/sci-electronics/linuxcnc https://dallasmakerspace.org/wiki/User:Peter242/Gentoo_for_LinuxCNCThe zugaina link gave me preview to linuxcnc 2.8_pre I don't remember what it was but somehow it didn't work on my machine when I tried it, but looks interesting. http://reiseradgabel.de/english/mail (This gives me less spam as putting my email address here.) Please keep in mind that generic LinuxCNC questions are better addressed somewhere else.