From 6549df76e5e184b27829066e7411029d90d83b80 Mon Sep 17 00:00:00 2001 From: "Lee, Jeong Han" Date: Mon, 26 Aug 2024 17:17:56 -0700 Subject: [PATCH 1/4] add WIP PMAC integration --- configure/CONFIG_MODS | 1 + configure/CONFIG_MODS_DEPS | 1 + configure/RELEASE | 7 ++++++ configure/RULES_MODS_CONFIG | 2 +- docs/README.newmodule.md | 50 +++++++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 docs/README.newmodule.md diff --git a/configure/CONFIG_MODS b/configure/CONFIG_MODS index 19042f1..07b7836 100644 --- a/configure/CONFIG_MODS +++ b/configure/CONFIG_MODS @@ -39,6 +39,7 @@ SRC_GITURL_SNMP:=$(strip $(SRC_URL_JEONGHANLEE))/$(strip $(SRC_NAME_SNMP)) SRC_GITURL_MOTORSIM:=$(strip $(SRC_URL_MOTOR))/$(strip $(SRC_NAME_MOTORSIM)) SRC_GITURL_PYDEVSUP:=$(strip $(SRC_URL_MD))/$(strip $(SRC_NAME_PYDEVSUP)) SRC_GITURL_PVXS:=$(strip $(SRC_URL_MD))/$(strip $(SRC_NAME_PVXS)) +SRC_GITURL_PMAC:=$(strip $(SRC_URL_PMAC))/$(strip $(SRC_NAME_PMAC)) # MODS_INSTALL_LOCATIONS_VARS:=$(filter-out %_EPICS %_ %_BASE %_MODS, $(filter INSTALL_LOCATION_%, $(.VARIABLES))) MODS_INSTALL_LOCATIONS:=$(foreach v, $(MODS_INSTALL_LOCATIONS_VARS), $($(v))) diff --git a/configure/CONFIG_MODS_DEPS b/configure/CONFIG_MODS_DEPS index daa96c2..4fa50b7 100644 --- a/configure/CONFIG_MODS_DEPS +++ b/configure/CONFIG_MODS_DEPS @@ -47,4 +47,5 @@ mca_DEPS:=null.base build.asyn build.calc build.sscan build.busy build.scaler bu measComp_DEPS:=null.base build.asyn build.calc build.sscan build.busy build.scaler build.sequencer build.autosave build.std build.mca motor_DEPS:=null.base build.sequencer build.busy build.lua build.modbus motorMotorSim_DEPS:=null.base build.motor +pmac_DEPS:=null.base build.asyn build.calc build.motor build.busy diff --git a/configure/RELEASE b/configure/RELEASE index 574b9b2..4bc8202 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -189,6 +189,13 @@ SRC_NAME_PVXS:=pvxs SRC_TAG_PVXS:=tags/1.3.1 SRC_VER_PVXS:=1.3.1 # +# https://github.com/DiamondLightSource/pmac +# 2024-07-15 dls-master +SRC_URL_PMAC:=https://github.com/DiamondLightSource +SRC_NAME_PMAC:=pmac +SRC_TAG_PMAC:=3d2e73f +SRC_VER_PMAC:=3d2e73fi +# -include $(TOP)/../RELEASE.local -include $(TOP)/configure/RELEASE.local # diff --git a/configure/RULES_MODS_CONFIG b/configure/RULES_MODS_CONFIG index f4614ab..6ac970d 100644 --- a/configure/RULES_MODS_CONFIG +++ b/configure/RULES_MODS_CONFIG @@ -14,7 +14,7 @@ MODS_ZERO_SHOW:=$(addsuffix .show, $(MODS_ZERO_VARS)) MODS_LIBERA_VARS:=conf.iocStats conf.retools conf.caPutLog conf.recsync conf.autosave conf.sncseq conf.sscan conf.pcas conf.asyn.libera MODS_LIBERA_SHOW:=$(addsuffix .show, $(MODS_LIBERA_VARS)) -MODS_ONE_VARS:=conf.calc conf.asyn conf.modbus conf.lua conf.std conf.StreamDevice conf.busy conf.scaler conf.mca conf.measComp conf.motor conf.motorMotorSim +MODS_ONE_VARS:=conf.calc conf.asyn conf.modbus conf.lua conf.std conf.StreamDevice conf.busy conf.scaler conf.mca conf.measComp conf.motor conf.motorMotorSim conf.pmac MODS_ONE_SHOW:=$(addsuffix .show, $(MODS_ONE_VARS)) .PHONY: conf.release.modules conf.release.modules.show update.pvxs diff --git a/docs/README.newmodule.md b/docs/README.newmodule.md new file mode 100644 index 0000000..866697d --- /dev/null +++ b/docs/README.newmodule.md @@ -0,0 +1,50 @@ +# New Module + +I would like to add the following repository for the production environemnt. + +https://github.com/DiamondLightSource/pmac + +## + +The commit is July 15, 2024 at the `dls-master` branch +In `configure/RELEASE` + + +```bash +# https://github.com/DiamondLightSource/pmac +# 2024-07-15 dls-master +SRC_URL_PMAC:=https://github.com/DiamondLightSource/pmac¶ +SRC_NAME_PMAC:=pmac +SRC_TAG_PMAC:=3d2e73f +SRC_VER_PMAC:=3d2e73f +``` + + Edit `configure/CONFIG_MODS` if the module URL is not `github/epics-modules` + +``` +SRC_GITURL_PMAC:=$(strip $(SRC_URL_PMAC))/$(strip $(SRC_NAME_PMAC)) +``` + + Edit `configure/CONFIG_MODS_DEPS` + +```bash +pmac_DEPS:=null.base build.asyn build.calc build.motor build.busy¶ +``` + + + +* Edit `configure/RULES_MODS_CONFIG` + +Please consult `XXXApp/src/Makefile` to check its real dependency and add the proper configuration name in one of the following variables. + + - `MOD_ZERO_VARS` : This module has only EPICS base dependency. + - `MOD_ONE_VARS` : This module has multiple EPICS modules dependencies. + +pmac has asyn, calc, motor, busy dependencies. So add conf.pmc into MODS_ONE_VARS + +```bash +MODS_ZERO_VARS:=conf.iocStats conf.MCoreUtils conf.retools conf.caPutLog conf.recsync conf.autosave conf.sncseq conf.ether_ip conf.sscan conf.snmp conf.opcua conf.pyDevSup +MODS_ONE_VARS:=conf.calc conf.asyn conf.modbus conf.lua conf.std conf.StreamDevice conf.busy conf.scaler conf.mca +``` + + From 62c330dddeeff0449f6d652b5669f3a73a498e02 Mon Sep 17 00:00:00 2001 From: "Lee, Jeong Han" Date: Tue, 27 Aug 2024 12:54:03 -0700 Subject: [PATCH 2/4] add pmac to 1.1.0-rc1 --- configure/RULES_MODS_CONFIG | 23 +++++++++++++++++++ docs/README.newmodule.md | 46 +++++++++++++++++++++++++++++++++++-- 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/configure/RULES_MODS_CONFIG b/configure/RULES_MODS_CONFIG index 6ac970d..82d1032 100644 --- a/configure/RULES_MODS_CONFIG +++ b/configure/RULES_MODS_CONFIG @@ -348,3 +348,26 @@ conf.motorMotorSim: conf.motorMotorSim.show: conf.release.modules.show cat -b $(TOP)/$(SRC_PATH_MOTORSIM)/configure/CONFIG_SITE cat -b $(TOP)/$(SRC_PATH_MOTORSIM)/configure/RELEASE + +conf.pmac: + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE.linux-x86_64.Common + @echo "INSTALL_LOCATION:=$(INSTALL_LOCATION_PMAC)" > $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "CHECK_RELEASE = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "BUILD_IOCS = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USE_GRAPHICSMAGICK = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH_LIB =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH_INCLUDE =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "WITH_BOOST = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USR_LDFLAGS += -lssh2" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local.linux-x86_64 + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.linux-x86_64.Common + @echo "ASYN=$(INSTALL_LOCATION_ASYN)" > $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "BUSY=$(INSTALL_LOCATION_BUSY)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "CALC=$(INSTALL_LOCATION_CALC)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "MOTOR=$(INSTALL_LOCATION_MOTOR)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "EPICS_BASE:=$(INSTALL_LOCATION_BASE)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + +conf.pmac.show: conf.release.modules.show + cat -b $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + cat -b $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local diff --git a/docs/README.newmodule.md b/docs/README.newmodule.md index 866697d..39fa51a 100644 --- a/docs/README.newmodule.md +++ b/docs/README.newmodule.md @@ -43,8 +43,50 @@ Please consult `XXXApp/src/Makefile` to check its real dependency and add the pr pmac has asyn, calc, motor, busy dependencies. So add conf.pmc into MODS_ONE_VARS ```bash -MODS_ZERO_VARS:=conf.iocStats conf.MCoreUtils conf.retools conf.caPutLog conf.recsync conf.autosave conf.sncseq conf.ether_ip conf.sscan conf.snmp conf.opcua conf.pyDevSup -MODS_ONE_VARS:=conf.calc conf.asyn conf.modbus conf.lua conf.std conf.StreamDevice conf.busy conf.scaler conf.mca +MODS_ONE_VARS:=conf.calc conf.asyn conf.modbus conf.lua conf.std conf.StreamDevice conf.busy conf.scaler conf.mca conf.pmac ``` +Then, add `conf.pmac` and `conf.pmac.show` as follows +```bash +conf.pmac: + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE.linux-x86_64.Common + @echo "INSTALL_LOCATION:=$(INSTALL_LOCATION_PMAC)" > $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "CHECK_RELEASE = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "BUILD_IOCS = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USE_GRAPHICSMAGICK = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH_LIB =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH_INCLUDE =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "WITH_BOOST = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USR_LDFLAGS += -lssh2" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local.linux-x86_64 + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.linux-x86_64.Common + @echo "ASYN=$(INSTALL_LOCATION_ASYN)" > $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "BUSY=$(INSTALL_LOCATION_BUSY)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "CALC=$(INSTALL_LOCATION_CALC)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "MOTOR=$(INSTALL_LOCATION_MOTOR)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "EPICS_BASE:=$(INSTALL_LOCATION_BASE)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + +conf.pmac.show: conf.release.modules.show + cat -b $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + cat -b $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local +``` + +* Commands + +```bash +make reconf.modules +make init.modules +make conf.pmac +make conf.pmac.show + 1 EPICS_BASE:=/home/jeonglee/epics/debian/10/e881cb1/base + 2 SUPPORT= + 1 CHECK_RELEASE = NO + 1 INSTALL_LOCATION:=/home/jeonglee/epics/debian/10/e881cb1/modules/scaler-c7c0bf9 + 1 ASYN=/home/jeonglee/epics/debian/10/e881cb1/modules/asyn-4.41 + 2 AUTOSAVE=/home/jeonglee/epics/debian/10/e881cb1/modules/autosave-5.10.2 +make build.pmac +make install.pmac +make symlinks +``` From d93dc515e10dbdb242daeff1206a5e6f061a3c28 Mon Sep 17 00:00:00 2001 From: "Lee, Jeong Han" Date: Tue, 27 Aug 2024 17:50:55 -0700 Subject: [PATCH 3/4] add a temp solution for Debian 12 --- configure/RULES_MODS_CONFIG | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure/RULES_MODS_CONFIG b/configure/RULES_MODS_CONFIG index 82d1032..73120bb 100644 --- a/configure/RULES_MODS_CONFIG +++ b/configure/RULES_MODS_CONFIG @@ -355,11 +355,12 @@ conf.pmac: @echo "CHECK_RELEASE = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @echo "BUILD_IOCS = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @echo "USE_GRAPHICSMAGICK = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE - @echo "SSH =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE - @echo "SSH_LIB =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH = YES" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH_LIB = /usr/lib/x86_64-linux-gnu" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @echo "SSH_INCLUDE =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @echo "WITH_BOOST = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE - @echo "USR_LDFLAGS += -lssh2" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USR_LDFLAGS += -lssh2 -lssl -ldl -pthread -lcrypto -ldl -pthread -lz" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "PROD_LDFLAGS += -lssh2 -lssl -ldl -pthread -lcrypto -ldl -pthread -lz" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local.linux-x86_64 @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.linux-x86_64.Common @echo "ASYN=$(INSTALL_LOCATION_ASYN)" > $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local From 000c9a3ee1a0ad2014d638c8e78d4d7e330e2f4f Mon Sep 17 00:00:00 2001 From: "Lee, Jeong Han" Date: Tue, 27 Aug 2024 21:05:55 -0700 Subject: [PATCH 4/4] add /usr/lib64 for Redhat variants for PMAC --- configure/RULES_MODS_CONFIG | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure/RULES_MODS_CONFIG b/configure/RULES_MODS_CONFIG index 73120bb..fa765eb 100644 --- a/configure/RULES_MODS_CONFIG +++ b/configure/RULES_MODS_CONFIG @@ -349,6 +349,11 @@ conf.motorMotorSim.show: conf.release.modules.show cat -b $(TOP)/$(SRC_PATH_MOTORSIM)/configure/CONFIG_SITE cat -b $(TOP)/$(SRC_PATH_MOTORSIM)/configure/RELEASE + +# Somehow, pkg-config libssh2 --libs does not return its -L (libpath), +# So we need to find a hack to switch two different paths among Redhat variants and Debian based one. +# For the static link of powerPmacAsynPortSrc +# We don't need to define SSH_INCLUDE, since it is in the default folder conf.pmac: @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE.linux-x86_64.Common @echo "INSTALL_LOCATION:=$(INSTALL_LOCATION_PMAC)" > $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @@ -356,10 +361,14 @@ conf.pmac: @echo "BUILD_IOCS = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @echo "USE_GRAPHICSMAGICK = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @echo "SSH = YES" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE +ifneq ($(wildcard /usr/lib/x86_64-linux-gnu/.*),) @echo "SSH_LIB = /usr/lib/x86_64-linux-gnu" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE +else + @echo "SSH_LIB = /usr/lib64" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE +endif @echo "SSH_INCLUDE =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @echo "WITH_BOOST = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE - @echo "USR_LDFLAGS += -lssh2 -lssl -ldl -pthread -lcrypto -ldl -pthread -lz" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USR_LDFLAGS += -lssh2 -lssl -ldl -pthread -lcrypto -ldl -pthread -lz" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @echo "PROD_LDFLAGS += -lssh2 -lssl -ldl -pthread -lcrypto -ldl -pthread -lz" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local.linux-x86_64 @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.linux-x86_64.Common