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
- view plaincopy to clipboardprint?
- $su
- #cp linux-2.6.29.4.tar.bz2 rtai-3.7.1.tar.bz2 /usr/src
- #tar jxvf linux-2.6.29.4.tar.bz2
- #tar jxvf rtai-3.7.1.tar.bz2
- #cd linux-2.6.29.4.tar.bz2
- #patch -p1 -b < ../rtai-3.7.1/base/arch/x86/patches/hal-linux-2.6.29.4-x86-2.4-01.patch
- #cp /boot/config-2.6.27.5-117.fc10.i686 ./.config
- #make menuconfig
- #make
- #make modules_install install
- $su
- #cp linux-2.6.29.4.tar.bz2 rtai-3.7.1.tar.bz2 /usr/src
- #tar jxvf linux-2.6.29.4.tar.bz2
- #tar jxvf rtai-3.7.1.tar.bz2
- #cd linux-2.6.29.4.tar.bz2
- #patch -p1 -b < ../rtai-3.7.1/base/arch/x86/patches/hal-linux-2.6.29.4-x86-2.4-01.patch
- #cp /boot/config-2.6.27.5-117.fc10.i686 ./.config
- #make menuconfig
- #make
- #make modules_install install
[Note] the configuration in the 'Make menuconfig' step is as follows:
4. Compile and install RTAI
- view plaincopy to clipboardprint?
- #cd rtai-3.7.1
- #make menuconfig
- #make
- #make install
- #cd rtai-3.7.1
- #make menuconfig
- #make
- #make install
After installing RTAI in Linux kernel, create an empty file and enter the following code:
- view plaincopy to clipboardprint?
- #!/bin/bash
- mkdir /dev/rtf
- for n in `seq 0 9`
- do
- f=/dev/rtf/$n
- mknod -m 666 $f c 150 $n
- done
- #!/bin/bash
- mkdir /dev/rtf
- for n in `seq 0 9`
- do
- f=/dev/rtf/$n
- mknod -m 666 $f c 150 $n
- done
Save the code as rt_script.
- view plaincopy to clipboardprint?
- #chmod +x rt_script
- #./rt_script
- #chmod +x rt_script
- #./rt_script
Save the following script as start_rt
- view plaincopy to clipboardprint?
- #!/bin/bash
- mknod -m 666 /dev/rtai_shm c 10 254
- for n in `seq 0 9`
- do
- f=/dev/rtf$n
- mknod -m 666 $f c 150 $n
- done
- #!/bin/bash
- mknod -m 666 /dev/rtai_shm c 10 254
- for n in `seq 0 9`
- do
- f=/dev/rtf$n
- mknod -m 666 $f c 150 $n
- done
And store it in the/etc/init. d/directory view plaincopy to clipboardprint?
- Linux Kernel code 75% is developed by staff
- Linux Kernel module debugging
- CentOS4 install oracle 10g to create an account and configure Linux Kernel Parameters
- How to get started with Linux kernel code
- Analysis of Linux kernel support for S3C2410 sleep mode