From 48f38ba288f926039af9abba1005f362725bf766 Mon Sep 17 00:00:00 2001 From: Travis Kemen Date: Sat, 17 Mar 2007 03:59:59 +0000 Subject: [PATCH 01/40] add B.A.T.M.A.N. from #1448 git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@6592 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 57 ++++++++++++++++++++++++++++++++++++++ files/etc/config/batman | 8 ++++++ files/etc/init.d/batman | 55 ++++++++++++++++++++++++++++++++++++ patches/100-makefile.patch | 18 ++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 Makefile create mode 100644 files/etc/config/batman create mode 100644 files/etc/init.d/batman create mode 100644 patches/100-makefile.patch diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3f07441 --- /dev/null +++ b/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=batman-III +PKG_VERSION:=0.2.0a +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tbz2 +PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman +PKG_MD5SUM:=d5ac8329633590ed072a6b7ecccacf0b +PKG_CAT:=bzcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/batman + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread +kmod-tun + TITLE:=B.A.T.M.A.N. Better Approach To Mobile Ad-hoc Networking + URL:=https://www.open-mesh.net/ +endef + +define Build/Configure +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C "$(PKG_BUILD_DIR)" \ + $(TARGET_CONFIGURE_OPTS) \ + NODEBUG=1 \ + OFLAGS="$(TARGET_CFLAGS)" \ + OS="linux" \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + STRIP="/bin/true" \ + batmand install +endef + +define Package/batman/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/ + $(CP) -a ./files/* $(1)/ + chmod -R 755 $(1)/etc/init.d/batman +endef + + +$(eval $(call BuildPackage,batman)) diff --git a/files/etc/config/batman b/files/etc/config/batman new file mode 100644 index 0000000..15587bc --- /dev/null +++ b/files/etc/config/batman @@ -0,0 +1,8 @@ +config batman general + option interface ath0 + option announce + option gateway_class + option originator_interval + option preferred_gateway + option routing_class + option visualisation_srv diff --git a/files/etc/init.d/batman b/files/etc/init.d/batman new file mode 100644 index 0000000..c12ebf1 --- /dev/null +++ b/files/etc/init.d/batman @@ -0,0 +1,55 @@ +#!/bin/sh /etc/rc.common +START=100 +. /lib/config/uci.sh +uci_load batman +start () { + interface=$(uci get batman.general.interface) + if [ "$interface" = "" ]; then + echo $1 Error, you must specify at least a network interface + exit + fi + announce=$(uci get batman.general.announce) + gateway_class=$(uci get batman.general.gateway_class) + originator_interval=$(uci get batman.general.originator_interval) + preferred_gateway=$(uci get batman.general.preferred_gateway) + routing_class=$(uci get batman.general.routing_class) + visualisation_srv=$(uci get batman.general.visualisation_srv) + batman_args="" + + if [ $announce ]; then + batman_args=${batman_args}'-a '$announce' ' + fi + + if [ $gateway_class ]; then + batman_args=${batman_args}'-g '$gateway_class' ' + fi + + if [ $originator_interval ]; then + batman_args=${batman_args}'-o '$originator_interval' ' + fi + + if [ $preferred_gateway ]; then + batman_args=${batman_args}'-p '$preferred_gateway' ' + fi + + if [ $routing_class ]; then + batman_args=${batman_args}'-r '$routing_class' ' + fi + + if [ $visualisation_srv ]; then + batman_args=${batman_args}'-v '$visualisation_srv' ' + fi + + batman_args=${batman_args}$interface + batmand $batman_args >/dev/null 2>&1 +} + +restart () { + $0 stop + sleep 3 + $0 start +} + +stop () { + killall batmand +} diff --git a/patches/100-makefile.patch b/patches/100-makefile.patch new file mode 100644 index 0000000..b96541f --- /dev/null +++ b/patches/100-makefile.patch @@ -0,0 +1,18 @@ +--- batman-III-0.2.0a.old/Makefile 2007-02-28 15:41:11.000000000 +0100 ++++ batman-III-0.2.0a/Makefile 2007-02-28 15:42:02.000000000 +0100 +@@ -27,6 +27,7 @@ + CFLAGS = -Wall -O0 -g3 + LDFLAGS = -lpthread + #LDFLAGS = -static -lpthread ++SBINDIR = $(INSTALL_PREFIX)/usr/sbin + + UNAME=$(shell uname) + +@@ -67,3 +68,7 @@ + + clean: + rm -f batmand batmand-mips* *.o *~ ++ ++install: ++ mkdir -p $(SBINDIR) ++ install -m 755 batmand $(SBINDIR) From ecfa7cbcefbcf0a9544151b1c57f4082a88cb459 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 24 Mar 2007 21:48:06 +0000 Subject: [PATCH 02/40] Fix the tun device path (#1491) git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@6686 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- patches/101-tun_device.patch | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 patches/101-tun_device.patch diff --git a/patches/101-tun_device.patch b/patches/101-tun_device.patch new file mode 100644 index 0000000..26d528f --- /dev/null +++ b/patches/101-tun_device.patch @@ -0,0 +1,27 @@ +diff -ruN batman-III-0.2.0a.old/linux-specific.c batman-III-0.2.0a/linux-specific.c +--- batman-III-0.2.0a.old/linux-specific.c 2007-02-20 21:07:29.000000000 +0100 ++++ batman-III-0.2.0a/linux-specific.c 2007-03-19 15:34:36.000000000 +0100 +@@ -111,9 +111,9 @@ + + int32_t fd; + +- if ( ( fd = open( "/dev/net/tun", O_RDWR ) ) < 0 ) { ++ if ( ( fd = open( "/dev/tun", O_RDWR ) ) < 0 ) { + +- debug_output( 0, "Error - could not open '/dev/net/tun' ! Is the tun kernel module loaded ?\n" ); ++ debug_output( 0, "Error - could not open '/dev/tun' ! Is the tun kernel module loaded ?\n" ); + return 0; + + } +@@ -151,9 +151,9 @@ + memset( &ifr_if, 0, sizeof(ifr_if) ); + ifr_tun.ifr_flags = IFF_TUN | IFF_NO_PI; + +- if ( ( *fd = open( "/dev/net/tun", O_RDWR ) ) < 0 ) { ++ if ( ( *fd = open( "/dev/tun", O_RDWR ) ) < 0 ) { + +- debug_output( 0, "Error - can't create tun device (/dev/net/tun): %s\n", strerror(errno) ); ++ debug_output( 0, "Error - can't create tun device (/dev/tun): %s\n", strerror(errno) ); + return -1; + + } From 8cc54661654481e15caee0216116b8292689245e Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Mon, 26 Mar 2007 00:09:44 +0000 Subject: [PATCH 03/40] fix typo in init-script (closes: #1518) git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@6700 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- files/etc/init.d/batman | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/etc/init.d/batman b/files/etc/init.d/batman index c12ebf1..b0e9886 100644 --- a/files/etc/init.d/batman +++ b/files/etc/init.d/batman @@ -37,7 +37,7 @@ start () { fi if [ $visualisation_srv ]; then - batman_args=${batman_args}'-v '$visualisation_srv' ' + batman_args=${batman_args}'-s '$visualisation_srv' ' fi batman_args=${batman_args}$interface From 3ae9189ff08eca400140aa75738c1f3236ab36c1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 1 Apr 2007 13:24:50 +0000 Subject: [PATCH 04/40] fix batman build on osx git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@6788 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3f07441..d59fc80 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ define Build/Compile $(TARGET_CONFIGURE_OPTS) \ NODEBUG=1 \ OFLAGS="$(TARGET_CFLAGS)" \ - OS="linux" \ + UNAME="Linux" \ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ STRIP="/bin/true" \ batmand install From db24e8b6f9461e158bfcd58370affbd019547895 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Mon, 2 Apr 2007 00:01:02 +0000 Subject: [PATCH 05/40] revert [6686] - no longer necessary since [6814] git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@6816 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- patches/101-tun_device.patch | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 patches/101-tun_device.patch diff --git a/patches/101-tun_device.patch b/patches/101-tun_device.patch deleted file mode 100644 index 26d528f..0000000 --- a/patches/101-tun_device.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -ruN batman-III-0.2.0a.old/linux-specific.c batman-III-0.2.0a/linux-specific.c ---- batman-III-0.2.0a.old/linux-specific.c 2007-02-20 21:07:29.000000000 +0100 -+++ batman-III-0.2.0a/linux-specific.c 2007-03-19 15:34:36.000000000 +0100 -@@ -111,9 +111,9 @@ - - int32_t fd; - -- if ( ( fd = open( "/dev/net/tun", O_RDWR ) ) < 0 ) { -+ if ( ( fd = open( "/dev/tun", O_RDWR ) ) < 0 ) { - -- debug_output( 0, "Error - could not open '/dev/net/tun' ! Is the tun kernel module loaded ?\n" ); -+ debug_output( 0, "Error - could not open '/dev/tun' ! Is the tun kernel module loaded ?\n" ); - return 0; - - } -@@ -151,9 +151,9 @@ - memset( &ifr_if, 0, sizeof(ifr_if) ); - ifr_tun.ifr_flags = IFF_TUN | IFF_NO_PI; - -- if ( ( *fd = open( "/dev/net/tun", O_RDWR ) ) < 0 ) { -+ if ( ( *fd = open( "/dev/tun", O_RDWR ) ) < 0 ) { - -- debug_output( 0, "Error - can't create tun device (/dev/net/tun): %s\n", strerror(errno) ); -+ debug_output( 0, "Error - can't create tun device (/dev/tun): %s\n", strerror(errno) ); - return -1; - - } From 063b8f7199fa25130519dd87f1a5853905cc9b6b Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 1 Jul 2007 23:09:45 +0000 Subject: [PATCH 06/40] Massive propset of svn:keywords for packages newly addded, next time, we should not forget it ;) git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@7845 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d59fc80..967fced 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $ +# $Id$ include $(TOPDIR)/rules.mk From ece13a9bdf86e4d2915694b41404399dca664c37 Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Tue, 31 Jul 2007 19:42:13 +0000 Subject: [PATCH 07/40] batman: cleanup and honor copts, updated to 0.2-rv478 as well git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@8281 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 35 ++++++++++++++++------------------- patches/100-makefile.patch | 28 +++++++++++++++------------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index 967fced..1bfd76c 100644 --- a/Makefile +++ b/Makefile @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=batman-III -PKG_VERSION:=0.2.0a +PKG_NAME:=batmand +PKG_VERSION:=0.2-rv478 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tbz2 -PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman -PKG_MD5SUM:=d5ac8329633590ed072a6b7ecccacf0b -PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_sources +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz +PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ +PKG_MD5SUM:=b00ad9603e32c85224d5b19f99126ddf +PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install @@ -33,18 +33,15 @@ endef define Build/Configure endef -define Build/Compile - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - $(TARGET_CONFIGURE_OPTS) \ - NODEBUG=1 \ - OFLAGS="$(TARGET_CFLAGS)" \ - UNAME="Linux" \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - STRIP="/bin/true" \ - batmand install -endef +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" \ + CCFLAGS="$(TARGET_CFLAGS)" \ + OFLAGS="$(TARGET_CFLAGS)" \ + NODEBUG=1 \ + UNAME="Linux" \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + STRIP="/bin/true" \ + batmand install define Package/batman/install $(INSTALL_DIR) $(1)/usr/sbin diff --git a/patches/100-makefile.patch b/patches/100-makefile.patch index b96541f..a46a594 100644 --- a/patches/100-makefile.patch +++ b/patches/100-makefile.patch @@ -1,18 +1,20 @@ ---- batman-III-0.2.0a.old/Makefile 2007-02-28 15:41:11.000000000 +0100 -+++ batman-III-0.2.0a/Makefile 2007-02-28 15:42:02.000000000 +0100 -@@ -27,6 +27,7 @@ - CFLAGS = -Wall -O0 -g3 - LDFLAGS = -lpthread - #LDFLAGS = -static -lpthread -+SBINDIR = $(INSTALL_PREFIX)/usr/sbin +Index: batmand_0.2-rv478_sources/Makefile +=================================================================== +--- batmand_0.2-rv478_sources.orig/Makefile 2007-07-31 14:26:18.000000000 -0500 ++++ batmand_0.2-rv478_sources/Makefile 2007-07-31 14:28:43.000000000 -0500 +@@ -21,6 +21,7 @@ + CFLAGS = -Wall -O1 -g3 -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA + STRIP= strip + LDFLAGS = -lpthread -static ++SBINDIR = $(INSTALL_PREFIX)/usr/sbin - UNAME=$(shell uname) + CFLAGS_MIPS = -Wall -O1 -g3 + LDFLAGS_MIPS = -lpthread +@@ -264,3 +265,7 @@ -@@ -67,3 +68,7 @@ - - clean: - rm -f batmand batmand-mips* *.o *~ + clean-long: + rm -rf batmand_* + +install: + mkdir -p $(SBINDIR) -+ install -m 755 batmand $(SBINDIR) ++ install -m 0755 batmand $(SBINDIR) From 873697c83cf2d0dc7c80d9f3f21f6f5bc26b73e0 Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Tue, 31 Jul 2007 19:47:16 +0000 Subject: [PATCH 08/40] check old if not in current git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@8282 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1bfd76c..29b1bc0 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,8 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_sources PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz -PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ +PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ \ + http://downloads.open-mesh.net/batman/stable/sources/ PKG_MD5SUM:=b00ad9603e32c85224d5b19f99126ddf PKG_CAT:=zcat From deb0f240cb4d9045fb4e2556970556c3acca8880 Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Tue, 31 Jul 2007 19:48:52 +0000 Subject: [PATCH 09/40] fingers typed too fast, try that same thing again git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@8283 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 29b1bc0..b35f6e4 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_sources PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ \ - http://downloads.open-mesh.net/batman/stable/sources/ + http://downloads.open-mesh.net/batman/stable/sources/old/ PKG_MD5SUM:=b00ad9603e32c85224d5b19f99126ddf PKG_CAT:=zcat From 34e07dee6d15e75b527a7db8af9dff1f9c6b2c41 Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Tue, 31 Jul 2007 22:08:27 +0000 Subject: [PATCH 10/40] batman: cleanup to match advanced version git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@8290 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b35f6e4..9c9c41c 100644 --- a/Makefile +++ b/Makefile @@ -45,11 +45,10 @@ MAKE_FLAGS += \ batmand install define Package/batman/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/ - $(CP) -a ./files/* $(1)/ - chmod -R 755 $(1)/etc/init.d/batman + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/etc/init.d/batman $(1)/etc/init.d + $(INSTALL_DATA) ./files/etc/config/batman $(1)/etc/config endef - $(eval $(call BuildPackage,batman)) From 582ff920451464f409bbc9078f87edc2dbf8a842 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 8 Oct 2007 08:03:13 +0000 Subject: [PATCH 11/40] Upgrade batman to rv502 git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@9185 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9c9c41c..048df38 100644 --- a/Makefile +++ b/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batmand -PKG_VERSION:=0.2-rv478 +PKG_VERSION:=0.2-rv502 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_sources PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ \ http://downloads.open-mesh.net/batman/stable/sources/old/ -PKG_MD5SUM:=b00ad9603e32c85224d5b19f99126ddf +PKG_MD5SUM:=cf1c92ef3455cfbfedf2c577e013b6c0 PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install From a782dd223ad785c6f05637c9bf8ccb1d70a40814 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 18 Oct 2007 18:46:37 +0000 Subject: [PATCH 12/40] remove PKG_CAT from packages git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@9349 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 048df38..dda6bea 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,6 @@ PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ \ http://downloads.open-mesh.net/batman/stable/sources/old/ PKG_MD5SUM:=cf1c92ef3455cfbfedf2c577e013b6c0 -PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install From 66e49d97754987a89952e2b0434947e424914ad1 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Wed, 16 Jan 2008 19:15:46 +0000 Subject: [PATCH 13/40] port batman package to batman 0.3 integrate batman kernel modul for tunneling TODO: batman svn is ssl only :( git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@10215 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 75 +++++++++++++++++++++------- files/etc/config/{batman => batmand} | 0 files/etc/init.d/{batman => batmand} | 0 patches/100-makefile.patch | 20 -------- 4 files changed, 57 insertions(+), 38 deletions(-) rename files/etc/config/{batman => batmand} (100%) rename files/etc/init.d/{batman => batmand} (100%) delete mode 100644 patches/100-makefile.patch diff --git a/Makefile b/Makefile index dda6bea..f5b4580 100644 --- a/Makefile +++ b/Makefile @@ -9,45 +9,84 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batmand -PKG_VERSION:=0.2-rv502 +PKG_REV:=949 +PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 +PKG_BRANCH:=batman -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_sources -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz -PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ \ - http://downloads.open-mesh.net/batman/stable/sources/old/ -PKG_MD5SUM:=cf1c92ef3455cfbfedf2c577e013b6c0 - +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_BRANCH)d-$(PKG_VERSION) +PKG_SOURCE_URL:=https://dev.open-mesh.net/svn/batman/trunk/$(PKG_BRANCH) +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(INCLUDE_DIR)/package.mk +PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules -define Package/batman +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/batmand/Default SECTION:=net CATEGORY:=Network + URL:=https://www.open-mesh.net/ + MAINTAINER:=Marek Lindner +endef + +define Package/batmand +$(call Package/batmand/Default) DEPENDS:=+libpthread +kmod-tun TITLE:=B.A.T.M.A.N. Better Approach To Mobile Ad-hoc Networking - URL:=https://www.open-mesh.net/ endef -define Build/Configure +define Package/batmand/description +B.A.T.M.A.N. layer 3 routing daemon endef -MAKE_FLAGS += \ +define Package/batgat +$(call Package/batmand/Default) + DEPENDS:=batmand + TITLE:=B.A.T.M.A.N. gateway module + FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX) +endef + +define Package/batgat/description +Kernel gateway module for B.A.T.M.A.N. +endef + +MAKE_ARGS += \ CFLAGS="$(TARGET_CFLAGS)" \ CCFLAGS="$(TARGET_CFLAGS)" \ OFLAGS="$(TARGET_CFLAGS)" \ + CC="$(TARGET_CC)" \ NODEBUG=1 \ UNAME="Linux" \ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ STRIP="/bin/true" \ batmand install -define Package/batman/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/ - $(INSTALL_BIN) ./files/etc/init.d/batman $(1)/etc/init.d - $(INSTALL_DATA) ./files/etc/config/batman $(1)/etc/config +define Build/Configure endef -$(eval $(call BuildPackage,batman)) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) + $(shell [ -e $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild ] && mv $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile) + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + PATH="$(TARGET_PATH)" \ + SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \ + LINUX_VERSION="$(LINUX_VERSION)" \ + REVISION="$(PKG_REV)" modules +endef + +define Package/batmand/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/etc/init.d/batmand $(1)/etc/init.d + $(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config +endef + +$(eval $(call BuildPackage,batmand)) +$(eval $(call BuildPackage,batgat)) diff --git a/files/etc/config/batman b/files/etc/config/batmand similarity index 100% rename from files/etc/config/batman rename to files/etc/config/batmand diff --git a/files/etc/init.d/batman b/files/etc/init.d/batmand similarity index 100% rename from files/etc/init.d/batman rename to files/etc/init.d/batmand diff --git a/patches/100-makefile.patch b/patches/100-makefile.patch deleted file mode 100644 index a46a594..0000000 --- a/patches/100-makefile.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: batmand_0.2-rv478_sources/Makefile -=================================================================== ---- batmand_0.2-rv478_sources.orig/Makefile 2007-07-31 14:26:18.000000000 -0500 -+++ batmand_0.2-rv478_sources/Makefile 2007-07-31 14:28:43.000000000 -0500 -@@ -21,6 +21,7 @@ - CFLAGS = -Wall -O1 -g3 -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA - STRIP= strip - LDFLAGS = -lpthread -static -+SBINDIR = $(INSTALL_PREFIX)/usr/sbin - - CFLAGS_MIPS = -Wall -O1 -g3 - LDFLAGS_MIPS = -lpthread -@@ -264,3 +265,7 @@ - - clean-long: - rm -rf batmand_* -+ -+install: -+ mkdir -p $(SBINDIR) -+ install -m 0755 batmand $(SBINDIR) From fa63f850777c1416ccb412b6b8a2063ae8b979df Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Mon, 21 Jan 2008 00:56:34 +0000 Subject: [PATCH 14/40] batmand-adv-userspace updated batman-adv kernel modul added battools added changed to http svn git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@10227 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f5b4580..e25d0db 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2006 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batmand -PKG_REV:=949 +PKG_REV:=963 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 PKG_BRANCH:=batman @@ -17,7 +17,7 @@ PKG_BRANCH:=batman PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_SUBDIR:=$(PKG_BRANCH)d-$(PKG_VERSION) -PKG_SOURCE_URL:=https://dev.open-mesh.net/svn/batman/trunk/$(PKG_BRANCH) +PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/$(PKG_BRANCH) PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install @@ -37,21 +37,23 @@ endef define Package/batmand $(call Package/batmand/Default) DEPENDS:=+libpthread +kmod-tun - TITLE:=B.A.T.M.A.N. Better Approach To Mobile Ad-hoc Networking + TITLE:=B.A.T.M.A.N. layer 3 routing daemon endef define Package/batmand/description B.A.T.M.A.N. layer 3 routing daemon endef -define Package/batgat +define KernelPackage/batgat $(call Package/batmand/Default) DEPENDS:=batmand TITLE:=B.A.T.M.A.N. gateway module FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,50,batgat) endef -define Package/batgat/description + +define KernelPackage/batgat/description Kernel gateway module for B.A.T.M.A.N. endef @@ -59,6 +61,7 @@ MAKE_ARGS += \ CFLAGS="$(TARGET_CFLAGS)" \ CCFLAGS="$(TARGET_CFLAGS)" \ OFLAGS="$(TARGET_CFLAGS)" \ + REVISION="$(PKG_REV)" \ CC="$(TARGET_CC)" \ NODEBUG=1 \ UNAME="Linux" \ @@ -71,7 +74,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) - $(shell [ -e $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild ] && mv $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile) + cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile $(MAKE) -C "$(LINUX_DIR)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ @@ -89,4 +92,4 @@ define Package/batmand/install endef $(eval $(call BuildPackage,batmand)) -$(eval $(call BuildPackage,batgat)) +$(eval $(call KernelPackage,batgat)) From 8000d384f278fa69e9e7c3382811da914f842b3c Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Thu, 24 Jan 2008 12:49:24 +0000 Subject: [PATCH 15/40] fix init scripts and config files git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@10236 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- files/etc/config/batmand | 6 ++++-- files/etc/init.d/batmand | 23 ++++++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/files/etc/config/batmand b/files/etc/config/batmand index 15587bc..95ec3fa 100644 --- a/files/etc/config/batmand +++ b/files/etc/config/batmand @@ -1,8 +1,10 @@ -config batman general +config batmand general option interface ath0 option announce option gateway_class option originator_interval option preferred_gateway option routing_class - option visualisation_srv + option visualisation_srv + option policy_routing_script + diff --git a/files/etc/init.d/batmand b/files/etc/init.d/batmand index b0e9886..5f255ed 100644 --- a/files/etc/init.d/batmand +++ b/files/etc/init.d/batmand @@ -1,19 +1,20 @@ #!/bin/sh /etc/rc.common -START=100 +START=90 . /lib/config/uci.sh -uci_load batman +uci_load batmand start () { - interface=$(uci get batman.general.interface) + interface=$(uci get batmand.general.interface) if [ "$interface" = "" ]; then echo $1 Error, you must specify at least a network interface exit fi - announce=$(uci get batman.general.announce) - gateway_class=$(uci get batman.general.gateway_class) - originator_interval=$(uci get batman.general.originator_interval) - preferred_gateway=$(uci get batman.general.preferred_gateway) - routing_class=$(uci get batman.general.routing_class) - visualisation_srv=$(uci get batman.general.visualisation_srv) + announce=$(uci get batmand.general.announce) + gateway_class=$(uci get batmand.general.gateway_class) + originator_interval=$(uci get batmand.general.originator_interval) + preferred_gateway=$(uci get batmand.general.preferred_gateway) + routing_class=$(uci get batmand.general.routing_class) + visualisation_srv=$(uci get batmand.general.visualisation_srv) + policy_routing_script=$(uci get batmand.general.policy_routing_script) batman_args="" if [ $announce ]; then @@ -39,6 +40,10 @@ start () { if [ $visualisation_srv ]; then batman_args=${batman_args}'-s '$visualisation_srv' ' fi + + if [ $policy_routing_script ]; then + batman_args=${batman_args}'--policy-routing-script '$policy_routing_script' ' + fi batman_args=${batman_args}$interface batmand $batman_args >/dev/null 2>&1 From ecd7e76d91be52da7443711e6592b14bb9c13f70 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 2 Mar 2008 17:21:15 +0000 Subject: [PATCH 17/40] Fix batman compilation by using EXTRA_CFLAGS and not overriding CFLAGS git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@10541 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- patches/001-extra_cflags.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 patches/001-extra_cflags.patch diff --git a/Makefile b/Makefile index e25d0db..ec4254c 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ Kernel gateway module for B.A.T.M.A.N. endef MAKE_ARGS += \ - CFLAGS="$(TARGET_CFLAGS)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ CCFLAGS="$(TARGET_CFLAGS)" \ OFLAGS="$(TARGET_CFLAGS)" \ REVISION="$(PKG_REV)" \ diff --git a/patches/001-extra_cflags.patch b/patches/001-extra_cflags.patch new file mode 100644 index 0000000..ac6384f --- /dev/null +++ b/patches/001-extra_cflags.patch @@ -0,0 +1,12 @@ +diff -urN batmand-r963/linux/modules/Makefile.kbuild batmand-r963.new/linux/modules/Makefile.kbuild +--- batmand-r963/linux/modules/Makefile.kbuild 2008-01-28 08:47:35.000000000 +0100 ++++ batmand-r963.new/linux/modules/Makefile.kbuild 2008-03-02 18:24:49.000000000 +0100 +@@ -3,7 +3,7 @@ + endif + + LINUX26:=2.6 +-CFLAGS +=-DREVISION_VERSION=\"\ rv$(REVISION)\" ++EXTRA_CFLAGS +=-DREVISION_VERSION=\"\ rv$(REVISION)\" + + ifeq ($(strip $(findstring $(LINUX26),$(LINUX_VERSION))),$(LINUX26)) + From 22eb51edfe0d4fbcee824ed58fa1594c4e938492 Mon Sep 17 00:00:00 2001 From: Andy Boyett Date: Sun, 16 Mar 2008 18:32:13 +0000 Subject: [PATCH 18/40] packages: move batman kmods into Kernel Modules menu git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@10606 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ec4254c..0184c67 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2008 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -28,14 +28,14 @@ include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/kernel.mk define Package/batmand/Default - SECTION:=net - CATEGORY:=Network URL:=https://www.open-mesh.net/ MAINTAINER:=Marek Lindner endef define Package/batmand $(call Package/batmand/Default) + SECTION:=net + CATEGORY:=Network DEPENDS:=+libpthread +kmod-tun TITLE:=B.A.T.M.A.N. layer 3 routing daemon endef @@ -46,7 +46,8 @@ endef define KernelPackage/batgat $(call Package/batmand/Default) - DEPENDS:=batmand + SUBMENU:=Network Support + DEPENDS:=+batmand TITLE:=B.A.T.M.A.N. gateway module FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX) AUTOLOAD:=$(call AutoLoad,50,batgat) @@ -54,7 +55,7 @@ endef define KernelPackage/batgat/description -Kernel gateway module for B.A.T.M.A.N. + Kernel gateway module for B.A.T.M.A.N. endef MAKE_ARGS += \ From 71b66430557b1bd5d4940a2fc023394457e69d37 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 27 Mar 2008 18:42:10 +0000 Subject: [PATCH 19/40] Upgrade batman to revision 989 (#3259) git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@10676 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0184c67..74d8567 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batmand -PKG_REV:=963 +PKG_REV:=989 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 PKG_BRANCH:=batman From 45d2af35db2ae5c6083f358b5535d0f13a7513ab Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Mon, 5 May 2008 20:35:45 +0000 Subject: [PATCH 20/40] updated to latest stable version git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@11051 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 8 ++++---- patches/001-extra_cflags.patch | 12 ------------ 2 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 patches/001-extra_cflags.patch diff --git a/Makefile b/Makefile index 74d8567..e6b3919 100644 --- a/Makefile +++ b/Makefile @@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batmand -PKG_REV:=989 +PKG_REV:=1057 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 -PKG_BRANCH:=batman +PKG_BRANCH:=batman-0.3 PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_SUBDIR:=$(PKG_BRANCH)d-$(PKG_VERSION) -PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/$(PKG_BRANCH) +PKG_SOURCE_SUBDIR:=$(PKG_BRANCH)-$(PKG_VERSION) +PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/tags/$(PKG_BRANCH) PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install diff --git a/patches/001-extra_cflags.patch b/patches/001-extra_cflags.patch deleted file mode 100644 index ac6384f..0000000 --- a/patches/001-extra_cflags.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN batmand-r963/linux/modules/Makefile.kbuild batmand-r963.new/linux/modules/Makefile.kbuild ---- batmand-r963/linux/modules/Makefile.kbuild 2008-01-28 08:47:35.000000000 +0100 -+++ batmand-r963.new/linux/modules/Makefile.kbuild 2008-03-02 18:24:49.000000000 +0100 -@@ -3,7 +3,7 @@ - endif - - LINUX26:=2.6 --CFLAGS +=-DREVISION_VERSION=\"\ rv$(REVISION)\" -+EXTRA_CFLAGS +=-DREVISION_VERSION=\"\ rv$(REVISION)\" - - ifeq ($(strip $(findstring $(LINUX26),$(LINUX_VERSION))),$(LINUX26)) - From c87aa8bea54655d970ba6e266d70d6940f689152 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Thu, 31 Jul 2008 12:30:14 +0000 Subject: [PATCH 21/40] pump batman version to latest revision git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@12043 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e6b3919..bb79bc6 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batmand -PKG_REV:=1057 +PKG_REV:=1099 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 PKG_BRANCH:=batman-0.3 From 93aac460e6e877ba6e2ea6f6f1e3dbea7860c42d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 5 Aug 2008 06:38:06 +0000 Subject: [PATCH 22/40] batman: switch to a more recent trunk version, which fixes the build for 2.6.26. also move the build directory to the right place git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@12123 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index bb79bc6..a0350b7 100644 --- a/Makefile +++ b/Makefile @@ -7,25 +7,25 @@ # $Id$ include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand -PKG_REV:=1099 +PKG_REV:=1105 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 -PKG_BRANCH:=batman-0.3 +#PKG_BRANCH:=batman-0.3 PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_SUBDIR:=$(PKG_BRANCH)-$(PKG_VERSION) -PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/tags/$(PKG_BRANCH) +PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),$(PKG_NAME))-$(PKG_VERSION) +PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/$(if $(PKG_BRANCH),tags/$(PKG_BRANCH),trunk/batman/) PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/kernel.mk define Package/batmand/Default URL:=https://www.open-mesh.net/ From 647c4e455746b15c74080e18e27a0e600f2a04fc Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 5 Aug 2008 22:04:10 +0000 Subject: [PATCH 23/40] Makefile cleanups, round 6 and last git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@12175 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index a0350b7..2c227a9 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,6 @@ PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),$(PKG_NAME))-$(PKG_VERSION) PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/$(if $(PKG_BRANCH),tags/$(PKG_BRANCH),trunk/batman/) PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules From 0a360d023ee36bab07b80f7f6d4da05912562459 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Wed, 5 Nov 2008 10:06:09 +0000 Subject: [PATCH 24/40] fix batman extra cflags and update revision git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@13124 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2c227a9..566fe0f 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,11 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand -PKG_REV:=1105 +PKG_REV:=1145 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 #PKG_BRANCH:=batman-0.3 +PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) @@ -58,7 +59,7 @@ define KernelPackage/batgat/description endef MAKE_ARGS += \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \ CCFLAGS="$(TARGET_CFLAGS)" \ OFLAGS="$(TARGET_CFLAGS)" \ REVISION="$(PKG_REV)" \ From 530c0fd54f1d9b92af34294b7179aa2eb24c2efd Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Sun, 25 Jan 2009 19:10:26 +0000 Subject: [PATCH 25/40] update batman package to 0.3.1 release git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@14183 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 566fe0f..668c888 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand -PKG_REV:=1145 +PKG_REV:=1206 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 #PKG_BRANCH:=batman-0.3 @@ -28,7 +28,7 @@ PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules include $(INCLUDE_DIR)/package.mk define Package/batmand/Default - URL:=https://www.open-mesh.net/ + URL:=http://www.open-mesh.net/ MAINTAINER:=Marek Lindner endef From 38d099ea1c1aff949bfce3c1be20ed6f0068c508 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Mon, 9 Mar 2009 05:50:38 +0000 Subject: [PATCH 26/40] batman: add kernelland init script & config file git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@14803 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 668c888..5d9ccbd 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand -PKG_REV:=1206 +PKG_REV:=1235 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 #PKG_BRANCH:=batman-0.3 From a8da2b823ecbcf7a35baacab20c275fdbaba2e1d Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 11 Apr 2009 16:30:23 +0000 Subject: [PATCH 27/40] [package] do not override restart function git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@15213 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- files/etc/init.d/batmand | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 5d9ccbd..77fed09 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand PKG_REV:=1235 PKG_VERSION:=r$(PKG_REV) -PKG_RELEASE:=1 +PKG_RELEASE:=2 #PKG_BRANCH:=batman-0.3 PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" diff --git a/files/etc/init.d/batmand b/files/etc/init.d/batmand index 5f255ed..94253e3 100644 --- a/files/etc/init.d/batmand +++ b/files/etc/init.d/batmand @@ -49,12 +49,6 @@ start () { batmand $batman_args >/dev/null 2>&1 } -restart () { - $0 stop - sleep 3 - $0 start -} - stop () { killall batmand } From fb6a25f2a2b2d681bb683bb28de31f9781ea5486 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 17 Apr 2009 14:22:30 +0000 Subject: [PATCH 28/40] nuke $Id$ in /packages as well git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@15244 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 77fed09..b496952 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,6 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -# $Id$ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk From f9ceca672a7056f0bfd7a825a4f6146d1e197859 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Tue, 21 Apr 2009 19:16:40 +0000 Subject: [PATCH 30/40] batman makefiles / configs / init scripts revised vis package added git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@15332 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 78 ++++++++++++++++++++++++++++++++-------- files/etc/config/batmand | 2 ++ files/etc/config/vis | 3 ++ files/etc/init.d/batmand | 14 +++++++- files/etc/init.d/vis | 20 +++++++++++ 5 files changed, 101 insertions(+), 16 deletions(-) create mode 100644 files/etc/config/vis create mode 100644 files/etc/init.d/vis diff --git a/Makefile b/Makefile index b496952..549952f 100644 --- a/Makefile +++ b/Makefile @@ -4,25 +4,25 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # +# $Id: Makefile 14803 2009-03-09 05:50:38Z marek $ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand -PKG_REV:=1235 +PKG_REV:=1249 PKG_VERSION:=r$(PKG_REV) -PKG_RELEASE:=2 -#PKG_BRANCH:=batman-0.3 +PKG_RELEASE:=1 PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),$(PKG_NAME))-$(PKG_VERSION) -PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/$(if $(PKG_BRANCH),tags/$(PKG_BRANCH),trunk/batman/) +PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules +PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/batman/linux/modules include $(INCLUDE_DIR)/package.mk @@ -43,6 +43,18 @@ define Package/batmand/description B.A.T.M.A.N. layer 3 routing daemon endef +define Package/vis +$(call Package/batmand/Default) + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread + TITLE:=visualization server for B.A.T.M.A.N. layer 3 +endef + +define Package/vis/description +visualization server for B.A.T.M.A.N. layer 3 +endef + define KernelPackage/batgat $(call Package/batmand/Default) SUBMENU:=Network Support @@ -54,10 +66,10 @@ endef define KernelPackage/batgat/description - Kernel gateway module for B.A.T.M.A.N. +Kernel gateway module for B.A.T.M.A.N. for better tunnel performance endef -MAKE_ARGS += \ +MAKE_BATMAND_ARGS += \ EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \ CCFLAGS="$(TARGET_CFLAGS)" \ OFLAGS="$(TARGET_CFLAGS)" \ @@ -68,20 +80,48 @@ MAKE_ARGS += \ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ STRIP="/bin/true" \ batmand install + +MAKE_VIS_ARGS += \ + EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \ + CCFLAGS="$(TARGET_CFLAGS)" \ + OFLAGS="$(TARGET_CFLAGS)" \ + REVISION="$(PKG_REV)" \ + CC="$(TARGET_CC)" \ + NODEBUG=1 \ + UNAME="Linux" \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + STRIP="/bin/true" \ + vis install + +MAKE_BATGAT_ARGS += \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + PATH="$(TARGET_PATH)" \ + SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \ + LINUX_VERSION="$(LINUX_VERSION)" \ + REVISION="$(PKG_REV)" modules + define Build/Configure endef +ifneq ($(DEVEL_CONFIG)$(CONFIG_PACKAGE_batmand),) + BUILD_BATMAND := $(MAKE) -C $(PKG_BUILD_DIR)/batman $(MAKE_BATMAND_ARGS) +endif + +ifneq ($(CONFIG_DEVEL)$(CONFIG_PACKAGE_vis),) + BUILD_VIS := $(MAKE) -C $(PKG_BUILD_DIR)/vis $(MAKE_VIS_ARGS) +endif + +ifneq ($(CONFIG_DEVEL)$(CONFIG_PACKAGE_kmod-batgat),) + BUILD_BATGAT := $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATGAT_ARGS) +endif + define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) + $(BUILD_BATMAND) + $(BUILD_VIS) cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile - $(MAKE) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ - PATH="$(TARGET_PATH)" \ - SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \ - LINUX_VERSION="$(LINUX_VERSION)" \ - REVISION="$(PKG_REV)" modules + $(BUILD_BATGAT) endef define Package/batmand/install @@ -91,5 +131,13 @@ define Package/batmand/install $(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config endef +define Package/vis/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d + $(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config +endef + $(eval $(call BuildPackage,batmand)) +$(eval $(call BuildPackage,vis)) $(eval $(call KernelPackage,batgat)) diff --git a/files/etc/config/batmand b/files/etc/config/batmand index 95ec3fa..a67fa5d 100644 --- a/files/etc/config/batmand +++ b/files/etc/config/batmand @@ -7,4 +7,6 @@ config batmand general option routing_class option visualisation_srv option policy_routing_script + option disable_client_nat + option disable_aggregation diff --git a/files/etc/config/vis b/files/etc/config/vis new file mode 100644 index 0000000..6d30023 --- /dev/null +++ b/files/etc/config/vis @@ -0,0 +1,3 @@ +config vis general + option interface ath0 + diff --git a/files/etc/init.d/batmand b/files/etc/init.d/batmand index 94253e3..5da2062 100644 --- a/files/etc/init.d/batmand +++ b/files/etc/init.d/batmand @@ -15,6 +15,8 @@ start () { routing_class=$(uci get batmand.general.routing_class) visualisation_srv=$(uci get batmand.general.visualisation_srv) policy_routing_script=$(uci get batmand.general.policy_routing_script) + disable_client_nat=$(uci get batmand.general.disable_client_nat) + disable_aggregation=$(uci get batmand.general.disable_aggregation) batman_args="" if [ $announce ]; then @@ -44,11 +46,21 @@ start () { if [ $policy_routing_script ]; then batman_args=${batman_args}'--policy-routing-script '$policy_routing_script' ' fi + + if [ $disable_client_nat ]; then + batman_args=${batman_args}'--disable-client-nat ' + fi + + if [ $disable_aggregation ]; then + batman_args=${batman_args}'--disable-aggregation ' + fi batman_args=${batman_args}$interface batmand $batman_args >/dev/null 2>&1 } stop () { - killall batmand + killall batmand } + + diff --git a/files/etc/init.d/vis b/files/etc/init.d/vis new file mode 100644 index 0000000..26db938 --- /dev/null +++ b/files/etc/init.d/vis @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common +START=90 +. /lib/config/uci.sh +uci_load vis +start () { + interface=$(uci get vis.general.interface) + if [ "$interface" = "" ]; then + echo $1 Error, you must specify at least a network interface + exit + fi + vis_args=$interface + + vis $vis_args >/dev/null 2>&1 +} + +stop () { + killall vis +} + + From 72482978145ba9cc52e90c7cb9a7f3607a74af4d Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Mon, 18 May 2009 17:49:15 +0000 Subject: [PATCH 31/40] [batman] bump revision / handle multiple HNA / deal with DEVELOPER=1 properly git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@15917 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 8 ++++---- files/etc/config/batmand | 2 +- files/etc/init.d/batmand | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 549952f..052039b 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand -PKG_REV:=1249 +PKG_REV:=1267 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" @@ -105,15 +105,15 @@ MAKE_BATGAT_ARGS += \ define Build/Configure endef -ifneq ($(DEVEL_CONFIG)$(CONFIG_PACKAGE_batmand),) +ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_batmand),) BUILD_BATMAND := $(MAKE) -C $(PKG_BUILD_DIR)/batman $(MAKE_BATMAND_ARGS) endif -ifneq ($(CONFIG_DEVEL)$(CONFIG_PACKAGE_vis),) +ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_vis),) BUILD_VIS := $(MAKE) -C $(PKG_BUILD_DIR)/vis $(MAKE_VIS_ARGS) endif -ifneq ($(CONFIG_DEVEL)$(CONFIG_PACKAGE_kmod-batgat),) +ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_kmod-batgat),) BUILD_BATGAT := $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATGAT_ARGS) endif diff --git a/files/etc/config/batmand b/files/etc/config/batmand index a67fa5d..6d1f3be 100644 --- a/files/etc/config/batmand +++ b/files/etc/config/batmand @@ -1,6 +1,6 @@ config batmand general option interface ath0 - option announce + option hna option gateway_class option originator_interval option preferred_gateway diff --git a/files/etc/init.d/batmand b/files/etc/init.d/batmand index 5da2062..411f025 100644 --- a/files/etc/init.d/batmand +++ b/files/etc/init.d/batmand @@ -8,7 +8,7 @@ start () { echo $1 Error, you must specify at least a network interface exit fi - announce=$(uci get batmand.general.announce) + hnas=$(uci get batmand.general.hna) gateway_class=$(uci get batmand.general.gateway_class) originator_interval=$(uci get batmand.general.originator_interval) preferred_gateway=$(uci get batmand.general.preferred_gateway) @@ -19,9 +19,10 @@ start () { disable_aggregation=$(uci get batmand.general.disable_aggregation) batman_args="" - if [ $announce ]; then - batman_args=${batman_args}'-a '$announce' ' - fi + for hna in $hnas + do + batman_args=${batman_args}'-a '$hna' ' + done if [ $gateway_class ]; then batman_args=${batman_args}'-g '$gateway_class' ' From c25ab373c353f84f30498c5dad84d14308a4cb4c Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Mon, 8 Jun 2009 09:12:24 +0000 Subject: [PATCH 32/40] [batman] removing batman-adv userspace as it is not supported anymore (see: http://www.open-mesh.net/changeset/1283) git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@16376 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- files/etc/init.d/batmand | 3 +-- files/etc/init.d/vis | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 052039b..658fa6f 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand -PKG_REV:=1267 +PKG_REV:=1289 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" diff --git a/files/etc/init.d/batmand b/files/etc/init.d/batmand index 411f025..403e9f3 100644 --- a/files/etc/init.d/batmand +++ b/files/etc/init.d/batmand @@ -1,7 +1,6 @@ #!/bin/sh /etc/rc.common START=90 -. /lib/config/uci.sh -uci_load batmand + start () { interface=$(uci get batmand.general.interface) if [ "$interface" = "" ]; then diff --git a/files/etc/init.d/vis b/files/etc/init.d/vis index 26db938..ef18eb7 100644 --- a/files/etc/init.d/vis +++ b/files/etc/init.d/vis @@ -1,7 +1,6 @@ #!/bin/sh /etc/rc.common START=90 -. /lib/config/uci.sh -uci_load vis + start () { interface=$(uci get vis.general.interface) if [ "$interface" = "" ]; then From 3319ea795c93c3585a623dd1867863b9780db9fc Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Wed, 7 Oct 2009 18:28:58 +0000 Subject: [PATCH 33/40] [batman] bump batman version to latest git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@17985 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 658fa6f..e6c830a 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand -PKG_REV:=1289 +PKG_REV:=1439 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" From fda5e7eba13b48a9318c19d27772cf62dc3b9cb0 Mon Sep 17 00:00:00 2001 From: Stephen Walker Date: Sun, 19 Sep 2010 14:15:24 +0000 Subject: [PATCH 35/40] [packages] batman, bmxd: change urls for the open-mesh.net -> open-mesh.org move git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@23089 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e6c830a..821e33a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,9 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -# $Id: Makefile 14803 2009-03-09 05:50:38Z marek $ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk @@ -18,7 +17,7 @@ PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),$(PKG_NAME))-$(PKG_VERSION) -PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/ +PKG_SOURCE_URL:=http://downloads.open-mesh.org/svn/batman/trunk/ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR) @@ -27,7 +26,7 @@ PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/batman/linux/modules include $(INCLUDE_DIR)/package.mk define Package/batmand/Default - URL:=http://www.open-mesh.net/ + URL:=http://www.open-mesh.org/ MAINTAINER:=Marek Lindner endef From 619afa82ec58f9af56d33d2913de34caa109ef4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCsch?= Date: Thu, 7 Oct 2010 22:06:23 +0000 Subject: [PATCH 36/40] batman: 2.6.36 compile fixes git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@23313 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- patches/100-2.6.36.patch | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 patches/100-2.6.36.patch diff --git a/patches/100-2.6.36.patch b/patches/100-2.6.36.patch new file mode 100644 index 0000000..566c23b --- /dev/null +++ b/patches/100-2.6.36.patch @@ -0,0 +1,47 @@ +--- + batman/linux/modules/gateway.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +--- batmand-r1439.orig/batman/linux/modules/gateway.c ++++ batmand-r1439/batman/linux/modules/gateway.c +@@ -29,6 +29,7 @@ static struct class *batman_class; + static int batgat_open(struct inode *inode, struct file *filp); + static int batgat_release(struct inode *inode, struct file *file); + static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg ); ++static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg ); + + + static void udp_data_ready(struct sock *sk, int len); +@@ -53,7 +54,11 @@ static int proc_clients_read(char *buf, + static struct file_operations fops = { + .open = batgat_open, + .release = batgat_release, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ .unlocked_ioctl = batgat_ioctl_unlocked, ++#else + .ioctl = batgat_ioctl, ++#endif + }; + + +@@ -166,6 +171,20 @@ static int batgat_release(struct inode * + } + + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++#include ++static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg ) ++{ ++ int ret; ++ ++ lock_kernel(); ++ ret = batgat_ioctl(file->f_path.dentry->d_inode, file, cmd, arg); ++ unlock_kernel(); ++ ++ return ret; ++} ++#endif ++ + static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg ) + { + uint8_t tmp_ip[4]; From 6457561c19cfb33931ca5c7c7d1067b5bbe1f8cc Mon Sep 17 00:00:00 2001 From: Daniel Dickinson Date: Sat, 12 Mar 2011 06:55:07 +0000 Subject: [PATCH 37/40] [net] Routing and Redirection: Moved programs for routing and redirecting/relaying traffic to the Routing and Redirection submenu. git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@26072 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 821e33a..db1bc37 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ define Package/batmand $(call Package/batmand/Default) SECTION:=net CATEGORY:=Network + SUBMENU:=Routing and Redirection DEPENDS:=+libpthread +kmod-tun TITLE:=B.A.T.M.A.N. layer 3 routing daemon endef From de6276efebbc6a228460c09838c34c1b2a22ae70 Mon Sep 17 00:00:00 2001 From: Daniel Dickinson Date: Sat, 12 Mar 2011 08:23:20 +0000 Subject: [PATCH 38/40] [net] Routing and Redirection: Moved vis visualation server for B.A.T.M.A.N. routing daemon to Routing and Redirection submenu. git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@26100 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index db1bc37..b17818a 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,7 @@ define Package/vis $(call Package/batmand/Default) SECTION:=net CATEGORY:=Network + SUBMENU:=Routing and Redirection DEPENDS:=+libpthread TITLE:=visualization server for B.A.T.M.A.N. layer 3 endef From c188b202935b50e6b92ff043ff72ca603714ec61 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Wed, 16 Nov 2011 20:02:41 +0000 Subject: [PATCH 39/40] packages: add missing conffiles define git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@29199 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b17818a..cd4a2ec 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2010 OpenWrt.org +# Copyright (C) 2008-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand PKG_REV:=1439 PKG_VERSION:=r$(PKG_REV) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" PKG_SOURCE_PROTO:=svn @@ -132,6 +132,10 @@ define Package/batmand/install $(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config endef +define Package/batmand/conffiles +/etc/config/batmand +endef + define Package/vis/install $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/ @@ -139,6 +143,10 @@ define Package/vis/install $(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config endef +define Package/vis/conffiles +/etc/config/vis +endef + $(eval $(call BuildPackage,batmand)) $(eval $(call BuildPackage,vis)) $(eval $(call KernelPackage,batgat)) From 479b1fc487e15b53fb046ebcf9a006d27283d3be Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 18 Apr 2013 18:46:32 +0200 Subject: [PATCH 40/40] Move batman files into subdirectory --- Makefile => batman/Makefile | 2 +- {files => batman/files}/etc/config/batmand | 0 {files => batman/files}/etc/config/vis | 0 {files => batman/files}/etc/init.d/batmand | 0 {files => batman/files}/etc/init.d/vis | 0 {patches => batman/patches}/100-2.6.36.patch | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename Makefile => batman/Makefile (99%) rename {files => batman/files}/etc/config/batmand (100%) rename {files => batman/files}/etc/config/vis (100%) rename {files => batman/files}/etc/init.d/batmand (100%) rename {files => batman/files}/etc/init.d/vis (100%) rename {patches => batman/patches}/100-2.6.36.patch (100%) diff --git a/Makefile b/batman/Makefile similarity index 99% rename from Makefile rename to batman/Makefile index cd4a2ec..4026496 100644 --- a/Makefile +++ b/batman/Makefile @@ -59,7 +59,7 @@ endef define KernelPackage/batgat $(call Package/batmand/Default) SUBMENU:=Network Support - DEPENDS:=+batmand + DEPENDS:=+batmand @BROKEN TITLE:=B.A.T.M.A.N. gateway module FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX) AUTOLOAD:=$(call AutoLoad,50,batgat) diff --git a/files/etc/config/batmand b/batman/files/etc/config/batmand similarity index 100% rename from files/etc/config/batmand rename to batman/files/etc/config/batmand diff --git a/files/etc/config/vis b/batman/files/etc/config/vis similarity index 100% rename from files/etc/config/vis rename to batman/files/etc/config/vis diff --git a/files/etc/init.d/batmand b/batman/files/etc/init.d/batmand similarity index 100% rename from files/etc/init.d/batmand rename to batman/files/etc/init.d/batmand diff --git a/files/etc/init.d/vis b/batman/files/etc/init.d/vis similarity index 100% rename from files/etc/init.d/vis rename to batman/files/etc/init.d/vis diff --git a/patches/100-2.6.36.patch b/batman/patches/100-2.6.36.patch similarity index 100% rename from patches/100-2.6.36.patch rename to batman/patches/100-2.6.36.patch