moved lots of stuff to startup-vxWorks, in particular NFS
This commit is contained in:
@@ -9,64 +9,16 @@ EPICS_MODULES = "/ioc/modules"
|
||||
# Find a better way later to know current require version
|
||||
REQUIRE_VERSION="3.2.2"
|
||||
|
||||
# Set EPICS_HOST_ARCH according to vxWorks version and cpu type
|
||||
VX6=(*runtimeVersion>>24)-'5'
|
||||
VMI=(*runtimeVersion>>8)&255
|
||||
EPICS_HOST_ARCH=malloc(16)
|
||||
sprintf EPICS_HOST_ARCH, "%s%c-ppc60%d", VX6 ? "V6" : "T", VX6 ? VMI : VMI>'3' ? '2' : '1', sysCpu-90
|
||||
printf "EPICS_HOST_ARCH = %s\n",EPICS_HOST_ARCH
|
||||
|
||||
# Set target name as IOC name
|
||||
IOC=&sysBootParams+60
|
||||
printf "IOC = %s\n",IOC
|
||||
|
||||
BOOTPC=&sysBootHost
|
||||
printf "BOOTPC = %s\n",BOOTPC
|
||||
|
||||
STRINGBUFFER=malloc(256)
|
||||
|
||||
# Set the prompt
|
||||
sprintf STRINGBUFFER, "%s (startup.script aborted) > ", IOC
|
||||
shellPromptSet STRINGBUFFER
|
||||
|
||||
# Set DNS if necessary
|
||||
resolvInit "129.129.190.11", "psi.ch"
|
||||
|
||||
# autoSR location
|
||||
putenv "SRBASE=/ioc/data"
|
||||
|
||||
# Do the NFS mounts and other network dependend stuff
|
||||
nfsAuthUnixSet &sysBootHost,500,9102
|
||||
< /ioc/startup/network
|
||||
|
||||
# Set environment variables
|
||||
sprintf STRINGBUFFER, "IOC=%s", IOC
|
||||
putenv STRINGBUFFER
|
||||
|
||||
sprintf STRINGBUFFER, "BOOTPC=%s", BOOTPC
|
||||
putenv STRINGBUFFER
|
||||
|
||||
sprintf STRINGBUFFER, "EPICS_HOST_ARCH=%s", EPICS_HOST_ARCH
|
||||
putenv STRINGBUFFER
|
||||
|
||||
# Create some path variables
|
||||
HOME=malloc(80)
|
||||
sprintf HOME, "/ioc/%s", IOC
|
||||
sprintf STRINGBUFFER, "HOME=%s", HOME
|
||||
putenv STRINGBUFFER
|
||||
cd HOME
|
||||
|
||||
CFG=malloc(80)
|
||||
sprintf CFG, "%s/cfg", HOME
|
||||
sprintf STRINGBUFFER, "CFG=%s", CFG
|
||||
sprintf STRINGBUFFER, "EPICS_DRIVER_PATH=.:bin/%s_%s:bin:snl:../bin:%s", EPICS, EPICS_HOST_ARCH, EPICS_MODULES
|
||||
putenv STRINGBUFFER
|
||||
|
||||
STREAM_PROTOCOL_DIR=malloc(80)
|
||||
sprintf STREAM_PROTOCOL_DIR, "%s/cfg", HOME
|
||||
|
||||
sprintf STRINGBUFFER, "EPICS_DRIVER_PATH=.:bin/%s_%s:bin:snl:../bin:%s", EPICS, EPICS_HOST_ARCH, EPICS_MODULES
|
||||
putenv STRINGBUFFER
|
||||
|
||||
# Release memory above 32 MB
|
||||
# Code loaded after this must be compiled with -mlongcall
|
||||
# at the moment snp24 does not work with this
|
||||
@@ -85,7 +37,7 @@ R3 = strncmp(EPICS,"R3.",3)==0
|
||||
R7 = strncmp(EPICS,"R7.",3)==0
|
||||
|
||||
# Load PVA only on vxWorks 6 with more than 32 MB RAM
|
||||
PVA = R7 && VX6 && sysPhysMemTop()&0xfc000000
|
||||
PVA = R7 && VX6 && sysPhysMemTop()&0xfc000000&!getenv("NOPVA")
|
||||
|
||||
# Time server (must be set before loading iocCoreLibrary.munch for 3.14.12)
|
||||
# Need EPICS_TS_FORCE_NTPTIME for 7.0
|
||||
@@ -113,7 +65,8 @@ dbBptNotMonotonic=1
|
||||
# Start Logging
|
||||
putenv getenv("EPICS_IOC_LOG_INET") ? "" : "EPICS_IOC_LOG_INET=gfa-syslog"
|
||||
putenv getenv("EPICS_IOC_LOG_PORT") ? "" : "EPICS_IOC_LOG_PORT=1514"
|
||||
sprintf STRINGBUFFER, R3_13||R3_14_8 ? "putenv \"EPICS_CA_PUT_LOG_PREFIX=%s\"" : "iocLogPrefix \"%s \"", IOC
|
||||
#sprintf STRINGBUFFER, R3_13||R3_14_8 ? "putenv \"EPICS_CA_PUT_LOG_PREFIX=%s\"" : "iocLogPrefix \"%s \"", IOC
|
||||
sprintf STRINGBUFFER, "putenv \"EPICS_CA_PUT_LOG_PREFIX=%s\"", IOC
|
||||
execute STRINGBUFFER
|
||||
iocLogInit
|
||||
errlogPrintf "Starting EPICS %s\n", EPICS
|
||||
@@ -154,7 +107,7 @@ putenv bootInfo("EPICS_CAS_INTF_ADDR_LIST=%e")
|
||||
# Set up CA search lists for different networks
|
||||
IP_ADDR=bootInfo("%e")
|
||||
|
||||
# Office (only officicial EPICS subnets, not SLS beamlines!)
|
||||
# Office (only official EPICS subnets, not SLS beamlines!)
|
||||
ifEnvSet IP_ADDR, "~129.129.130.*", "EPICS_CA_ADDR_LIST", "129.129.131.255 129.129.137.255"
|
||||
ifEnvSet IP_ADDR, "~129.129.131.*", "EPICS_CA_ADDR_LIST", "129.129.130.255 129.129.137.255"
|
||||
ifEnvSet IP_ADDR, "~129.129.137.*", "EPICS_CA_ADDR_LIST", "129.129.130.255 129.129.131.255"
|
||||
|
||||
Reference in New Issue
Block a user