update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
From 913c2cc740d60450e91e066cf38f5654936a6015 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cercueil <paul.cercueil@analog.com>
|
||||
Date: Mon, 6 Feb 2017 14:04:47 +0100
|
||||
Subject: [PATCH] utilities.c: Add a check for newlocale() function
|
||||
|
||||
uClibc might define __UCLIBC_HAS_LOCALE__, without actually providing
|
||||
the locale_t type or the setlocale() function.
|
||||
|
||||
Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
iio-config.h.cmakein | 1 +
|
||||
utilities.c | 2 +-
|
||||
3 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cb3a48f..b24eff3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -66,6 +66,7 @@ endif()
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(strdup "string.h" HAS_STRDUP)
|
||||
check_symbol_exists(strerror_r "string.h" HAS_STRERROR_R)
|
||||
+check_symbol_exists(newlocale "locale.h" HAS_NEWLOCALE)
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
option(WITH_IIOD "Build the IIO Daemon" ON)
|
||||
diff --git a/iio-config.h.cmakein b/iio-config.h.cmakein
|
||||
index 1b8608e..6700326 100644
|
||||
--- a/iio-config.h.cmakein
|
||||
+++ b/iio-config.h.cmakein
|
||||
@@ -21,6 +21,7 @@
|
||||
#cmakedefine HAS_PIPE2
|
||||
#cmakedefine HAS_STRDUP
|
||||
#cmakedefine HAS_STRERROR_R
|
||||
+#cmakedefine HAS_NEWLOCALE
|
||||
#cmakedefine HAS_PTHREAD_SETNAME_NP
|
||||
#cmakedefine HAVE_IPV6
|
||||
#cmakedefine HAVE_AVAHI
|
||||
diff --git a/utilities.c b/utilities.c
|
||||
index 88b8257..21dbd10 100644
|
||||
--- a/utilities.c
|
||||
+++ b/utilities.c
|
||||
@@ -34,7 +34,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef LOCALE_SUPPORT
|
||||
-#if defined(__MINGW32__)
|
||||
+#if defined(__MINGW32__) || (!defined(_WIN32) && !defined(HAS_NEWLOCALE))
|
||||
static int read_double_locale(const char *str, double *val)
|
||||
{
|
||||
char *end, *old_locale;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
106
bsp/buildroot-2017.02.11/package/libiio/Config.in
Normal file
106
bsp/buildroot-2017.02.11/package/libiio/Config.in
Normal file
@@ -0,0 +1,106 @@
|
||||
config BR2_PACKAGE_LIBIIO
|
||||
bool "libiio"
|
||||
select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if !BR2_PACKAGE_LIBIIO_XML_BACKEND
|
||||
help
|
||||
Libiio is a library to ease the development of software
|
||||
interfacing Linux Industrial I/O (IIO) devices.
|
||||
|
||||
http://wiki.analog.com/resources/tools-software/linux-software/libiio
|
||||
|
||||
if BR2_PACKAGE_LIBIIO
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
|
||||
bool "Local backend"
|
||||
default y
|
||||
help
|
||||
Enable the local backend of the library.
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_XML_BACKEND
|
||||
bool "XML backend"
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
default y
|
||||
help
|
||||
Enable the XML backend of the library.
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
|
||||
bool "Network backend"
|
||||
select BR2_PACKAGE_LIBIIO_XML_BACKEND
|
||||
default y
|
||||
help
|
||||
Enable the network backend of the library.
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_USB_BACKEND
|
||||
bool "USB backend"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # from libusb
|
||||
select BR2_PACKAGE_LIBIIO_XML_BACKEND
|
||||
select BR2_PACKAGE_LIBUSB
|
||||
default y
|
||||
help
|
||||
Enable the USB backend of the library.
|
||||
|
||||
comment "The USB backend needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_SERIAL_BACKEND
|
||||
bool "Serial backend"
|
||||
select BR2_PACKAGE_LIBIIO_XML_BACKEND
|
||||
select BR2_PACKAGE_LIBSERIALPORT
|
||||
default y
|
||||
help
|
||||
Enable the serial backend of the library.
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_IIOD
|
||||
bool "IIO Daemon"
|
||||
select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_bfin
|
||||
default y
|
||||
help
|
||||
Install the IIO Daemon.
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_IIOD_USBD
|
||||
bool "USB support in the IIO Daemon (FunctionFS)"
|
||||
depends on BR2_PACKAGE_LIBIIO_IIOD
|
||||
depends on BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 # usb_functionfs_descs_head_v2
|
||||
select BR2_PACKAGE_LIBAIO
|
||||
help
|
||||
Add support for USB through FunctionFS with IIOD.
|
||||
|
||||
comment "USB support in the IIO Daemon requires libaio, headers >= 3.18"
|
||||
depends on BR2_PACKAGE_LIBIIO_IIOD
|
||||
depends on !BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS || \
|
||||
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
|
||||
|
||||
comment "IIO Daemon needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_bfin
|
||||
|
||||
comment "IIO Daemon is not yet available on Blackfin"
|
||||
depends on BR2_bfin
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_TESTS
|
||||
bool "Install test programs"
|
||||
select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
|
||||
select BR2_PACKAGE_LIBIIO_XML_BACKEND
|
||||
select BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
help
|
||||
Install the test programs (iio_info, iio_genxml, iio_readdev).
|
||||
|
||||
comment "IIO test programs need a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP
|
||||
bool "Install C# bindings"
|
||||
depends on BR2_PACKAGE_MONO
|
||||
help
|
||||
Install the C# bindings.
|
||||
|
||||
config BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON
|
||||
bool "Install Python bindings"
|
||||
depends on BR2_PACKAGE_PYTHON
|
||||
help
|
||||
Install the Python bindings.
|
||||
|
||||
endif
|
||||
30
bsp/buildroot-2017.02.11/package/libiio/S99iiod
Normal file
30
bsp/buildroot-2017.02.11/package/libiio/S99iiod
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Server-side demuxing by default
|
||||
IIOD_OPTS=-D
|
||||
|
||||
[ -r /etc/default/iiod ] && . /etc/default/iiod
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting IIO Server Daemon"
|
||||
start-stop-daemon -S -b -q -m -p /var/run/iiod.pid -x /usr/sbin/iiod -- $IIOD_OPTS
|
||||
exit $?
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping IIO Server Daemon"
|
||||
start-stop-daemon -K -q -p /var/run/iiod.pid 2>/dev/null
|
||||
exit $?
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
2
bsp/buildroot-2017.02.11/package/libiio/libiio.hash
Normal file
2
bsp/buildroot-2017.02.11/package/libiio/libiio.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# From https://github.com/analogdevicesinc/libiio/archive/v0.9/
|
||||
sha256 b6184876d192fbfd51e3a0a29736fa1be2dbaf07370cf861797076f40a85f823 libiio-0.9.tar.gz
|
||||
94
bsp/buildroot-2017.02.11/package/libiio/libiio.mk
Normal file
94
bsp/buildroot-2017.02.11/package/libiio/libiio.mk
Normal file
@@ -0,0 +1,94 @@
|
||||
################################################################################
|
||||
#
|
||||
# libiio
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBIIO_VERSION = 0.9
|
||||
LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION))
|
||||
LIBIIO_INSTALL_STAGING = YES
|
||||
LIBIIO_LICENSE = LGPLv2.1+
|
||||
LIBIIO_LICENSE_FILES = COPYING.txt
|
||||
|
||||
LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \
|
||||
-DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \
|
||||
-DWITH_NETWORK_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \
|
||||
-DWITH_MATLAB_BINDINGS_API=OFF \
|
||||
-DMATLAB_BINDINGS=OFF \
|
||||
-DINSTALL_UDEV_RULE=$(if $(BR2_PACKAGE_HAS_UDEV),ON,OFF) \
|
||||
-DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \
|
||||
-DWITH_DOC=OFF
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND),y)
|
||||
LIBIIO_DEPENDENCIES += libxml2
|
||||
LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=ON
|
||||
else
|
||||
LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND),y)
|
||||
LIBIIO_DEPENDENCIES += libusb
|
||||
LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=ON
|
||||
else
|
||||
LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND),y)
|
||||
LIBIIO_DEPENDENCIES += libserialport
|
||||
LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=ON
|
||||
else
|
||||
LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
|
||||
LIBIIO_DEPENDENCIES += host-flex host-bison
|
||||
LIBIIO_CONF_OPTS += -DWITH_IIOD=ON
|
||||
else
|
||||
LIBIIO_CONF_OPTS += -DWITH_IIOD=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD_USBD),y)
|
||||
LIBIIO_DEPENDENCIES += libaio
|
||||
LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=ON
|
||||
else
|
||||
LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=OFF
|
||||
endif
|
||||
|
||||
# Avahi support in libiio requires avahi-client, which needs avahi-daemon and dbus
|
||||
ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
|
||||
LIBIIO_DEPENDENCIES += avahi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
|
||||
LIBIIO_DEPENDENCIES += python
|
||||
LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
|
||||
else
|
||||
LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP),y)
|
||||
define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
|
||||
rm $(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll.mdb
|
||||
$(HOST_DIR)/usr/bin/gacutil -root $(TARGET_DIR)/usr/lib -i \
|
||||
$(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll
|
||||
endef
|
||||
define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
|
||||
$(HOST_DIR)/usr/bin/gacutil -root $(STAGING_DIR)/usr/lib -i \
|
||||
$(STAGING_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll
|
||||
endef
|
||||
LIBIIO_POST_INSTALL_TARGET_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
|
||||
LIBIIO_POST_INSTALL_STAGING_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
|
||||
LIBIIO_DEPENDENCIES += mono
|
||||
LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=ON
|
||||
else
|
||||
LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
|
||||
define LIBIIO_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/libiio/S99iiod \
|
||||
$(TARGET_DIR)/etc/init.d/S99iiod
|
||||
endef
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user