From 7637cb87327e190cc2148ddf38499ec5de664b1d Mon Sep 17 00:00:00 2001 From: zimoch Date: Mon, 4 Jan 2010 12:43:59 +0000 Subject: [PATCH] after changing to routed SLS network --- R3.13 | 33 +++++++++++++++++++++++ R3.14.11 | 48 ++++++++++++++++++++++++++++++++++ R3.14.8 | 42 +++-------------------------- common | 61 ------------------------------------------- getbcast | 1 - startup.script_common | 19 +++++++++++++- startup.script_iocmon | 2 +- startup.script_linux | 1 + startup.script_part2 | 22 ++++++++++++++++ syncTS | 46 +++++++------------------------- 10 files changed, 136 insertions(+), 139 deletions(-) create mode 100644 R3.13 create mode 100644 R3.14.11 delete mode 100644 common delete mode 100755 getbcast diff --git a/R3.13 b/R3.13 new file mode 100644 index 0000000..084b60f --- /dev/null +++ b/R3.13 @@ -0,0 +1,33 @@ +cd LIB + +# load EPICS system core +ld < iocCore +ld < seq + +# load EPICS tools like "require" +ld < utilitiesLib +ld < miscLib + +# disable floating point exceptions +slsFppInit + +# next line allows to continue even if mounting of /ioc failed +cd bootInfo("%H:") +cd HOME + +# insert boot infos into database +bootNotify (INSTBASE, "sls/bin/iocBootNotify.sh") + +# try for user-defined menus scan and convert +dbLoadDatabase("dbd/scan.dbd") +dbLoadDatabase("dbd/convert.dbd") +dbLoadDatabase("dbd/slsConvert.dbd") + +#load standard drivers +require "base" + +# setup clock +TSconfigure(0,10,10,18323,18322,250,1) + +# $Id: R3.13,v 1.1 2010/01/04 12:43:59 zimoch Exp $ +# end of startup.script_common diff --git a/R3.14.11 b/R3.14.11 new file mode 100644 index 0000000..6579fd3 --- /dev/null +++ b/R3.14.11 @@ -0,0 +1,48 @@ +cd LIB +#required for ifenvsetnew: +ld < utilitiesLib.munch +# disable floating point exceptions +slsFppInit + +# load EPICS system core +ld < iocCoreLibrary.munch + +# load EPICS tools like "require" +ld < miscLib.munch +misc_registerRecordDeviceDriver + +# next line allows to continue even if mounting of /ioc failed +cd bootInfo("%H:") +cd HOME + +# insert boot infos into database +bootNotify (INSTBASE, "sls/bin/iocBootNotify.sh") + +# setup logging +putenv(bootInfo("EPICS_IOC_LOG_INET=%h")) +putenv("EPICS_IOC_LOG_PORT=6500") + +# try for user-defined menus scan and convert +dbLoadDatabase("dbd/scan.dbd") +dbLoadDatabase("dbd/convert.dbd") +dbLoadDatabase("dbd/slsConvert.dbd") + +#load standard drivers +require "base" +require "symbDev" +require "seq" + +# setup clock: +# 2010: +putenv("TIMEZONE=MET::-60:032802:103103") +# 2011: putenv("TIMEZONE=MET::-60:032702:103003") +# 2012: putenv("TIMEZONE=MET::-60:032502:102803") +ifenvsetnew(ifName(),"EPICS_TS_NTP_INET","129.129.190.1","172.19.11.101","172.20.10.10") +#require "generalTime","test" +#EvtTimeConfigure(master?, sync_rate_sec, clock_rate_hz, master_port, slave_port, time_out_msec) +#EvtTimeConfigure(0, 5, 500000, 18323, 18322, 250) + +AUTOSRHOST=bootHost() + +# $Id: R3.14.11,v 1.1 2010/01/04 12:43:59 zimoch Exp $ +# end of startup.script_common diff --git a/R3.14.8 b/R3.14.8 index fd581bf..2443385 100644 --- a/R3.14.8 +++ b/R3.14.8 @@ -1,73 +1,39 @@ -# All T2-code is compiled with -mlongcall. Thus enable extended memory. -memAddToPool (sysMemTop(),sysPhysMemTop()-sysMemTop()) -EXTENDED_MEMORY=0 - cd LIB #required for ifenvsetnew: ld < utilitiesLib.munch # disable floating point exceptions slsFppInit -# setup mount points -ifenvsetnew (ifName(),"SLSFS01","129.129.145.52","172.19.11.101","172.20.10.10") -hostAdd ("slsfs01",getenv("SLSFS01")) -nfsMount (&sysBootHost, "/ioc", "/ioc") -nfsMount (&sysBootHost, "/home/ioc", "/home/ioc") -nfsMount ("slsfs01","/export/csa/releases/work","/work") -nfsMount ("slsfs01","/export/csa/releases/prod","/prod") -nfsMount ("slsfs01","/export/csa/releases/devl","/devl") -nfsMount ("slsfs01","/export/exchange","/exchange") -# cd to now mounted direcotry -cd LIB - # load EPICS system core ld < iocCoreLibrary.munch + # load EPICS tools like "require" ld < miscLib.munch misc_registerRecordDeviceDriver # next line allows to continue even if mounting of /ioc failed cd bootInfo("%H:") - cd HOME -# setup logging -ifenvsetnew(ifName(),"EPICS_IOC_LOG_INET","129.129.128.46","172.19.84.63","172.20.20.30") -putenv("EPICS_IOC_LOG_PORT=6500") - # insert boot infos into database bootNotify (INSTBASE, "sls/bin/iocBootNotify.sh") -# run EPICS only on 1st network port -putenv("EPICS_CA_AUTO_ADDR_LIST=NO") -putenv(bootInfo("EPICS_CA_ADDR_LIST=%B")) -putenv(bootInfo("EPICS_CAS_INTF_ADDR_LIST=%e")) -putenv("EPICS_CAS_AUTO_BEACON_ADDR_LIST=NO") -putenv(bootInfo("EPICS_CAS_BEACON_ADDR_LIST=%B")) - # try for user-defined menus scan and convert dbLoadDatabase("dbd/scan.dbd") dbLoadDatabase("dbd/convert.dbd") dbLoadDatabase("dbd/slsConvert.dbd") -#load standard drivers +# load standard drivers require "base" require "symbDev" require "seq" -# setup clock: -# 2008: putenv("TIMEZONE=MET::-60:033002:102603") -# 2009: -putenv("TIMEZONE=MET::-60:032902:102503") -# 2010: putenv("TIMEZONE=MET::-60:032802:103103") -# 2011: putenv("TIMEZONE=MET::-60:032702:103003") -# 2012: putenv("TIMEZONE=MET::-60:032502:102803") -ifenvsetnew(ifName(),"EPICS_TS_NTP_INET","129.129.190.1","172.19.11.101","172.20.10.10") +# setup clock require "generalTime" #EvtTimeConfigure(master?, sync_rate_sec, clock_rate_hz, master_port, slave_port, time_out_msec) EvtTimeConfigure(0, 5, 500000, 18323, 18322, 250) AUTOSRHOST=bootHost() -# $Id: R3.14.8,v 1.1 2009/12/22 11:03:10 zimoch Exp $ +# $Id: R3.14.8,v 1.2 2010/01/04 12:43:59 zimoch Exp $ # end of startup.script_common diff --git a/common b/common deleted file mode 100644 index 625fbc3..0000000 --- a/common +++ /dev/null @@ -1,61 +0,0 @@ -# set extended memory size (for startup.script_part3) -EXTENDED_MEMORY=sysPhysMemTop()-sysMemTop() - -cd LIB -#required for ifenvsetnew: -ld < utilitiesLib -# disable floating point exceptions -slsFppInit - -# setup mount points -ifenvsetnew (ifName(),"SLSFS01","129.129.145.52","172.19.11.101","172.20.10.10") -hostAdd ("slsfs01",getenv("SLSFS01")) -nfsMount (&sysBootHost, "/ioc", "/ioc") -nfsMount (&sysBootHost, "/home/ioc", "/home/ioc") -nfsMount ("slsfs01","/export/csa/releases/work","/work") -nfsMount ("slsfs01","/export/csa/releases/prod","/prod") -nfsMount ("slsfs01","/export/csa/releases/devl","/devl") -nfsMount ("slsfs01","/export/exchange","/exchange") -# cd to now mounted direcotry -cd LIB - -# load EPICS system core -ld < iocCore -ld < seq -# load EPICS tools like "require" -ld < miscLib -# next line allows to continue even if mounting failed -cd bootInfo("%H:") -cd HOME - -# setup logging -ifenvsetnew(ifName(),"EPICS_IOC_LOG_INET","129.129.128.46","172.19.84.63","172.20.20.30") -putenv("EPICS_IOC_LOG_PORT=6500") - -# insert boot infos into database -bootNotify (INSTBASE, "sls/bin/iocBootNotify.sh") - -# run EPICS only on 1st network port -putenv("EPICS_CA_AUTO_ADDR_LIST=NO") -putenv(bootInfo("EPICS_CA_ADDR_LIST=%B")) -putenv(bootInfo("EPICS_CAS_INTF_ADDR_LIST=%e")) -putenv("EPICS_CAS_AUTO_BEACON_ADDR_LIST=NO") -putenv(bootInfo("EPICS_CAS_BEACON_ADDR_LIST=%B")) - -# try for user-defined menus scan and convert -dbLoadDatabase("dbd/scan.dbd") -dbLoadDatabase("dbd/convert.dbd") -dbLoadDatabase("dbd/slsConvert.dbd") - -#load standard drivers -require "base" -require "slsDev" -require "ipac" - -# setup clock -putenv("EPICS_TS_MIN_WEST=-60") -ifenvsetnew(ifName(),"EPICS_TS_NTP_INET","129.129.190.1","172.19.11.101","172.20.10.10") -TSconfigure(0,10,10,18323,18322,250,1) - -# $Id: common,v 1.1 2009/12/22 11:03:10 zimoch Exp $ -# end of startup.script_common diff --git a/getbcast b/getbcast deleted file mode 100755 index b91926a..0000000 --- a/getbcast +++ /dev/null @@ -1 +0,0 @@ -/sbin/ifconfig | awk -F "[ :]+" '/Bcast/ { print $6}' diff --git a/startup.script_common b/startup.script_common index b9b7b79..2efc226 100644 --- a/startup.script_common +++ b/startup.script_common @@ -35,7 +35,24 @@ LIB=malloc(80) sprintf (LIB, "%s/iocBoot/%s/%s", INSTBASE, EPICS, ARCH) TEMPLATES=malloc(80) -sprintf (TEMPLATES, "%s/iocBoot/templates", INSTBASE) +sprintf (TEMPLATES, ".:%s/iocBoot/templates", INSTBASE) + +# Router for SLS machine net (fails otherwise but that's ok) +routeAdd ("0.0.0.0","172.20.10.1") + +# setup mount points (try both possible locations for /ioc) +hostAdd ("slsfs","129.129.145.52") +nfsMount (&sysBootHost, "/home/ioc", "/home/ioc") +nfsMount (&sysBootHost, "/ioc", "/ioc") +nfsMount ("slsfs", "/export/csa/releases/ioc", "/ioc") +nfsMount ("slsfs","/export/csa/releases/work","/work") +nfsMount ("slsfs","/export/csa/releases/prod","/prod") +nfsMount ("slsfs","/export/csa/releases/devl","/devl") +nfsMount ("slsfs","/export/exchange","/exchange") + +# All T2-code is compiled with -mlongcall. Thus enable extended memory. +memAddToPool (sysMemTop(),sysPhysMemTop()-sysMemTop()) +EXTENDED_MEMORY=0 #Load EPICS version dependent script sprintf (STRINGBUFFER, "%s/iocBoot/startup/%s", INSTBASE, EPICS) diff --git a/startup.script_iocmon b/startup.script_iocmon index 926bd68..af76658 100644 --- a/startup.script_iocmon +++ b/startup.script_iocmon @@ -1,2 +1,2 @@ require "iocmon" -dbLoadDatabase("iocmon.template", TEMPLATES, bootInfo("CRATE=%T")) +dbLoadDatabase("iocmon.template", TEMPLATES, bootInfo("IOC=%T,CRATE=%T")) diff --git a/startup.script_linux b/startup.script_linux index 400fee5..c2f0ec4 100644 --- a/startup.script_linux +++ b/startup.script_linux @@ -1,3 +1,4 @@ epicsEnvSet EPICS, R3.14.8 epicsEnvSet STREAM_PROTOCOL_PATH, .:$(PWD)/cfg epicsEnvSet EPICS_DRIVER_PATH, bin:snl:$(INSTBASE)/iocBoot/$(EPICS)/$(EPICS_HOST_ARCH) +! iocBootNotify.sh $(IOC) - $(SHELLBOX) - $(_) $(PWD)/startup.script - $(EPICS) - diff --git a/startup.script_part2 b/startup.script_part2 index 4a84a48..6c2ec56 100644 --- a/startup.script_part2 +++ b/startup.script_part2 @@ -1,4 +1,26 @@ # 2nd part of common startup + +# setup clock: +# must be done AFTER loading iocCore and BEFORE iocInit +#ifenvsetnew(ifName(),"EPICS_TS_NTP_INET","129.129.190.1","172.19.11.101","172.20.10.10") +putenv("EPICS_TS_NTP_INET=129.129.190.1") +# 2010: +putenv("TIMEZONE=MET::-60:032802:103103") +# 2011: putenv("TIMEZONE=MET::-60:032702:103003") +# 2012: putenv("TIMEZONE=MET::-60:032502:102803") +putenv("EPICS_TS_MIN_WEST=-60") + +# setup logging on boot PC +putenv(bootInfo("EPICS_IOC_LOG_INET=%h")) +putenv("EPICS_IOC_LOG_PORT=6500") + +# run EPICS only on 1st network port +putenv("EPICS_CA_AUTO_ADDR_LIST=NO") +putenv(bootInfo("EPICS_CA_ADDR_LIST=%B")) +putenv(bootInfo("EPICS_CAS_INTF_ADDR_LIST=%e")) +putenv("EPICS_CAS_AUTO_BEACON_ADDR_LIST=NO") +putenv(bootInfo("EPICS_CAS_BEACON_ADDR_LIST=%B")) + iocInit # initialize records diff --git a/syncTS b/syncTS index 2d6c20b..8e7b495 100644 --- a/syncTS +++ b/syncTS @@ -1,46 +1,22 @@ -# set extended memory size (for startup.script_part3) -EXTENDED_MEMORY=sysPhysMemTop()-sysMemTop() - -cd LIB -#required for ifenvsetnew: -ld < utilitiesLib -# disable floating point exceptions -slsFppInit - -# setup mount points -ifenvsetnew (ifName(),"SLSFS01","129.129.145.52","172.19.11.101","172.20.10.10") -hostAdd ("slsfs01",getenv("SLSFS01")) -nfsMount (&sysBootHost, "/ioc", "/ioc") -nfsMount (&sysBootHost, "/home/ioc", "/home/ioc") -nfsMount ("slsfs01","/export/csa/releases/work","/work") -nfsMount ("slsfs01","/export/csa/releases/prod","/prod") -nfsMount ("slsfs01","/export/csa/releases/devl","/devl") -nfsMount ("slsfs01","/export/exchange","/exchange") -# cd to now mounted direcotry cd LIB # load EPICS system core ld < iocCore.syncTS ld < seq + # load EPICS tools like "require" +ld < utilitiesLib ld < miscLib -# next line allows to continue even if mounting failed + +# disable floating point exceptions +slsFppInit + +# next line allows to continue even if mounting of /ioc failed cd bootInfo("%H:") cd HOME -# setup logging -ifenvsetnew(ifName(),"EPICS_IOC_LOG_INET","129.129.128.46","172.19.84.63","172.20.20.30") -putenv("EPICS_IOC_LOG_PORT=6500") - # insert boot infos into database -bootNotify (SLSBASE, "sls/bin/iocBootNotify.sh") - -# run EPICS only on 1st network port -putenv("EPICS_CA_AUTO_ADDR_LIST=NO") -putenv(bootInfo("EPICS_CA_ADDR_LIST=%B")) -putenv(bootInfo("EPICS_CAS_INTF_ADDR_LIST=%e")) -putenv("EPICS_CAS_AUTO_BEACON_ADDR_LIST=NO") -putenv(bootInfo("EPICS_CAS_BEACON_ADDR_LIST=%B")) +bootNotify (INSTBASE, "sls/bin/iocBootNotify.sh") # try for user-defined menus scan and convert dbLoadDatabase("dbd/scan.dbd") @@ -49,16 +25,12 @@ dbLoadDatabase("dbd/slsConvert.dbd") #load standard drivers require "base" -require "slsDev" -require "ipac" # setup clock require "mrcevg" require "mrcevr" require "TSstat" -putenv("EPICS_TS_MIN_WEST=-60") -ifenvsetnew(ifName(),"EPICS_TS_NTP_INET","129.129.190.2","172.19.11.101","172.20.10.10") TSconfigure(0,20,1000,18323,18322,250,0) -# $Id: syncTS,v 1.1 2009/12/22 11:03:11 zimoch Exp $ +# $Id: syncTS,v 1.2 2010/01/04 12:43:59 zimoch Exp $ # end of startup.script_common