RTLinux 学习系列(001): RTLinux 安装手记
前两天研究TP(一个基于vxWorks的IPS),搞得郁闷了,却激起了对实时系统的兴趣,想研究把RTLinux。 什么是RTLinux,参见Waht is RTLinux (http://blog.jibin.net/read.php?7) 先把安装过程写下来的说。RTLinux是以Linux Kernel Patch的方式发布的,他通过巧妙的技术实现了不重写Linux内核而使得Linux支持实时的特性。根据网上的测试数据来看,在多任务的情况,RTLinux的进程切换时间要明显优于通常的Linux。 废话不多说了,讲一下安装过程: 下载rtlinux,去ftp://ftp.rtlinux-gpl.org/pub/rtlinux/下载。下载一个最近的版本,这里是 rtlinux-3.2-rc1.tar.bz2。支持内核 2.4.19 to 2.4.29。接着下载Linux Kernel,去kernel.org 找个速度快点的镜像推荐一个国内的镜像(http://www.cn.kernel.org/pub/linux/kernel/v2.4/)。 我用的是Slackware Linux 10.2,将Kernel源码和rtlinux的源码拷贝到/usr/src下解压。
进入rtlinux的源码目录,创建一个指向kernel source的连接
应用RTLinux的Patch
开始编译内核 (这里不详细说了)
安装新内核
在lilo.conf里加上一段(Slackware用的是lilo,grub大同小异):
image = /boot/rtlinux
root = /dev/sda2
label = RTLinux
read-only
安装:
使用新的内核进行启动,启用时选择RTLinux,启动后编译RTLinux
cd /usr/src/rtlinux-3.2-rc1
make clean
make menuconfig
make
make devices
make install
./scripts/insrtl
最后:
./scripts/regression.sh
---------------------------- - Installing basic modules - ----------------------------
Testing multiple loads of rtl.o... [ OK ]
Testing multiple loads of rtl_time.o... [ OK ]
Testing multiple loads of rtl_sched.o... [ OK ]
Testing multiple loads of rtl_posixio.o... [ OK ]
Testing multiple loads of rtl_fifo.o... [ OK ]
Testing RTLinux fifos... [ OK ]
Testing thread wait times... [ FAILED ]
Testing that Linux time progresses... [ OK ]
Testing that Linux time is monotonically increasing... [ OK ]
Testing ping flood... [ OK ]
Testing floating-point support... [ OK ]
Removing rtl_sched.o... [ OK ]
Testing periodic timer... [ OK ]
Testing oneshot timer... [ OK ]
不知道为什么有一个FAILED 尝试着启动rtlinux,成功了
安装到此结束,RTLinux到底有啥用,有啥特性,等有空研究了再写吧。
tar xjvf rtlinux-3.2-rc1.tar.bz2 tar xjvf linux-kernel-2.4.28.tar.bz2
进入rtlinux的源码目录,创建一个指向kernel source的连接
cd rtlinux-3.2-rc1 ln -s /usr/src/linux-2.4.28/ ./linux
应用RTLinux的Patch
cd ./linux patch –p1 < /usr/src/linux-2.4.28/patches/kernel_patch-2.4.28-rtl3.2-rc1
开始编译内核 (这里不详细说了)
make menuconfig // 选择自己需要的驱动、模块等 make dep make bzImages make modules make modules_install
安装新内核
cp ./arch/i386/boot/bzImage /boot/rtlinux
在lilo.conf里加上一段(Slackware用的是lilo,grub大同小异):
image = /boot/rtlinux
root = /dev/sda2
label = RTLinux
read-only
安装:
lilo
使用新的内核进行启动,启用时选择RTLinux,启动后编译RTLinux
cd /usr/src/rtlinux-3.2-rc1
make clean
make menuconfig
make
make devices
make install
./scripts/insrtl
最后:
./scripts/regression.sh
---------------------------- - Installing basic modules - ----------------------------
Testing multiple loads of rtl.o... [ OK ]
Testing multiple loads of rtl_time.o... [ OK ]
Testing multiple loads of rtl_sched.o... [ OK ]
Testing multiple loads of rtl_posixio.o... [ OK ]
Testing multiple loads of rtl_fifo.o... [ OK ]
Testing RTLinux fifos... [ OK ]
Testing thread wait times... [ FAILED ]
Testing that Linux time progresses... [ OK ]
Testing that Linux time is monotonically increasing... [ OK ]
Testing ping flood... [ OK ]
Testing floating-point support... [ OK ]
Removing rtl_sched.o... [ OK ]
Testing periodic timer... [ OK ]
Testing oneshot timer... [ OK ]
root@matrix:~# rtlinux start
......
root@matrix:~# lsmod
Module Size Used by Tainted: P
rtl_sched 26912 0 (unused)
rtl_fifo 9284 0 (unused)
rtl_posixio 6936 0 [rtl_fifo]
rtl_time 4596 0 [rtl_sched rtl_posixio]
rtl 17616 0 [rtl_sched rtl_fifo rtl_posixio rtl_time]
mbuff 5932 0 (unused)
usbcore 59404 1
pcnet32 17444 1
mii 2272 0 [pcnet32]
crc32 2880 0 [pcnet32]
pcmcia_core 42628 0
ide-scsi 9168 0
agpgart 45124 0 (unused)
root@matrix:~#
......
root@matrix:~# lsmod
Module Size Used by Tainted: P
rtl_sched 26912 0 (unused)
rtl_fifo 9284 0 (unused)
rtl_posixio 6936 0 [rtl_fifo]
rtl_time 4596 0 [rtl_sched rtl_posixio]
rtl 17616 0 [rtl_sched rtl_fifo rtl_posixio rtl_time]
mbuff 5932 0 (unused)
usbcore 59404 1
pcnet32 17444 1
mii 2272 0 [pcnet32]
crc32 2880 0 [pcnet32]
pcmcia_core 42628 0
ide-scsi 9168 0
agpgart 45124 0 (unused)
root@matrix:~#
安装到此结束,RTLinux到底有啥用,有啥特性,等有空研究了再写吧。
HELP
2008/03/13 11:26
请教你的内核是如何编译的,我insrtl 后,就会死机了,为什么。
adf
2009/08/18 15:05
After being wow gold
分页: 1/1
1
1


What is RTLinux?
数码相机坏了

