Linux Kernel compilation and installation of RTAI

Source: Internet
Author: User

Linux Kernel can improve computer performance. The following describes how to compile the Linux kernel system.

1. Download the Linux Kernel

Ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.4.tar.bz2

2. download the latest RTAI Real-Time Linux Kernel

Https://www.rtai.org/RTAI/rtai-3.7.1.tar.bz2

3. Re-compile the Linux Kernel

 
 
  1. view plaincopy to clipboardprint?  
  2. $su    
  3. #cp linux-2.6.29.4.tar.bz2 rtai-3.7.1.tar.bz2 /usr/src    
  4. #tar jxvf linux-2.6.29.4.tar.bz2    
  5. #tar jxvf rtai-3.7.1.tar.bz2    
  6. #cd linux-2.6.29.4.tar.bz2    
  7. #patch -p1 -b < ../rtai-3.7.1/base/arch/x86/patches/hal-linux-2.6.29.4-x86-2.4-01.patch    
  8. #cp /boot/config-2.6.27.5-117.fc10.i686 ./.config    
  9. #make menuconfig    
  10. #make    
  11. #make modules_install install    
  12. $su  
  13. #cp linux-2.6.29.4.tar.bz2 rtai-3.7.1.tar.bz2 /usr/src  
  14. #tar jxvf linux-2.6.29.4.tar.bz2  
  15. #tar jxvf rtai-3.7.1.tar.bz2  
  16. #cd linux-2.6.29.4.tar.bz2  
  17. #patch -p1 -b < ../rtai-3.7.1/base/arch/x86/patches/hal-linux-2.6.29.4-x86-2.4-01.patch  
  18. #cp /boot/config-2.6.27.5-117.fc10.i686 ./.config  
  19. #make menuconfig  
  20. #make  
  21. #make modules_install install  

[Note] the configuration in the 'Make menuconfig' step is as follows:

4. Compile and install RTAI

 
 
  1. view plaincopy to clipboardprint?    
  2. #cd rtai-3.7.1      
  3. #make menuconfig      
  4. #make       
  5. #make install      
  6. #cd rtai-3.7.1    
  7. #make menuconfig    
  8. #make     
  9. #make install     

After installing RTAI in Linux kernel, create an empty file and enter the following code:

 
 
  1. view plaincopy to clipboardprint?  
  2. #!/bin/bash     
  3. mkdir /dev/rtf     
  4. for n in `seq 0 9`     
  5. do    
  6. f=/dev/rtf/$n     
  7. mknod -m 666 $f c 150 $n     
  8. done    
  9. #!/bin/bash  
  10. mkdir /dev/rtf  
  11. for n in `seq 0 9`  
  12. do  
  13. f=/dev/rtf/$n  
  14. mknod -m 666 $f c 150 $n  
  15. done  

Save the code as rt_script.

 
 
  1. view plaincopy to clipboardprint?  
  2. #chmod +x rt_script    
  3. #./rt_script    
  4. #chmod +x rt_script  
  5. #./rt_script  

Save the following script as start_rt

 
 
  1. view plaincopy to clipboardprint?  
  2. #!/bin/bash     
  3. mknod -m 666 /dev/rtai_shm c 10 254     
  4. for n in `seq 0 9`     
  5. do    
  6.  f=/dev/rtf$n     
  7. mknod -m 666 $f c 150 $n     
  8. done    
  9. #!/bin/bash  
  10. mknod -m 666 /dev/rtai_shm c 10 254  
  11. for n in `seq 0 9`  
  12. do  
  13. f=/dev/rtf$n  
  14. mknod -m 666 $f c 150 $n  
  15. done  

And store it in the/etc/init. d/directory view plaincopy to clipboardprint?

  1. Linux Kernel code 75% is developed by staff
  2. Linux Kernel module debugging
  3. CentOS4 install oracle 10g to create an account and configure Linux Kernel Parameters
  4. How to get started with Linux kernel code
  5. Analysis of Linux kernel support for S3C2410 sleep mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.