initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
From 61f9440dfeacad517965451773371aca0332d700 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Tue, 5 Jan 2021 23:08:53 +0100
|
||||
Subject: [PATCH] CMakeLists.txt: project only contains C code
|
||||
|
||||
Make sure CMake doesn't check for a C++ compiler when it's not needed,
|
||||
as open62541 is in C.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 94ceb127..acc41ab2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.0...3.12)
|
||||
-project(open62541)
|
||||
+project(open62541 C)
|
||||
# set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From a312e82124fb8c9f139d5a40fa5a28123bb77a33 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 10 Jan 2021 14:25:56 +0100
|
||||
Subject: [PATCH] arch/posix/CMakeLists.txt: fix build without threads
|
||||
|
||||
Fix the following build failure without threads:
|
||||
|
||||
[100%] Linking C shared library bin/libopen62541.so
|
||||
/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: cannot find -lpthread
|
||||
collect2: error: ld returned 1 exit status
|
||||
CMakeFiles/open62541.dir/build.make:192: recipe for target 'bin/libopen62541.so.0.0.0' failed
|
||||
make[3]: *** [bin/libopen62541.so.0.0.0] Error 1
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/87ec3c987c991f790757276316d6caf81e635fa2
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
arch/posix/CMakeLists.txt | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/arch/posix/CMakeLists.txt b/arch/posix/CMakeLists.txt
|
||||
index bb24757c..a53c9f2c 100644
|
||||
--- a/arch/posix/CMakeLists.txt
|
||||
+++ b/arch/posix/CMakeLists.txt
|
||||
@@ -20,8 +20,6 @@ if (${_index} GREATER -1 OR "${UA_ARCHITECTURE}" STREQUAL "posix")
|
||||
ua_architecture_append_to_library(netdb ndblib socket)
|
||||
else()
|
||||
ua_architecture_append_to_library(m)
|
||||
- #TODO - Error on first make run if pthread is included conditional?
|
||||
- ua_architecture_append_to_library(pthread)
|
||||
if(UA_MULTITHREADING OR UA_BUILD_UNIT_TESTS)
|
||||
ua_architecture_append_to_library(pthread)
|
||||
endif()
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 0c53fd776af9631c915c8722e1d68ce9a69fa3f6 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Walter <andreas.walter@waltronix.de>
|
||||
Date: Fri, 26 Feb 2021 11:49:25 +0100
|
||||
Subject: [PATCH] fix(core): Explicit cast to avoid compiler warning (#4203)
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/open62541/open62541/commit/0c53fd776af9631c915c8722e1d68ce9a69fa3f6]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
src/ua_types_encoding_binary.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ua_types_encoding_binary.c b/src/ua_types_encoding_binary.c
|
||||
index 0fe88eb98e0..abbd23735d3 100644
|
||||
--- a/src/ua_types_encoding_binary.c
|
||||
+++ b/src/ua_types_encoding_binary.c
|
||||
@@ -319,7 +319,7 @@ static long double
|
||||
unpack754(uint64_t i, unsigned bits, unsigned expbits) {
|
||||
unsigned significandbits = bits - expbits - 1;
|
||||
long double result = (long double)(i&(uint64_t)((1LL<<significandbits)-1));
|
||||
- result /= (1LL<<significandbits);
|
||||
+ result /= (long double)(1LL<<significandbits);
|
||||
result += 1.0f;
|
||||
unsigned bias = (unsigned)(1<<(expbits-1)) - 1;
|
||||
long long shift = (long long)((i>>significandbits) & (uint64_t)((1LL<<expbits)-1)) - bias;
|
||||
@@ -0,0 +1,54 @@
|
||||
From a439daafdc98391eed13e23f93ecfca81d71c731 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Mon, 2 Aug 2021 09:49:48 +0200
|
||||
Subject: [PATCH] CMakeLists.txt: add UA_FORCE_WERROR
|
||||
|
||||
Allow the user to disable -Werror to avoid the following build failures:
|
||||
|
||||
/tmp/instance-0/output-1/build/open62541-v1.2.2/arch/network_tcp.c: In function 'connection_recv':
|
||||
/tmp/instance-0/output-1/build/open62541-v1.2.2/arch/network_tcp.c:96:5: error: conversion to 'unsigned int' from 'int' may change the sign of the result [-Werror=sign-conversion]
|
||||
96 | UA_fd_set(connection->sockfd, &fdset);
|
||||
| ^~~~~~~~~
|
||||
|
||||
/tmp/instance-6/output-1/build/open62541-v1.2.2/plugins/ua_pubsub_udp.c: In function 'UA_PubSubChannelUDPMC_receive':
|
||||
/tmp/instance-6/output-1/build/open62541-v1.2.2/plugins/ua_pubsub_udp.c:477:21: error: conversion to '__suseconds_t' {aka 'int'} from 'UA_UInt32' {aka 'unsigned int'} may change the sign of the result [-Werror=sign-conversion]
|
||||
477 | tmptv.tv_usec = (long int)(timeout % 1000000);
|
||||
| ^
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/911811de81d8abb2a31feb8f27af1592641c6fbc
|
||||
- http://autobuild.buildroot.org/results/f0187b3f2d62e955fddeef4e90f84ba4fd642bd2
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/open62541/open62541/pull/4572]
|
||||
---
|
||||
CMakeLists.txt | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index bc839f27..963460d0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -292,6 +292,8 @@ if(UA_FORCE_CPP)
|
||||
add_definitions(-D__STDC_CONSTANT_MACROS) # We need the UINT32_C define
|
||||
endif()
|
||||
|
||||
+option(UA_FORCE_WERROR "Force compilation with -Werror" ON)
|
||||
+
|
||||
#General PubSub setup
|
||||
option(UA_ENABLE_PUBSUB "Enable the PubSub protocol" OFF)
|
||||
|
||||
@@ -589,7 +591,9 @@ if(NOT UA_FORCE_CPP AND (CMAKE_COMPILER_IS_GNUCC OR "x${CMAKE_C_COMPILER_ID}" ST
|
||||
check_add_cc_flag("-Wall") # Warnings
|
||||
check_add_cc_flag("-Wextra") # More warnings
|
||||
check_add_cc_flag("-Wpedantic") # Standard compliance
|
||||
- check_add_cc_flag("-Werror") # All warnings are errors
|
||||
+ if(UA_FORCE_WERROR)
|
||||
+ check_add_cc_flag("-Werror") # All warnings are errors
|
||||
+ endif()
|
||||
|
||||
check_add_cc_flag("-Wno-static-in-inline") # Clang doesn't like the use of static inline methods inside static inline methods
|
||||
check_add_cc_flag("-Wno-overlength-strings") # May happen in the nodeset compiler when complex values are directly encoded
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
config BR2_PACKAGE_OPEN62541
|
||||
bool "open62541"
|
||||
help
|
||||
open62541 is an open source and free implementation of OPC UA.
|
||||
|
||||
http://open62541.org
|
||||
|
||||
if BR2_PACKAGE_OPEN62541
|
||||
|
||||
choice
|
||||
prompt "namespace zero nodes"
|
||||
help
|
||||
Namespace zero contains the standard-defined nodes. The full
|
||||
namespace zero may not be required for all applications.
|
||||
|
||||
config BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_DEFAULT
|
||||
bool "default"
|
||||
help
|
||||
Use the default namespace zero contents.
|
||||
|
||||
config BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_MINIMAL
|
||||
bool "minimal"
|
||||
help
|
||||
A barebones namespace zero that is compatible with most
|
||||
clients. But this namespace 0 is so small that it does not
|
||||
pass the CTT (Conformance Testing Tools of the OPC
|
||||
Foundation).
|
||||
|
||||
config BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_REDUCED
|
||||
bool "reduced"
|
||||
help
|
||||
Small namespace zero that passes the CTT.
|
||||
|
||||
config BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_FULL
|
||||
bool "full"
|
||||
help
|
||||
Full namespace zero generated from the official XML
|
||||
definitions.
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_PACKAGE_OPEN62541_JSON_ENCODING
|
||||
bool "json encoding"
|
||||
|
||||
config BR2_PACKAGE_OPEN62541_PUBSUB
|
||||
bool "publish/subscribe"
|
||||
help
|
||||
Enable the experimental OPC UA PubSub support. The option
|
||||
will include the PubSub UDP multicast plugin.
|
||||
|
||||
if BR2_PACKAGE_OPEN62541_PUBSUB
|
||||
|
||||
config BR2_PACKAGE_OPEN62541_PUBSUB_DELTAFRAMES
|
||||
bool "publish/subscribe deltaframes"
|
||||
help
|
||||
The PubSub messages differentiate between keyframe (all
|
||||
published values contained) and deltaframe (only changed
|
||||
values contained) messages. Deltaframe messages creation
|
||||
consumes some additional ressources.
|
||||
|
||||
config BR2_PACKAGE_OPEN62541_PUBSUB_INFORMATIONMODEL
|
||||
bool "publish/subscribe information model"
|
||||
depends on BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_REDUCED || \
|
||||
BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_FULL
|
||||
help
|
||||
Enable the information model representation of the PubSub
|
||||
configuration.
|
||||
|
||||
endif # BR2_PACKAGE_OPEN62541_PUBSUB
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 c59c85b519a18350f5014b6e7b7545ee144ceeb15094e75b0b7ecec7dce43dd0 open62541-v1.2.2-br1.tar.gz
|
||||
sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85 LICENSE
|
||||
@@ -0,0 +1,64 @@
|
||||
################################################################################
|
||||
#
|
||||
# open62541
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPEN62541_VERSION = v1.2.2
|
||||
OPEN62541_SITE_METHOD = git
|
||||
OPEN62541_SITE = git://github.com/open62541/open62541.git
|
||||
OPEN62541_GIT_SUBMODULES = YES
|
||||
OPEN62541_INSTALL_STAGING = YES
|
||||
OPEN62541_LICENSE = MPL-2.0
|
||||
OPEN62541_LICENSE_FILES = LICENSE
|
||||
|
||||
# Force Release build to remove -Werror.
|
||||
# Don't use git describe to get the version number.
|
||||
# Disable hardening options to let Buildroot handle it.
|
||||
OPEN62541_CONF_OPTS = \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DGIT_EXECUTABLE=NO \
|
||||
-DOPEN62541_VERSION=$(OPEN62541_VERSION) \
|
||||
-DUA_ENABLE_HARDENING=OFF \
|
||||
-DUA_FORCE_WERROR=OFF
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_MINIMAL),y)
|
||||
OPEN62541_CONF_OPTS += -DUA_NAMESPACE_ZERO=MINIMAL
|
||||
else ifeq ($(BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_REDUCED),y)
|
||||
OPEN62541_CONF_OPTS += -DUA_NAMESPACE_ZERO=REDUCED
|
||||
else ifeq ($(BR2_PACKAGE_OPEN62541_UA_NAMESPACE_ZERO_FULL),y)
|
||||
OPEN62541_CONF_OPTS += -DUA_NAMESPACE_ZERO=FULL
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPEN62541_JSON_ENCODING),y)
|
||||
OPEN62541_CONF_OPTS += -DUA_ENABLE_JSON_ENCODING=ON
|
||||
else
|
||||
OPEN62541_CONF_OPTS += -DUA_ENABLE_JSON_ENCODING=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPEN62541_PUBSUB),y)
|
||||
OPEN62541_CONF_OPTS += -DUA_ENABLE_PUBSUB=ON
|
||||
else
|
||||
OPEN62541_CONF_OPTS += -DUA_ENABLE_PUBSUB=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPEN62541_PUBSUB_DELTAFRAMES),y)
|
||||
OPEN62541_CONF_OPTS += -DUA_ENABLE_PUBSUB_DELTAFRAMES=ON
|
||||
else
|
||||
OPEN62541_CONF_OPTS += -DUA_ENABLE_PUBSUB_DELTAFRAMES=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPEN62541_PUBSUB_INFORMATIONMODEL),y)
|
||||
OPEN62541_CONF_OPTS += -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON
|
||||
else
|
||||
OPEN62541_CONF_OPTS += -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=OFF
|
||||
endif
|
||||
|
||||
# Remove unneeded files
|
||||
define OPEN62541_REMOVE_UNNEEDED_FILES
|
||||
$(RM) -r $(TARGET_DIR)/usr/share/open62541
|
||||
endef
|
||||
|
||||
OPEN62541_POST_INSTALL_TARGET_HOOKS += OPEN62541_REMOVE_UNNEEDED_FILES
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user