Building the Entire System
A multi-stage make is required to build the .munch files for the IOCs. Munch files are raw binary executable for the MVME5500's VxWorks operating system generated by a cross compiler. The cross compiler resides on machine con6, a Sun Solaris machine. This machine has no internal hard disk, it connects to the network file server. This means files can be copied willy-nilly but that doesn't mean they should be. Yes, physicists, I speak to you. DO NOT TOUCH /dk/fs2/dgs/global_sanbox EVER. NO, NEVER!!
How Gammasphere VME IOCs boot
Each of the VME processors in Gammasphere (VME01 - VME12) are embedded processors running the VxWorks operating system, version 5.5. For some history see https://www.windriver.com/blog/vxworks-past-and-future, but don't allow the maximally stupid concept of "upgrading" to enter your mind. Everything in the system is specifically dependent and designed for VxWorks version 5.5, and if you change that, you have contracted to spend the next 5 years of your life attempting to rebuild everything for ZERO functional gain.
When the VxWorks processors are powered on they first boot from an onboard boot loader PROM. If one has access to a console terminal window the data in the PROM may be viewed or edited. The PROM specifies the IP address, user name and location of the boot script that the VME processor will load and execute after the initial PROM boot, and also the location of the VxWorks image.
Boot Host for VME processors
Machine DGS1 is the boot host for VME processors. The VxWorks OS image and the boot scripts for all the VME processors are located on machine DGS1, starting at the folder /global/ioc.
Machine DGS1 and other machines in the data room use a shared file server. The /global folder on many machines is actually just a symbolic link. /global, depending upon which machine you log into, may be one of THREE different locations on the file server:
* Machines running a 64-bit OS like Rocky Linux will map /global to /dk/fs2/dgs/global_64. * Machines running Scientific Linux 6 (e.g. DGS1) will map /global to /dk/fs2/dgs/global_32. * One specific machine (CON6), critical to the maintenance of the system, maps /global to /dk/fs2/dgs/global_sandbox.
File Structure of Boot Host DGS1
The root of the boot host is the folder /global/ioc that has subfolders
- bin
- boot
- db
- dbd
- dgsSoftIOC
- epics
- FW_Maint (Will be deprecated in the imminent future)
- gui
The places that change when the system is rebuilt are the bin, boot and gui areas.
Compiling the Code used in the VME IOCs
- ssh -XY dgs@con6
- cd /global/devel/dgsDrivers/dgsDriverApp/src
- ./Export_SVN_ParameterFiles.sh
- cd ../..
- make clean
- make
- There should be ZERO errors and ZERO warnings. Anything else is a fatal, full, stop.
- cd ../dgsIoc
- make clean
- make
- There should be ZERO errors and ZERO warnings. Anything else is a fatal, full, stop.
- Log out of con6
- Log into dgs1 as dgs
- cd /global/ioc/bin/vxWorks-ppc604_long
- ./CopyNewMunch.sh
Ensuring EPICS databases are up to date
- ssh -XY dgs@dgs1
- cd /global/ioc/db
- ./Export_SVN_Databases.sh
- You will have to reboot all the VME IOCs to load the new databases.
- You will have to stop and restart the Soft IOC to load the new databases
The entire sequence from spreadsheet to boot
Spreadsheet general path
- Checkout or update a local working copy of https://svn.inside.anl.gov/repos/psg/CodeGeneratingSpreadsheetsGeneric onto a Windows PC.
- Make any modifications to the spreadsheet needed to update desired functionality in firmware, EPICS, C structs, etc.
- There are different projects for every kind of FPGA/board.
Spreadsheet outputs
A spreadsheet for the digitizer or the master trigger or the router trigger has a folder SS_output that contains all of its output products. The output products of interest for the Area IV data acquisition systems are
- <boardtype>Registers.template
- <boardtype>User.template
- A series of VMExx.db files (however many were defined in the system definition file of the spreadsheet)
- A 'JustGlobals.db' file for use by the Soft IOC