MIDAS software installation

Installation of MIDAS application packages for MVME5500 Linux

Last updated on February 1 2005

The following instructions assume that you are familiar with Linux and are just an indication of the tasks required for the MIDAS installation. It is NOT expected that someone who has never used Linux before would be able to perform the software installation without additional assistance.

In particular you WILL require superuser (root) access to your Unix/Linux server in order to perform a complete initial installation of the software.

These instructions have been tested for Sun Solaris 8 and 9 and for various Linux distributions (RedHat, Fedora, Mandrake) based on the 2.4 kernel.

The Motorola MVME5500 CPU card boots the Linux kernel (using the embedded Motorola program MOTLoad) from a server using TFTP using parameters and options obtained using DHCP. The Linux kernel then takes over and NFS mounts the Linux root filesystem from the same or a different server and mounts any other file systems required and runs a sequence of scripts which load the MIDAS Data Acquisition components such as the MIDAS servers and the Data Acquisition program.

The version of Linux used was obtained from TimeSys and is based on the 2.4 kernel. All code used is covered by the GPL and hence is available free of any license charge.

The current release of TimeSys Linux for the Motorola MVME5500 is 4.1. So, for example, the root file system is in the directory /MIDAS/TimeSysLinux/4.1/mvme5500.

The instructions and examples which follow use the file pathnames which are used at Daresbury. While it is possible to install the software at other locations (no code has inbuilt absolute pathnames which cannot be overridden) you will have to understand the installation in greater detail so that your installation is consistent.

Throughout these instructions the host name of the MVME5500 Linux system is nnlx3. You can change this to whatever you wish but you MUST be consistent and replace nnlx3 by your name whereever you see it in the instructions and examples.

  Install the TimeSys Linux distribution in the directory /MIDAS/TimeSysLinux/4.1/mvme5500.
You must install the tar file as user=root in order that the correct file ownership and permissions for the Linux file system are preserved.
This is essentially the TimeSys Linux Evaluation Kit (LEK) which is a freely available download.

  Install the MIDAS distribution for MVME5500 Linux in the directory /MIDAS/linux-mvme5500
This contains MIDAS device drivers for Linux, MIDAS servers and common programs.

  Install any application packges required

First you need to identify the Linux/Unix server which will act as the TFTP boot server and the file system (NFS) server for the MVME500 Linux.
Login to the system and become Super User.

  Enable the TFTP service (Sun Solaris)

  Edit the file /etc/inetd.conf and uncomment (remove any #) before tftp

  Create the directory /tftpboot

  cd /tftpboot    and    ln -s . tftpboot

  finally kill -HUP <PID of inetd>

The TFTPboot server which is supplied by Sun with Solaris 9 has been "enhanced". This means that in some cases the TFTPboot server fails to understand requests using the "unenhanced" command format. Sun are aware of the problem. Until a fix is provided you will have to use an alternative tftpboot server. [The version from Solaris 8 appears to be usable.]

  Enable the TFTP service (RedHat)
You may first require to install the TFTP service for your Linux release. This is not installed by default in current Linux releases. If in doubt check that you have the file /usr/sbin/in.tftpd.

  Edit the file /etc/xinetd.d/tftp and ensure that disable=no

  Create the directory /tftpboot

  cd /tftpboot    and    ln -s . tftpboot

  finally restart the xinetd service using /etc/rc.d/init.d/xinetd restart

These instructions assume that the name of your MVME5500 Linux system is nnlx3. Replace this with your name.

  The Linux/Unix server needs to know the name and ethernet address of the MVME5500 Linux system. The ethernet address is printed on a label on the processor board - it will look like 0001AF0DB37D. The MVME5500 has 2 ethernet interfaces: ENET1 which is Gigabit ethernet and ENET2 which is 10/100 ethernet. It is assumed that you will boot via the 10/100 port (the default case). The ethernet addresses used by the board are on 2 labels on the PCB. The address used by ENET2 is the label nearest the front panel (and is the lower of the 2 numbers).

  Edit the file /etc/ethers and add (for each VME processor) a line like
00:01:AF:0D:B3:7D nnlx3

  The Linux/Unix server needs to know the name and IP address of the MVME5500 Linux system. If the MVME5500 Linux system is being connected to a "private" network then the MVME5500 Linux system can have an IP address like If the Linux system is being connected to your site network then you will have to obtain an IP address from your network administration.

  Edit the file /etc/hosts and add (for each MVME5500 processor) a line like nnlx3

  One file is required in the TFTP server /tftpboot directory for TimeSys Linux systems. The file /MIDAS/linux-mvme5500/boot/mvme5500.bin should be copied into the /tftpboot directory.

All boot parameters and initial configuration options are supplied by a DHCP server.

  Install the DHCP service

Linux installations normally have a DHCP server included although it may not be enabled and configured by default.
For Solaris you will probably have to install the server. You can obtain the standard DHCP server which runs on both Solaris and Linux from www.isc.org or here. Follow the README file to configure, make and install.

sample configuration file for DHCP: /etc/dhcpd.conf

option domain-name "dl.ac.uk";
option domain-name-servers nnsa.dl.ac.uk;
default-lease-time 3600;
ddns-update-style ad-hoc;
max-lease-time 14400;
subnet netmask {
   host nnlx3 {
     hardware ethernet 00:01:af:0d:b3:7d;
     server-name "";
     option root-path "/MIDAS/TimeSysLinux/4.1/mvme5500/rfs/nnlx3";
     option host-name "nnlx3";
     filename "mvme5500.bin";

  Enable the NFS service

Sun Solaris
If NFS had not previously been running in the Unix server it will be necessary to start it.
The following command will do this /etc/init.d/nfs.server start

RedHat Linux
If NFS had not previously been running in the Unix server it will be necessary to start it.
The following command will do this service nfs start

  The Linux/Unix server must also SHARE the file systems accessed via NFS with Linux (Sun Solaris)

  edit the file /etc/dfs/dfstab

  for each MVME5500 Linux processor add share -F nfs -o rw=nnlx3,root=nnlx3 /MIDAS

  execute the command shareall

  The Linux/Unix server must also SHARE the file systems accessed via NFS with Linux (RedHat Linux)

  edit the file /etc/exports

  for each MVME5500 Linux processor add /MIDAS nnlx3(rw,no_root_squash)

  execute the command exportfs -r -v

  The MVME5500 linux system needs to know the IP address of your server and how to mount the MIDAS application (as distinct from its root file system).

You will need to review the files /etc/hosts and /etc/fstab in the MVME5500 linux file system. These are the files /MIDAS/TimeSysLinux/4.1/mvme5500/rfs/nnlx3/etc/hosts and /MIDAS/TimeSysLinux/4.1/mvme5500/rfs/nnlx3/etc/fstab as seen by your server. These path names may of course need to be modified to be compatible with your installation as determined by the DHCP parameters.


# Do not remove the following line, or various programs
# that require network functionality will fail.	localhost.localdomain	localhost   myserver loghost egmsg
You will have to modify the supplied file to use the IP address of your server.


none				/proc		proc	defaults	0 0
none                            /dev/shm        tmpfs   size=450M       0 0
none				/dev/pts	devpts	gid=5,mode=620	0 0
myserver:/MIDAS                 /MIDAS    nfs  soft,intr,timeo=20
The supplied file will normally not require to be changed.

  Set-up the MVME5500 for network boot by getting to the processor MOTLoad prompt.

Before you plug the MVME5500 into the VME for the first time look for the red jumper on the MVME5500 PCB labelled FLASH0/FLASH1. It is at the top right-hand corner of the board (there are only 4 jumpers!). Set this jumper so that it is in the FLASH1 position.

Now you will need to connect a simple line-mode terminal to the DEBUG port of the MVME5500 or (better) use a terminal emulator program running in a workstation or PC. A standard RJ45 connector located on the front plate of the MVME5500 provides the interface to the asynchronous serial debug port (COM1).
The pin assignments for this connector are as follows:


Pin 1 is on the left when you view the RJ45 from the back (clip) side.

Assuming that the terminal has a standard 25 pin RS232 connector all that is required is to connect pin 4 (TXD) on the RJ45 to pin 2 on the DB25; pin 5 (RXD) on the RJ45 to pin 3 on the DB25 and pin 3 or 6 (GND) to pin 7 on the DB25.
NOTE: The DEBUG port and the ETHERNET ports on the MVME5500 both use RJ45 connectors (dumb!!). Try not to connect the wrong way around!
NOTE: You only need the DEBUG port for setup and fault finding. At other times it may be best to disconnect the DEBUG RJ45 connector from the MVME5500.

  The initial messages from a new MVME5500 will look like

Copyright Motorola Inc. 1999-2003, All Rights Reserved
MOTLoad RTOS Version 2.0,  PAL Version 1.1 RM02
Tue Jul  1 16:34:30 MST 2003

Warning: Global Environment Variable Area is uninitialized, use gevInit.
MPU-Int Clock Speed  =1000MHz
MPU-Ext Clock Speed  =133MHz
MPU-Number/Type = 0/MPC7455
MPU-Int Cache(L2) = 256K, Enabled, L2CR =0xC0000000
MPU-Ext Cache(L3) =  2MB, Enabled, 200MHz, L3CR =0xDF826000

Reset/Boot Vector    =Flash1

Local Memory Found   =20000000 (&536870912)
User Download Buffer =00694000:00893FFF


If the processor does not halt at the MVME5500> prompt then press the ESC key to interrupt the processor and get to the MVME5500> prompt.

  Look for the line

Reset/Boot Vector    =Flash1
If this says Flash0 then go back and change the jumper position as asked!

  For now ignore the line

Warning: Global Environment Variable Area is uninitialized, use gevInit.

  Start the MVME5500 Real Time Clock
If the processor is "new out of the box" you will have to start the real time clock. This is done by setting the date and time by using the set command. The format is set -tmmddyyhhmmss. Check that you have done this correctly by using the time command.

  Setting up the MVME5500 NVRAM
At the MVME5500> prompt enter the command gevInit.
Then to set up for Auto Boot across a network:

MVME5500>gevEdit mot-script-boot
(Blank line teminates input.)
netBoot -d/dev/enet0 -p -z

This will cause MOTload to download the Linux kernel using the device /dev/enet0 (ENET2) (which is the default and so the parameter -d/dev/enet0 may be omitted). To download using the gigabit ethernet interface (ENET1) use -d/dev/enet1.
The -p flag tells the board to locate its boot information from the DHCP or BOOTP server. The name of the file containing the Linux kernel is supplied via the server.
For more information on the netBoot function issue the command help netBoot at the MVME5500> prompt.

The labelling and naming of the ethernet devices is totally inconsistent. So here is a summary before your brain starts to overload. In particular note the difference between MOTload (used only to load the kernel) and Linux itself.

labelled MOTload Linux
ENET2 10/100 /dev/enet0 /dev/eth1
ENET1 GigE /dev/enet1 /dev/eth0

You will be pleased to hear that MVME5500 Linux should now boot!! Either reset or power cycle the board and the Auto Network Boot will occur.

You will expect to see output like this following. NOTE that messages after the line "Starting MIDAS Data Acquisition for nnlx3" will be dependent on the particular application being loaded.

Copyright Motorola Inc. 1999-2003, All Rights Reserved
MOTLoad RTOS Version 2.0,  PAL Version 1.1 RM02
Tue Jul  1 16:34:30 MST 2003

MPU-Int Clock Speed  =1000MHz
MPU-Ext Clock Speed  =133MHz
MPU-Number/Type = 0/MPC7455
MPU-Int Cache(L2) = 256K, Enabled, L2CR =0xC0000000
MPU-Ext Cache(L3) =  2MB, Enabled, 200MHz, L3CR =0xDF826000

Reset/Boot Vector    =Flash1

Local Memory Found   =20000000 (&536870912)
User Download Buffer =005C3000:007C2FFF

MVME5500> netBoot -p -z
Network Loading from: /dev/enet0

Locating BOOTP Server... Found It!

Client IP Address      =
Server IP Address      =
Gateway IP Address     =
Subnet IP Address Mask =
Boot File Name         = mvme5500.bin
Load Address           = 04000000

Network Boot File Load Start - Press  to Bypass,  to Continue

Network Boot File Load in Progress - Press  to Abort

Bytes Received =&1080137, Bytes Loaded =&1080137
Bytes/Second   =&1080137, Elapsed Time =1 Second(s)

Moving File/Image to User Download Buffer (005C3000)

Boot Device       =/dev/enet0
Boot File         =mvme5500.bin
Load Address      =005C3000
Load Size         =00107B49
Execution Address =005C3400
Execution Offset  =00000400

Passing control to the loaded file/image.
loaded at:     005C3400 006CC5BC
relocated to:  00800000 009091BC
zimage at:     00805984 00905128
avail ram:     00400000-00800000

Linux/PPC load: console=ttyS0,9600 ip=::::mvme5500:eth1:bootp root=/dev/nfs rw
Uncompressing Linux...done.
Now booting the kernel
Memory BAT mapping: BAT2=256Mb, BAT3=256Mb, residual: 512Mb
Total memory = 512MB; using 1024kB for hash table (at c0300000)
Linux version 2.4.21-timesys-4.1.171 (root@nn161.dl.ac.uk) (gcc version 3.2) #2 Tue Aug 3 10:48:05 BST 2004
Motorola Computer Group MVME5500 Board
MVME5500 port (C) 2003 Motorola, Inc.
TimeSys port (C) 2003 TimeSys Corporation
On node 0 totalpages: 131072
zone(0): 131072 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,9600 ip=::::mvme5500:eth1:bootp root=/dev/nfs rw
time_init: decrementer frequency = 33.333285 MHz
Memory: 514560k available (1680k kernel code, 744k data, 92k init, 0k highmem)
Calibrating delay loop... 999.42 BogoMIPS
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode cache hash table entries: 32768 (order: 6, 262144 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
Page-cache hash table entries: 131072 (order: 7, 524288 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Generic PowerPC real-time clock driver
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
I2C GT64260 Driver v1.0
i2c-proc.o version 2.6.1 (20010825)
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xf1120000 (irq = 64) is a 16550A
ttyS01 at 0xf1121000 (irq = 0) is a 16550A
gt64260_wdt: WDT driver v1.1 for GT64260 initialized
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: loaded (max 8 devices)
Intel(R) PRO/1000 Network Driver - version 5.1.13-k1
Copyright (c) 1999-2003 Intel Corporation.
eth0: Intel(R) PRO/1000 Network Connection
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
cfi_cmdset_0001: Erase suspend on write enabled
MVME5500 Flash Bank 0 device: 32MB at 0xf2000000
Creating 3 MTD partitions on "MVME5500_FLASH_0":
0x00000000-0x00100000 : "Primary Kernel"
0x00100000-0x01f00000 : "Primary Filesystem"
0x01f00000-0x02000000 : "Flash 0 Monitor"
cfi_cmdset_0001: Erase suspend on write enabled
MVME5500 Flash Bank 1 device: 8MB at 0xff800000
Creating 3 MTD partitions on "MVME5500_FLASH_1":
0x00000000-0x00100000 : "Secondary Kernel"
0x00100000-0x00700000 : "Secondary Filesystem"
0x00700000-0x00800000 : "Flash 1 Monitor"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 128 buckets, 21Kbytes
TCP: Hash tables configured (established 4096 bind 29127)
gt64260_eth_open : Assigned IRQ 32 to gt64260_eth0
eth1: link state:
  GT:100: Link:HD:nFC
Sending BOOTP requests . OK
IP-Config: Got BOOTP answer from, my address is
IP-Config: Complete:
      device=eth1, addr=, mask=, gw=,
     host=nnlx3, domain=dl.ac.uk, nis-domain=(none),
     bootserver=, rootserver=, rootpath=/MIDAS/TimeSysLinux/4.1/mvme5500/rfs/nnlx3
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
IPv6 v0.8 for NET4.0
IPv6 over IPv4 tunneling driver
Looking up port of RPC 100003/2 on
Looking up port of RPC 100005/1 on
VFS: Mounted root (nfs filesystem).
Mounted devfs on /dev
Freeing unused kernel memory: 92k init
INIT: version 2.78 booting
Remounting the root filesystem read-write.
Cleaning: /tmp /var/lock /var/run.
Mounting local file systems...
none on /dev/shm type tmpfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
Cleaning: /etc/network/ifstate.
Setting up IP spoofing protection: rp_filter.
Configuring network interfaces: done.
Starting portmap daemon: Done
Mounting remote filesystems...
Initializing random number generator... done.
INIT: Entering runlevel: 2
Starting enterprise event logger: Done
Starting system logger: Done
Starting kernel logger: Done
Universe device successfully initialized
Installed VME Universe module version: 3.3 @ Daresbury
Starting OpenBSD Secure Shell server: sshd.
Starting xinetd: Done
Starting enterprise event log notification: Done
Starting remote event logger: Done
Starting MIDAS Data Acquisition for nnlx3
Register Server "vme" installed on port 10220
claimed localhost (vme), default port : capability = 411b5f1900000000
defined NetVar_MyHostName
written attributes to NetVar_MyHostName
defined NetVar_ServerType
written attributes to NetVar_ServerType
defined NetVar_ServerOS
written attributes to NetVar_ServerOS
defined NetVar_HasBeenConfigured
written attributes to NetVar_HasBeenConfigured
defined NetVar_HasBeenRestored
written attributes to NetVar_HasBeenRestored
freed localhost vme
Spectrum Access Server installed on port 10230

Executive Program Release 1
Executive task started - PID= 160
Executive task now ready for work

MIDAS Data Acquisition Program Release 1 starting

Creating NetVars
Output buffer length = 32736; format option = 3; transfer option = 3
NetVars created and initialised
Data Acquisition task has PID 162
Statistics thread created
Heartbeat thread created
Installing signal handlers
Mapped VME A32 address 0x0 to virtual address 0x300f4000 for 0x5800000 bytes
Mapped VME A24 address 0x0 to virtual address 0x358f4000 for 0x1000000 bytes
Mapped VME A16 address 0x0 to virtual address 0x368f4000 for 0x10000 bytes
Heartbeat thread starting
MIDAS setup complete
Data Acquisition using tape server nnsv on port 0
Initialising communication with tape server
Setting Transfer Block Size 32768
Setting Transfer Mode 3
Setting Overlap Mode 1
Setting nice 1
TCP transfer library version 3.9T
Threads enabled
TCP socket send buffer was 16384 - now 262142
TCP socket created OK - now connecting to nnsv
Connected to nnsv port 10305
MIDAS Data Acquisition now all ready to start
SIGBUS and SIGSEGV traps setup
Starting notification action daemon: Done

Welcome to TimeSys Linux v4.1
nnlx3 login:

After the initial kernel boot MVME5500 Linux mounts the root file system and follows the normal Linux startup procedure. The MIDAS data acquisition startup is invoked by the file (seem by the MVME5500) /etc/rc2.d/S90MIDAS which is the file (as seen by the Linux/Unix server) /MIDAS/TimeSysLinux/4.1/mvme5500/rfs/nnlx3/etc/rc2.d/S90MIDAS which is actually a symbolic link to the file /MIDAS/linux-mvme5500/startup/mvme5500. This invokes the file /MIDAS/linux-mvme5500/startup/nnlx3 which loads the required Data Acquisition application.

If you have installed the software at a different location then pathnames in the script examples which follow may need to be changed. Note however that the scripts are executed by the Linux system and so the pathnames are as seen by Linux and NOT by the UNIX server. If you mount for Linux the MIDAS software as /MIDAS (see the fstab example file which follows) then no changes will be needed regards of the location on the UNIX server.

If /MIDAS is a symbolic link on your UNIX server then remember that you must export the file system to which the symbolic link points. This is normal NFS practice.

Generic MIDAS startup script /MIDAS/linux-mvme5500/startup/mvme5500


my_name=`uname -n`
hostname "$my_name"

echo "Starting MIDAS Data Acquisition for `hostname`"

export PATH=/MIDAS/linux-mvme5500/bin:${PATH}
export LD_LIBRARY_PATH=/MIDAS/linux-mvme5500/lib:${LD_LIBRARY_PATH}

[ -x /MIDAS/linux-mvme5500/startup/$my_name ] && /MIDAS/linux-mvme5500/startup/$my_name

sleep 10

Sample application specific start up script (file /MIDAS/linux-mvme5500/startup/nnlx3)

    umask 0
#   configure GigE interface for EbyE data
#   This system is and there is a tape server
#   Remove this command (or comment out) if you do not wish to use the gigabit interface
    ifconfig eth0 inet netmask broadcast up
    vmeers 0 vme
    source /MIDAS/config/VME/NetVarDefn.linux-mvme5500
    source /MIDAS/config/VME/NetVarRegDefn.linux-mvme5500
# start spectrum server:
#    define netints and access registers
#    The next line defines the IP address of your tape server. Remove the comment symbol to activate
#    netstring TS_Server ""
    netint Xfer_Option 3
    netint Format_Option 3
    netint Output_BufferSize 32
    netint Xfer_Overlap 1
    netint Xfer_Priority 1
    cd /MIDAS/Data_Acq/bin/linux-mvme5500

#    the next line starts the specific data acquisition program 
    nice ./MIDASExecV2
    umask $UM

Several configuration files are used by the standard startup scripts. In most cases these are supplied in the various distributions and the versions there should be considered as the definitive source.
VME register server configuration files


netstring NetVar_VME_ServerType "VME"

#   variable to indicate that a software reset has been performed after reboot
netint NetVar_VME_HasBeenConfigured 0

#   variable to indicate that a parameter restore has been performed after reboot
netint NetVar_VME_HasBeenRestored 0

# two useful general purpose variables
netstring NetVar_MyHostName `uname -n`
netstring NetVar_ServerOS `uname`
ersclaim localhost vme
ersdefine   NetVar_MyHostName       generic
erswta      NetVar_MyHostName     -a  -n NetVar_MyHostName -t string
ersdefine   NetVar_ServerType   generic
erswta      NetVar_ServerType   -a  -n NetVar_VME_ServerType -t string
ersdefine   NetVar_ServerOS     generic
erswta      NetVar_ServerOS    -a  -n NetVar_ServerOS -t string
ersdefine   NetVar_HasBeenConfigured        generic
erswta      NetVar_HasBeenConfigured      -a  -n NetVar_VME_HasBeenConfigured -t int
ersdefine   NetVar_HasBeenRestored        generic
erswta      NetVar_HasBeenRestored      -a  -n NetVar_VME_HasBeenRestored -t int

 return to MIDAS download home page