Committed revision 23631.

On Thu, Oct 21, Committed revision 23631.
2010 at 2:13 PM, Roberto Riggio <roberto.rig...@create-net.org> wrote:

>
> This patch:
>
> * splits the wing package compilation into host and target
> * upgrades the git revision to a more recent version of the protocol
> which solves a segfault on arm boards and adds support for OLSR-like
> Host-Network-Association messages.
>
> Signed-off-by: Roberto Riggio<roberto.rig...@create-net.org>
>
> --
> Index: net/wing/files/lib/network/wing.sh
> ===================================================================
> --- net/wing/files/lib/network/wing.sh    (revision 23569)
> +++ net/wing/files/lib/network/wing.sh    (working copy)
> @@ -36,7 +36,7 @@
>         exit 1
>     fi
>
> -    local profile rc ls prefix debug
> +    local profile rc ls metric prefix period tau debug
>
>     config_get profile $config profile "bulk"
>     config_get rc $config rc "static"
> @@ -131,8 +131,12 @@
>     config_get ifname $1 ifname
>     config_get device $1 device
>     config_get hwmode $device hwmode "11bg"
> -    freq=$(iwlist $ifname freq | grep "Current Frequency" | sed -n
> "s/^.*Current Frequency:\([0-9.]*\) GHz (Channel \([0-9]*\))/\1/p" | awk
> '{print $1*1000}')
> -    freq=${freq:-"0"}
> +    config_get channel $device channel "0"
> +    [ "$channel" = "0" -o "$channel" = "auto" ] && {
> +        logger -t "$device" "Channel not specified. Ignoring."
> +        return 0
> +    }
> +    freq=$(iwlist $ifname freq | sed -n "s/^.*Channel 0*$channel :
> \([0-9.]*\).*/\1/p" | awk '{print $1*1000}')
>     hwaddr=$(/sbin/ifconfig $ifname 2>&1 | sed -n 's/^.*HWaddr
> \([0-9A-Za-z\-]*\).*/\1/p' | sed -e 's/\-/:/g' | cut -c1-17)
>     freqs=${freqs:+"$freqs "}$freq
>     hwmodes=${hwmodes:+"$hwmodes "}$hwmode
> Index: net/wing/patches/100-cross-compile.patch
> ===================================================================
> --- net/wing/patches/100-cross-compile.patch    (revision 23569)
> +++ net/wing/patches/100-cross-compile.patch    (working copy)
> @@ -1,21 +0,0 @@
> ----
> - m4/click.m4 |    8 --------
> - 1 file changed, 8 deletions(-)
> -
> ---- wing-20100903.orig/m4/click.m4
> -+++ wing-20100903/m4/click.m4
> -@@ -235,14 +235,6 @@ AC_DEFUN([CLICK_CHECK_BUILD_DYNAMIC_LINK
> -     if test "x$ac_build_have_dlopen" = xyes -a "x$ac_build_have_dlfcn_h"
> = xyes; then
> -     ac_build_have_dynamic_linking=yes
> -     fi
> --    if test "x$ac_build_have_dynamic_linking" !=
> "x$ac_have_dynamic_linking"; then
> --    AC_MSG_ERROR([
> --=========================================
> --
> --Build system and host system don't have the same dynamic linking state!
> --
> --=========================================])
> --    fi
> -     AC_SUBST(BUILD_DL_LIBS)
> -     eval "$saver"
> - ])
> Index: net/wing/Config.in
> ===================================================================
> --- net/wing/Config.in    (revision 23569)
> +++ net/wing/Config.in    (working copy)
> @@ -1,17 +0,0 @@
> -# Wing configuration
> -
> -choice
> -    prompt "Version"
> -    depends on PACKAGE_wing
> -    default WING_STABLE
> -    help
> -        This option allows you to select the version of Wing to be built.
> -
> -config WING_STABLE
> -    bool "Use the stable version (multi-interface)"
> -
> -config WING_TESTING
> -    bool "Use the unstable version (multi-interfaces w/ ITACA)"
> -
> -endchoice
> -
> Index: net/wing/Makefile
> ===================================================================
> --- net/wing/Makefile    (revision 23569)
> +++ net/wing/Makefile    (working copy)
> @@ -8,17 +8,10 @@
>  include $(TOPDIR)/rules.mk
>
>  PKG_NAME:=wing
> +PKG_VERSION:=20101021
> +PKG_RELEASE:=1
> +PKG_REV:=402b10c1e914157ee1a105e11390ff013aa00748
>
> -ifneq ($(CONFIG_WING_STABLE),)
> -    PKG_VERSION:=20100903
> -    PKG_RELEASE:=4
> -    PKG_REV:=520e3168a5af4d26bec3779cfa4901d128a4bc6f
> -else
> -    PKG_VERSION:=$(shell date +%Y%m%d)
> -    PKG_RELEASE:=1
> -    PKG_REV:=HEAD
> -endif
> -
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>  PKG_SOURCE_URL:=http://github.com/create-net/click-wing.git
>  PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
> @@ -26,72 +19,58 @@
>  PKG_SOURCE_PROTO:=git
>
>  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
> -PKG_BUILD_PARALLEL:=1
> -PKG_INSTALL:=1
>
> +PKG_BUILD_DEPENDS:=wing/host
> +
>  include $(INCLUDE_DIR)/package.mk
> +include $(INCLUDE_DIR)/host-build.mk
>
>  define Package/wing
>     TITLE:=Wireless mesh networking toolkit
>     SECTION:=net
>     CATEGORY:=Network
>     MAINTAINER:=Roberto Riggio <roberto.rig...@create-net.org>
> -    DEPENDS:=+kmod-tun
> +    DEPENDS:=+kmod-tun +libpcap +libstdcpp
>     URL:=http://www.wing-project.org/
>  endef
>
>  define Package/wing/Description
>     Wing is a wireless mesh routing software. The routing protocol
> -    is derived from Roofnet. It supports multiple radio interfaces and
> -    link quality routing using the ETX, ETT, and WCETT metrics.
> +    is derived from Roofnet. It supports multiple radio interfaces
> +    and link quality routing using the ETX, ETT, or WCETT metric.
>  endef
>
> -define Package/wing/config
> -    source "$(SOURCE)/Config.in"
> -endef
> +EXTRA_CFLAGS=-MD
>
> -EXTRA_LDFLAGS:=-ldl
> +CONFIGURE_ARGS += \
> +    --enable-tools=host \
> +    --enable-userlevel \
> +    --enable-wifi \
> +    --enable-wing \
> +    --disable-linuxmodule \
> +    --disable-dynamic-linking \
>
> -MAKE_FLAGS+=\
> -    V=1 \
> -    MINDRIVER=$(PKG_NAME) \
> -    BUILD_CC=$(TARGET_CC) \
> -    BUILD_CXX=$(TARGET_CXX)
> +HOST_CONFIGURE_ARGS += \
> +    --enable-userlevel \
> +    --enable-wifi \
> +    --enable-wing \
> +    --disable-linuxmodule \
>
> -HOST_MAKE_FLAGS:=\
> -    V=1 \
> -    MINDRIVER=$(PKG_NAME)
> +define Host/Compile
> +    $(call Host/Install/Default, tools elementmap.xml install)
> +endef
>
> -define Build/Configure
> -    (cd $(PKG_BUILD_DIR); \
> -        rm -rf config.{cache,status}; \
> -         ./configure \
> -            --prefix=/usr \
> -            --enable-userlevel \
> -            --enable-wifi \
> -            --enable-wing \
> -            --disable-linuxmodule \
> -    );
> -    $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS) tools
> -    $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS)
> elementmap.xml
> -    $(CP) $(PKG_BUILD_DIR)/tools/click-mkmindriver/click-mkmindriver
> $(PKG_BUILD_DIR)/
> -    rm -rf $(PKG_BUILD_DIR)/config.{cache,status}
> -    $(call Build/Configure/Default, \
> -        --enable-tools=mixed \
> -        --enable-userlevel \
> -        --enable-wifi \
> -        --enable-wing \
> -        --disable-linuxmodule \
> -    )
> +define Build/Compile
>     (cd $(PKG_BUILD_DIR)/userlevel; \
> -        ../click-mkmindriver -p $(PKG_NAME) -C .. \
> +        $(STAGING_DIR_HOST)/bin/click-mkmindriver -p $(PKG_NAME) -C
> $(STAGING_DIR_HOST) \
>         -f $(PKG_BUILD_DIR)/conf/wing/sample.click \
>         -A --all -E Discard -E Print -E Null \
>         -E InfiniteSource -E RatedSource -E EtherEncap -E UDPIPEncap \
>         -E RadiotapDecap -E RadiotapEncap \
> -        -E ProbeTXRate -E MadwifiRate -E AutoRateFallback \
> +        -E ProbeTXRate -E MadwifiRate -E AutoRateFallback -E Minstrel \
>         -E RoundRobinSched -E DRRSched; \
> -    )
> +    );
> +    $(call Build/Install/Default, MINDRIVER=$(PKG_NAME) install)
>  endef
>
>  define Package/wing/install
> @@ -108,5 +87,6 @@
>     $(CP) $(PKG_INSTALL_DIR)/usr/share/click/elementmap.xml
> $(1)/usr/share/click/elementmap.xml
>  endef
>
> +$(eval $(call HostBuild))
>  $(eval $(call BuildPackage,wing))
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to