libiio: new package
PATCH v2 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
--- package/Config.in | 1 + package/libiio/Config.in | 42 ++++++++++++++++++++++++++ package/libiio/libiio.mk | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 package/libiio/Config.in create mode 100644 package/libiio/libiio.mk
package/Config.in +1 -0
@@ -665,6 +665,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 +42 -0
42 lines not on this page · raw message
package/libiio/libiio.mk new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH v2 1/1 libiio: new package
Dear Paul Cercueil,
Quoted 5 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
Quoted 8 lines
Signed-off-by Paul Cercueil <[email protected]>--- package/Config.in | 1 + package/libiio/Config.in | 42 ++++++++++++++++++++++++++ package/libiio/libiio.mk | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 package/libiio/Config.in create mode 100644 package/libiio/libiio.mk
Thanks. However, I tested your package, and it fails to build:
make[1]: entrant dans le r?pertoire ? /home/thomas/projets/buildroot/output/build/libiio-2014_R1/iiod ? install --strip-program=/home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-strip -D -s -m 0755 \
iiod /home/thomas/projets/buildroot/output/target/usr/sbin/iiod
install -m 0755 iiod.sh /home/thomas/projets/buildroot/output/target/etc/init.d/iiod.sh update-rc.d iiod.sh defaults 99 01
update-rc.d: /etc/init.d/iiod.sh: file does not exist
make[1]: *** [install] Erreur 1
First, the Makefile should not be calling update-rc.d, and also the init script in /etc/init.d/ should not be named iiod.sh in Buildroot, but directly S<number><name>.
Also, is the install command with stripping is not good for Buildroot:
we want to control whether stripping happens or not.
Quoted 32 lines
package/libiio/libiio.mk new file +32
-0+# Avahi support in libiio requires avahi-client, +# which needs avahi-daemon and dbus +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy) + LIBIIO_DEPENDENCIES += avahi +else + LIBIIO_MAKE_OPTS += WITH_AVAHI=no +endif + +ifneq ($(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),y) + LIBIIO_MAKE_OPTS += WITH_LOCAL_BACKEND=no +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y) + LIBIIO_DEPENDENCIES += libxml2 +else + LIBIIO_MAKE_OPTS += WITH_NETWORK_BACKEND=no +endif + +# Libiio can run without threads +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) + LIBIIO_MAKE_OPTS += WITH_PTHREAD=no +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y) +define LIBIIO_BUILD_IIOD + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod $(LIBIIO_MAKE_OPTS) +endef +define LIBIIO_INSTALL_IIOD + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod install \ + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) +endef +endif
package/libiio/libiio.mk line 56
Quoted 10 lines
package/libiio/libiio.mk new file +10
-0+ +ifeq ($(BR2_PACKAGE_LIBIIO_TESTS),y) +define LIBIIO_BUILD_TESTS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests $(LIBIIO_MAKE_OPTS) +endef +define LIBIIO_INSTALL_TESTS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests install \ + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) +endef +endif
Now that I think of it, you could also do:
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)LIBIIO_MAKE_DIRS += iiod
endif
ifeq ($(BR2_PACKAGE_LIBIIO_TESTS),y)LIBIIO_MAKE_DIRS += tests
endif
package/libiio/libiio.mk line 61
Quoted 4 lines
package/libiio/libiio.mk new file +4
-0+define LIBIIO_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) libiio $(LIBIIO_MAKE_OPTS) + $(LIBIIO_BUILD_IIOD) + $(LIBIIO_BUILD_TESTS)
Replace those last two lines with:
for d in $(LIBIIO_MAKE_DIRS); do \ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d $(LIBIIO_MAKE_OPTS) || break ; \ done
package/libiio/libiio.mk line 73
Quoted 10 lines
package/libiio/libiio.mk new file +10
-0+define LIBIIO_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-sysroot \ + $(LIBIIO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) +endef + +define LIBIIO_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-lib \ + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) + $(LIBIIO_INSTALL_IIOD) + $(LIBIIO_INSTALL_TESTS)
And ditto here.
Note that the Makefile of libiio could make this a little bit nicer by having a build and installation scheme that is easy to work with several make targets.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 libiio: new package
Hi Thomas,
Allright, thank you for your comments. I'll come with something better.
Regards,
Paul
Quoted 120 lines · Thomas Petazzoni
Dear Paul Cercueil,
Quoted 5 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
Quoted 8 lines
Signed-off-by Paul Cercueil <[email protected]>--- package/Config.in | 1 + package/libiio/Config.in | 42 ++++++++++++++++++++++++++ package/libiio/libiio.mk | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+)create mode 100644 package/libiio/Config.in
create mode 100644package/libiio/libiio.mkThanks. However, I tested your package, and it fails to build:
make[1]: entrant dans le r?pertoire ?
/home/thomas/projets/buildroot/output/build/libiio-2014_R1/iiod? install --strip-program=/home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-strip -D -s -m 0755 \
iiod/home/thomas/projets/buildroot/output/target/usr/sbin/iiod
install -m 0755iiod.sh/home/thomas/projets/buildroot/output/target/etc/init.d/iiod.shupdate-rc.diiod.shdefaults 99 01
update-rc.d:/etc/init.d/iiod.sh: file does not exist
make[1]: *** [install] Erreur 1First, the
Makefileshould not be calling update-rc.d, and also the init script in/etc/init.d/should not be namediiod.shin Buildroot, but directly S<number><name>.Also, is the install command with stripping is not good for Buildroot:
we want to control whether stripping happens or not.Quoted 32 lines
package/libiio/libiio.mk new file +32
-0+# Avahi support in libiio requires avahi-client, +# which needs avahi-daemon and dbus +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy) + LIBIIO_DEPENDENCIES += avahi +else + LIBIIO_MAKE_OPTS += WITH_AVAHI=no +endif + +ifneq ($(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),y) + LIBIIO_MAKE_OPTS += WITH_LOCAL_BACKEND=no +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y) + LIBIIO_DEPENDENCIES += libxml2 +else + LIBIIO_MAKE_OPTS += WITH_NETWORK_BACKEND=no +endif + +# Libiio can run without threads +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) + LIBIIO_MAKE_OPTS += WITH_PTHREAD=no +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y) +define LIBIIO_BUILD_IIOD + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod $(LIBIIO_MAKE_OPTS) +endef +define LIBIIO_INSTALL_IIOD + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/iiod install \ + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) +endef +endifpackage/libiio/libiio.mk line 56
Quoted 10 lines
package/libiio/libiio.mk new file +10
-0+ +ifeq ($(BR2_PACKAGE_LIBIIO_TESTS),y) +define LIBIIO_BUILD_TESTS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests $(LIBIIO_MAKE_OPTS) +endef +define LIBIIO_INSTALL_TESTS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tests install \ + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) +endef +endifNow that I think of it, you could also do:
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
LIBIIO_MAKE_DIRS+= iiod
endififeq ($(BR2_PACKAGE_LIBIIO_TESTS),y)
LIBIIO_MAKE_DIRS+= tests
endifpackage/libiio/libiio.mk line 61
Quoted 4 lines
package/libiio/libiio.mk new file +4
-0+define LIBIIO_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) libiio $(LIBIIO_MAKE_OPTS) + $(LIBIIO_BUILD_IIOD) + $(LIBIIO_BUILD_TESTS)Replace those last two lines with:
for d in $(LIBIIO_MAKE_DIRS); do \ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d $(LIBIIO_MAKE_OPTS) || break ; \ donepackage/libiio/libiio.mk line 73
Quoted 10 lines
package/libiio/libiio.mk new file +10
-0+define LIBIIO_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-sysroot \ + $(LIBIIO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) +endef + +define LIBIIO_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-lib \ + $(LIBIIO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) + $(LIBIIO_INSTALL_IIOD) + $(LIBIIO_INSTALL_TESTS)And ditto here.
Note that the
Makefileof libiio could make this a little bit nicer by having a build and installation scheme that is easy to work with several make targets.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