You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 38
Next »
Definitions
- BOLD: refers to files that need to be modified or generated by IOC developer
- Italics: symbolic link
References (documents need to be updated)
How-To setup the CPU and IOC boot directories
The instructions differ between production and development due to permission restrictions in production.
Production: lcls, lcls2, facet, testfac
- Send email to Ken Brobeck requesting:
- create controls infrastructure for a new linuxRT CPU and / or IOC to a specific facility production server.
- includes $IOC_DATA/<cpu,ioc> directories
- includes $IOC_DATA/<ioc>/<autosave,autosave-req,restore,iocInfo,archive> directories
- add CPU boot information to the DHCP configuration file, and reboot the DHCP server. Ken will need the following details:
- Which facility the CPU will boot (e.g. facet, lcls, lcls2, testfac). This indicates the path to the startup.cmd script and the DHCP server.
- MAC Address of the CPU
- The CPU EPICS target architecture (e.g. linuxRT-x86,linuxRT-x86_64,etc)
- Proceed to Development Step #3
Development: dev
- Create the $IOC_DATA directory for your cpu and iocs as follows:
- cd $IOC_DATA
- Create the $EPICS_IOCS cpu and ioc boot directories
- cd $EPICS_IOCS
- mkdir cpu-<area>-<subsystem-prefix><2-digit#>
- mkdir sioc-<area>-<subsystem-prefix><2-digit#>
- Setup cpu directory files
- cd cpu-<area>-<subsystem-prefix><2-digit#>
- Setup relative symbolic links to the common startup script and EPICS version:.
- ln -s ../common/st.cmd.linuxRT.cpu startup.cmd
- ln -s ../common/bin/<epics base version> epicsSpecificRelease
- Generate the file kernel-module.cmd. This file load kernels modules and drivers: kernel-modules.cmd
- for examples click here.
- Setup ioc directory files
- cd sioc-<area>-<subsystem-prefix><2-digit#>
- copy the ioc startup.cmd script from $EPICS_IOCS/template
- for linuxRT running iocsh: cp ../template/startup.cmd.linuxRT startup.cmd
- for linuxRT running cexp: cp ../template/startup.cmd.linuxRT.cexp startup.cmd
- edit startup.cmd
- replace <ioc> with your ioc name and for cexp replace <facility>
- change path of the EPICS_IOC_APP if your st.cmd file is in a non-standard location.
- cp ../template/screenrc screenrc
- edit screenrc and replace <ioc> with your ioc name.
- Setup a relative symbolic link to the TOP of the IOC Application release.
- ln -s ../../iocTop/<app>/<version> iocSpecificRelease
- Modify $EPICS_IOCS/screeniocs – Please note that this is a symbolic link to a CVS file
- verify that the file in use has not been modified without being committed.
- cd $EPICS_IOCS/All/<facility> , where facility is Dev,Prod,facet,acctest
- cvs diff -r HEAD screeniocs
- if there are issues, then send email to whoever made the change or to controls-software that you are about to update this file and uncommitted edits will be lost, so please commit your changes to CVS. If you don't get a response, you can either add the changes to CVS in addition to yours or just add yours.
- check out screeniocs from CVS into your work area
- cd
- cd <work>
cvs co epics/iocCommon/All/<facility> , where facility is Dev,Prod,facet,acctest - cd epics/iocCommon/All/<facility>/screeniocs
- edit screeniocs
- add line for cpu
format: cpu-<area>-<subsystem-prefix><2-digit #> <ts> <ts port #t> <screen host> [ # comment] - add line for each ioc
format: sioc-<area>-<subsystem prefix><2-digit #> cpu-<area>-<subsystem-prefix><2-digit #> <account> [ # comment] - The "comment" field in screeeniocs is optional and must be precede but "#".
- commit your changes of screeniocs to CVS as follows:
- cvs commit -m "added cpu and ioc blah" screeniocs
- update the screeniocs file in use
- cd $EPICS_IOCS/All/<facility>
- rm -f screeniocs
- cvs update screeniocs
IOC Applications Specific RT constraints:
- Create script <app>/iocBoot/<ioc>/rtPrioritySetup.cmd to set real-time priorities for threads
- Load rtPrioritySetup.cmd from <app>/iocBoot/<ioc>/st.cmd
How-to Release a LinuxRT IOC Application:
How-to boot a linuxRT IOC from a Linux Host :
- Log onto the host machine for example softegr@lcls-srv01 type the following:
How-to boot an IOC from the linuxRT hostT
The following scripts are located under the directory $IOC/common and should be in PATH on the CPU.
- Start IOC in the background w/screens
- linuxRT_viocConsole.sh <ioc>
- Start IOC in the background w/screens
- linuxRT_startup_vioc.sh <ioc>
- Start iOC in the foreground without screens
- linuxRT_startupConsole.sh <ioc>
How to connect to CPU from a Linux host:
Use either iocConsole or ssh to CPU as follows:
- iocConsole <cpu>
- Using ssh
- from lcls or dev: ssh laci@<cpu>
- from facet: ssh flaci@<cpu
How to check if IOC is running on the linuxRT CPU:
- from laci or flaci type: screen -ls
How-to use screen program:
Additional References: