diff mbox

linux-zigbee: new package

Message ID 1399139280-9258-1-git-send-email-maxime.hadjinlian@gmail.com
State Accepted
Headers show

Commit Message

Maxime Hadjinlian May 3, 2014, 5:48 p.m. UTC
linux-zigbee is a mix of utility tools that implements a 802.15.4 stack
along with a usefull library for any program that would need to use this
stack.

Note that the name is mislead, for licensing reason, this does *NOT*
implement the ZigBee protocol.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 package/Config.in                                  |  1 +
 package/linux-zigbee/Config.in                     | 28 ++++++++++++
 ...igbee-0001-test-serial-Remove-test-serial.patch | 52 ++++++++++++++++++++++
 package/linux-zigbee/linux-zigbee.mk               | 28 ++++++++++++
 4 files changed, 109 insertions(+)
 create mode 100644 package/linux-zigbee/Config.in
 create mode 100644 package/linux-zigbee/linux-zigbee-0001-test-serial-Remove-test-serial.patch
 create mode 100644 package/linux-zigbee/linux-zigbee.mk

Comments

Thomas Petazzoni June 9, 2014, 12:25 p.m. UTC | #1
Dear Maxime Hadjinlian,

On Sat,  3 May 2014 19:48:00 +0200, Maxime Hadjinlian wrote:
> linux-zigbee is a mix of utility tools that implements a 802.15.4 stack
> along with a usefull library for any program that would need to use this
> stack.
> 
> Note that the name is mislead, for licensing reason, this does *NOT*
> implement the ZigBee protocol.
> 
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>

I've committed this patch, after making a fairly significant number of
changes. From the git commit log:

    [Thomas:
     - add dependency on threads, propagated from libnl
     - improve the Config.in description by borrowing more text from the
       upstream website
     - fix the prompt of sub-options to be more consistent, and add help
       texts where appropriate
     - fix indentation of the BR2_PACKAGE_LINUX_ZIGBEE_TESTS option help
       text
     - add missing dependencies on host-pkgconf, host-flex and host-bison
     - add missing SoB line in the patch disabling test-serial. Maxime is
       a well-known contributor, so I assumed we had his SoB.
     - fix indentation of <pkg>_CONF_OPT.
     - remove <pkg>_INSTALL_STAGING = YES since the package does not
       install any library, and the two headers it installs are available
       through the toolchain kernel headers.
     - add comment to explain <pkg>_AUTORECONF = YES.]

Thanks!

Thomas
Thomas Petazzoni Aug. 9, 2016, 8:46 p.m. UTC | #2
Hello,

On Sat,  3 May 2014 19:48:00 +0200, Maxime Hadjinlian wrote:
> linux-zigbee is a mix of utility tools that implements a 802.15.4 stack
> along with a usefull library for any program that would need to use this
> stack.
> 
> Note that the name is mislead, for licensing reason, this does *NOT*
> implement the ZigBee protocol.
> 
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>

FWIW, following a build failure on this package, I did a patch, which I
submitted upstream. Here is the answer I got from upstream (more
precisely Alexander Aring) :

"""
Thanks for the patch, but this userspace software is unmaintained.
You should use wpan-tools [0] which used nl802154, this is available
since kernel 3.19.

It's not recommended to use the stack in earlier kernel versions.
We don't have a stable strategy yet (except extrem imporant fixed,
root exploit, etc. :-))

- Alex

[0] http://wpan.cakelab.org/releases/
"""

Best regards,

Thomas
Khem Raj Aug. 9, 2016, 9:01 p.m. UTC | #3
> On Aug 9, 2016, at 1:46 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> 
> Hello,
> 
> On Sat,  3 May 2014 19:48:00 +0200, Maxime Hadjinlian wrote:
>> linux-zigbee is a mix of utility tools that implements a 802.15.4 stack
>> along with a usefull library for any program that would need to use this
>> stack.
>> 
>> Note that the name is mislead, for licensing reason, this does *NOT*
>> implement the ZigBee protocol.
>> 
>> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> 
> FWIW, following a build failure on this package, I did a patch, which I
> submitted upstream. Here is the answer I got from upstream (more
> precisely Alexander Aring) :
> 
> """
> Thanks for the patch, but this userspace software is unmaintained.
> You should use wpan-tools [0] which used nl802154, this is available
> since kernel 3.19.
> 
> It's not recommended to use the stack in earlier kernel versions.
> We don't have a stable strategy yet (except extrem imporant fixed,
> root exploit, etc. :-))

This is quite valuable feedback I believe. Helps you to decide
if you want to add a new package which is unmaintained and take
up maintaining it.

> 
> - Alex
> 
> [0] http://wpan.cakelab.org/releases/
> """
> 
> Best regards,
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni Aug. 9, 2016, 9:05 p.m. UTC | #4
Hello,

On Tue, 9 Aug 2016 14:01:02 -0700, Khem Raj wrote:

> > FWIW, following a build failure on this package, I did a patch, which I
> > submitted upstream. Here is the answer I got from upstream (more
> > precisely Alexander Aring) :
> > 
> > """
> > Thanks for the patch, but this userspace software is unmaintained.
> > You should use wpan-tools [0] which used nl802154, this is available
> > since kernel 3.19.
> > 
> > It's not recommended to use the stack in earlier kernel versions.
> > We don't have a stable strategy yet (except extrem imporant fixed,
> > root exploit, etc. :-))  
> 
> This is quite valuable feedback I believe. Helps you to decide
> if you want to add a new package which is unmaintained and take
> up maintaining it.

On the other, not everyone may be able to use the latest nl802154
stack, since it's available only since 3.19. So some people might be
stuck using the older userspace tools.

Thomas
Maxime Hadjinlian Aug. 10, 2016, 7:58 a.m. UTC | #5
Hi Thomas, all

On Tue, Aug 9, 2016 at 11:05 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Tue, 9 Aug 2016 14:01:02 -0700, Khem Raj wrote:
>
>> > FWIW, following a build failure on this package, I did a patch, which I
>> > submitted upstream. Here is the answer I got from upstream (more
>> > precisely Alexander Aring) :
>> >
>> > """
>> > Thanks for the patch, but this userspace software is unmaintained.
>> > You should use wpan-tools [0] which used nl802154, this is available
>> > since kernel 3.19.
>> >
>> > It's not recommended to use the stack in earlier kernel versions.
>> > We don't have a stable strategy yet (except extrem imporant fixed,
>> > root exploit, etc. :-))
>>
>> This is quite valuable feedback I believe. Helps you to decide
>> if you want to add a new package which is unmaintained and take
>> up maintaining it.
>
> On the other, not everyone may be able to use the latest nl802154
> stack, since it's available only since 3.19. So some people might be
> stuck using the older userspace tools.
Which is exactly my situation, thanks for the feedback though. I'll
keep it in mind when upgrading the kernel that we are using.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 4430241..f5df132 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -939,6 +939,7 @@  source "package/lighttpd/Config.in"
 source "package/linknx/Config.in"
 source "package/links/Config.in"
 source "package/linphone/Config.in"
+source "package/linux-zigbee/Config.in"
 source "package/lrzsz/Config.in"
 source "package/macchanger/Config.in"
 source "package/mii-diag/Config.in"
diff --git a/package/linux-zigbee/Config.in b/package/linux-zigbee/Config.in
new file mode 100644
index 0000000..2917c46
--- /dev/null
+++ b/package/linux-zigbee/Config.in
@@ -0,0 +1,28 @@ 
+config BR2_PACKAGE_LINUX_ZIGBEE
+	bool "linux-zigbee"
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_LIBNL
+	help
+	  IEEE 802.15.4 userspace tools.
+
+	  Note: The name's project is somewhat of a misnomer, because of licensing
+	  issues this does *NOT* implement ZigBee, only IEEE 802.15.4 and 6LoWPAN.
+
+	  http://sourceforge.net/apps/trac/linux-zigbee/
+
+if BR2_PACKAGE_LINUX_ZIGBEE
+
+config BR2_PACKAGE_LINUX_ZIGBEE_TESTS
+	bool "Install tests programs"
+	help
+		Linux-ZigBee build tests programs, select this if you want to install
+		them.
+
+config BR2_PACKAGE_LINUX_ZIGBEE_OLD_KERNEL_COMPAT
+	bool "Enable compatibility with older kernels"
+
+config BR2_PACKAGE_LINUX_ZIGBEE_LEASEFILE
+	string "Specify path for persistent lease storage."
+	default "/var/run/izcoordinator.leases"
+
+endif
diff --git a/package/linux-zigbee/linux-zigbee-0001-test-serial-Remove-test-serial.patch b/package/linux-zigbee/linux-zigbee-0001-test-serial-Remove-test-serial.patch
new file mode 100644
index 0000000..7258ff4
--- /dev/null
+++ b/package/linux-zigbee/linux-zigbee-0001-test-serial-Remove-test-serial.patch
@@ -0,0 +1,52 @@ 
+From 98187a5238939edc889fdaad93b00628b55d1e08 Mon Sep 17 00:00:00 2001
+From: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
+Date: Sat, 3 May 2014 19:43:20 +0200
+Subject: [PATCH] test-serial: Remove test-serial
+
+This folders only contains python tests scripts which would force us to
+enable a dependency to host-python which seems kind of silly since
+theses are only tests scripts.
+---
+ Makefile.am  | 2 +-
+ configure.ac | 6 ------
+ 2 files changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 265f0d7..e7bb1a1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.common
+ 
+ ACLOCAL_AMFLAGS = -I m4
+ 
+-SUBDIRS = lib addrdb src tests test-serial
++SUBDIRS = lib addrdb src tests
+ 
+ include_HEADERS = include/ieee802154.h include/nl802154.h
+ noinst_HEADERS = include/libcommon.h include/addrdb.h include/logging.h
+diff --git a/configure.ac b/configure.ac
+index 17658af..506b289 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -77,11 +77,6 @@ AC_PROG_LIBTOOL
+ AM_PROG_LEX
+ AC_PROG_YACC
+ AC_SUBST(LIBTOOL_DEPS)
+-# Currently the scripts works with python2.x only
+-# Check for this at first
+-AC_PATH_PROG(PYTHON, python2 python2.7 python2.6 python2.5 python)
+-AM_PATH_PYTHON(,, [:])
+-py_CHECK_MAJOR_VERSION([PYTHON_VERSION], [2])
+ AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
+ 
+ # Checks for libraries.
+@@ -135,6 +130,5 @@ AC_CONFIG_FILES([
+ 	addrdb/Makefile
+ 	src/Makefile
+ 	tests/Makefile
+-	test-serial/Makefile
+ ])
+ AC_OUTPUT
+-- 
+1.9.2
+
diff --git a/package/linux-zigbee/linux-zigbee.mk b/package/linux-zigbee/linux-zigbee.mk
new file mode 100644
index 0000000..9aa4da9
--- /dev/null
+++ b/package/linux-zigbee/linux-zigbee.mk
@@ -0,0 +1,28 @@ 
+################################################################################
+#
+# linux-zigbee
+#
+################################################################################
+
+LINUX_ZIGBEE_VERSION = v0.3.1
+LINUX_ZIGBEE_SITE = git://linux-zigbee.git.sourceforge.net/gitroot/linux-zigbee/linux-zigbee
+LINUX_ZIGBEE_LICENSE = GPLv2
+LINUX_ZIGBEE_LICENSE_FILES = COPYING
+LINUX_ZIGBEE_AUTORECONF = YES
+LINUX_ZIGBEE_INSTALL_STAGING = YES
+LINUX_ZIGBEE_DEPENDENCIES = libnl
+
+LINUX_ZIGBEE_CONF_OPT += --disable-manpages\
+        --with-leasefile="$(call qstrip,$(BR2_PACKAGE_LINUX_ZIGBEE_LEASEFILE))"
+
+ifeq ($(BR2_PACKAGE_LINUX_ZIGBEE_TESTS),y)
+LINUX_ZIGBEE_CONF_OPT += --with-zbtestdir='/usr/sbin/'
+else
+LINUX_ZIGBEE_CONF_OPT += --with-zbtestdir=''
+endif
+
+ifeq ($(BR2_PACKAGE_LINUX_ZIGBEE_OLD_KERNEL_COMPAT),y)
+LINUX_ZIGBEE_CONF_OPT += --enable-kernel-compat
+endif
+
+$(eval $(autotools-package))