You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 17
Next »
For a more comprehensive overview and detailed questions, please refer to the following page:
LinuxRT Initial Set-up of cpu and ioc Directory Structure:
- BOLD: refers to files that need to be modified or generated by IOC developer
- Italics: symbolic link
- LinuxRT_Diagram (old)
- Create the $IOC_DATA directory for your cpu and iocs as follows:
- cd $IOC_DATA
- mkdir cpu-<area>-<subsystem-prefix><2-digit#>
- mkdir sioc-<area>-<subsystem-prefix><2-digit#>
- cd sioc-<area>-<subsystem-prefix><2-digit#>
- mkdir autossave autosave-req iocInfor archive
- Create the $EPICS_IOCS cpu and ioc boot directories
- cd $EPICS_IOCS
- mkdir cpu-<area>-<subsystem-prefix><2-digit#>
- cd cpu-<area>-<subsystem-prefix><2-digit#>
- ln -s ../common/st.cmd.linuxRT.cpu startup.cmd
- ln -s ../common/bin/<epics base version> epicsSpecificRelease
- Generate a kernel-modules.cmd file
- for examples click here.
- mkdir sioc-<area>-<subsystem-prefix><2-digit#>
- cd sioc-<area>-<subsystem-prefix><2-digit#>
- cp ../template/st.cmd.linuxRT startup.cmd
- edit startup.cmd and replace <ioc> with your ioc name.
- cp ../template/screenrc .
- edit screenrc and replace <ioc> with your ioc name.
- Please note that if the location of your IOC Application st.cmd file is non-standard then change EPICS_IOC_APP path in startup.cmd
- ln -s ../../iocTop/<app>/<version> iocSpecificRelease
- Edit $EPICS_IOCS/screeniocs – please note this is a symbolic link to this file.
add line for cp
# Alias Terminal Server Port No. screen is run Comments (must start with #)
#------- ------------- ------- -------------- -----------------------------------------------
- ex) Hostname
- Generate cpu-##-## directory
- Make a symbolic link named “startup.cmd” that points to “../skel/startup_cpu.cmd”
- Create a “kernel-modules.cmd” file that is specific for your cpu
- Make a symbolic link for each vioc(s) hosted on the cpu (ln -s ../vioc-xx##-xx## vioc-xx##-xx##)
- Create a vioc-##-## directory for each vioc running on this machine
- Create a “screenrc” file that is name-specific for each vioc
- Make a symbolic link named “startup.cmd” that points to “../skel/startup_vioc.cmd”
- Make a symbolic link called “iocSpecificRelease” that follows the CRAM convention for pointing to an Epics application
How to CRAM your Epics Application:
Update $IOC/All/Dev screeniocs
Update information pertaining to which vioc’s are running on a cpu and currently the application each vioc is running
- Commit screeniocs back into CVS
- RT IOC Applications:
- Create a /iocBoot/<ioc>/rtPriortiesSetup.cmd file to set real-time priorities for threads
- Load rtPriortiesSetup.cmd file from iocBoot/<ioc>/st.cmd
How to commit screeniocs back into CVS:
- cvs status <file_name>
- cvs commit <file_name>
From the command line, start a linuxRT Epics Application manually (must run on a linuxRT machine)
- ssh laci@cpu-b34-fb01
- cd to to the epics application directory structure and run the st.cmd for a linuxRT application
- ./st.cmd (first line of st.cmd must have !# for this to execute epics application binary ex: !# ../../bin/linuxRT_glibc-x86_64/fastFeedback)
How to boot-up in the foreground versus background:
The following scripts are located under the directory $IOC/common
- In the foreground w/screens
- linuxRT_viocConsole.sh vioc-b34-fb01
- In the background w/screens
- linuxRT_startup_vioc.sh vioc-b34-fb01
- In the foreground without screens
- linuxRT_startupConsole.sh vioc-b34-fb01
Development Mode:
If you're going to be frequently changing what viocs start automatically and don't want to keep changing the screeniocs file, you can define $LOCAL_IOCS in your kernel-modules.cmd file to override what's in screeniocs. Examples:
export LOCAL_IOCS=( vioc-abc-123 vioc-456-def vioc-789-ghi )
or to start nothing
export LOCAL_IOCS=( )
Don't do this with stable production systems. It's there to give you flexibility during development without changing screeniocs all the time.
If using the screen program:
Development Mode:
If you're going to be frequently changing what viocs start automatically and don't want to keep changing the screeniocs file, you can define $LOCAL_IOCS in your kernel-modules.cmd file to override what's in screeniocs.
Examples:
export LOCAL_IOCS=( vioc-abc-123 vioc-456-def vioc-789-ghi )
or to start nothing
export LOCAL_IOCS=( )
Common Linux Commands Used
- mkdir <directory_for_cpu/vioc>
- ln -s <path_to_desired_file> <symbolic_link_name>
- rm <symbolic_link_name> (WARNING: Make sure you are not removing the entire directory. rm <symbolic_link_name/> will remove the directory that the symbolic link points too)
- grep -r <search_term> . (recursively search through directories starting in your currently working directory)
- man <linux_command> (linux documentation)
Additional References: