CAMP_boot_linux.html
How to set up a CAMP board to boot from linux
How to set up a CAMP MVME board (booting from linux)
Note
As an example, the "development" MUSR beamline "dev" is used throughout. "dasdevpc" is the linux host and "devvw" in the VxWorks host. Substitute your own host names (and ip addresses) where necessary.Summary
The camp MVME board needs to access the directories /camp and /campnode on the linux host. The disk containing these directories must exported to the camp MVME board.Linux host side
Create accounts on linux host
On dasdevpc, the main camp area is /home/musrdaq/musr/camp. It is assumed that the camp area is already set up, and the latest versions of the camp files downloaded from CVS. Therefore, the /camp directory below will have been created by the "cvs checkout" command.To run camp, the VxWorks host needs to nfsmount the following CVS directories (e.g. on dasdevpc):
/home/musrdarc/musr/camp as /camp (read only)NOTE - these directories will now be referred to as "/camp" and "/campnode" respectively.
/home/musrdarc/musr/camp/devvw as /campnode (read/write)
[ substitute the name of your VxWorks cpu for "devvw"].
Also the following nfsmounted directories are useful but not essential (since camp loads copies of the software from the ram disk):
/home/musrdaq/musr/vw as /vw (read only) is useful for testingCreate the following (non-CVS) directories on your linux host if they don't already exist:
/home/musrdaq/musr/vw as /tools (read only) is needed for rshell commands to work.
/campnode/cfg e.g. /home/musrdarc/musr/camp/devvw/cfgClick here for information on the contents of the camp directories.
/campnode/log e.g. /home/musrdarc/musr/camp/devvw/log
[ substitute the name of your VxWorks cpu for "devvw"].
Copy across node-specific files
Copy files from the /campnode directories from a similar setup on
another machine so that
users don't have to reload all their instruments.
This example uses midm9b as the linux host and m9bvw as the camp host:
On midm9b, logon as musrdaq.
cd /home/musrdaq/musr/camp
ls m9bvw
Create m9bvw and m9bvw/cfg directories if they do not exist.
Copy the files from dasdevpc to midm9b using scp :
On midm9b:
cd /home1/musrdaq/camp/m9bvw/cfg
scp musrdaq@dasdevpc:/home/musrdaq/musr/camp/m9bvw/cfg/\* .
Permission to nfsmount & rshell access
Follow instructions in add export permissions to nfs mount the appropriate directories under linux, and to allow rshell access (necessary so that the password need not be given as a bootup parameter).Security
Security could also prevent the disk from being mounted. Check /etc/hosts.allow on the exporting machine. It should allow access to specific machines or to all of triumf machines.portmap: 142.90.0.0/255.255.0.0
rpc.mountd: 142.90.0.0/255.255.0.0, 127.0.0.1
CAMP VxWorks host side
It is assumed that the full set of object modules needed for the camp server etc. are already present on the ram disk. If not, install them.VxWorks startup file
Use a startup file such as stcamp_lx.dev as a template. Change the vxWorks and linux host names as appropriate.Set the boothost to dasdevpc (for convenience - the camp board actually uses the ram disk to boot), and define dasdevpc with hostAdd:
and define the nfsAuth... to be the user ID and group ID that owns the files on the UNIX side. To find out the uid and gid for the user can use linux command:
boothost = "dasdevpc"
hostAdd "dasdevpc.triumf.ca","142.90.106.82"
>id usernameNext mount the camp directories as "/camp" and "/campnode" e.g.
# Set NFS username/authorization
nfsAuthUnixSet "isdaq01", 569, 569, 0
host uid gid
# Mount directories required by CAMPand other useful directories "/vw" and "/tools":
nfsMount "boothost", "/home/musrdaq/musr/camp", "/camp"
nfsMount "boothost", "/home/musrdaq/musr/camp/devvw", "/campnode"
nfsMount boothost, "/home/musrdaq/musr/vw", "/vw"
nfsMount boothost, "/home/musrdaq/musr/vw", "/tools"
To try a new startup script
- Load startup script by hand
i.e.since if the startup script can not be loaded for some reason, it can cause the vxWorks node to go into limbo. To recover, the startup script filename in ram must be overwritten.
-> < /home/musrdaq/musr/vw/stcamp_lx.dev
- Test startup file before copying it to ram disk
i.e.since a bad startup script can cause the vxWorks node to go into limbo.
-> < /home/musrdaq/musr/vw/stcamp_lx.dev
bootup parameters
Click here to obtain typical bootup parameters for all DAQ boards.Example bootup parameters for devvw are shown below:
boot device : eiAdd the startup script later (see above).
processor number : 0
host name : dasdevpc
file name :
inet on ethernet (e) : 142.90.106.103
inet on backplane (b):
host inet (h) : 142.90.106.82
gateway inet (g) :
user (u) : musrdaq
ftp password (pw) (blank = use rsh):
flags (f) : 0x8
target name (tn) : devvw
startup script (s) :
other (o) :
.rhosts
A file named ~musrdaq/.rhosts containing the linedevvw musrdaq
is needed to allow the MVME162 rshell access to the host at bootup.
(This may not in fact be necessary since the MVME board actually
boots
from RAM)
problems
- failure to load startup file :
- cannot access files on /camp or /campnode :
Check the path and filename are correct. Try giving the password
as
a bootup parameter. If this works, check that you have correctly allowed
rshell access.
Check success of nfsmounts, i.e.
->nfsDevShowIf devices are not mounted, check the nfs exports (see above). If /camp and /campnode are mounted, you should be able to write a file to /campnode/cfg, and read files from /camp/dat, e.g.
-> ll "/camp/dat" directoryIf nfsAuthUnixSet is not set to be the owner of the files in /campnode, you will not be able to write. As a test, set permissions on these directories to be world writeable
-> copy "/camp/dat/camp.ini" type camp.ini
-> copy "/ram/stcamp.dev", "/campnode/cfg/tmp.tmp" copy a file
-> ll "/campnode/cfg" check it's there
-> rm "/campnode/cfg/tmp.tmp" delete it
[musrdaq@dasdevpc] $ cd ~musrdaq/musr/camp/devvwUse "chmod o-w" to replace the correct permissions after problem is fixed.
[musrdaq@dasdevpc camp]$ ls -ld cfg
drwxrwxr-x 2 musrdaq musrdaq 1024 Jan 31 13:05 cfg/
[musrdaq@dasdevpc camp]$ chmod a+w cfg
[musrdaq@dasdevpc camp]$ chmod a+w log
[musrdaq@dasdevpc camp]$ ls -ld cfg
drwxrwxrwx 3 musrdaq musrdaq 1024 Jan 31 14:20 cfg/