Re: How to install RTAI 5.1 on Debian?
Paolo Mantegazza <[email protected]> Mon, 12 Feb 2018 15:49:23 +0100
| Newsgroups | gmane.linux.real-time.rtai |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============2759749125271149658== Content-Type: multipart/alternative; boundary="------------E318D0E9DFFBE739527BE768" Content-Language: en-US This is a multi-part message in MIME format. --------------E318D0E9DFFBE739527BE768 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Have you disabled the legacy support? Paolo On 02/12/2018 03:41 PM, Guo Yunfei wrote: > Not. > I using the patchs in RTAI-5.1 directory. > I had tried=C2=A0hal-linux-3.10.32-x86-8.patch , > and hal-linux-3.16.7-x86-5.patch > and hal-linux-3.18.20-x86-6.patch > > all of them make and make install was successful. > > But when I test the latency by that "run" command. > the computer not response and hang . > need to =C2=A0power off to reboot. > > BR > Guo Yunfei > > > On Mon, Feb 12, 2018 at 10:17 PM, Paolo Mantegazza=20 > <[email protected] <mailto:[email protected]>> wrote: > > Is there any 3.8.13 patch in RTAI-5.1? > Paolo > > > On 02/12/2018 02:23 PM, Guo Yunfei wrote: >> >> Hi. everybody. >> >> I always install RTAI 4.0 and RTAI 4.1 on Debian as below steps >> and using it perfect. >> When I install RTAI 5.1 as same steps. =C2=A0the RTAI 5.1 can be m= ake >> successfully. >> But the system not reponse after I test the latency by that "run >> " command. >> >> Could some one give me a guide of installation of RTAI 5.1 on Debi= an? >> >> Best Regards >> Guo Yunfei >> >> My steps: >> //------------------------------------------ >> This document describes how to install RTAI 4.0 on a Ubuntu >> 12.04.4 LTS using a 3.8.13 kernel, either 32bit or 64 bit version. >> >> >> Prerequisites >> >> Install Ubuntu 12.04.4 using one of the following images: >> >> http://releases.ubuntu.com/precise/ubuntu-12.04.4-desktop-amd64.is= o >> <http://releases.ubuntu.com/precise/ubuntu-12.04.4-desktop-amd64.i= so> >> >> http://releases.ubuntu.com/precise/ubuntu-12.04.4-desktop-i386.iso >> <http://releases.ubuntu.com/precise/ubuntu-12.04.4-desktop-i386.is= o> >> >> And then follow the installation instructions here: >> https://help.ubuntu.com/community/Installation/ >> <https://help.ubuntu.com/community/Installation/> >> >> >> Introduction >> >> If the ROOT user is not created yet, log as your usual user, open >> a terminal and type -> >> >> # sudo su - >> # sudo passwd root >> >> Enter the password for the ROOT user. Log out and log in as Root. >> >> Open a terminal and update your package repository source file : >> >> # apt-get update >> >> Some tools are required in order to set up the kernel (You need >> to be connected to Internet) >> >> # apt-get -y install qt3-apps-dev build-essential kernel-package v= im cvs >> >> >> I - Kernel source and RTAI download >> >> # cd /usr/src/ >> >> Get the kernel source from kernel.org <http://kernel.org> >> >> # wgethttps://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.13.ta= r.bz2 >> <https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.13.tar.bz2= > >> # tar xf linux-3.8.13.tar.bz2 >> >> Get RTAI 4.0 from the RTAI homepage >> >> # wgethttps://www.rtai.org/userfiles/downloads/RTAI/rtai-4.0.tar.b= z2 >> <https://www.rtai.org/userfiles/downloads/RTAI/rtai-4.0.tar.bz2> >> tar xf rtai-4.0.tar.bz2 >> >> >> II - Kernel Preparation >> >> # cd /usr/src >> # ln -s linux-3.8.13 linux >> # cd linux >> >> >> Applying patch >> >> If you want first simulate the patch application, use "--dry-run" >> after "-p1". It won't touch any files on your computer, but you >> can see if you get Hunks or not. >> >> # patch -p1 < /usr/src/rtai-4.0/base/arch/x86/patches/hal-linux-3.= 8.13-x86-4.patch >> >> >> Kernel Configuration >> >> # cd /usr/src/linux >> >> In order to retrieve your current kernel configuration : (If at >> this step, questions are asked give the answer by default) >> >> # make oldconfig >> >> Now we modify the kernel settings the way we need it (NOTE: some >> parameters cannot be disabled with xconfig - better to use >> menuconfig): >> >> # make xconfig >> >> Set up the kernel settings as follows : >> >> *Processor type and features* >> >> -> Processor family =3D /Select yours >> /-> Maximum number of CPUs (NR_CPUS) =3D /Set your number (it's >> generally "4")/ >> -> SMT (Hyperthreading) scheduler support =3D /DISABLE IT/ >> >> *Power Management and ACPI options* >> >> CPU idle PM support >> -> Cpu idle Driver for Intel Processors =3D /DISABLE IT >> /-> ACPI (Advanced Configuration and Power Interface) Support -> >> PROCESSOR =3D /DISABLE IT >> /-> APM (Advanced Power Management) BIOS support =3D /DISABLE IT >> /-> CPU Frequency scaling -> CPU Frequency scaling =3D /DISABLE IT >> /CPU idle PM support =3D DISABLE IT >> >> Save and Quit >> >> Note (Sylvain, May 2014): these settings should be verified in >> the .config file, since there have been cases that xconfig does >> not do it correctly. >> >> >> *III - Kernel Compilation* >> >> # cd /usr/src/linux >> # make && make modules_install && make install >> >> NOTE: The compilation time might be decreased by passing the >> flags -jX (with X=3Dnumber of CPUs you have on your machine). This >> has for effect to parallelize the kernel compilation between the >> CPUs. This will take ~1 hour. >> >> >> Kernel Boot Options >> >> This is very important - it took us (and the guys at the RTAI >> mailing list) ages to find that special config that makes >> everything work smoothly! >> >> You need to add the following option to the kernel at boot time >> >> lapic=3Dnotscdeadline >> >> The best way to do this is in /etc/default/grub in the field >> GRUB_CMDLINE_LINUX_DEFAULT, i.e., >> >> GRUB_CMDLINE_LINUX_DEFAULT=3D"quiet splash lapic=3Dnotscdeadline" >> >> You will also have to change the GRUB_DEFAULT to the number that >> corresponds to the new kernel. >> >> Finally run update-grub and reboot >> >> # update-grub >> # reboot >> >> >> *IV - RTAI installation* >> >> Now that the system has restarted, make sure you booted on your >> new OpenAir >> <https://twiki.eurecom.fr/twiki/bin/edit/OpenAirInterface/OpenAir?= topicparent=3DOpenAirInterface.OpenAirKernel357Ubuntu1204x86Setups;nowysi= wyg=3D0>=C2=A0kernel >> >> # uname -r >> >> Should give you "3.8.13" as result >> >> # cd /usr/src/rtai-4.0 >> # make xconfig >> >> UPDATE the CPUs number according to your configuration and >> disable RTAI_USE_NEWERR and real-time COMEDI support in Add-ons. >> Enable the watchdog, CONFIG_RTAI_WD. >> >> Save and quit. If any error occurs here, solve it and repeat this >> "make xconfig" step until it's OK >> >> # make && make install >> >> Add what follows, to the end of the file ~/.bashrc >> >> export PATH=3D/usr/realtime/bin:$PATH >> export LD_LIBRARY_PATH=3D$LD_LIBRARY_PATH:/usr/realtime/lib >> >> Create a file /etc/ld.so.conf.d/rtai.conf with the content >> >> /usr/realtime/lib >> >> and run "ldconfig"in order to take it into account >> >> We will test the RTAI system via the latency test >> >> # cd /usr/realtime/testsuite/kern/latency >> # ./run >> //----------------------------------------------------------------= ------------------------- >> >> >> _______________________________________________ >> Rtai mailing list >> [email protected] <mailto:[email protected]> >> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai >> <https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai> > > > --------------E318D0E9DFFBE739527BE768 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf= -8"> </head> <body text=3D"#000000" bgcolor=3D"#FFFFFF"> <div class=3D"moz-cite-prefix">Have you disabled the legacy support?<= br> Paolo<br> <br> On 02/12/2018 03:41 PM, Guo Yunfei wrote:<br> </div> <blockquote type=3D"cite" cite=3D"mid:CAN_Un=3DWa+vJBB4bFAvkdiU7NwsLC_-zfBVVkw-JBO=3DkN=3DTu2mQ@mai= l.gmail.com"> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Du= tf-8"> <div dir=3D"ltr">Not. <div>I using the patchs in RTAI-5.1 directory.</div> <div>I had tried=C2=A0hal-linux-3.10.32-x86-8.patch ,</div> <div>and hal-linux-3.16.7-x86-5.patch=C2=A0</div> <div>and hal-linux-3.18.20-x86-6.patch</div> <div><br> </div> <div>all of them make and make install was successful.</div> <div><br> </div> <div>But when I test the latency by that "run" command.</div> <div>the computer not response and hang .</div> <div>need to =C2=A0power off to reboot.</div> <div><br> </div> <div>BR</div> <div>Guo Yunfei</div> <div><br> </div> </div> <div class=3D"gmail_extra"><br> <div class=3D"gmail_quote">On Mon, Feb 12, 2018 at 10:17 PM, Paol= o Mantegazza <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank= " moz-do-not-send=3D"true">[email protected]</a>>= </span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div text=3D"#000000" bgcolor=3D"#FFFFFF"> <div class=3D"m_6538383722746369347moz-cite-prefix">Is ther= e any 3.8.13 patch in RTAI-5.1? <br> Paolo <div> <div class=3D"h5"><br> =C2=A0<br> On 02/12/2018 02:23 PM, Guo Yunfei wrote:<br> </div> </div> </div> <blockquote type=3D"cite"> <div> <div class=3D"h5"> <div dir=3D"ltr"> <div><span><br> </span></div> <div><span>Hi. everybody.</span></div> <div><span><br> </span></div> <div><span>I always install RTAI 4.0 and RTAI 4.1 on Debian as below steps and using it perfect.<= /span></div> <div><span>When I install RTAI 5.1 as same steps. =C2=A0the RTAI 5.1 can be make successfully.</s= pan></div> <div><span>But the system not reponse after I test the latency by that "run " command.</span></div= > <div><span><br> </span></div> <div><span>Could some one give me a guide of installation of RTAI 5.1 on Debian?</span></div= > <div><span><br> </span></div> <div><span>Best Regards</span></div> <div><span>Guo Yunfei</span></div> <div><span><br> </span></div> <span> <div>My steps:<span><br> </span></div> <div><span>//----------------------------<wbr>---= -----------</span></div> <div>This document describes how to install RTAI 4.0 on a Ubuntu 12.04.4 LTS using a 3.8.13 kernel, either 32bit or 64 bit version.<br> </div> </span> <h4><a name=3D"m_6538383722746369347_Prerequisites" moz-do-not-send=3D"true"></a>Prerequisites</h4> <p>Install Ubuntu 12.04.4 using one of the following images:</p> <p><a href=3D"http://releases.ubuntu.com/precise/ubuntu-12.04.4-desktop-amd64.i= so" target=3D"_blank" moz-do-not-send=3D"true">http= ://releases.ubuntu.com/<wbr>precise/ubuntu-12.04.4-<wbr>desktop-amd64.iso= </a></p> <p><a href=3D"http://releases.ubuntu.com/precise/ubuntu-12.04.4-desktop-i386.is= o" target=3D"_blank" moz-do-not-send=3D"true">http= ://releases.ubuntu.com/<wbr>precise/ubuntu-12.04.4-<wbr>desktop-i386.iso<= /a></p> <p>And then follow the installation instructions here:=C2=A0<a href=3D"https://help.ubuntu.com/community/Insta= llation/" target=3D"_blank" moz-do-not-send=3D"true">http= s://help.ubuntu.com/<wbr>community/Installation/</a></p> <h4><a name=3D"m_6538383722746369347_Introduction" moz-do-not-send=3D"true"></a>Introduction</h4> <p>If the ROOT user is not created yet, log as your usual user, open a terminal and type -></= p> <pre style=3D"color:rgb(0,0,0)"># sudo su - # sudo passwd root </pre> <p>Enter the password for the ROOT user. Log out and log in as Root.</p> <p>Open a terminal and update your package repository source file :</p> <pre style=3D"color:rgb(0,0,0)"># apt-get update </pre> <p>Some tools are required in order to set up the kernel (You need to be connected to Internet)</p> <pre style=3D"color:rgb(0,0,0)"># apt-get -y instal= l qt3-apps-dev build-essential kernel-package vim cvs </pre> <h4><a name=3D"m_6538383722746369347_I_Kernel_source_a= nd_RTAI_downloa" moz-do-not-send=3D"true"></a>I - Kernel source and RTAI download</h4> <pre style=3D"color:rgb(0,0,0)"># cd /usr/src/</pre= > <p>Get the kernel source from <a href=3D"http://kernel.org" target=3D"_blank" moz-do-not-send=3D"true">kernel.org</a></p> <pre style=3D"color:rgb(0,0,0)"># wget <a href=3D"h= ttps://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.13.tar.bz2" target=3D= "_blank" moz-do-not-send=3D"true">https://www.kernel.org/pub/<wbr>linux/k= ernel/v3.x/linux-3.8.<wbr>13.tar.bz2</a> # tar xf linux-3.8.13.tar.bz2 </pre> <p>Get RTAI 4.0 from the RTAI homepage</p> <pre style=3D"color:rgb(0,0,0)"># wget <a href=3D"h= ttps://www.rtai.org/userfiles/downloads/RTAI/rtai-4.0.tar.bz2" target=3D"= _blank" moz-do-not-send=3D"true">https://www.rtai.org/<wbr>userfiles/down= loads/RTAI/rtai-<wbr>4.0.tar.bz2</a> tar xf rtai-4.0.tar.bz2</pre> <h4><a name=3D"m_6538383722746369347_II_Kernel_Prepara= tion" moz-do-not-send=3D"true"></a>II - Kernel Preparation</h4> <pre style=3D"color:rgb(0,0,0)"># cd /usr/src # ln -s linux-3.8.13 linux # cd linux </pre> <h5><a name=3D"m_6538383722746369347_Applying_patch= " moz-do-not-send=3D"true"></a>Applying patch</h5= > <p>If you want first simulate the patch application, use "--dry-run" after "-p1". It won't touch any files on your computer, but you can see if you get Hunks or not.</p> <pre style=3D"color:rgb(0,0,0)"># patch -p1 < /u= sr/src/rtai-4.0/base/arch/<wbr>x86/patches/hal-linux-3.8.13-<wbr>x86-4.pa= tch </pre> <h5><a name=3D"m_6538383722746369347_Kernel_Configurat= ion" moz-do-not-send=3D"true"></a>Kernel Configuration</h5> <pre style=3D"color:rgb(0,0,0)"># cd /usr/src/linux= </pre> <p>In order to retrieve your current kernel configuration : (If at this step, questions are asked give the answer by default)</p> <pre style=3D"color:rgb(0,0,0)"># make oldconfig</p= re> <p>Now we modify the kernel settings the way we need it (NOTE: some parameters cannot be disabled with xconfig - better to use menuconfig):</p> <pre style=3D"color:rgb(0,0,0)"># make xconfig </pr= e> <p>Set up the kernel settings as follows :</p> <p><strong>Processor type and features</strong></p> <p>-> Processor family =3D=C2=A0<em>Select yours= <br> </em>-> Maximum number of CPUs (NR_CPUS) =3D=C2= =A0<em>Set your number (it's generally "4")</em><br> -> SMT (Hyperthreading) scheduler support =3D=C2= =A0<em>DISABLE IT</em></p> <p><strong>Power Management and ACPI options</stron= g><span style=3D"background-color:transparent"></span><= /p> <p>CPU idle PM support<br> <span style=3D"background-color:transparent">->= ; Cpu idle Driver for Intel Processors =3D=C2=A0<= /span><em style=3D"background-color:transparent">DISABLE IT<br> </em><span style=3D"background-color:transparent"= >-> ACPI (Advanced Configuration and Power Interface) Support -> PROCESSOR =3D=C2=A0</s= pan><em style=3D"background-color:transparent">DISABLE IT<br> </em><span style=3D"background-color:transparent"= >-> APM (Advanced Power Management) BIOS support =3D=C2=A0</span><em style=3D"background-color:transparent">DISABLE IT<br> </em><span style=3D"background-color:transparent"= >-> CPU Frequency scaling -> CPU Frequency scaling =3D=C2=A0</span><em style=3D"background-color:transparent">DISABLE IT<br> </em><span style=3D"background-color:transparent"= >CPU idle PM support =3D DISABLE IT</span></p> <p>Save and Quit</p> <p>Note (Sylvain, May 2014): these settings should be verified in the .config file, since there have been cases that xconfig does not do it correctly.</p> <h4><a name=3D"m_6538383722746369347_III_Kernel_Compil= ation" moz-do-not-send=3D"true"></a><strong>III - Kernel Compilation</strong></h4> <pre style=3D"color:rgb(0,0,0)"># cd /usr/src/linux # make && make modules_install && make install</pre> <p>NOTE: The compilation time might be decreased by passing the flags -jX (with X=3Dnumber of CPUs you have on your machine). This has for effect to parallelize the kernel compilation between the CPUs. This will take ~1 hour.</p> <h5><a name=3D"m_6538383722746369347_Kernel_Boot_Optio= ns" moz-do-not-send=3D"true"></a>Kernel Boot Option= s</h5> <p>This is very important - it took us (and the guys at the RTAI mailing list) ages to find that special config that makes everything work smoothly!</p> <p>You need to add the following option to the kernel at boot time</p> <pre style=3D"color:rgb(0,0,0)">lapic=3Dnotscdeadli= ne</pre> <p>The best way to do this is in /etc/default/grub in the field GRUB_CMDLINE_LINUX_DEFAULT, i.e.,</p= > <pre style=3D"color:rgb(0,0,0)">GRUB_CMDLINE_LINUX_= DEFAULT=3D"<wbr>quiet splash lapic=3Dnotscdeadline"</pre> <p>You will also have to change the GRUB_DEFAULT to the number that corresponds to the new kernel.</p> <p>Finally run update-grub and reboot</p> <pre style=3D"color:rgb(0,0,0)"># update-grub # reboot </pre> <h4><a name=3D"m_6538383722746369347_IV_RTAI_installat= ion" moz-do-not-send=3D"true"></a><strong>IV - RTAI installation</strong></h4> <p>Now that the system has restarted, make sure you booted on your new=C2=A0<span class=3D"m_6538383722746369347gmail-twikiNewLin= k"><a href=3D"https://twiki.eurecom.fr/twiki/bin/edit/OpenAirInterface/OpenAir?= topicparent=3DOpenAirInterface.OpenAirKernel357Ubuntu1204x86Setups;nowysi= wyg=3D0" rel=3D"nofollow" title=3D"OpenAir (this topic does not yet exist; you can create it)" target=3D"_blank" moz-do-not-send=3D"true">Op= enAir</a></span>=C2=A0kernel</p> <pre style=3D"color:rgb(0,0,0)"># uname -r </pre> <p>Should give you "3.8.13" as result</p> <pre style=3D"color:rgb(0,0,0)"># cd /usr/src/rtai-= 4.0 =20 # make xconfig =20 </pre> <p>UPDATE the CPUs number according to your configuration and disable RTAI_USE_NEWERR and real-time COMEDI support in Add-ons. Enable the watchdog, CONFIG_RTAI_WD.</p> <p>Save and quit. If any error occurs here, solve it and repeat this "make xconfig" step until it's OK</p> <pre style=3D"color:rgb(0,0,0)"># make && m= ake install </pre> <p>Add what follows, to the end of the file ~/.bashrc</p> <pre style=3D"color:rgb(0,0,0)">export PATH=3D/usr/= realtime/bin:$PATH=20 export LD_LIBRARY_PATH=3D$LD_LIBRARY_<wbr>PATH:/usr/realtime/lib </pre> <p>Create a file /etc/ld.so.conf.d/rtai.conf with the content</p> <pre style=3D"color:rgb(0,0,0)">/usr/realtime/lib</= pre> <p>and run "ldconfig"in order to take it into account</p> <p>We will test the RTAI system via the latency test</p> <pre style=3D"color:rgb(0,0,0)"># cd /usr/realtime/= testsuite/kern/<wbr>latency =20 # ./run </pre> <div>//----------------------------<wbr>-----------= -------------------<wbr>------------------------------<wbr>-</div> </div> <br> <fieldset class=3D"m_6538383722746369347mimeAttachmentHeader"= ></fieldset> <br> </div> </div> <pre>______________________________<wbr>_________________ Rtai mailing list <a class=3D"m_6538383722746369347moz-txt-link-abbreviated" href=3D"mailto= :[email protected]" target=3D"_blank" moz-do-not-send=3D"true">[email protected]<= /a> <a class=3D"m_6538383722746369347moz-txt-link-freetext" href=3D"https://m= ail.rtai.org/cgi-bin/mailman/listinfo/rtai" target=3D"_blank" moz-do-not-= send=3D"true">https://mail.rtai.org/cgi-bin/<wbr>mailman/listinfo/rtai</a= ></pre> </blockquote> <p><br> </p> </div> </blockquote> </div> <br> </div> </blockquote> <p><br> </p> </body> </html> --------------E318D0E9DFFBE739527BE768-- --===============2759749125271149658== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Rtai mailing list [email protected] https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai --===============2759749125271149658==--