回複:哪裏可以下載UNIX 操作係統?

Step by Step of Installing rtlinux on RH9.0

1, Check the gcc version,
[sliu@localhost sliu]$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)

if it is not GNU gcc2.95.3, then download gcc2.95.3 from

http://gcc.gnu.org

untar it and install it on your workstation following the instruction.

1.1, To configure gcc:
% mkdir objdir
% cd objdir
% srcdir/configure
1.2, Building
For a native build issue the command make bootstrap.
1.3, Final installation
cd objdir; make install

2. download a clean 2.4.19 kernel from

http://www.kernel.org

3. get the latest rtlinux-3.2-pre1 package from

http://www.rtlinux.org

To avoid being stalled by slow link, you can download them (1,2,3) from
pekignese ftp server:

Download from Pekignese

4. untar linux to /usr/src/linux and rtlinux to /usr/src/rtlinux-3.2-pre1

5. find and untar the patch for your _exact_ kernel version in
/usr/src/rtlinux-3.2-pre1/patches/

6. rm -rf /usr/include/asm

7. ln -s /usr/src/linux/include/asm-i386 /usr/include/asm

8. cd /usr/src/linux

9. patch -p1 pout
check pout file, if if any file is being rjected. if so, check your procedure.

10. Check your cpu type by:
[sliu@localhost sliu]$ more /proc/cpuinfo |grep CPU
model name : Intel(R) Pentium(R) 4 CPU 2.00GHz

You can use you existing configuration file to make menuconfig:
cp /boot/config-2.4.20-6 /usr/src/linux/.config

If you have same type cpu, then download the following configuration file and
save it. (this is the rtlinux minimized config setup)

sliu-configure

cd /usr/src/linux
cp .../sliu-config .config

11. make menuconfig,
Follow steps below, don't make any change if you are not sure.

11.1. Processor type and features -- > your CPU type (should be Pentium 4,
if not, make change); MTRR --> Enable

11.2. General setup --> Power Management support --> disable
11.3. Save a copy of your latest configuration file by:
cp .config /boot/config-2.4.19rtl3.2-pre1

12. make bzImage, make modules, make modules_install


13. cp arch/i386/boot/bzImage /boot/bzImage

14. If you use lilo for boot loader, goto 15. if you usr grub as boot
loader, follow 14 and skip 15. Check where is your system's root directory by:

[sliu@localhost public_html]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 37349096 3733980 31717840 11% /
/dev/hda1 101089 10285 85585 11% /boot
none 253284 0 253284 0% /dev/shm


This system's root directory is on /dev/hda2, add following section at end
of your /etc/grub.conf file:

title rtlinux (2.4.19-rtl3.2-pre1)
root (hd0,0)
kernel /bzImage ro root=/dev/hda2


15. if you use lilo as boot load, skip step 14, follow 15. Add this to
/etc/lilo.conf:
image=/boot/bzImage
label=RTLinux
read-only
say 'lilo'

16. reboot your machine with the new RTLinux kernel

17. cd /usr/src/rtlinux-3.2-pre1

18. make menuconfig, make, make install

19. You all set. Let's roll.

20. Now you should be able to load the rtlinux:

[sliu@localhost public_html]$ rtlinux start

Scheme: (-) not loaded, (+) loaded
(+) mbuff
(+) rtl_fifo
(+) rtl
(+) rtl_posixio
(+) rtl_sched
(+) rtl_time

21, Load the hello module:
[root@localhost hello]# insmod -P usr/src/rtlinux/examples/hello hello.o
insmod -P usr/src/rtlinux/examples/hello hello.o
Warning: loading hello.o will taint the kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module hello loaded, with warnings

[root@localhost hello]# lsmod
Module Size Used by Tainted: P
hello 1080 0 (unused)
rtl_sched 47936 0 [hello]
rtl_fifo 44832 0 (unused)
rtl_posixio 7860 0 [rtl_fifo]
rtl_time 13552 0 [hello rtl_sched rtl_posixio]
rtl 31120 0 [hello rtl_sched rtl_fifo rtl_posixio rtl_time]
mbuff 8492 0 (unused)
hid 15876 0 (unused)

[root@localhost hello]# rtlinux status

Scheme: (-) not loaded, (+) loaded
(+) mbuff
(+) rtl_fifo
(+) rtl
(+) rtl_posixio
(+) rtl_sched
(+) rtl_time

Have FUN

請您先登陸,再發跟帖!