Building the Entire System

From GammaSphere DAQ
Revision as of 00:35, February 22, 2024 by Moberling (talk | contribs) (→‎Compiling the Code used in the VME IOCs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

Shared File System

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

  1. ssh -XY dgs@dgs1
  2. cd /dk/fs/dgs/global_sandbox/devel/dgsDrivers/dgsDriverApp/src
  3. ./Export_SVN_ParameterFiles_from_dgs1.sh
  4. ssh -XY dgs@con6
  5. cd /global/devel/dgsDrivers
  6. make clean
  7. make
    1. There should be ZERO errors and ZERO warnings. Anything else is a fatal, full, stop.
  8. cd ../dgsIoc
  9. make clean
  10. make
    1. There should be ZERO errors and ZERO warnings. Anything else is a fatal, full, stop.
  11. Log out of con6
  12. Log into dgs1 as dgs
  13. cd /global/ioc/bin/vxWorks-ppc604_long
  14. ./CopyNewMunch.sh

Ensuring EPICS databases are up to date

  1. ssh -XY dgs@dgs1
  2. cd /global/ioc/db
  3. ./Export_SVN_Databases.sh
  4. You will have to reboot all the VME IOCs to load the new databases.
  5. 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.
  • After the spreadsheet is run then the entire folder tree for the project must be committed to SVN.

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

files for rebuilding the VxWorks driver

  • asyn<boardtype>Params.c
  • asyn<boardtype>Params.h

The Solaris machine 'con6' has no 'svn' program installed on it, so some other machine that has 'svn' must be used to pull the files down. This is done by

  • cd /dk/fs2/dgs/global_sandbox/devel/dgsDrivers/dgsDriverApp/src
  • ./Export_Parameter_Files_from_dgs1.sh

After you have exported the parameter files, then compile as described above.

Once you have successfully compiled, then you must go to the boot machine (e.g. DGS1) and do the following:

  • cd /global/ioc/bin/vxWorks-ppc604_long
  • ./CopyNewMunch.sh

files used by the VME IOCs to generate PVs

  • <boardtype>Registers.template
  • <boardtype>User.template
  • A series of 'VMExx.db' files (however many were defined in the system definition file of the spreadsheet)

These files must be exported from SVN to the folder on the boot host machine (e.g. dgs1) for use by the VME IOC processor during the boot of that specific processor. This is done by

  • cd /global/ioc/db
  • ./Export_SVN_Databases.sh

files used by the Soft IOC (run on the host machine, e.g. DGS1)

  • JustGlobals.db

This file must be exported from SVN to the folder on the boot host machine where the Soft IOC resides. This is done by

  • cd /global/ioc/dgsSoftIOC/db
  • ./Export_SVN_SoftIOC_Database.sh