Install RTAI on Ubuntu linux

231 downloads 1577 Views 71KB Size Report
Install RTAI on Ubuntu linux. The files needed is: Linux 2.6.22.14 kernel---http:// www.kernel.org/pub/linux/kernel/v2.6/. (suppose the linux-2.6.22.14.tar.gz file isĀ ...
Install RTAI on Ubuntu linux The files needed is: Linux 2.6.22.14 kernel---http://www.kernel.org/pub/linux/kernel/v2.6/ (suppose the linux-2.6.22.14.tar.gz file is in home/stud directory) RTAI 3.6---http://www.rtai.org/ (suppose the extracted directory is in home/stud directory) The Steps are as follows: 1. uname -r (so as to see what kernel you are using) 2. sudo apt-get update sudo apt-get install build-essential sudo apt-get install kernel-package sudo apt-get install gcc sudo apt-get install gcc-3.6 sudo apt-get install libncurses5 sudo apt-get install libncurses5-dev sudo apt-get install libqt3-mt-dev 3. cd /usr/src 4. cp /home/stud/linux-2.6.22.14.tar.gz /usr/src 5. sudo tar xzvf linux-2.6.22.14.tar.gz 6. sudo ln -s /usr/src/linux-2.6.22.14 /usr/src/linux 7. cd /usr/src/linux 8. sudo patch -p1 -b < home/stud/rtai_3.6/base/arch/i386/patches/hal-linux-2.6.22.14-i386xxx.patch 9. cp /boot/config-2.6.22.14-xx-i386-generic /usr/src/linux/.config (if this is the kernel you chose to start from the grub) 10. sudo make xconfig (a. In the code maturity level options, set the "prompt for development and/or incomplete code/drivers" option to 'yes'. b. In the "loadable module support" section, make sure that the "Enable loadable module support" is set to 'yes', and set the "Module Versioning support" is to 'no'. c. In the "processor type and features" section, set the "Preemptible kernel" and the "Use register arguments" options to 'no', and make sure to set the "interrupt pipeline" option, (aka IPIPE) to 'yes'. d. Disable all "power management options" including "acpi" and "CPU frequency rescaling". d. Finally, in the "File systems" section, under the "Pseudo filesystems" subsection , make sure that the "/proc file system support", is set to yes. e. Remember to save the kernel configuration on exit.) 11. sudo make-kpkg clean

sudo make-kpkg --initrd kernel_image kernel_headers 12. Wait... 13. cd /usr/src ls (You'll see a list of the names of the files in the folder as well as the names of your new kernel image and kernel headers; they should look (approximately)like these ones:kernel-image-2.6.22.14custom_10.00.Custom_i386.deb; kernel-headers-2.6.22.14-custom_10.00.Custom_i386.deb) 14. sudo dpkg -i kernel-image-2.6.22.14-custom_10.00.Custom_i386.deb sudo dpkg -i kernel-headers-2.6.22.14-custom_10.00.Custom_i386.deb (REMEMBER NOT TO UNINSTALL your previous kernel (just in case anything goes wrong) (i.e. don't do anything else apart from following the instructions) 15. Restart your computer. 16. cd /home/stud/rtai_3.6/ 17. make xconfig 20. make 21. make install 22. cd usr/realtime/testsuite/kern/latency ./run script will start it and the non-realtime results will appear.... 23. In order to get the parallel driver to work you must blacklist the ordinary parallel drivers. Sudo nano /etc/modprobe.d/blacklist Add following lines: blacklist lp blacklist ppdev blacklist parport_pc blacklist parport 34. Restart