libiio: new package
PATCH v5 1/1 libiio: new package
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
v2: Simplify greatly the patch (upstream now uses CMake)
v3: Add support for IPv6 and allow installation of systemd service file
v4: Added .hash file
v5: Rework libiio.mk and init.d scripts after feedback from upstream
--- package/Config.in | 1 + package/libiio/Config.in | 43 +++++++++++++++++++++++++++++++++++++++ package/libiio/S99iiod.sh | 40 +++++++++++++++++++++++++++++++++++++ package/libiio/libiio.hash | 2 ++ package/libiio/libiio.mk | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 package/libiio/Config.in create mode 100644 package/libiio/S99iiod.sh create mode 100644 package/libiio/libiio.hash create mode 100644 package/libiio/libiio.mk
package/Config.in +1 -0
@@ -707,6 +707,7 @@ menu "Hardware handling" source "package/libfreefare/Config.in" source "package/libftdi/Config.in" source "package/libhid/Config.in" + source "package/libiio/Config.in" source "package/libinput/Config.in" source "package/libiqrf/Config.in" source "package/libllcp/Config.in"
package/libiio/Config.in new file +43 -0
43 lines not on this page · raw message
package/libiio/S99iiod.sh new file +40 -0
@@ -0,0 +1,40 @@ +#!/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 $? + ;; + + status) + RET=1 + if [ -f /var/run/iiod.pid ] ; then + kill -0 `cat /var/run/iiod.pid` >/dev/null 2>&1 + RET=$? + fi + + if [ $RET -eq 0 ] ; then + echo "iiod is running" + else + echo "iiod is NOT running" + fi + + exit $RET + ;; + + *) + echo "Usage: $0 {start|stop|status}" + exit 1 +esac
package/libiio/libiio.hash new file +2 -0
@@ -0,0 +1,2 @@ +# From https://github.com/analogdevicesinc/libiio/archive/v0.3/ +sha256 a3571bbf7e80b9e0a8d6bd4b39a5bcd18f80a3d36c4a6f2092dfeefc98e20e07 libiio-v0.3.tar.gz
package/libiio/libiio.mk new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
2.1.3
Thomas Petazzoni
AppliedPATCH v5 1/1 libiio: new package
Dear Paul Cercueil,
Quoted 11 lines · Paul Cercueil
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
v2: Simplify greatly the patch (upstream now uses CMake)
v3: Add support for IPv6 and allow installation of systemd service file
v4: Added .hash file
v5: Rework libiio.mk and init.d scripts after feedback from upstreamSigned-off-by Paul Cercueil <[email protected]>
Quoted 11 lines
--- package/Config.in | 1 + package/libiio/Config.in | 43 +++++++++++++++++++++++++++++++++++++++ package/libiio/S99iiod.sh | 40 +++++++++++++++++++++++++++++++++++++ package/libiio/libiio.hash | 2 ++ package/libiio/libiio.mk | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 package/libiio/Config.in create mode 100644 package/libiio/S99iiod.sh create mode 100644 package/libiio/libiio.hash create mode 100644 package/libiio/libiio.mk
Thanks, applied, after doing a bunch of changes:
[Thomas:
- Remove changelog from the commit log.
- Rename init script to S99iiod instead of S99iiod.sh
- Remove "status" command from init script, and implement "restart" instead.
- Add dependency on thread support in toolchain.
- Fixup indentation in the .mk file.
- Fixup wrapping in the Config.in help text.]
Also, if you don't have any /sys/bus/iio/devices directory, the iiod daemon doesn't start, with a mysterious "Unable to create context" message, which only appears if you start iiod manually (not from the init script). Maybe it should be improved a bit: make sure to have a proper error message, and make sure it gets shown when iiod is started from the init script.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v5 1/1 libiio: new package
Dear Thomas,
Thanks for merging this patch - and thanks for the extra work.
I see you added a dependency on thread support in the toolchain, is it because it breaks some builds if not set?
The library in itself will work just fine on a system without threads, only the IIO Daemon requires threads, that's why I'm asking.
Regards,
Paul Cercueil
Quoted 48 lines · Thomas Petazzoni
Dear Paul Cercueil,
Quoted 18 lines · Paul Cercueil
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
v2: Simplify greatly the patch (upstream now uses CMake)
v3: Add support for IPv6 and allow installation of systemd service file
v4: Added .hash file
v5: Rework libiio.mk and init.d scripts after feedback from upstreamSigned-off-by Paul Cercueil <[email protected]>--- package/Config.in | 1 + package/libiio/Config.in | 43 +++++++++++++++++++++++++++++++++++++++ package/libiio/S99iiod.sh | 40 +++++++++++++++++++++++++++++++++++++ package/libiio/libiio.hash | 2 ++ package/libiio/libiio.mk | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+)Quoted 4 lines
create mode 100644 package/libiio/Config.in
create mode 100644package/libiio/S99iiod.sh
create mode 100644 package/libiio/libiio.hash
create mode 100644package/libiio/libiio.mkThanks, applied, after doing a bunch of changes:
[Thomas:
- Remove changelog from the commit log.
- Rename init script to S99iiod instead ofS99iiod.sh
- Remove "status" command from init script, and implement "restart" instead.
- Add dependency on thread support in toolchain.
- Fixup indentation in the .mk file.
- Fixup wrapping in the Config.in help text.]Also, if you don't have any
/sys/bus/iio/devicesdirectory, the iiod daemon doesn't start, with a mysterious "Unable to create context" message, which only appears if you start iiod manually (not from the init script). Maybe it should be improved a bit: make sure to have a proper error message, and make sure it gets shown when iiod is started from the init script.Thanks!
Thomas
Signature · 4 lines
-- Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, William A. Martin, Margaret Seif
PATCH v5 1/1 libiio: new package
Dear Paul Cercueil,
Quoted 6 lines · Paul Cercueil
Thanks for merging this patch - and thanks for the extra work.
I see you added a dependency on thread support in the toolchain, is it because it breaks some builds if not set?
The library in itself will work just fine on a system without threads, only the IIO Daemon requires threads, that's why I'm asking.
I honestly don't remember. You can try building with the base config
http://autobuild.buildroot.org/toolchains/configs/br-arm-full-nothread.config
and see what breaks (of course after removing the dependency on threads).
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com