mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Merge branch 'arm' into node-uldaq
This commit is contained in:
commit
e120535fa8
12 changed files with 32 additions and 24 deletions
|
@ -62,6 +62,12 @@ else()
|
|||
add_compile_options(-Wall -Werror)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND uname -m
|
||||
COMMAND tr -d '\n'
|
||||
OUTPUT_VARIABLE ARCH
|
||||
)
|
||||
|
||||
# Check OS
|
||||
check_include_file("sys/eventfd.h" HAS_EVENTFD)
|
||||
check_include_file("semaphore.h" HAS_SEMAPHORE)
|
||||
|
@ -75,7 +81,6 @@ endif()
|
|||
# Check packages
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(Libwebsockets 2.3.0 REQUIRED)
|
||||
find_package(OpenSSL 1.0.0 REQUIRED)
|
||||
find_package(CURL 7.29 REQUIRED)
|
||||
find_package(Mosquitto)
|
||||
|
@ -100,6 +105,7 @@ pkg_check_modules(RABBITMQ_C IMPORTED_TARGET librabbitmq>=0.8.0)
|
|||
pkg_check_modules(COMEDILIB IMPORTED_TARGET comedilib>=0.11.0)
|
||||
pkg_check_modules(LIBZMQ IMPORTED_TARGET libzmq>=2.2.0)
|
||||
pkg_check_modules(ULDAQ IMPORTED_TARGET libuldaq>=1.0.0)
|
||||
pkg_check_modules(LIBWEBSOCKETS IMPORTED_TARGET libwebsockets>=2.3.0)
|
||||
pkg_check_modules(NANOMSG IMPORTED_TARGET nanomsg)
|
||||
if(NOT NANOMSG_FOUND)
|
||||
pkg_check_modules(NANOMSG IMPORTED_TARGET libnanomsg>=1.0.0)
|
||||
|
|
|
@ -74,7 +74,7 @@ enum log_facilities {
|
|||
LOG_WEBSOCKET = (1L << 29),
|
||||
LOG_OPAL = (1L << 30),
|
||||
LOG_COMEDI = (1L << 31),
|
||||
LOG_IB = (1L << 32),
|
||||
LOG_IB = (1LL << 32),
|
||||
|
||||
/* Classes */
|
||||
LOG_NODES = LOG_NODE | LOG_SOCKET | LOG_FILE | LOG_FPGA | LOG_NGSI | LOG_WEBSOCKET | LOG_OPAL | LOG_IB,
|
||||
|
@ -148,7 +148,7 @@ void log_print(struct log *l, const char *lvl, const char *fmt, ...)
|
|||
void log_vprint(struct log *l, const char *lvl, const char *fmt, va_list va);
|
||||
|
||||
/** Printf alike debug message with level. */
|
||||
void debug(long lvl, const char *fmt, ...)
|
||||
void debug(long long lvl, const char *fmt, ...)
|
||||
__attribute__ ((format(printf, 2, 3)));
|
||||
|
||||
/** Printf alike info message. */
|
||||
|
|
|
@ -34,6 +34,7 @@ set(LIBRARIES
|
|||
PkgConfig::JANSSON
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
m
|
||||
)
|
||||
|
||||
set(LIB_SRC
|
||||
|
@ -72,9 +73,13 @@ set(LIB_SRC
|
|||
table.c
|
||||
bitset.c
|
||||
signal.c
|
||||
tsc.c
|
||||
)
|
||||
|
||||
|
||||
if(ARCH STREQUAL "x86_64")
|
||||
list(APPEND LIB_SRC tsc.c)
|
||||
endif()
|
||||
|
||||
if(IBVERBS_FOUND AND RDMACM_FOUND)
|
||||
list(APPEND LIB_SRC memory/ib.c)
|
||||
endif()
|
||||
|
@ -113,7 +118,7 @@ if(WITH_WEB)
|
|||
)
|
||||
|
||||
list(APPEND INCLUDE_DIRS ${LIBWEBSOCKETS_INCLUDE_DIRS})
|
||||
list(APPEND LIBRARIES websockets_shared)
|
||||
list(APPEND LIBRARIES PkgConfig::LIBWEBSOCKETS)
|
||||
endif()
|
||||
|
||||
if(WITH_API AND WITH_WEB)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
int kernel_get_cacheline_size()
|
||||
{
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && defined(__x86_64__)
|
||||
return sysconf(_SC_LEVEL1_ICACHE_LINESIZE);
|
||||
#else
|
||||
return 64; /** @todo fixme */
|
||||
|
|
|
@ -216,7 +216,7 @@ int log_set_facility_expression(struct log *l, const char *expression)
|
|||
{
|
||||
bool negate;
|
||||
char *copy, *token;
|
||||
long mask = 0, facilities = 0;
|
||||
long long mask = 0, facilities = 0;
|
||||
|
||||
copy = strdup(expression);
|
||||
token = strtok(copy, ",");
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <villas/utils.h>
|
||||
#include <villas/log.h>
|
||||
|
||||
void debug(long class, const char *fmt, ...)
|
||||
void debug(long long class, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ int memory_init(int hugepages)
|
|||
{
|
||||
info("Initialize memory sub-system: #hugepages=%d", hugepages);
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && defined(__x86_64__)
|
||||
int pagecnt, pagesz, ret;
|
||||
struct rlimit l;
|
||||
|
||||
|
@ -85,7 +85,7 @@ int memory_init(int hugepages)
|
|||
if (l.rlim_cur < lock) {
|
||||
if (l.rlim_max < lock) {
|
||||
if (getuid() != 0) {
|
||||
warn("Failed to in increase ressource limit of locked memory from %zu to %zu bytes", l.rlim_cur, lock);
|
||||
warn("Failed to in increase ressource limit of locked memory from %lu to %zu bytes", l.rlim_cur, lock);
|
||||
warn("Please re-run as super-user or raise manually via:");
|
||||
warn(" $ ulimit -Hl %zu", lock);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ int queue_init(struct queue *q, size_t size, struct memory_type *m)
|
|||
if (!IS_POW2(size)) {
|
||||
size_t old_size = size;
|
||||
size = LOG2_CEIL(size);
|
||||
warn("A queue size was changed from %lu to %lu", old_size, size);
|
||||
warn("A queue size was changed from %zu to %zu", old_size, size);
|
||||
}
|
||||
|
||||
q->buffer_mask = size - 1;
|
||||
|
|
|
@ -42,7 +42,7 @@ RUN cmake -DCPACK_GENERATOR=RPM ..
|
|||
RUN make -j$(nproc) doc
|
||||
RUN make -j$(nproc) package
|
||||
|
||||
FROM fedora:28
|
||||
FROM fedora:29
|
||||
|
||||
# Some of the dependencies are only available in our own repo
|
||||
ADD https://packages.fein-aachen.org/redhat/fein.repo /etc/yum.repos.d/
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
FROM fedora:28
|
||||
FROM fedora:29
|
||||
|
||||
ARG GIT_REV=unknown
|
||||
ARG GIT_BRANCH=unknown
|
||||
|
@ -36,12 +36,7 @@ ARG VERSION=unknown
|
|||
ARG VARIANT=unknown
|
||||
|
||||
# Some of the dependencies are only available in our own repo
|
||||
ADD https://packages.fein-aachen.org/redhat/fein.repo /etc/yum.repos.d/
|
||||
|
||||
# We need to use our own RPM packages of libwebsockets
|
||||
# as the official ones do contain the CMake files
|
||||
RUN dnf -y install --repo=fein \
|
||||
libwebsockets-2.4.2
|
||||
ADD https://packages.fein-aachen.org/fedora/fein.repo /etc/yum.repos.d/
|
||||
|
||||
# Toolchain
|
||||
RUN dnf -y install \
|
||||
|
@ -76,15 +71,16 @@ RUN dnf -y install \
|
|||
libcurl-devel \
|
||||
jansson-devel \
|
||||
zeromq-devel \
|
||||
nanomsg-devel \
|
||||
protobuf-devel \
|
||||
protobuf-c-devel \
|
||||
libiec61850-devel \
|
||||
librabbitmq-devel \
|
||||
mosquitto-devel \
|
||||
comedilib-devel comedilib \
|
||||
libibverbs-devel \
|
||||
librdmacm-devel
|
||||
librdmacm-devel \
|
||||
libwebsockets-devel \
|
||||
nanomsg \
|
||||
libiec61850
|
||||
|
||||
# Build & Install Criterion
|
||||
RUN cd /tmp && \
|
||||
|
|
|
@ -117,7 +117,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
const char *uri = "opal-shmem.conf";
|
||||
#else
|
||||
char c;
|
||||
int c;
|
||||
while ((c = getopt(argc, argv, "hV")) != -1) {
|
||||
switch (c) {
|
||||
case 'V':
|
||||
|
|
|
@ -255,7 +255,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
json_t *cfg_cli = json_object();
|
||||
|
||||
char c, *endptr;
|
||||
int c;
|
||||
char *endptr;
|
||||
while ((c = getopt(argc, argv, "Vhxrsd:l:L:t:f:o:")) != -1) {
|
||||
switch (c) {
|
||||
case 'V':
|
||||
|
|
Loading…
Add table
Reference in a new issue