Adding owfs support
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 Adding owfs support
Hi Istv?n,
Le 13/07/2015 21:30, Pongr?cz Istv?n a ?crit :
Quoted 5 lines
Hi Romain,
Thank you very much for your feedback and detailed explanation of the necessary modifications.
Quoted 7 lines
As I am not a master of buildroot, I will need more time to check and modify the package.
Anyway, as I wrote, I just borrowed this package from an other source and modified to be able to compile. The original source (url) should be there.
In the other hand, I will need to learn buildroot better, because I would like to compile "heavy" application and its dependencies. That will be fun (and annoying, too :)
Thank you again for your feedback and support.
You're welcome.
Ok, we'll wait for your updated patch :)
Please, next time keep the list in Cc.
Best regards,
Romain Naour
Quoted 320 lines
Cheers,
Istv?n (Steve)----------------eredeti ?zenet----------------- Felad?: "Romain Naour" romain.naour at openwide.fr C?mzett: "root"
, buildroot at buildroot.org
D?tum: Mon, 13 Jul 2015 13:03:42 +0200
-------------------------------------------------Quoted 304 lines
Hi Istvan,
Le 21/05/2015 15:02, root a ?crit :
package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patch
Quoted 31 lines
---
package/Config.in | 1 +.../0001-fix-owshell-libusb-for-owfs-3.1p0.patch| 127
+++++++++++++++++++++
package/owfs/Config.in | 33 ++++++package/owfs/owfs.mk| 20 ++++4 files changed, 181 insertions(+)create mode 100644
package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patchcreate mode 100644 package/owfs/Config.in
create mode 100644package/owfs/owfs.mkpackage/Config.in +1
-0@@ -846,6 +846,7 @@ menu "Hardware handling" source "package/mtdev/Config.in" source "package/ne10/Config.in" source "package/neardal/Config.in" + source "package/owfs/Config.in" source "package/pcsc-lite/Config.in" source "package/tslib/Config.in" source "package/urg/Config.in"(quoted diff) +0
-0
a/package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patchb/package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patchnew file mode 100644
index 0000000..cdaa39dpackage/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patch new file +0
-0You need to add your Sob line and a description about the change.
Quoted 8 lines
package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patch new file +1
-0@@ -0,0 +1,127 @@ +diff -Nur owfs-3.1p0/module/owshell/src/c/Makefile.amowfs-3.1p0-patched/module/owshell/src/c/Makefile.am
+--- a/module/owshell/src/c/Makefile.am 2015-01-11
02:31:32.000000000 +0100
++++ b/module/owshell/src/c/Makefile.am 2015-05-02
19:13:00.000000000 +0200
+@@ -41,7 +41,9 @@package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patch
Quoted 7 lines
package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patch new file +7
-0+ -Wcast-align \ + -Wstrict-prototypes \ + -Wredundant-decls \ +- ${EXTRACFLAGS} ++ ${EXTRACFLAGS} \ ++ ${LIBUSB_CFLAGS} \ ++ ${PTHREAD_CFLAGS}I don't think this is the right fix with the PATH overwrite in owfs.mk. If you have a link issue with libusb, you can try to use pkg-config to retrieve the necessary CFLAGS. To be investigated...
Quoted 10 lines
+
+-LDADD = ${LD_EXTRALIBS} ${OSLIBS}
++LDADD = ${LIBUSB_LIBS} ${PTHREAD_LIBS} ${LD_EXTRALIBS} ${OSLIBS} +
+diff -Nur owfs-3.1p0/module/owshell/src/c/Makefile.in owfs-3.1p0-patched/module/owshell/src/c/Makefile.in
+--- a/module/owshell/src/c/Makefile.in 2015-03-15
02:38:32.000000000 +0100
++++ b/module/owshell/src/c/Makefile.in 2015-05-02
19:12:00.000000000 +0200Since the package is autoreconfed, you doesn't need to patch Makefile.in.
Quoted 119 lines
+@@ -1,7 +1,7 @@
+-# Makefile.in generated by automake 1.14.1 from Makefile.am. ++# Makefile.in generated by automake 1.15 from Makefile.am.
+ # @configure_input@
+
+-# Copyright (C) 1994-2013 Free Software Foundation, Inc. ++# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it, +@@ -15,7 +15,17 @@
+ @SET_MAKE@
+
+ VPATH = @srcdir@
+-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' ++am__is_gnu_make = { \
++ if test -z '$(MAKELEVEL)'; then \
++ false; \
++ elif test -n '$(MAKE_HOST)'; then \
++ true; \
++ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
++ true; \
++ else \
++ false; \
++ fi; \
++}
+am__make_running_with_option= \
+ case $${target_option-} in \
+ ?) ;; \
+@@ -82,16 +92,8 @@
+bin_PROGRAMS= owget$(EXEEXT) owdir$(EXEEXT) owread$(EXEEXT) \package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patch new file +19
-0+ owwrite$(EXEEXT) owpresent$(EXEEXT) owexist$(EXEEXT) + subdir = module/owshell/src/c +-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ +- $(top_srcdir)/src/scripts/install/mkinstalldirs \ +- $(top_srcdir)/src/scripts/install/depcomp + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/src/scripts/m4/libtool.m4 \ +- $(top_srcdir)/src/scripts/m4/ltoptions.m4 \ +- $(top_srcdir)/src/scripts/m4/ltsugar.m4 \ +- $(top_srcdir)/src/scripts/m4/ltversion.m4 \ +- $(top_srcdir)/src/scripts/m4/lt~obsolete.m4 \ +- $(top_srcdir)/acinclude.m4 \ ++am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/src/scripts/m4/acx_pthread.m4 \ + $(top_srcdir)/module/swig/perl5/perl5.m4 \ + $(top_srcdir)/module/swig/php/php.m4 \ +@@ -99,6 +101,7 @@ + $(top_srcdir)/module/owtcl/tcl.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps)$(CONFIGURE_DEPENDENCIES) \
package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patch new file +42
-0+ $(ACLOCAL_M4) ++DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) + mkinstalldirs = $(SHELL) \ + $(top_srcdir)/src/scripts/install/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/src/include/config.h +@@ -201,6 +204,9 @@ + done | $(am__uniquify_input)` + ETAGS = etags + CTAGS = ctags ++am__DIST_COMMON = $(srcdir)/Makefile.in \ ++ $(top_srcdir)/src/scripts/install/depcomp \ ++ $(top_srcdir)/src/scripts/install/mkinstalldirs + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ + AMTAR = @AMTAR@ +@@ -295,6 +301,7 @@ + LT_CURRENT = @LT_CURRENT@ + LT_RELEASE = @LT_RELEASE@ + LT_REVISION = @LT_REVISION@ ++LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ + MAKEINFO = @MAKEINFO@ + MANIFEST_TOOL = @MANIFEST_TOOL@ + MKDIR_P = @MKDIR_P@ +@@ -498,9 +505,11 @@ + -Wcast-align \ + -Wstrict-prototypes \ + -Wredundant-decls \ +- ${EXTRACFLAGS} ++ ${EXTRACFLAGS} \ ++ ${LIBUSB_CFLAGS} \ ++ ${PTHREAD_CFLAGS} + +-LDADD = ${LD_EXTRALIBS} ${OSLIBS} ++LDADD = ${LIBUSB_LIBS} ${PTHREAD_LIBS} ${LD_EXTRALIBS} ${OSLIBS} + all: all-am + + .SUFFIXES: +@@ -514,10 +523,9 @@ + exit 1;; \ + esac; \ + done; \ +- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreignmodule/owshell/src/c/Makefile'; \
++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu
module/owshell/src/c/Makefile'; \package/owfs/0001-fix-owshell-libusb-for-owfs-3.1p0.patch new file +16
-0+ $(am__cd) $(top_srcdir) && \ +- $(AUTOMAKE) --foreign module/owshell/src/c/Makefile +-.PRECIOUS: Makefile ++ $(AUTOMAKE) --gnu module/owshell/src/c/Makefile + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ +@@ -865,6 +873,8 @@ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + ++.PRECIOUS: Makefile ++ + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded.package/owfs/Config.in new file +1
-0@@ -0,0 +1,33 @@ +config BR2_PACKAGE_OWFSpackage/owfs/Config.in line 11
Quoted 10 lines
package/owfs/Config.in new file +10
-0+ bool "owfs" + select BR2_PACKAGE_LIBFUSE + help + OWFS is an easy way to use the powerful 1-wire system of + Dallas/Maxim. + http://owfs.org/ + Original owfs patch comes from here: + https://github.com/davygravy/owfsplug + by Dave Purdy davygravy +There are some trailing space
package/owfs/Config.in line 15
Quoted 4 lines
package/owfs/Config.in new file +4
-0+ Notes: + - uClibc: librpc must be enabled + - FUSE must be enabled in the kernel (module or built-in) +ditto
package/owfs/Config.in line 23
Quoted 8 lines
package/owfs/Config.in new file +8
-0+ Tested on 2015.2 and master git, uclibc and glibc. + This package based on owfs version 3.1p0 from sourceforge: + http://sourceforge.net/projects/owfs/files/owfs/ + + Usage: + Create a mountpoint, where you will use owfs, for example: + mkdir /mnt/1wire +ditto
package/owfs/Config.in line 33
Quoted 10 lines
package/owfs/Config.in new file +10
-0+ Issue the following command, where the ttySx is your owfs port: + owfs /dev/ttySx /mnt/1wire + Enjoy :) + + Summarized by Istvan Pongracz (pongraczi on github) + 16th of May, 2015 + + + +ditto + empty new lines.
I like that you add an usage example here :)
Quoted 14 lines
package/owfs/owfs.mk new file +1
-0@@ -0,0 +1,20 @@ +###############################################################################
package/owfs/owfs.mk new file +4
-0+# +# owfs +# +#################################################################Quoted 1 line
##############
Usually we add a new line here
package/owfs/owfs.mk
Quoted 3 lines
package/owfs/owfs.mk new file +2
-0+OWFS_VERSION = 3.1p0 +OWFS_SOURCE = owfs-$(OWFS_VERSION).tar.gzThis is not needed since tar.gz extension is the default.
Quoted 5 lines
+OWFS_SITE =
http://downloads.sourceforge.net/project/owfs/owfs/$(OWFS_VERSION)+OWFS_INSTALL_STAGING = YES
Why this is needed ?
Quoted 1 line
+OWFS_INSTALL_TARGET = YES
This is not needed since target packages are installed to target by default.
package/owfs/owfs.mk
Quoted 5 lines
package/owfs/owfs.mk new file +4
-0+OWFS_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH) +OWFS_CONF_OPTS = --enable-owshell --enable-owhttpd --enable-owftpd \ +--enable-owserver --enable-ownet --enable-ownetlib --enable-owtap \ +--enable-owmon --enable-owcapi --enable-usbThere is a trailing space here.
Quoted 1 line
+OWFS_DEPENDENCIES = libfuse libusb libusb-compat
In the Config.in you select only the libfuse package, you must also select libusb and libusb-compat.
Quoted 1 line
+OWFS_AUTORECONF = YES
You need to add a comment to say why the package needs to be autoreconfed. Just add the patch's name:
# 0001-fix-owshell-libusb-for-owfs-3.1p0.patchOWFS_AUTORECONF= YESpackage/owfs/owfs.mk
Quoted 6 lines
package/owfs/owfs.mk new file +4
-0+ +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) +Why a host package is needed ?
Can you resend an updated version of your patch ?
Best regards,
Romain Naour