Skip to contentSkip to conversation

open62541: Move to version 1.3.6 from meta-networking

PATCH New Ryan Eatmon 1 participant 2 messages Jun 29, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 open62541: Move to version 1.3.6 from meta-networking

Migrate from a locked down version of open62541 to whatever meta-networking wants to point to. We do need to turn on the examples and apply some patches to get the examples to compile.

---
 .../0001-examples-Remove-sys-io.h.patch       | 68 ++++++++++++++
 ...les-client-allow-configurable-server.patch |  4 +-
 .../open62541/open62541_%.bbappend            | 39 ++++++++
 .../open62541/open62541_git.bb                | 91 -------------------
 4 files changed, 110 insertions(+), 92 deletions(-)
 create mode 100644 meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-Remove-sys-io.h.patch
 create mode 100644 meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend
 delete mode 100644 meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb
meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-Remove-sys-io.h.patch new file +68 -0
new file mode 100644
index 00000000..3119fb3d
@@ -0,0 +1,68 @@
+From 123f7274cf6cb65866c910dec16ec1595495d1dc Mon Sep 17 00:00:00 2001
+From: Ryan Eatmon <[email protected]>
+Date: Thu, 29 Jun 2023 11:14:50 -0500
+Subject: [PATCH] examples: Remove sys/io.h
+
+This header is missing on some architectures, aarch64 being one of them.
+
+Upstream-Status: Pending
+
+Signed-off-by: Ryan Eatmon <[email protected]>
+---
+ examples/pubsub_realtime/pubsub_TSN_loopback.c                  | 1 -
+ examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c    | 1 -
+ examples/pubsub_realtime/pubsub_TSN_publisher.c                 | 1 -
+ examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c | 1 -
+ 4 files changed, 4 deletions(-)
+
+diff --git a/examples/pubsub_realtime/pubsub_TSN_loopback.c b/examples/pubsub_realtime/pubsub_TSN_loopback.c
+index 803a3c107..e90015aa3 100644
+--- a/examples/pubsub_realtime/pubsub_TSN_loopback.c
++++ b/examples/pubsub_realtime/pubsub_TSN_loopback.c
+@@ -77,7 +77,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <linux/types.h>
+-#include <sys/io.h>
+ #include <getopt.h>
+ 
+ /* For thread operations */
+diff --git a/examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c b/examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c
+index 7db37e9d5..ba5f7aff6 100644
+--- a/examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c
++++ b/examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c
+@@ -54,7 +54,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <linux/types.h>
+-#include <sys/io.h>
+ #include <getopt.h>
+ 
+ /* For thread operations */
+diff --git a/examples/pubsub_realtime/pubsub_TSN_publisher.c b/examples/pubsub_realtime/pubsub_TSN_publisher.c
+index 945ec3d4f..5ff866908 100644
+--- a/examples/pubsub_realtime/pubsub_TSN_publisher.c
++++ b/examples/pubsub_realtime/pubsub_TSN_publisher.c
+@@ -78,7 +78,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <linux/types.h>
+-#include <sys/io.h>
+ #include <getopt.h>
+ 
+ /* For thread operations */
+diff --git a/examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c b/examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c
+index 72dcd3997..73967577f 100644
+--- a/examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c
++++ b/examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c
+@@ -57,7 +57,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <linux/types.h>
+-#include <sys/io.h>
+ #include <getopt.h>
+ 
+ /* For thread operations */
+-- 
+2.17.1
+
meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch +3 -1
index 97d241ed..742d56ac 100644
@@ -36,8 +36,9 @@ index f04bed9..dfc56f5 100644
 +    UA_StatusCode retval = UA_Client_getEndpoints(client, ua_server,
                                                    &endpointArraySize, &endpointArray);
      if(retval != UA_STATUSCODE_GOOD) {
+         printf("Could not get the endpoints\n");
          UA_Array_delete(endpointArray, endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
-@@ -51,8 +56,8 @@ int main(int argc, char *argv[]) {
+@@ -52,8 +57,8 @@ int main(int argc, char *argv[]) {
      UA_Array_delete(endpointArray,endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
  
      /* Connect to a server */
@@ -46,6 +47,7 @@ index f04bed9..dfc56f5 100644
 +    /* anonymous connect would be: retval = UA_Client_connect(client, ua_server); */
 +    retval = UA_Client_connect_username(client, ua_server, "user1", "password");
      if(retval != UA_STATUSCODE_GOOD) {
+         printf("Could not connect\n");
          UA_Client_delete(client);
          return EXIT_FAILURE;
 -- 
meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend new file +39 -0
new file mode 100644
index 00000000..7ce16235
@@ -0,0 +1,39 @@
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI:append = " file://0001-examples-client-allow-configurable-server.patch \
+                   file://0001-examples-Remove-sys-io.h.patch \
+"
+
+EXTRA_OECMAKE = "-DUA_BUILD_EXAMPLES=1"
+
+# Install examples and unit tests
+do_install:append() {
+    # Install examples
+    install -d "${D}${datadir}/${BPN}/examples"
+    for example in ${B}/bin/examples/*
+    do
+        install -m 755 "$example" "${D}${datadir}/${BPN}/examples"
+    done
+
+    if ${@bb.utils.contains('PACKAGECONFIG','unit_tests','true','false',d)}
+    then
+        # Install unittests
+        install -d "${D}${datadir}/${BPN}/tests"
+        for test in ${B}/bin/tests/*
+        do
+            install -m 755 "$test" "${D}${datadir}/${BPN}/tests"
+        done
+    fi
+}
+
+PACKAGES =+ "${PN}-examples ${PN}-tests"
+FILES:${PN}-dev += "${libdir}/cmake/* ${datadir}/${BPN}/tools"
+FILES:${PN}-examples += "${datadir}/${BPN}/examples"
+FILES:${PN}-tests += "${datadir}/${BPN}/tests"
+
+# Allow staticdev package to be empty incase sharedlibs is switched on
+ALLOW_EMPTY:${PN}-staticdev = "1"
+ALLOW_EMPTY:${PN}-tests = "1"
+
+BBCLASSEXTEND = "native nativesdk"
+
meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb deleted +0 -91

91 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 arago.conf: Remove open62541 pkgconfig

The newer version of open62541 has encryption by default, and the available options changed in 1.3.6. So remove our setting.

---
 meta-arago-distro/conf/distro/arago.conf | 3 ---
 1 file changed, 3 deletions(-)
meta-arago-distro/conf/distro/arago.conf +0 -3
index 59b09dcc..d9f84cbd 100644
@@ -107,9 +107,6 @@ PACKAGECONFIG:append:pn-piglit = " \
 PACKAGECONFIG:pn-opengl-es-cts = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "surfaceless", d)}"
 PACKAGECONFIG:pn-vulkan-cts = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "surfaceless", d)}"
 
-# Enable encryption support in open62541
-PACKAGECONFIG:append:pn-open62541 = " encrypt"
-
 # Enable netperf intervals/pacing and histogram
 PACKAGECONFIG:append:pn-netperf = " intervals histogram"
 
Signature · 1 line
2.17.1