batman-adv: upgrade package to latest release 2012.1.0
authorMarek Lindner <lindner_marek@yahoo.de>
Mon, 16 Apr 2012 17:36:28 +0000 (17:36 +0000)
committerMarek Lindner <lindner_marek@yahoo.de>
Mon, 16 Apr 2012 17:36:28 +0000 (17:36 +0000)
Also fix hotplug scripts to load batman-adv module when necessary.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman-adv@31317 3c298f89-4303-0410-b956-a3cf2f4a3e73

Makefile
files/etc/hotplug.d/net/99-batman-adv
files/lib/batman-adv/config.sh
files/usr/sbin/batman-adv

index 8a409949d7f42c99465f04abae0a6e2b857c4406..3f2737e9ef04db801b306ba8d7efd53e4d04def2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=batman-adv
 
-PKG_VERSION:=2012.0.0
-BATCTL_VERSION:=2012.0.0
-PKG_MD5SUM:=f1de23457a47ca4369ee1f0e0b7fc405
-BATCTL_MD5SUM:=27991c2921e18657c7262e917d45106a
+PKG_VERSION:=2012.1.0
+BATCTL_VERSION:=2012.1.0
+PKG_MD5SUM:=a66fdc92c677aadae339073c560a454e
+BATCTL_MD5SUM:=afdc15c886f27f7740212db50db47190
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
@@ -47,12 +47,14 @@ endef
 
 MAKE_BATMAN_ADV_ARGS += \
        CROSS_COMPILE="$(TARGET_CROSS)" \
+       KERNELPATH="$(LINUX_DIR)" \
        ARCH="$(LINUX_KARCH)" \
        PATH="$(TARGET_PATH)" \
-       $(if $(CONFIG_KMOD_BATMAN_ADV_DEBUG_LOG),EXTRA_CFLAGS="-DCONFIG_BATMAN_ADV_DEBUG") \
        SUBDIRS="$(PKG_BUILD_DIR)" \
+       PWD="$(PKG_BUILD_DIR)" \
        LINUX_VERSION="$(LINUX_VERSION)" \
-       REVISION="" modules
+       CONFIG_BATMAN_ADV_DEBUG=$(if $(CONFIG_KMOD_BATMAN_ADV_DEVEL_DEBUG_LOG),y,n) \
+       REVISION="" all
 
 MAKE_BATCTL_ARGS += \
        CFLAGS="$(TARGET_CFLAGS)" \
@@ -96,8 +98,7 @@ define Build/Patch
 endef
 
 define Build/Compile
-       cp $(PKG_BUILD_DIR)/Makefile.kbuild $(PKG_BUILD_DIR)/Makefile
-       $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATMAN_ADV_ARGS)
+       $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_BATMAN_ADV_ARGS)
        $(BATCTL_BUILD)
 endef
 
index fe19e6470af981b367123fe3de8eedcac2a2589b..42d4c2962dce19883b6e09a8c3494f3fd991d093 100644 (file)
@@ -2,6 +2,7 @@
 
 . /lib/batman-adv/config.sh
 
+bat_load_module
 config_load batman-adv
 
 case "$ACTION" in
index 044c2f64bca92e7511187a9c9d26d78c9546697c..24037b08ab5cdeaa791c7cf41b1c13a073bd0b56 100644 (file)
@@ -1,6 +1,15 @@
 #!/bin/sh
 
-bat_config(){
+bat_load_module()
+{
+       [ -d "/sys/module/batman_adv/" ] && return
+       
+       . /etc/functions.sh
+       load_modules /etc/modules.d/*-lib-crc16 /etc/modules.d/*-batman-adv     
+}
+
+bat_config()
+{
        local mesh="$1"
        local aggregated_ogms bonding fragmentation gw_bandwidth gw_mode gw_sel_class log_level orig_interval hop_penalty vis_mode
 
@@ -30,7 +39,8 @@ bat_config(){
        
 }
 
-bat_add_interface(){
+bat_add_interface()
+{
        local mesh="$1"
        local interface="$2"
        local interfaces
@@ -47,7 +57,8 @@ bat_add_interface(){
        done
 }
 
-bat_del_interface(){
+bat_del_interface()
+{
        local mesh="$1"
        local interface="$2"
        local interfaces
index 6580756ab44bc7929cd2835c9fbc0f762df8eeca..93ae1b58f3c9c82007fdbdf9c071feb820dce255 100644 (file)
@@ -26,6 +26,7 @@ stop_mesh() {
 
 # can also be used with "batman-adv start bat0"
 start() {
+       bat_load_module
        config_load batman-adv
 
        if [ -n "$1" ]; then