diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3a2a65a..41e30d8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,9 +6,9 @@ "target": "developer", "args": { // Native target development settings ============================== - "TARGET_ARCHITECTURE": "linux-x86_64" + "EPICS_TARGET_ARCH": "linux-x86_64" // Local cross compilation settings ================================ - // "TARGET_ARCHITECTURE": "RTEMS-beatnik", + // "EPICS_TARGET_ARCH": "RTEMS-beatnik", // "RUNTIME": "ghcr.io/epics-containers/rtems-proxy" } }, diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c364054..19ac849 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,7 +66,7 @@ jobs: platforms: ${{ matrix.platform }} target: ${{ matrix.target }} build-args: | - TARGET_ARCHITECTURE=${{ matrix.epics-target }} + EPICS_TARGET_ARCH=${{ matrix.epics-target }} EPICS_HOST_ARCH=${{ matrix.epics-host }} IMAGE_EXT=${{ matrix.extension }} ${{ matrix.runtime }} @@ -88,7 +88,7 @@ jobs: platforms: ${{ matrix.platform }} target: ${{ matrix.target }} build-args: | - TARGET_ARCHITECTURE=${{ matrix.epics-target }} + EPICS_TARGET_ARCH=${{ matrix.epics-target }} EPICS_HOST_ARCH=${{ matrix.epics-host }} IMAGE_EXT=${{ matrix.extension }} ${{ matrix.runtime }} diff --git a/.gitlab/kanikobuild.sh b/.gitlab/kanikobuild.sh index b49f4c3..75a3284 100644 --- a/.gitlab/kanikobuild.sh +++ b/.gitlab/kanikobuild.sh @@ -19,7 +19,7 @@ else DESTINATION=$CI_PROD_REGISTRY/$PROJECT_PATH/$CI_PROJECT_NAME fi -CMDROOT="/kaniko/executor --context $CI_PROJECT_DIR --build-arg TARGET_ARCHITECTURE=${ARCH}" +CMDROOT="/kaniko/executor --context $CI_PROJECT_DIR --build-arg EPICS_TARGET_ARCH=${ARCH}" CMD=$CMDROOT" --target ${TARGET}" CMD=$CMD" --destination $DESTINATION-${ARCH}-${TARGET}:$CI_COMMIT_TAG" diff --git a/build b/build index 0c65475..b894efd 100755 --- a/build +++ b/build @@ -6,15 +6,15 @@ set -e -# set TARGET_ARCHITECTURE to rtems for RTEMS based targets -T_A=${TARGET_ARCHITECTURE:-linux_x86_64} +# set EPICS_TARGET_ARCH to rtems for RTEMS based targets +T_A=${EPICS_TARGET_ARCH:-linux_x86_64} # set TARGET to runtime for runtime images TARGET=${TARGET:-developer} # set TAG to override the default tag TAG=${TAG:-ec_test} if [[ ${T_A} != "linux_x86_64" ]]; then - # container image extension is the lcase of TARGET_ARCHITECTURE + # container image extension is the lcase of EPICS_TARGET_ARCH IMAGE_EXT=-"${T_A,,}" if [ "$T_A" = "RTEMS-beatnik" ]; then runtime="--build-arg RUNTIME=ghcr.io/epics-containers/rtems-proxy" @@ -33,6 +33,6 @@ if [ ! -d ibek-support ] ; then git submodule update --init ; fi # build and developer images set -x $docker build $buildx -t ${TAG} "${@}" $load \ - --build-arg TARGET_ARCHITECTURE=$T_A \ + --build-arg EPICS_TARGET_ARCH=$T_A \ --build-arg IMAGE_EXT=$IMAGE_EXT \ $runtime --target $TARGET . diff --git a/ibek-support b/ibek-support index 31c4d30..4253847 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit 31c4d30bd331a4849a56549ec22f4d4ecd15d5c2 +Subproject commit 425384791a32aa0b40b236733bdda5776a31f548 diff --git a/ioc/.iocsh_history b/ioc/.iocsh_history new file mode 100644 index 0000000..d8117f3 --- /dev/null +++ b/ioc/.iocsh_history @@ -0,0 +1,51 @@ +# EPICS IOC Startup Script generated by https://github.com/epics-containers/ibek +cd "/epics/ioc" +epicsEnvSet EPICS_TZ GMT0BST +dbLoadDatabase dbd/ioc.dbd +ioc_registerRecordDeviceDriver pdbbase +# Create IP Port (PortName, IPAddr) +pmacAsynIPConfigure("BRICK1port", "172.23.240.97:1025") +# Configure Model 3 Controller Driver (ControlerPort, LowLevelDriverPort, Address, Axes, MovingPoll, IdlePoll) +pmacCreateController("BRICK1", "BRICK1port", 0, 4, 100, 1000) +# Configure Model 3 Axes Driver (Controler Port, Axis Count) +pmacCreateAxes("BRICK1", 4) +# Create CS (CSPortName, ControllerPort, CSNumber, ProgramNumber) +pmacCreateCS("CS2", "BRICK1", 1, 10) +# Configure Model 3 CS Axes Driver (CSPortName, CSAxisCount) +pmacCreateCSAxes("CS2", 9) +# Create CS (CSPortName, ControllerPort, CSNumber, ProgramNumber) +pmacCreateCS("CS1", "BRICK1", 2, 10) +# Configure Model 3 CS Axes Driver (CSPortName, CSAxisCount) +pmacCreateCSAxes("CS1", 9) +# Create CS (CSPortName, ControllerPort, CSNumber, ProgramNumber) +pmacCreateCS("CS3", "BRICK1", 3, 10) +# Configure Model 3 CS Axes Driver (CSPortName, CSAxisCount) +pmacCreateCSAxes("CS3", 9) +dbLoadRecords /epics/runtime/ioc.db +iocInit +# EPICS IOC Startup Script generated by https://github.com/epics-containers/ibek +cd "/epics/ioc" +epicsEnvSet EPICS_TZ GMT0BST +dbLoadDatabase dbd/ioc.dbd +ioc_registerRecordDeviceDriver pdbbase +# Create IP Port (PortName, IPAddr) +pmacAsynIPConfigure("BRICK1port", "172.23.240.97:1025") +# Configure Model 3 Controller Driver (ControlerPort, LowLevelDriverPort, Address, Axes, MovingPoll, IdlePoll) +pmacCreateController("BRICK1", "BRICK1port", 0, 4, 100, 1000) +# Configure Model 3 Axes Driver (Controler Port, Axis Count) +pmacCreateAxes("BRICK1", 4) +# Create CS (CSPortName, ControllerPort, CSNumber, ProgramNumber) +pmacCreateCS("CS2", "BRICK1", 1, 10) +# Configure Model 3 CS Axes Driver (CSPortName, CSAxisCount) +pmacCreateCSAxes("CS2", 9) +# Create CS (CSPortName, ControllerPort, CSNumber, ProgramNumber) +pmacCreateCS("CS1", "BRICK1", 2, 10) +# Configure Model 3 CS Axes Driver (CSPortName, CSAxisCount) +pmacCreateCSAxes("CS1", 9) +# Create CS (CSPortName, ControllerPort, CSNumber, ProgramNumber) +pmacCreateCS("CS3", "BRICK1", 3, 10) +# Configure Model 3 CS Axes Driver (CSPortName, CSAxisCount) +pmacCreateCSAxes("CS3", 9) +dbLoadRecords /epics/runtime/ioc.db +iocInit +dbl diff --git a/ioc/install.sh b/ioc/install.sh index e47d208..f2b4d9a 100755 --- a/ioc/install.sh +++ b/ioc/install.sh @@ -5,7 +5,7 @@ x86_cfg='./configure/CONFIG_SITE.Common.linux-x86_64' # for RTEMS builds don't build for the host architecture, target only -if [[ $TARGET_ARCHITECTURE == "RTEMS"* ]]; then +if [[ $EPICS_TARGET_ARCH == "RTEMS"* ]]; then touch ${x86_cfg} sed -i '/VALID_BUILDS/d' ${x86_cfg} echo "VALID_BUILDS=Host" >> ${x86_cfg} diff --git a/ioc/start.sh b/ioc/start.sh index 141e296..42039bc 100755 --- a/ioc/start.sh +++ b/ioc/start.sh @@ -155,7 +155,7 @@ fi # Launch the IOC *************************************************************** -if [[ ${TARGET_ARCHITECTURE} == "linux-x86_64" ]] ; then +if [[ ${EPICS_TARGET_ARCH} == "linux-x86_64" ]] ; then # Execute the IOC binary and pass the startup script as an argument exec ${IOC}/bin/linux-x86_64/ioc ${final_ioc_startup} else