-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to ACAP 4 Native SDK and open62541 1.4.4 (#55)
This patchset moves to the ACAP 4 Native SDK. This means we drop support for (really) old devices. If you need to build with the ACAP 3 SDK for old devices, please use the previous commit as your base since that will work fine for that. With the move to ACAP 4 Native SDK, we can drop the support for this repo to be built with locally installed SDKs (that nobody uses these days anyway) and then move the build of open62541 from Makefile into the Dockerfile instead. The patchset also bumps open62541 to version 1.4.4. Signed-off-by: Joakim Roubert <[email protected]>
- Loading branch information
1 parent
7ad3229
commit ff78807
Showing
6 changed files
with
71 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,30 @@ | ||
.PHONY: %.eap dockerbuild 3rd-party-clean clean very-clean | ||
.PHONY: %.eap dockerbuild clean | ||
|
||
PROG = opcuaserver | ||
SRCS = $(wildcard *.c) | ||
OBJS = $(SRCS:.c=.o) | ||
STRIP ?= strip | ||
|
||
PKGS = gio-2.0 glib-2.0 axparameter | ||
PKGS = gio-2.0 glib-2.0 axparameter open62541 | ||
CFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags $(PKGS)) | ||
LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs $(PKGS)) | ||
|
||
# open62541 | ||
OPEN62541_VERSION = 1.2.9 | ||
OPEN62541 = open62541-$(OPEN62541_VERSION) | ||
OPEN62541_BUILD = $(OPEN62541)/$(CROSS_COMPILE)build | ||
|
||
LIBOPEN62541 = $(OPEN62541_BUILD)/bin/libopen62541.a | ||
CFLAGS += -I $(OPEN62541)/include -I $(OPEN62541_BUILD)/src_generated -I $(OPEN62541)/arch -I $(OPEN62541)/deps -I $(OPEN62541)/plugins/include | ||
LDLIBS += $(OPEN62541_BUILD)/bin/libopen62541.a | ||
|
||
CFLAGS += -Wformat=2 -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wdisabled-optimization -Wall -Werror | ||
LDFLAGS += -flto=auto | ||
|
||
# main targets | ||
all: $(PROG) | ||
$(STRIP) $(PROG) | ||
|
||
$(OBJS): $(LIBOPEN62541) | ||
|
||
$(PROG): $(OBJS) | ||
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(LDLIBS) -o $@ | ||
|
||
# open62541 targets | ||
$(OPEN62541): | ||
curl -L https://github.com/open62541/open62541/archive/refs/tags/v$(OPEN62541_VERSION).tar.gz | tar xz | ||
|
||
$(OPEN62541_BUILD): $(OPEN62541) | ||
mkdir -p $(OPEN62541_BUILD) | ||
|
||
$(OPEN62541_BUILD)/Makefile: | $(OPEN62541_BUILD) | ||
cd $(OPEN62541_BUILD) && \ | ||
cmake -j -DBUILD_SHARED_LIBS=OFF -DUA_BUILD_EXAMPLES=OFF .. | ||
|
||
$(LIBOPEN62541): $(OPEN62541_BUILD)/Makefile | ||
make -j -C $(OPEN62541_BUILD) | ||
|
||
# docker build container targets | ||
%.eap: | ||
DOCKER_BUILDKIT=1 docker build --build-arg ARCH=$(basename $@) -o type=local,dest=. "$(CURDIR)" | ||
DOCKER_BUILDKIT=1 docker build --build-arg ARCH=$(*F) -o type=local,dest=. "$(CURDIR)" | ||
|
||
dockerbuild: armv7hf.eap aarch64.eap | ||
|
||
# clean targets | ||
3rd-party-clean: | ||
rm -rf $(OPEN62541_BUILD) | ||
|
||
clean: | ||
rm -f $(PROG) *.o *.eap *LICENSE.txt pa*conf* | ||
|
||
very-clean: clean 3rd-party-clean | ||
rm -rf *.eap *.eap.old $(OPEN62541) eap | ||
rm -f $(PROG) *.o *.eap* *LICENSE.txt pa*conf* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
{ | ||
"schemaVersion": "1.3", | ||
"schemaVersion": "1.7.0", | ||
"acapPackageConf": { | ||
"setup": { | ||
"appName": "opcuaserver", | ||
"friendlyName": "OPC UA Server", | ||
"vendor": "Axis Communications AB", | ||
"embeddedSdkVersion": "3.0", | ||
"user": { | ||
"username": "sdk", | ||
"group": "sdk" | ||
}, | ||
"vendorUrl": "https://www.axis.com/", | ||
"runMode": "respawn", | ||
"version": "1.2.6" | ||
"version": "2.0.0" | ||
}, | ||
"configuration": { | ||
"paramConfig": [ | ||
{"name": "port", "type": "int:min=1024,max=65535", "default": "4840"} | ||
] | ||
} | ||
}, | ||
"resources": { | ||
"dbus": { | ||
"requiredMethods": [ | ||
"com.axis.IOControl.State.GetNbrPorts", | ||
"com.axis.IOControl.State.GetState", | ||
"com.axis.TemperatureController.GetNbrOfTemperatureSensors", | ||
"com.axis.TemperatureController.RegisterForTemperatureChangeSignal" | ||
] | ||
} | ||
} | ||
} |
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