Files
startup/startup.script_common
2011-09-23 09:36:31 +00:00

47 lines
1.3 KiB
Plaintext

# $Source: /cvs/A/CS/startup/startup.script_common,v $
# This is the common part of all startup scripts
# It is included by all generated scripts
# The following variables should be set before:
# * IOC the system name of the ioc
# * INSTBASE where to boot from
# * EPICS the epics release (e.g "R3.13.9")
# * ARCH the vxWorks architecture (e.g. "T1-ppc604")
# do the NFS mounts
< ../../startup/network
STRINGBUFFER=malloc(256)
# set the prompt
sprintf (STRINGBUFFER, "%s (startup.script aborted) > ", IOC)
shellPromptSet (STRINGBUFFER)
# create some path variables
HOME=malloc(80)
sprintf (HOME, "/ioc/%s", IOC)
CFG=malloc(80)
sprintf (CFG, "%s/cfg", HOME)
STREAM_PROTOCOL_DIR=malloc(80)
sprintf (STREAM_PROTOCOL_DIR, "%s/cfg", HOME)
LIB=malloc(80)
sprintf (LIB, "%s/iocBoot/%s/%s", INSTBASE, EPICS, ARCH)
TEMPLATES=malloc(80)
sprintf (TEMPLATES, ".:%s/iocBoot/templates", INSTBASE)
# Memory above 32 MB is blocked to avoid relocation problem
# Release it after libs are loaded and before iocInit
# Code loaded afer iocInit must be compiled with -mlongcall
EXTENDED_MEMORY=sysPhysMemTop()-sysMemTop()
#Load EPICS version dependent script
sprintf (STRINGBUFFER, "%s/iocBoot/startup/EPICS_%s", INSTBASE, EPICS)
cd STRINGBUFFER
< startup.script_epicsdependent
# end of startup.script_common