initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
From 43a4bc6b750c37f585d03b14941f3633ed5348d8 Mon Sep 17 00:00:00 2001
|
||||
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
|
||||
Date: Tue, 9 Jun 2020 11:30:38 +0300
|
||||
Subject: [PATCH] Fix compilation with GCC10
|
||||
|
||||
Fixed compilation with -fno-common, which enabled in GCC 10 by default.
|
||||
See https://bugs.gentoo.org/707438.
|
||||
[Retrieved from:
|
||||
https://github.com/owfs/owfs/commit/43a4bc6b750c37f585d03b14941f3633ed5348d8]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
module/owserver/src/c/owserver.c | 2 ++
|
||||
module/owserver/src/include/owserver.h | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/module/owserver/src/c/owserver.c b/module/owserver/src/c/owserver.c
|
||||
index db29988e..2ed29161 100644
|
||||
--- a/module/owserver/src/c/owserver.c
|
||||
+++ b/module/owserver/src/c/owserver.c
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "owserver.h"
|
||||
|
||||
+pthread_mutex_t persistence_mutex ;
|
||||
+
|
||||
/* --- Prototypes ------------ */
|
||||
static void SetupAntiloop(int argc, char **argv);
|
||||
|
||||
diff --git a/module/owserver/src/include/owserver.h b/module/owserver/src/include/owserver.h
|
||||
index 8be582f0..a257ed02 100644
|
||||
--- a/module/owserver/src/include/owserver.h
|
||||
+++ b/module/owserver/src/include/owserver.h
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "ow.h"
|
||||
#include "ow_connection.h"
|
||||
|
||||
-pthread_mutex_t persistence_mutex ;
|
||||
+extern pthread_mutex_t persistence_mutex ;
|
||||
#define PERSISTENCELOCK _MUTEX_LOCK( persistence_mutex ) ;
|
||||
#define PERSISTENCEUNLOCK _MUTEX_UNLOCK( persistence_mutex ) ;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_OWFS
|
||||
bool "owfs"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
help
|
||||
OWFS is an easy way to use the powerful 1-wire system of
|
||||
Dallas/Maxim.
|
||||
|
||||
OWFS is a simple and flexible program to monitor and control
|
||||
the physical environment. You can write scripts to read
|
||||
temperature, flash lights, write to an LCD, log and graph,
|
||||
etc.
|
||||
|
||||
http://owfs.org/
|
||||
|
||||
comment "owfs needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
@@ -0,0 +1,31 @@
|
||||
NAME="owserver"
|
||||
DAEMON="/usr/bin/${NAME}"
|
||||
PID_F="/run/${NAME}.pid"
|
||||
|
||||
OWSERVER_ARGS=
|
||||
[ -r /etc/default/${NAME} ] && . /etc/default/${NAME}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting ${NAME}: "
|
||||
if [ -z "${OWSERVER_ARGS}" ]; then
|
||||
echo "OWSERVER_ARGS must be set in defaults file" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
start-stop-daemon -S -x ${DAEMON} -- \
|
||||
--pid_file ${PID_F} ${OWSERVER_ARGS}
|
||||
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping ${NAME}: "
|
||||
start-stop-daemon -K -p ${PID_F}
|
||||
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,33 @@
|
||||
NAME="owfs"
|
||||
DAEMON="/usr/bin/${NAME}"
|
||||
PID_F="/run/${NAME}.pid"
|
||||
OWFS_MOUNTPOINT="/dev/1wire"
|
||||
OWFS_DEVICES="-s localhost:4304"
|
||||
OWFS_ARGS=""
|
||||
|
||||
[ -r /etc/default/${NAME} ] && . /etc/default/${NAME}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting ${NAME}: "
|
||||
# Fuse may be in a module, so try to load it
|
||||
modprobe -q fuse && printf "[fuse] "
|
||||
mkdir -p ${OWFS_MOUNTPOINT}
|
||||
start-stop-daemon -S -x ${DAEMON} -- \
|
||||
--pid_file ${PID_F} -m ${OWFS_MOUNTPOINT} ${OWFS_DEVICES} \
|
||||
${OWFS_ARGS}
|
||||
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping ${NAME}: "
|
||||
start-stop-daemon -K -p ${PID_F}
|
||||
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,4 @@
|
||||
# Locally calculated
|
||||
sha256 b8d33eba57d4a2f6c8a11ff23f233e3248bd75a42c8219b058a888846edd8717 owfs-3.2p3.tar.gz
|
||||
sha256 1f0527ab035eefb5197c68633d06f50f5077c719d82a99344702ceaca29150b9 COPYING
|
||||
sha256 8a6601b893d5784d931b2ede64a406fac463acfbb7014914e27de4d6e68457c3 COPYING.LIB
|
||||
@@ -0,0 +1,108 @@
|
||||
################################################################################
|
||||
#
|
||||
# owfs
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OWFS_VERSION = 3.2p3
|
||||
OWFS_SITE = https://github.com/owfs/owfs/releases/download/v$(OWFS_VERSION)
|
||||
OWFS_DEPENDENCIES = host-pkgconf
|
||||
OWFS_CONF_OPTS = --disable-owperl --without-perl5 --disable-owtcl --without-tcl
|
||||
|
||||
# owtcl license is declared in module/ownet/c/src/include/ow_functions.h
|
||||
OWFS_LICENSE = GPL-2.0+, LGPL-2.0 (owtcl)
|
||||
OWFS_LICENSE_FILES = COPYING COPYING.LIB
|
||||
OWFS_INSTALL_STAGING = YES
|
||||
|
||||
# owfs PHP support is not PHP 7 compliant
|
||||
# https://sourceforge.net/p/owfs/support-requests/32/
|
||||
OWFS_CONF_OPTS += --disable-owphp --without-php
|
||||
|
||||
# Skip man pages processing
|
||||
OWFS_CONF_ENV += ac_cv_path_SOELIM=true
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFUSE),y)
|
||||
OWFS_DEPENDENCIES += libfuse
|
||||
OWFS_CONF_OPTS += \
|
||||
--enable-owfs \
|
||||
--with-fuseinclude=$(STAGING_DIR)/usr/include \
|
||||
--with-fuselib=$(STAGING_DIR)/usr/lib
|
||||
define OWFS_INSTALL_FUSE_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 $(OWFS_PKGDIR)S60owfs \
|
||||
$(TARGET_DIR)/etc/init.d/S60owfs
|
||||
endef
|
||||
define OWFS_CREATE_MOUNTPOINT
|
||||
mkdir -p $(TARGET_DIR)/dev/1wire
|
||||
endef
|
||||
OWFS_POST_INSTALL_TARGET_HOOKS += OWFS_CREATE_MOUNTPOINT
|
||||
else
|
||||
OWFS_CONF_OPTS += --disable-owfs
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFTDI1),y)
|
||||
OWFS_CONF_OPTS += \
|
||||
--enable-ftdi \
|
||||
--with-libftdi-config=$(STAGING_DIR)/usr/bin/libftdi1-config
|
||||
OWFS_DEPENDENCIES += libftdi1
|
||||
else ifeq ($(BR2_PACKAGE_LIBFTDI),y)
|
||||
OWFS_CONF_OPTS += \
|
||||
--enable-ftdi \
|
||||
--with-libftdi-config=$(STAGING_DIR)/usr/bin/libftdi-config
|
||||
OWFS_DEPENDENCIES += libftdi
|
||||
else
|
||||
OWFS_CONF_OPTS += --disable-ftdi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUSB),y)
|
||||
OWFS_CONF_OPTS += --enable-usb
|
||||
OWFS_DEPENDENCIES += libusb
|
||||
else
|
||||
OWFS_CONF_OPTS += --disable-usb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AVAHI),y)
|
||||
OWFS_CONF_OPTS += --enable-avahi
|
||||
OWFS_DEPENDENCIES += avahi
|
||||
else
|
||||
OWFS_CONF_OPTS += --disable-avahi
|
||||
endif
|
||||
|
||||
# setup.py isn't python3 compliant
|
||||
ifeq ($(BR2_PACKAGE_PYTHON),y)
|
||||
OWFS_CONF_OPTS += \
|
||||
--enable-owpython \
|
||||
--with-python \
|
||||
--with-pythonconfig=$(STAGING_DIR)/usr/bin/python-config
|
||||
OWFS_MAKE_ENV += \
|
||||
CC="$(TARGET_CC)" \
|
||||
PYTHONPATH="$(PYTHON_PATH)" \
|
||||
_python_sysroot=$(STAGING_DIR) \
|
||||
_python_prefix=/usr \
|
||||
_python_exec_prefix=/usr
|
||||
OWFS_DEPENDENCIES += python host-swig
|
||||
# The configure scripts finds PYSITEDIR as the python_lib directory of
|
||||
# host-python, and then prepends DESTDIR in front of it. So we end up
|
||||
# installing things in $(TARGET_DIR)/$(HOST_DIR)/lib/python which is
|
||||
# clearly wrong.
|
||||
# Patching owfs to do the right thing is not trivial, it's much easier to
|
||||
# override the PYSITEDIR variable in make.
|
||||
OWFS_EXTRA_MAKE_OPTS += PYSITEDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
|
||||
|
||||
else
|
||||
OWFS_CONF_OPTS += --disable-owpython --without-python
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
# zeroconf support uses dlopen()
|
||||
OWFS_CONF_OPTS += --disable-zero
|
||||
endif
|
||||
|
||||
OWFS_MAKE = $(MAKE) $(OWFS_EXTRA_MAKE_OPTS)
|
||||
|
||||
define OWFS_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 $(OWFS_PKGDIR)S55owserver \
|
||||
$(TARGET_DIR)/etc/init.d/S55owserver
|
||||
$(OWFS_INSTALL_FUSE_INIT_SYSV)
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user