How to build FOWSR 2.0 for OpenWRT. Help ??

258 views
Skip to first unread message

James Nichols

unread,
Nov 29, 2013, 3:35:11 AM11/29/13
to fo...@googlegroups.com
i want to build the latest fowsr 2.0 package for OpenWRT.

I did a build with some success months ago,
but I have forgotten what I did and cannot repeat it.

Is there anyone out there that can help?


I tried manually editing the OpenWRT-style "Makefile" for fowsr that is supplied with OpenWRT (located in /trunk/feeds/packages/utils/fowsr/ )

The "makefile" looks like this after my edits:
#
# Copyright (C) 2010-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=fowsr
PKG_VERSION:=2.0-131015
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=7f78e8d2b1a162a99e684cab49a210a0

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

define Package/fowsr
  SECTION:=utils
  CATEGORY:=Utilities
  DEPENDS:=+libusb-compat
  TITLE:=Fine Offset Wireless Weather Station Reader
endef

define Package/fowsr/description
  fowsr is a USB Data Collector application for WH1080 compatible
  weather stations.
  Output formats includes XML, Wunderground.com and pywws.
endef

define Package/fowsr/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fowsr $(1)/usr/bin/
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/{fowsr,pwsweather,pywws,wunderground,xml}.sh \
$(1)/usr/bin/
endef

$(eval $(call BuildPackage,fowsr))

After I do make menuconfig and make commands, this is the tail of the build log where the error seems to be:

CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/media/extra/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/media/extra/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/media/extra/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/media/extra/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/media/extra/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/media/extra/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/media/extra/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/media/extra/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/media/extra/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib -L/media/extra/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib -L/media/extra/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib -L/media/extra/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.6-linaro_uClibc-0.9.33.2/lib " make -j1 -C /media/extra/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/fowsr-2.0-131015/. AR=mips-openwrt-linux-uclibc-ar AS="mips-openwrt-linux-uclibc-gcc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float" LD=mips-openwrt-linux-uclibc-ld NM=mips-openwrt-linux-uclibc-nm CC="mips-openwrt-linux-uclibc-gcc" GCC="mips-openwrt-linux-uclibc-gcc" CXX="mips-openwrt-linux-uclibc-g++" RANLIB=mips-openwrt-linux-uclibc-ranlib STRIP=mips-openwrt-linux-uclibc-strip OBJCOPY=mips-openwrt-linux-uclibc-objcopy OBJDUMP=mips-openwrt-linux-uclibc-objdump SIZE=mips-openwrt-linux-uclibc-size CROSS="mips-openwrt-linux-uclibc-" ARCH="mips" ;
make[4]: Entering directory `/media/extra/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/fowsr-2.0-131015'
make[4]: *** No targets specified and no makefile found.  Stop.
make[4]: Leaving directory `/media/extra/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/fowsr-2.0-131015'
make[3]: *** [/media/extra/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/fowsr-2.0-131015/.built] Error 2
make[3]: Leaving directory `/media/extra/openwrt/trunk/feeds/packages/utils/fowsr'
make[2]: *** [package/feeds/packages/fowsr/compile] Error 2
make[2]: Leaving directory `/media/extra/openwrt/trunk'
make[1]: *** [/media/extra/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/media/extra/openwrt/trunk'
make: *** [world] Error 2

James Nichols

unread,
Nov 30, 2013, 8:06:28 AM11/30/13
to fo...@googlegroups.com
I found the problems:

download the above Makefile and replace the file: package/feeds/packages/fowsr/Makefile

2) Edit the new makefile, replace "libusb-compat" with "libusb". (libusb-compat doesn't exist in OpenWRT.)

Cheers,

James

Josch

unread,
Dec 12, 2013, 3:28:59 PM12/12/13
to fo...@googlegroups.com
I think, that's not the right way. You should instead
1) Invoke "make menuconfig" in the OpenWrt folder and select libraries--> libusb-compat
2) The file http://fowsr.googlecode.com/svn/trunk/openwrt/Makefile should be unmodified copied to feeds/packages/utils/fowsr.
See also https://code.google.com/p/fowsr/wiki/OpenWrt

Josch

James Nichols

unread,
Dec 13, 2013, 1:43:17 AM12/13/13
to fo...@googlegroups.com
Well it worked great for me.  I even added a way to send data to WeatherFlow.com !! (wind speed and gust updates, but timezone and direction seem to be somewhat broken)

However, I will try your method one more time.  Maybe I missed something.

Another issue is with the log directory on installation.  If the /var/log/fowsr directory doesn't exist on installation or is ever deleted; then it is not created and fowsr doesn't work.

James


--
Du mottar denne meldingen fordi du abonnerer på et emne i Google-gruppen «fowsr».
For å avslutte abonnementet på dette emnet, gå til https://groups.google.com/d/topic/fowsr/3-WUDbyYnB8/unsubscribe.
For å melde deg av denne gruppen og alle emner, send en e-post til fowsr+un...@googlegroups.com.
Du finner flere alternativer på https://groups.google.com/groups/opt_out.

James Nichols

unread,
Dec 13, 2013, 4:38:59 AM12/13/13
to fo...@googlegroups.com
But changing to libusb in the Makefile worked for me.

When I do menu-config, under Libraries there is
libusb (A library for accessing Linux USB devices) and
libusbpp (A C++ library for accessing Linux USB devices)

I don't find a libusb-compat there.

James
Reply all
Reply to author
Forward
0 new messages