[Home]GentooPreemtrt

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Difference (from prior major revision) (minor diff)

Changed: 1,3c1,5
Disclaimer:
This worked for me and there are surely things to improove. 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 distribution. There you can remove the blinky stuff too and get it run with 256MB. (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 lapic - so my hope to just drop in Ubuntu based and use it was dissappointed and my hate to Ubuntu grew stronger.)
<html><table border="0" bgcolor="#e3c3c3"><tr><td align="left"><div class=wikitext>
Disclaimer:

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.)
</div></td></tr></table></html>

Changed: 7c9,12
Emerge preemptrt sources

Contents



<toc>

1. Emerge preemptrt sources



you can skip this and the following step if you just want to simulate machining on your Gentoo system

Changed: 11c16,20
cd to the directory where the rt-sources got installed /usr/src/linux-[versionnumber]-rt[revision]

2. Build the PreempRT? kernel



cd to the directory where the rt-sources got installed /usr/src/linux-[versionnumber]-rt[revision], e.g.

cd /usr/src/linux-4.13.13-rt5


Changed: 13c22,26
then

cp ../linux/.config .

then


Added: 14a28


Added: 15a30,39
make sure your .config contains
<html><table border="0" bgcolor="#eeeeee"><tr><td align="left"><div class=wikitext>

CONFIG_PREEMPT=y
CONFIG_PREEMPT_RT_BASE=y
CONFIG_PREEMPT_RT_FULL=y
CONFIG_HIGH_RES_TIMERS=y
</div></td></tr></table></html>

build the kernel


Added: 16a41,43

install the modules


Added: 17a45


Added: 21a50,54
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

3. Emerge LinuxCNC





Added: 25a59,64
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

PORTDIR_OVERLAY="/usr/local/portage"


Removed: 33d71


Added: 36a75,78
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-update
interactive to make those changes real. Be carefull, with this tool. Be patient and don't mix commands with - with numbers e.g. <html>-1</html> is not the same as <html>1</html> !


Changed: 43c85
TODO

4. TODO




Changed: 47c89,98
If you have any suggestions, questions or improvements you can reach my via my mail form: http://reiseradgabel.de/english/mail

5. More resources




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_LinuxCNC
The 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.

6. Contact to the author of this manual



If you have any suggestions, questions or improvements you can reach me via my mail form: 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.

Disclaimer:
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.

Contents

1. Emerge preemptrt sources
2. Build the PreempRT kernel
3. Emerge LinuxCNC
4. TODO
5. More resources
6. Contact to the author of this manual

1. Emerge preemptrt sources

you can skip this and the following step if you just want to simulate machining on your Gentoo system

 emerge -av sys-kernel/rt-sources

2. Build the PreempRT? kernel

cd to the directory where the rt-sources got installed /usr/src/linux-[versionnumber]-rt[revision], e.g.

 cd /usr/src/linux-4.13.13-rt5

copy .config of a working kernel to this directory

 cp ../linux/.config .

then

 make oldconfig

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

 make all

install the modules

 make modules_install

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

3. Emerge LinuxCNC

Download upload:linuxcnc-ebuilds-2.7.11.tar.xz

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

 PORTDIR_OVERLAY="/usr/local/portage"

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/

 sci-misc/linuxcnc modbus

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.

PORTAGE_COMPRESS=""

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-update
interactive 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

good luck

4. TODO

get rid of the make.conf line change
useflag for installing the whole documentation

5. More resources

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_LinuxCNC
The 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.

6. Contact to the author of this manual

If you have any suggestions, questions or improvements you can reach me via my mail form: 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.

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited December 18, 2017 6:52 pm by Reiseradgabel (diff)
Search:
Published under a Creative Commons License