Install RTLinux 3.2 [dslab] On redhat9

Source: Internet
Author: User
Tags tainted

// Install rtlinux3.2 >>> dslab Yang honggang on redhat9

// For more information, see: http://dslab.lzu.edu.cn/

 

Files used:
Rtlinux-3.2-wr.tar.bz2: From the Wind River company website after free registration download http://www.rtlinuxfree.com/
Linux-2.4.28.tar.bz2: can download ftp://mirror.lzu.edu.cn/kernel.org/v2.6/ from the large open source community mirror site
Environment:
Processor: Intel (r) Pentium (r) 4 CPU 2.80 GHz
Operating system release: redhat9
----------------------------------------------------------
1. Create a working directory and decompress the file
# Mkdir RTLinux
# Cd RTLinux
Copy rtlinux-3.2-wr.tar.bz2, linux-2.4.28.tar.bz2 to the current directory
# Tar-jxf rtlinux-3.2-wr.tar.bz2
# Tar-jxf linux-2.4.28.tar.bz2
2. Compile Linux
# Cd linux-2.4.28
// Patch the kernel
// Patch test
# Patch-P1 -- dry-run <../rtlinux-3.2-wr/patches/kernel_patch-2.4.28-rtl3.2-rc1 // select the corresponding patch version
If there are no errors, You can execute the following command and install patches.
# Patch-P1 <../rtlinux-3.2-wr/patches/kernel_patch-2.4.28-rtl3.2-rc1
In fact, there is a problem:
...
Patch: *** malformed patch at line 2061: * +/
...
Modify patch files
# Vim ../rtlinux-3.2-wr/patches/kernel_patch-2.4.28-rtl3.2-rc1
Change * +/of row 2061 to + */
Repeat the above patching Process
// Configure the kernel
# Cp/boot/config-2.4.20-8. config // copy the existing configuration file on the system
# Make menuconfig
Note to select Processor family, my is: Pentium-4

USB support
USB hidbp keyboard (basic) Support (optional)
USB hidbp mouse (basic) Support (optional)
My mouse and keyboard are all USB Interfaces
Others can be used by default.
# Make Dep
# Make bzimage // generate the kernel Image
# Make modules // generation module
The following error occurs:
...
Dn_neigh.c: 584: 'This _ module 'undeclared here (not in a function)
Dn_neigh.c: 584: initializer element is not constant
Dn_neigh.c: 584: (near initialization for 'dn _ neigh_seq_fops.owner ')
Make [2]: *** [dn_neigh.o] Error 1
Make [2]: Leaving directory '/home/Joseph/WF/RTLinux/AN/linux-2.4.28/NET/decnet'
Make [1]: *** [_ modsubdir_decnet] Error 2
Make [1]: Leaving directory '/home/Joseph/WF/RTLinux/AN/linux-2.4.28/net'
Make: *** [_ mod_net] Error 2
Add
# Include <Linux/module. h>
Regenerate a module
# Make modules_install // module Installation
# Cp ARCH/i386/boot/bzimage/boot/vmlinuz-2.4.28-rtl3.2-rc1
# Cp system. MAP/boot/system. map-2.4.28-rtl3.2-rc1
# Cd/boot
# Mkinitrd initrd-2.4.28-rtl3.2-rc1.img 2.4.28-rtl3.2-RC1
// If mkinitrd cannot be used, add/sbin to path.
# Vim ~ /. Bashrc
Add: Path =/sbin: $ path
Export path
# Source ~ //. Bashrc // make the settings take effect]
// Modify the grub boot
# Vim grub/menu. lst
Add the following content:
Title Red Hat Linux (2.4.28-rtl3.2-rc1-Joseph-Yang)
Root (hd0, 1)
Kernel/vmlinuz-2.4.28-rtl3.2-rc1 Ro root = label =/
Initrd/initrd-2.4.28-rtl3.2-rc1.img
# Reboot // reboot. If there is no problem, you can start your new compiled kernel.
3. Compile and install RTLinux
# Cd rtlinux-3.2-wr
# Make menuconfig
The following error occurs:
Ls: No file or directory
Ls: Directory: the file or directory does not exist.
Ls: for: the file or directory does not exist.
Ls: RTLinux: the file or directory does not exist.
Ls: 3.2/include/ASM: No file or directory
Ls: No file or directory
Ls: Directory: the file or directory does not exist.
Ls: for: the file or directory does not exist.
Ls: RTLinux: the file or directory does not exist.
Ls: 3.2/include/ASM: No file or directory
Schedulers // makefile: 8: ../RTL. mk: no such file or directory
Ls: No file or directory
Ls: Directory: the file or directory does not exist.
Ls: for: the file or directory does not exist.
Ls: RTLinux: the file or directory does not exist.
Ls: 3.2/include/ASM: No file or directory
Ls: No file or directory
Ls: Directory: the file or directory does not exist.
Ls: for: the file or directory does not exist.
Ls: RTLinux: the file or directory does not exist.
Ls: 3.2/include/ASM: No file or directory
Ls: No file or directory
Ls: Directory: the file or directory does not exist.
Ls: for: the file or directory does not exist.
Ls: RTLinux: the file or directory does not exist.
Ls: 3.2/include/ASM: No file or directory
Ls: No file or directory
Ls: Directory: the file or directory does not exist.
Ls: for: the file or directory does not exist.
Ls: RTLinux: the file or directory does not exist.
Ls: 3.2/include/ASM: No file or directory
Ls: No file or directory
Ls: Directory: the file or directory does not exist.
Ls: for: the file or directory does not exist.
Ls: RTLinux: the file or directory does not exist.
Ls: 3.2/include/ASM: No file or directory
Makefile: 526: Warning: overriding commands for target 'install'
Schedulers // makefile: 56: Warning: ignoring old commands for target 'install'
Makefile: 600: Warning: overriding commands for target 'clean'
Schedulers // makefile: 6: Warning: ignoring old commands for target 'clean'
Make: *** no rule to make target '../RTL. mk'. Stop.
Solution: Create a symbolic link to the rtlinux-3.2-wr directory under the linux-2.4.28 directory:
# Cd rtlinux-3.2-wr
# Ln-S ../linux-2.4.28 Linux // The Symbolic Link name is Linux
# Make menuconfig
Use the default configuration to save the settings.
# Make Dep
The following message is displayed:
Rm-F. depend
Make. depend
Make [1]: Entering directory '/home/Joseph/WF/RTLinux/AN/rtlinux-3.2-wr'
Gcc-wall-O2-O scripts/mkdep. c
Kernel version 2.4.28-rtl3.2-RC1
For X in 'Find.-Name makefile'; do/
F = 'echo $ X | SED's/makefile $ // g '';/
(CD $ F; $ RTL/scripts/mkdep *. C *. H *. S>. Depend 2>/dev/null );/
Done
Xargs: environment is too large for Exec
Make [1]: *** [. Depend] Error 1
Make [1]: Leaving directory '/home/Joseph/WF/RTLinux/AN/rtlinux-3.2-wr'
Make: *** [Dep] Error 2
I did not perform any processing and directly executed
# Make
...
Now do "Sh scripts/insrtl" to install the modules
# Make install
# Make Regression
The following prompt is displayed:
...
./Scripts/regression. Sh
Make: execvp:./scripts/regression. sh: insufficient Permissions
Make: *** [regression] Error 127
# Chmod + X./scripts/regression. Sh
# Make Regression
...
./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_polico.o... [OK]
Testing RTLinux operating OS... [OK]
Testing thread wait times... [OK]
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]

# RTLinux start
...
Scheme: (-) not loaded, (+) loaded
(+) Mbuff
(+) Rtl_fifo
(+) RTL
(+) Rtl_posixio
(+) Rtl_sched
(+) Rtl_time
# RTLinux stop
Rmmod: RTL is in use

Scheme: (-) not loaded, (+) loaded
(-) Mbuff
(-) Rtl_fifo
(-) RTL
(-) Rtl_posixio
(-) Rtl_sched
(-) Rtl_time
4. Application Example
# Cd examples/Hello
# RTLinux start
# Insmod 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
# Lsmod
Module size used by tainted: P
Hello 1160 0 (unused)
Rtl_sched 30752 0 [Hello]
Rtl_fifo 10752 0 (unused)
Rtl_posixio 8052 0 [rtl_fifo]
Rtl_time 7020 0 [Hello rtl_sched rtl_posixio]
RTL 20752 0 [Hello rtl_sched rtl_fifo rtl_posixio rtl_time]
Mbuff 7852 0 (unused)
Parport_pc 19204 1 (autoclean)
LP 8548 0 (autoclean)
Parport 36512 1 (autoclean) [parport_pc LP]
Autofs 12244 0 (autoclean) (unused)
8139too 17224 1
MII 3992 0 [8139too]
EHCI-HCD 21064 0 (unused)
USB-OHCI 21864 0 (unused)
USB core 78816 1 [EHCI-hcd usb-OHCI]
Ext3 71460 2
Jbd 51492 2 [ext3]
Bytes --------------------------------------------------------------------------------------------------
Note: If you find a similar prompt when running the example program:
/Bin/sh: Line 1: scripts/insrtl: insufficient Permissions
You only need to add executable permissions to the corresponding file.
# Chmod + X scripts/insrtl

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.