{"id":623,"date":"2016-01-11T22:58:47","date_gmt":"2016-01-11T21:58:47","guid":{"rendered":"http:\/\/www.mb200d.nl\/wordpress\/?p=623"},"modified":"2016-01-12T23:03:25","modified_gmt":"2016-01-12T22:03:25","slug":"linuxcnc-2-7-on-jessie","status":"publish","type":"post","link":"http:\/\/www.mb200d.nl\/wordpress\/2016\/01\/linuxcnc-2-7-on-jessie\/","title":{"rendered":"LinuxCNC 2.7 on Jessie"},"content":{"rendered":"<p>Running LinuxCNC on fresh Debian Jessie (8) install using custom compiled longterm kernel 4.1.15.<\/p>\n<p>Start with a fresh install of Debian.<\/p>\n<p>Most of the step can be done as a normal user. For apt-get and dpkg commands log in as root or use sudo.<\/p>\n<h2>Compile Kernel 4.1.15 with RT patch<\/h2>\n<p>With some help from <a href=\"https:\/\/rt.wiki.kernel.org\/index.php\/RT_PREEMPT_HOWTO\">https:\/\/rt.wiki.kernel.org\/index.php\/RT_PREEMPT_HOWTO<\/a> and <a href=\"http:\/\/www.cyberciti.biz\/faq\/debian-ubuntu-building-installing-a-custom-linux-kernel\/\">http:\/\/www.cyberciti.biz\/faq\/debian-ubuntu-building-installing-a-custom-linux-kernel\/<\/a> .<\/p>\n<h3>Install required tools<\/h3>\n<pre># apt-get install build-essential ncurses-dev fakeroot kernel-package\r\n<\/pre>\n<h3>Extract kernel and patch<\/h3>\n<pre># mkdir \/opt\/kernel\r\n# cd \/opt\/kernel\r\n# wget https:\/\/cdn.kernel.org\/pub\/linux\/kernel\/v4.x\/linux-4.1.15.tar.xz\r\n# wget https:\/\/www.kernel.org\/pub\/linux\/kernel\/projects\/rt\/4.1\/patch-4.1.15-rt17.patch.gz\r\n# tar xvf linux-4.1.15.tar.xz\r\n# gzip --decompress patch-4.1.15-rt17.patch\r\n# cd linux-4.1.15\r\n# cat ..\/patch-4.1.15-rt17.patch | patch -p1\r\n<\/pre>\n<h3>Copy current kernel config into this build<\/h3>\n<pre># cp \/boot\/config-$(uname -r) .config\r\n<\/pre>\n<h3>Configure kernel<\/h3>\n<pre># make menuconfig\r\n-&gt; Processor type and features\r\n-&gt; -&gt; Preemption Model (Fully Preemptible Kernel (RT))\r\n-&gt; -&gt; Timer frequency (1000 HZ)\r\n&lt;Save&gt;\r\n<\/pre>\n<p><a href=\"http:\/\/www.mb200d.nl\/wordpress\/wp-content\/uploads\/2016\/01\/menuconfig.png\" rel=\"attachment wp-att-629\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-629\" src=\"http:\/\/www.mb200d.nl\/wordpress\/wp-content\/uploads\/2016\/01\/menuconfig.png\" alt=\"menuconfig\" width=\"737\" height=\"503\" srcset=\"http:\/\/www.mb200d.nl\/wordpress\/wp-content\/uploads\/2016\/01\/menuconfig.png 737w, http:\/\/www.mb200d.nl\/wordpress\/wp-content\/uploads\/2016\/01\/menuconfig-300x205.png 300w, http:\/\/www.mb200d.nl\/wordpress\/wp-content\/uploads\/2016\/01\/menuconfig-624x426.png 624w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/a><\/p>\n<h3>Compile kernel<\/h3>\n<pre># make-kpkg clean\r\n# fakeroot make-kpkg -j4 --initrd kernel_image kernel_headers\r\n<\/pre>\n<p>Where -j specifies number of cpu cores.<br \/>\nThis might take a while and raise room temperature. \ud83d\ude42<\/p>\n<h3>Installing kernel<\/h3>\n<p>Execute de following commands as root or use sudo.<\/p>\n<pre># cd ..\r\n# dpkg -i linux-headers-4.1.15-rt17-10.00.Custom_amd64.deb\r\n# dpkg -i linux-image-4.1.15-rt17-10.00.Custom_amd64.deb\r\n# shutdown -r now\r\n<\/pre>\n<h3>Adding LinuxCNC repository to APT<\/h3>\n<p>I do not compile my own LinuxCNC, maybe later, for now i am using LinuxCNC APT archive.<\/p>\n<p>Follow http:\/\/linuxcnc.org\/docs\/html\/getting-started\/getting-linuxcnc.html#_installing_on_debian_wheezy_with_preempt_rt_kernel<\/p>\n<p>Run the following commands as user root or use sudo.<\/p>\n<p>Add the LinuxCNC Archive Signing Key to your apt keyring:<\/p>\n<pre># apt-key adv --keyserver hkp:\/\/keys.gnupg.net --recv-key 3cb9fd148f374fef\r\n<\/pre>\n<p>Now edit \/etc\/apt\/sources.list and add the following line:<\/p>\n<pre>deb http:\/\/linuxcnc.org\/ jessie base 2.7-uspace\r\n<\/pre>\n<p>and update aptitude.<\/p>\n<pre># apt-get update\r\n<\/pre>\n<p>Now you can install LinuxCNC by using this line:<\/p>\n<pre># apt-get install linuxcnc-uspace\r\n<\/pre>\n<p>Please let me know if i wrote something wrong.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running LinuxCNC on fresh Debian Jessie (8) install using custom compiled longterm kernel 4.1.15. Start with a fresh install of Debian. Most of the step can be done as a normal user. For apt-get and dpkg commands log in as root or use sudo. Compile Kernel 4.1.15 with RT patch With some help from https:\/\/rt.wiki.kernel.org\/index.php\/RT_PREEMPT_HOWTO [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[170],"tags":[309,311,313,315,317,319,321],"class_list":["post-623","post","type-post","status-publish","format-standard","hentry","category-geen-categorie-en","tag-debian-8-en","tag-debian-jessie-en","tag-kernel-4-1-15-en","tag-kernel-compile-en","tag-linuxcnc-2-7-en","tag-rt-patch-en","tag-rt-preempt-en"],"_links":{"self":[{"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/comments?post=623"}],"version-history":[{"count":8,"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/posts\/623\/revisions"}],"predecessor-version":[{"id":637,"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/posts\/623\/revisions\/637"}],"wp:attachment":[{"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/media?parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/categories?post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mb200d.nl\/wordpress\/wp-json\/wp\/v2\/tags?post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}