-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from epics-containers/embedded-ioc
Update to ibek 2.6 and embedded ioc source
- Loading branch information
Showing
21 changed files
with
366 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ibek-support
updated
33 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*~ | ||
O.* | ||
bin | ||
dbd | ||
db | ||
data | ||
lib | ||
.svn* | ||
iocs/*IOC* | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TOP = . | ||
include $(TOP)/configure/CONFIG | ||
|
||
DIRS += configure | ||
DIRS += iocApp/src | ||
|
||
include $(TOP)/configure/RULES_TOP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# CONFIG - Load build configuration data | ||
# | ||
# Do not make changes to this file! | ||
|
||
# Allow user to override where the build rules come from | ||
RULES = $(EPICS_BASE) | ||
|
||
# RELEASE files point to other application tops | ||
include $(TOP)/configure/RELEASE | ||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common | ||
ifdef T_A | ||
-include $(TOP)/configure/RELEASE.Common.$(T_A) | ||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A) | ||
endif | ||
|
||
CONFIG = $(RULES)/configure | ||
include $(CONFIG)/CONFIG | ||
-include $(CONFIG)/CONFIG.Dls | ||
|
||
# Override the Base definition: | ||
INSTALL_LOCATION = $(TOP) | ||
|
||
# CONFIG_SITE files contain other build configuration settings | ||
include $(TOP)/configure/CONFIG_SITE | ||
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common | ||
ifdef T_A | ||
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A) | ||
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A) | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# CONFIG_SITE | ||
|
||
CROSS_COMPILER_TARGET_ARCHS = | ||
CHECK_RELEASE = NO | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
TOP=.. | ||
|
||
include $(TOP)/configure/CONFIG | ||
|
||
TARGETS = $(CONFIG_TARGETS) | ||
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS))) | ||
|
||
include $(TOP)/configure/RULES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# The following definitions must be changed for each site | ||
# | ||
# Common prefixes | ||
SUPPORT=/epics/support | ||
include $(SUPPORT)/configure/RELEASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# RULES | ||
|
||
-include $(CONFIG)/RULES.Dls | ||
include $(CONFIG)/RULES | ||
|
||
# Library should be rebuilt because LIBOBJS may have changed. | ||
$(LIBNAME): ../Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#RULES.ioc | ||
include $(CONFIG)/RULES.ioc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#RULES_DIRS | ||
include $(CONFIG)/RULES_DIRS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#RULES_TOP | ||
include $(CONFIG)/RULES_TOP | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generic IOC Makefile | ||
|
||
TOP = ../.. | ||
include $(TOP)/configure/CONFIG | ||
|
||
PROD_IOC = ioc | ||
DBD += ioc.dbd | ||
ioc_DBD += base.dbd | ||
|
||
# add in the dbds collected by ibek during container build | ||
ioc_DBD += $(shell cat /epics/support/configure/dbd_list) | ||
|
||
ioc_SRCS += ioc_registerRecordDeviceDriver.cpp | ||
|
||
# add in the libs collected by ibek during container build | ||
ioc_LIBS += $(shell cat /epics/support/configure/lib_list) | ||
|
||
ioc_LIBS += $(EPICS_BASE_IOC_LIBS) | ||
ioc_SRCS += iocMain.cpp | ||
|
||
include $(TOP)/configure/RULES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* This file was automatically generated on Fri 25 May 2018 08:06:10 BST from | ||
* source: /home/hgv27681/R3.14.12.3/support/pmac/etc/makeIocs/lab.xml | ||
* | ||
* *** Please do not edit this file: edit the source file instead. *** | ||
* */ | ||
#include "epicsExit.h" | ||
#include "epicsThread.h" | ||
#include "iocsh.h" | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
if(argc>=2) { | ||
iocsh(argv[1]); | ||
epicsThreadSleep(.2); | ||
} | ||
iocsh(NULL); | ||
epicsExit(0); | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
TOP=/epics/ioc | ||
cd ${TOP} | ||
CONFIG_DIR=${TOP}/config | ||
|
||
set -ex | ||
|
||
CONFIG_DIR=/epics/ioc/config | ||
THIS_SCRIPT=$(realpath ${0}) | ||
override=${CONFIG_DIR}/liveness.sh | ||
|
||
if [[ -f ${override} && ${override} != ${THIS_SCRIPT} ]]; then | ||
exec bash ${override} | ||
fi | ||
|
||
if [[ ${K8S_IOC_LIVENESS_ENABLED} != 'true' ]]; then | ||
exit 0 | ||
fi | ||
|
||
# use devIOCStats UPTIME as the default liveness PV | ||
# but allow override from the environment | ||
K8S_IOC_PV=${K8S_IOC_PV:-"${IOC_PREFIX}:UPTIME"} | ||
|
||
# use default CA PORT or override from the environment | ||
K8S_IOC_PORT=${K8S_IOC_PORT:-5064} | ||
|
||
export EPICS_CA_ADDR_LIST=${K8S_IOC_ADDRESS} | ||
export EPICS_CA_SERVER_PORT=${K8S_IOC_PORT} | ||
|
||
# verify that the IOC is running | ||
if caget ${K8S_IOC_PV} ; then | ||
exit 0 | ||
else | ||
# send the error message to the container's main process stdout | ||
echo "Liveness check failed for ${IOC_NAME}" > /proc/1/fd/1 | ||
echo "Failing PV: ${K8S_IOC_PV}" > /proc/1/fd/2 | ||
echo "Address list: ${EPICS_CA_ADDR_LIST}" > /proc/1/fd/2 | ||
echo "CA Port: ${EPICS_CA_SERVER_PORT}" > /proc/1/fd/2 | ||
exit 1 | ||
fi |
Oops, something went wrong.