| |
Installing RTLinux on System with Fedora Core 2
(This is being done on a Dell GX280 PC with SATA hard drive
and USB keyboard.)
1) Install Fedora Core 2
boot: linux text
Installation Type: Custom
Auto Partition:
Edit partition sda2: Size (MB) 3000 (*) Fixed Size
(Note that "sda1/2" should be replaced with the correct partition
corresponding to "/boot" and "/".)
If Auto Partition does not work:
Disk Druid:
"New"; Mount Point "/"; Size 3000 MB (*) Fixed Size
Firewall: (*) No Firewall
Package Group Selection: Only select:
[*] Editors
[*] Development Tools
[*] Kernel Development
[*] Administration Tools
[*] System Tools
Select "Continue" at the "Required Install Media" screen.
Insert disks as prompted, reboot.
At GRUB screen, choose the top (smp) kernel.
Login as "root"
Set date/time, eg
# date -s "Friday July 1 2005 14:40"
Create the "downloads" directory
# mkdir /home/downloads
If there is a problem with the following command:
# ifconfig eth0
you need to download the driver for the network card.
(The following assumes a Broadcom Corporation bcm5700 NIC
on a Dell GX280)
Go to
http://www.broadcom.com/drivers/downloaddrivers.php
Grab the Linux i386/IA64/x86-64 driver
Download linux-8.1.55.zip to your hard drive /tmp
directory and "unzip" it.
(The file you need - bcm5700-8.1.55.tar.gz -
should be in /u/SOURCE/cogsys-4)
Copy /tmp/bcm5700-8.1.55.tar.gz to floppy,
insert the floppy in the workstation you are configuring,
and copy bcm5700-8.1.55.tar.gz to /home/downloads
Unmount the floppy and eject it.
# cd /home/downloads
# tar -xzf bcm5700-8.1.55.tar.gz
# cd bcm5700-8.1.55/src
# vi b57um.c --> put "//" in front of every "pci_disable_msi()"
call.
# make
<compile/link messages printed out here>
# make install
# insmod bcm5700.ko
You should be able to
# ifconfig eth0
without error now.
Copy bcm5700.ko to
/lib/modules/2.6.5-1.358smp/kernel/drivers/net/
# vi /etc/hosts --> put in
140.254.96.70 eccles eccles
140.254.96.78 lincogsys lincogsys
Run setup and configure IP/netmask/gateway
# setup --> Network Configuration
Once setup is complete:
# service network restart
# ifconfig eth0
You should see all the correct IP configuration numbers.
# ping eccles
Should successfully ping eccles. CTRL-C to stop the ping.
Get the pico editor:
# scp lincogsys:/usr/bin/pico /usr/bin/.
2) Install linux kernel 2.4.29
# cd /usr/src
Copy linux-2.4.29.tar.gz to /usr/src
# tar xzf linux-2.4.29.tar.gz
Copy rtlinux-3.1.tgz to /usr/src
# tar xzf rtlinux-3.1.tgz
Patch the 2.4.29 kernel with the rtlinux patch
# cd /usr/src/linux-2.4.29
# patch -p1 < /usr/src/rtlinux-3.1/patches/kernel-patch-2.4.29-rtl
Now configure the 2.4.29 kernel
# make menuconfig
Make the following modifications:
Processor type and features --->
Pentium-4 (or what is revealed by the command: # dmesg | grep CPU)
...
[*] MTRR (Memory Type Range Register) support
[ ] Symmetric multi-processing support
Block devices --->
<*> Loopback device support
SCSI support --->
SCSI low-level drivers --->
[*] Serial ATA (SATA) support
<*> Intel PIIX/ICH SATA support
Input core support --->
<M> Input core support
<M> Keyboard support
File systems --->
<*> Ext3 journalling file system support
...
<*> DOS FAT fs support
<*> MSDOS fs support
...
<*> VFAT (Windows-95) fs support
USB support --->
<M> USB HIDBP Keyboard (basic) support
<Exit>
# make dep
# make bzImage
# make modules
# make modules_install
# cp arch/i386/boot/bzImage /boot/rtzImage
Edit /boot/grub/menu.lst, and add the following to the
end of the file:
-----------------------------------------------------------------
title Cogsys
root (hd0,0)
kernel /rtzImage ro root=/dev/sda2
-----------------------------------------------------------------
(Note that "sda2" should be replaced with the correct partition
corresponding to "/". Do a "# df" to find out where "/" is mounted.)
and change the line
-----------------------------------------------------------------
default=0
-----------------------------------------------------------------
to
-----------------------------------------------------------------
default=1
-----------------------------------------------------------------
3) Install RTLinux
Reboot with CTRL-ALT-DEL, and select "Cogsys" in the GRUB
window (should be default).
At any kudzu prompts, hit "Do Nothing/Keep Configuration".
Login as root, and run setup configurator
# setup
At "Choose a Tool" window, run "System services",
and remove all services, except:
[*] kudzu
[*] network
[*] ntpd
[*] portmap
[*] syslog
Quit "Choose a Tool" Setup Agent
The ethernet driver needs to be re-made for the rtl kernel:
Login as root, go to /home/downloads/bcm5700-8.1.55/
and type:
# cp -rf src/ src2/
# cd src2
# make clean
# make
# make install
# insmod bcm5700.o
You should now see the eth0 interface with "# ifconfig"
Now make the RTLinux kernel:
# cd /usr/src/rtlinux-3.1
# ln -sf /usr/src/linux-2.4.29 linux
# make menuconfig
Answer "y" at the licensing prompt.
At the Main Menu, hit <ESC>, then < Yes > to save
the configuration.
# make dep
# make
# make devices
# make install
Test RTLinux:
# make regression
This should generate lots of [OK] messages, and will hang
on "Testing ping flood...", so press <CTRL>-C, and you should
get several more [OK] messages. Then the # prompt should
re-appear.
If there are any messages besides [OK], then there is
some error. You may be in the wrong kernel: type "dmesg | head"
and the first line should be:
Linux version 2.4.29-rtl-3.1 (root@localhost.localdomain) ...
4) Setup rc.local to automatically start RTLinux/Cogsys
Add this to /etc/rc.local
-----------------------------------------------------------------
if [ `cat /proc/sys/kernel/osrelease` = "2.4.29-rtl-3.1" ]; then
insmod /lib/modules/2.4.29-rtl-3.1/kernel/drivers/net/bcm5700.o
/usr/bin/rtlinux start
insmod /usr/src/rtlinux-3.1/debugger/rtl_debug.o
else
insmod /lib/modules/2.6.5-1.358smp/kernel/drivers/net/bcm5700.ko
fi
reset
setterm -blength 0
setterm -blank 0
setterm -msg off
/sbin/set_IP
-----------------------------------------------------------------
(Be warned that the NIC driver bcm5700.ko will only work in
the "smp" kernel, because that is the one it was built for.)
5) Do all Cogsys-oriented configuration
auto-login:
-----------
As root, type
# useradd cogsys
Edit /etc/passwd and change
cogsys:x:500:500:/home/cogsys:/bin/bash
to
cogsys:x:0:0:/home/cogsys:/bin/bash
In the file /etc/inittab, change the line
1:2345:respawn:/sbin/mingetty tty1
to
1:2345:respawn:/sbin/mingetty --autologin cogsys tty1
Edit /home/cogsys/.bashrc, and add the lines
----------------------------
export PATH=$PATH:/sbin
setterm -blength 0
setterm -blank 0
sh /scripts/fcogsys.sh
----------------------------
create directories:
-------------------
Still as root...
# mkdir /scripts
# mkdir /apps
# mkdir /fonts
# mkdir /data
# chmod a+rwx /data
# mkdir /home/source
# cd /scripts
# scp root@lincogsys:/scripts/* .
<enter password>
# cp mac.table /data/.
# cp cogsys_patch /sbin/.
# chmod a+x /sbin/cogsys_patch
# sh download
<enter password>
# cd /fonts
# scp root@lincogsys:/fonts/* .
<enter password>
# cd /home/downloads
# scp root@lincogsys:/home/downloads/SDL* .
<enter password>
# rpm -i SDL*
# cd /usr/bin
# scp root@lincogsys:/usr/local/bin/dialog .
<enter password>
# cd /home/source
# scp root@lincogsys:/home/source/* .
<enter password>
# cp /usr/rtlinux-3.1/rtl.mk .
# make clean
# make cogsys
# make
kbd
# make usbkbd
# make tick
# make rtl
update mac.table
----------------
Edit /data/mac.table so that your machine's MAC address
is assigned the correct IP address
restart and test:
----------------
Restart the computer with CTL-ALT-DEL.
You should see the COGSYS Login menu when the reboot
is complete.
Try running testlists using all three testlist source
options:
1. expt (gail's directory)
2. postdoc
3. local data
exiting to the root prompt
--------------------------
To get to the root prompt, type "s" at the
Select Option prompt, then type "shexit" at the
cogsh# prompt. This gives "superuser" access to the
workstation, so do not give out the "shexit" command
to users who do not need it.
|