Skip to contentSkip to conversation

ell: new package

PATCH New Peter Seiderer 2 participants 5 messages Nov 5, 2018 – Nov 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ell: new package

---
 package/Config.in                             |  1 +
 ...-standard-sigset_t-fixes-musl-compil.patch | 57 +++++++++++++++++++
 package/ell/Config.in                         | 13 +++++
 package/ell/ell.hash                          |  5 ++
 package/ell/ell.mk                            | 27 +++++++++
 5 files changed, 103 insertions(+)
 create mode 100644 package/ell/0001-ell-signal.h-use-standard-sigset_t-fixes-musl-compil.patch
 create mode 100644 package/ell/Config.in
 create mode 100644 package/ell/ell.hash
 create mode 100644 package/ell/ell.mk
package/Config.in +1 -0
index 712e360402..b60e7700ad 100644
@@ -1608,6 +1608,7 @@ menu "Other"
 	source "package/ding-libs/Config.in"
 	source "package/eigen/Config.in"
 	source "package/elfutils/Config.in"
+	source "package/ell/Config.in"
 	source "package/fftw/Config.in"
 	source "package/flann/Config.in"
 	source "package/flatbuffers/Config.in"
package/ell/0001-ell-signal.h-use-standard-sigset_t-fixes-musl-compil.patch new file +57 -0

57 lines not on this page · raw message

package/ell/Config.in new file +13 -0
new file mode 100644
index 0000000000..8809dc6042
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_ELL
+	bool "ell"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_USE_WCHAR
+	help
+	  Embedded Linux library (ell)
+
+	  https://01.org/ell
+
+comment "ell needs a toolchain w/ dynamic library, wchar"
+	depends on BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR
package/ell/ell.hash new file +5 -0
new file mode 100644
index 0000000000..c6b23baec8
@@ -0,0 +1,5 @@
+# Locally computed
+sha256 8e629347d49d30418e215ccf80f05eb6ff617f752396f93287ed723169aec006 ell-0.13.tar.gz
+
+# License files
+sha256 ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5 COPYING
package/ell/ell.mk new file +27 -0
new file mode 100644
index 0000000000..8ea95a6d77
@@ -0,0 +1,27 @@
+################################################################################
+#
+# ell
+#
+################################################################################
+
+ELL_VERSION = 0.13
+ELL_SITE = https://git.kernel.org/pub/scm/libs/ell/ell.git
+ELL_SITE_METHOD = git
+ELL_LICENSE = LGPL-2.1+
+ELL_LICENSE_FILES = COPYING
+ELL_INSTALL_STAGING = YES
+# sources from git, no configure script provided
+ELL_AUTORECONF = YES
+
+# autoreconf requires an existing build-aux directory
+define ELL_MKDIR_BUILD_AUX
+	mkdir -p $(@D)/build-aux
+endef
+ELL_POST_PATCH_HOOKS += ELL_MKDIR_BUILD_AUX
+
+ELL_DEPENDENCIES = host-pkgconf
+
+# disable ell/glib main loop example
+ELL_CONF_OPTS = --disable-glib
+
+$(eval $(autotools-package))
Signature · 1 line
2.19.1
#1 lore raw

PATCH 2/2 iwd: new package

---
 package/Config.in                             |  1 +
 ...til.c-add-missing-ell-utf8.h-include.patch | 46 +++++++++++++++++++
 ...cap.c-add-missing-sys-stat.h-include.patch | 46 +++++++++++++++++++
 ..._iwd_backtrace_init-availability-det.patch | 32 +++++++++++++
 package/iwd/Config.in                         | 14 ++++++
 package/iwd/iwd.hash                          |  5 ++
 package/iwd/iwd.mk                            | 46 +++++++++++++++++++
 7 files changed, 190 insertions(+)
 create mode 100644 package/iwd/0001-src-util.c-add-missing-ell-utf8.h-include.patch
 create mode 100644 package/iwd/0002-monitor-pcap.c-add-missing-sys-stat.h-include.patch
 create mode 100644 package/iwd/0003-src-main.c-fix-__iwd_backtrace_init-availability-det.patch
 create mode 100644 package/iwd/Config.in
 create mode 100644 package/iwd/iwd.hash
 create mode 100644 package/iwd/iwd.mk
package/Config.in +1 -0
index b60e7700ad..2f2c0dc4e3 100644
@@ -1866,6 +1866,7 @@ menu "Networking applications"
 	source "package/iputils/Config.in"
 	source "package/irssi/Config.in"
 	source "package/iw/Config.in"
+	source "package/iwd/Config.in"
 	source "package/janus-gateway/Config.in"
 	source "package/keepalived/Config.in"
 	source "package/kismet/Config.in"
package/iwd/0001-src-util.c-add-missing-ell-utf8.h-include.patch new file +46 -0

46 lines not on this page · raw message

package/iwd/0002-monitor-pcap.c-add-missing-sys-stat.h-include.patch new file +46 -0

46 lines not on this page · raw message

package/iwd/0003-src-main.c-fix-__iwd_backtrace_init-availability-det.patch new file +32 -0
new file mode 100644
index 0000000000..e6ac3bee45
@@ -0,0 +1,32 @@
+From 5f0fbde7ecfe76fdd437aaf0af34b3726e2c29fb Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Fri, 2 Nov 2018 14:38:37 +0100
+Subject: [PATCH] src/main.c: fix __iwd_backtrace_init() availability detection
+
+Fixes:
+
+  src/main.o: In function `main':
+  main.c:(.text.startup+0x798): undefined reference to `__iwd_backtrace_init'
+  collect2: error: ld returned 1 exit status
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ src/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.c b/src/main.c
+index afb895e..649e301 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -431,7 +431,7 @@ int main(int argc, char *argv[])
+ 	if (debugopt)
+ 		l_debug_enable(debugopt);
+ 
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && defined(HAVE_EXECINFO_H)
+ 	__iwd_backtrace_init();
+ #endif
+ 
+-- 
+2.19.1
+
package/iwd/Config.in new file +14 -0
new file mode 100644
index 0000000000..c65e5e05d2
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_IWD
+	bool "iwd"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # ell
+	depends on !BR2_STATIC_LIBS # ell
+	depends on BR2_USE_WCHAR # ell
+	select BR2_PACKAGE_ELL
+	help
+	  iNet Wireless daemon (iwd)
+
+	  https://iwd.wiki.kernel.org/
+
+comment "iwd needs a toolchain w/ dynamic library, wchar"
+	depends on BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR
package/iwd/iwd.hash new file +5 -0
new file mode 100644
index 0000000000..32018531b2
@@ -0,0 +1,5 @@
+# Locally computed
+sha256 cb071b9e10688e7347bb3f2d6927c27c635614e9a2b1c5eb3ea6203ca2894c05 iwd-0.10.tar.gz
+
+# License files
+sha256 ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5 COPYING
package/iwd/iwd.mk new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
2.19.1
#2 lore raw

PATCH 2/2 iwd: new package

Hello Peter,

Quoted 9 lines · Peter Seiderer
---
 package/Config.in                             |  1 +
 ...til.c-add-missing-ell-utf8.h-include.patch | 46 +++++++++++++++++++
 ...cap.c-add-missing-sys-stat.h-include.patch | 46 +++++++++++++++++++
 ..._iwd_backtrace_init-availability-det.patch | 32 +++++++++++++
 package/iwd/Config.in                         | 14 ++++++
 package/iwd/iwd.hash                          |  5 ++
 package/iwd/iwd.mk                            | 46 +++++++++++++++++++

Entry to DEVELOPERS file is missing.

Quoted 2 lines

+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && defined(HAVE_EXECINFO_H)

The HAVE_EXECINFO_H check is sufficient, checking for __GLIBC__ in addition is not very useful.

Quoted 10 lines
package/iwd/Config.in new file +4 -0
new file mode 100644
index 0000000000..c65e5e05d2
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_IWD
+	bool "iwd"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # ell
+	depends on !BR2_STATIC_LIBS # ell

package/iwd/Config.in line 14

Quoted 10 lines
package/iwd/Config.in new file +10 -0
+	depends on BR2_USE_WCHAR # ell
+	select BR2_PACKAGE_ELL
+	help
+	  iNet Wireless daemon (iwd)
+
+	  https://iwd.wiki.kernel.org/
+
+comment "iwd needs a toolchain w/ dynamic library, wchar"
+	depends on BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR

This needs to be fixed, like I have done for the ell package.

package/iwd/Config.in

Quoted 5 lines
package/iwd/Config.in new file +5 -0
+IWD_VERSION = 0.10
+IWD_SITE = https://git.kernel.org/pub/scm/network/wireless/iwd.git
+IWD_SITE_METHOD = git
+# iwd client depends on readline (GPL-3.0+)
+IWD_LICENSE = LGPL-2.1+, GPL-3.0+ (client)

The , GPL-3.0+ (client) part could instead go...

package/iwd/Config.in

Quoted 3 lines
package/iwd/Config.in new file +3 -0
+ifeq ($(BR2_PACKAGE_READLINE),y)
+IWD_CONF_OPTS += --enable-client
+IWD_DEPENDENCIES += readline

... here, like this:

IWD_LICENSE := $(IWD_LICENSE), GPL-3.0+ (client)

However, with readline enabled, it doesn't build here:

In file included from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/history.h:35:0,
from client/display.c:28:
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/rltypedefs.h:71:28: error: unknown type name ?FILE?

 typedef int rl_getc_func_t PARAMS((FILE *));
                            ^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:429:20: error: unknown type name ?FILE?
 extern int rl_getc PARAMS((FILE *));
                    ^
In file included from client/display.c:29:0:
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:558:8: error: unknown type name ?FILE?
 extern FILE *rl_instream;
        ^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:559:8: error: unknown type name ?FILE?
 extern FILE *rl_outstream;
        ^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:588:8: error: unknown type name ?rl_getc_func_t?
 extern rl_getc_func_t *rl_getc_function;
        ^

/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:917:3: error: unknown type name ?FILE?
FILE *inf;
^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:918:3: error: unknown type name ?FILE?
FILE *outf;
^
make[3]: *** [Makefile:1878: client/display.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1187: all] Error 2
make[1]: *** [package/pkg-generic.mk:232: /home/thomas/projets/buildroot/output/build/iwd-0.10/.stamp_built] Error 2
make: *** [Makefile:84: _all] Error 2

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/2 iwd: new package

Hello Thomas,

Quoted 13 lines · Thomas Petazzoni

Hello Peter,

Quoted 9 lines · Peter Seiderer
---
 package/Config.in                             |  1 +
 ...til.c-add-missing-ell-utf8.h-include.patch | 46 +++++++++++++++++++
 ...cap.c-add-missing-sys-stat.h-include.patch | 46 +++++++++++++++++++
 ..._iwd_backtrace_init-availability-det.patch | 32 +++++++++++++
 package/iwd/Config.in                         | 14 ++++++
 package/iwd/iwd.hash                          |  5 ++
 package/iwd/iwd.mk                            | 46 +++++++++++++++++++  
Quoted 1 line

Entry to DEVELOPERS file is missing.

O.k., will fix...

Quoted 6 lines
Quoted 3 lines
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && defined(HAVE_EXECINFO_H)  

The HAVE_EXECINFO_H check is sufficient, checking for __GLIBC__ in addition is not very useful.

Mhhh, wanted to keep the symmetry to src/backtrace.h halfway:

22 #ifdef __GLIBC__
23 void __iwd_backtrace_init();
24 void __iwd_backtrace_print(unsigned int offset); 25 #endif

Would changing this one to '#if defined(HAVE_EXECINFO_H)' o.k?

The header src/backtrace.h is only included from src/main.c (after including config.h) and (unused) from plugins/ofono.c (without including config.h)...

Quoted 15 lines

plugins/ofono.c

Quoted 14 lines
package/iwd/Config.in new file +8 -0
new file mode 100644
index 0000000000..c65e5e05d2
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_IWD
+	bool "iwd"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # ell
+	depends on !BR2_STATIC_LIBS # ell
+	depends on BR2_USE_WCHAR # ell
+	select BR2_PACKAGE_ELL
+	help
+	  iNet Wireless daemon (iwd)
Quoted 8 lines

package/iwd/Config.in line 14

Quoted 6 lines
package/iwd/Config.in new file +6 -0
+
+	  https://iwd.wiki.kernel.org/
+
+comment "iwd needs a toolchain w/ dynamic library, wchar"
+	depends on BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR  

This needs to be fixed, like I have done for the ell package.

O.k. will do (thanks for fixing it in the ell package)...

Quoted 9 lines

package/iwd/Config.in

Quoted 6 lines
package/iwd/Config.in new file +5 -0
+IWD_VERSION = 0.10
+IWD_SITE = https://git.kernel.org/pub/scm/network/wireless/iwd.git
+IWD_SITE_METHOD = git
+# iwd client depends on readline (GPL-3.0+)
+IWD_LICENSE = LGPL-2.1+, GPL-3.0+ (client)  

The , GPL-3.0+ (client) part could instead go...

Quoted 7 lines

package/iwd/Config.in

Quoted 3 lines
package/iwd/Config.in new file +3 -0
+ifeq ($(BR2_PACKAGE_READLINE),y)
+IWD_CONF_OPTS += --enable-client
+IWD_DEPENDENCIES += readline  

... here, like this:

IWD_LICENSE := $(IWD_LICENSE), GPL-3.0+ (client)

O.k. will do...

Quoted 27 lines

However, with readline enabled, it doesn't build here:

In file included from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/history.h:35:0,
from client/display.c:28:
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/rltypedefs.h:71:28: error: unknown type name ?FILE?

 typedef int rl_getc_func_t PARAMS((FILE *));
                            ^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:429:20: error: unknown type name ?FILE?
 extern int rl_getc PARAMS((FILE *));
                    ^
In file included from client/display.c:29:0:
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:558:8: error: unknown type name ?FILE?
 extern FILE *rl_instream;
        ^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:559:8: error: unknown type name ?FILE?
 extern FILE *rl_outstream;
        ^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:588:8: error: unknown type name ?rl_getc_func_t?
 extern rl_getc_func_t *rl_getc_function;
        ^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:917:3: error: unknown type name ?FILE?
   FILE *inf;
   ^
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/readline/readline.h:918:3: error: unknown type name ?FILE?
   FILE *outf;
   ^
Quoted 5 lines

make[3]: *** [Makefile:1878: client/display.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1187: all] Error 2
make[1]: *** [package/pkg-generic.mk:232: /home/thomas/projets/buildroot/output/build/iwd-0.10/.stamp_built] Error 2
make: *** [Makefile:84: _all] Error 2

Did not happen here, mind to share your defconfig?

Regards,
Peter

Quoted 4 lines

Best regards,

Thomas

#4 lore raw

PATCH 1/2 ell: new package

In reply to Peter Seiderer

Hello,

Quoted 1 line · Peter Seiderer

I've applied, after adjusting two things.

Quoted 6 lines
---
 package/Config.in                             |  1 +
 ...-standard-sigset_t-fixes-musl-compil.patch | 57 +++++++++++++++++++
 package/ell/Config.in                         | 13 +++++
 package/ell/ell.hash                          |  5 ++
 package/ell/ell.mk                            | 27 +++++++++

You forgot to add an entry to the DEVELOPERS file.

package/ell/Config.in line 13

Quoted 3 lines
package/ell/Config.in new file +3 -0
+comment "ell needs a toolchain w/ dynamic library, wchar"
+	depends on BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR

This should have been:

+comment "ell needs a toolchain w/ dynamic library, wchar"
+ depends on BR2_TOOLCHAIN_HAS_SYNC_4
+ depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR

Applied with those two issues fixed. Thanks!

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com