Browse Source

batman-adv-legacy: remove the package

pull/237/head
Martin Weinelt 2 years ago
parent
commit
de7b228cae
No known key found for this signature in database GPG Key ID: BD4AA0528F63F17E
  1. 29
      net/batman-adv-legacy/Config.in
  2. 74
      net/batman-adv-legacy/Makefile
  3. 20
      net/batman-adv-legacy/files/etc/config/batman-adv-legacy
  4. 12
      net/batman-adv-legacy/files/etc/hotplug.d/net/99-batman-adv-legacy
  5. 48
      net/batman-adv-legacy/files/lib/batman-adv-legacy/config.sh
  6. 33
      net/batman-adv-legacy/files/lib/netifd/proto/batadv_legacy.sh

29
net/batman-adv-legacy/Config.in

@ -1,29 +0,0 @@
config KMOD_BATMAN_ADV_LEGACY_DEBUG_LOG
bool "enable verbose debug logging"
depends on PACKAGE_kmod-batman-adv-legacy
default n
config KMOD_BATMAN_ADV_LEGACY_BLA
bool "enable bridge loop avoidance"
depends on PACKAGE_kmod-batman-adv-legacy
default y
config KMOD_BATMAN_ADV_LEGACY_DAT
bool "enable distributed arp table"
depends on PACKAGE_kmod-batman-adv-legacy
default y
config KMOD_BATMAN_ADV_LEGACY_NC
bool "enable network coding [requires promisc mode support]"
depends on PACKAGE_kmod-batman-adv-legacy
default n
config KMOD_BATMAN_ADV_LEGACY_BATCTL
bool "enable batctl"
depends on PACKAGE_kmod-batman-adv-legacy
default y
help
batctl is a more intuitive managment utility for B.A.T.M.A.N.-Advanced.
It is an easier method for configuring batman-adv and
provides some additional tools for debugging as well.

74
net/batman-adv-legacy/Makefile

@ -1,74 +0,0 @@
#
# Copyright (C) 2010 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:=batman-adv-legacy
PKG_VERSION:=2019-04-22
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/freifunk-gluon/batman-adv-legacy.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=ea42aed32284121e90857089cd741e237d34cdea
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
define KernelPackage/batman-adv-legacy
URL:=http://www.open-mesh.org/
MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>, Linus Lüssing <linus.luessing@c0d3.blue>
SUBMENU:=Network Support
DEPENDS:=+kmod-lib-crc16 +kmod-crypto-crc32c +kmod-lib-crc32c +libc
TITLE:=B.A.T.M.A.N. Adv Legacy
FILES:=$(PKG_BUILD_DIR)/batman-adv-legacy.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/batman-adv-legacy/description
B.A.T.M.A.N. advanced is a kernel module which allows to
build layer 2 mesh networks.
endef
define KernelPackage/batman-adv-legacy/config
source "$(SOURCE)/Config.in"
endef
MAKE_FLAGS += \
CROSS_COMPILE="$(TARGET_CROSS)" \
KERNELPATH="$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \
PATH="$(TARGET_PATH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
PWD="$(PKG_BUILD_DIR)" \
LINUX_VERSION="$(LINUX_VERSION)" \
CONFIG_BATMAN_ADV_DEBUG=$(if $(CONFIG_KMOD_BATMAN_ADV_LEGACY_DEBUG_LOG),y,n) \
CONFIG_BATMAN_ADV_BLA=$(if $(CONFIG_KMOD_BATMAN_ADV_LEGACY_BLA),y,n) \
CONFIG_BATMAN_ADV_DAT=$(if $(CONFIG_KMOD_BATMAN_ADV_LEGACY_DAT),y,n) \
CONFIG_BATMAN_ADV_NC=$(if $(CONFIG_KMOD_BATMAN_ADV_LEGACY_NC),y,n) \
REVISION="" all
define Build/Prepare
$(call Build/Prepare/Default)
$(SED) '/#define _NET_BATMAN_ADV_MAIN_H_/a\#undef CONFIG_MODULE_STRIPPED' \
$(PKG_BUILD_DIR)/main.h
endef
define Build/Compile
$(call Build/Compile/Default,)
mv $(PKG_BUILD_DIR)/batman-adv.$(LINUX_KMOD_SUFFIX) $(PKG_BUILD_DIR)/batman-adv-legacy.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/batman-adv-legacy/install
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/hotplug.d/net $(1)/etc/hotplug.d/iface $(1)/lib/batman-adv-legacy $(1)/usr/sbin $(1)/lib/netifd/proto
$(INSTALL_DATA) ./files/etc/config/batman-adv-legacy $(1)/etc/config
$(INSTALL_DATA) ./files/lib/batman-adv-legacy/config.sh $(1)/lib/batman-adv-legacy
$(INSTALL_BIN) ./files/etc/hotplug.d/net/99-batman-adv-legacy $(1)/etc/hotplug.d/net
$(INSTALL_BIN) ./files/lib/netifd/proto/batadv_legacy.sh $(1)/lib/netifd/proto
endef
$(eval $(call KernelPackage,batman-adv-legacy))

20
net/batman-adv-legacy/files/etc/config/batman-adv-legacy

@ -1,20 +0,0 @@
config 'mesh' 'bat0'
option 'aggregated_ogms'
option 'ap_isolation'
option 'bonding'
option 'fragmentation'
option 'gw_bandwidth'
option 'gw_mode'
option 'gw_sel_class'
option 'log_level'
option 'orig_interval'
option 'vis_mode'
option 'bridge_loop_avoidance'
option 'distributed_arp_table'
option 'network_coding'
option 'hop_penalty'
# yet another batX instance
# config 'mesh' 'bat5'
# option 'interfaces' 'second_mesh'

12
net/batman-adv-legacy/files/etc/hotplug.d/net/99-batman-adv-legacy

@ -1,12 +0,0 @@
#!/bin/sh
. /lib/batman-adv-legacy/config.sh
bat_load_module
config_load batman-adv-legacy
case "$ACTION" in
add)
[ -d /sys/class/net/$INTERFACE/mesh/ ] && bat_config "$INTERFACE"
;;
esac

48
net/batman-adv-legacy/files/lib/batman-adv-legacy/config.sh

@ -1,48 +0,0 @@
#!/bin/sh
bat_load_module()
{
[ -d "/sys/module/batman_adv/" ] && return
. /lib/functions.sh
load_modules /etc/modules.d/*-crc16 /etc/modules.d/*-crypto* /etc/modules.d/*-lib-crc* /etc/modules.d/*-batman-adv-legacy*
}
bat_config()
{
local mesh="$1"
local aggregated_ogms ap_isolation bonding bridge_loop_avoidance distributed_arp_table fragmentation
local gw_bandwidth gw_mode gw_sel_class hop_penalty network_coding log_level orig_interval vis_mode
config_get aggregated_ogms "$mesh" aggregated_ogms
config_get ap_isolation "$mesh" ap_isolation
config_get bonding "$mesh" bonding
config_get bridge_loop_avoidance "$mesh" bridge_loop_avoidance
config_get distributed_arp_table "$mesh" distributed_arp_table
config_get fragmentation "$mesh" fragmentation
config_get gw_bandwidth "$mesh" gw_bandwidth
config_get gw_mode "$mesh" gw_mode
config_get gw_sel_class "$mesh" gw_sel_class
config_get hop_penalty "$mesh" hop_penalty
config_get network_coding "$mesh" network_coding
config_get log_level "$mesh" log_level
config_get orig_interval "$mesh" orig_interval
config_get vis_mode "$mesh" vis_mode
[ ! -f "/sys/class/net/$mesh/mesh/orig_interval" ] && echo "batman-adv-legacy mesh $mesh does not exist - check your interface configuration" && return 1
[ -n "$aggregate_ogms" ] && echo $aggregate_ogms > /sys/class/net/$mesh/mesh/aggregate_ogms
[ -n "$ap_isolation" ] && echo $ap_isolation > /sys/class/net/$mesh/mesh/ap_isolation
[ -n "$bonding" ] && echo $bonding > /sys/class/net/$mesh/mesh/bonding
[ -n "$bridge_loop_avoidance" ] && echo $bridge_loop_avoidance > /sys/class/net/$mesh/mesh/bridge_loop_avoidance 2>&-
[ -n "$distributed_arp_table" ] && echo $distributed_arp_table > /sys/class/net/$mesh/mesh/distributed_arp_table 2>&-
[ -n "$fragmentation" ] && echo $fragmentation > /sys/class/net/$mesh/mesh/fragmentation
[ -n "$gw_bandwidth" ] && echo $gw_bandwidth > /sys/class/net/$mesh/mesh/gw_bandwidth
[ -n "$gw_mode" ] && echo $gw_mode > /sys/class/net/$mesh/mesh/gw_mode
[ -n "$gw_sel_class" ] && echo $gw_sel_class > /sys/class/net/$mesh/mesh/gw_sel_class
[ -n "$hop_penalty" ] && echo $hop_penalty > /sys/class/net/$mesh/mesh/hop_penalty
[ -n "$network_coding" ] && echo $network_coding > /sys/class/net/$mesh/mesh/network_coding 2>&-
[ -n "$log_level" ] && echo $log_level > /sys/class/net/$mesh/mesh/log_level 2>&-
[ -n "$orig_interval" ] && echo $orig_interval > /sys/class/net/$mesh/mesh/orig_interval
[ -n "$vis_mode" ] && echo $vis_mode > /sys/class/net/$mesh/mesh/vis_mode
}

33
net/batman-adv-legacy/files/lib/netifd/proto/batadv_legacy.sh

@ -1,33 +0,0 @@
#!/bin/sh
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
proto_batadv_legacy_init_config() {
proto_config_add_string "mesh"
proto_config_add_string "mesh_no_rebroadcast"
}
proto_batadv_legacy_setup() {
local config="$1"
local iface="$2"
local mesh mesh_no_rebroadcast
json_get_vars mesh mesh_no_rebroadcast
echo "$mesh" > "/sys/class/net/$iface/batman_adv/mesh_iface"
[ -n "$mesh_no_rebroadcast" ] && echo "$mesh_no_rebroadcast" > "/sys/class/net/$iface/batman_adv/no_rebroadcast"
proto_init_update "$iface" 1
proto_send_update "$config"
}
proto_batadv_legacy_teardown() {
local config="$1"
local iface="$2"
(echo "none" > "/sys/class/net/$iface/batman_adv/mesh_iface") 2>/dev/null
}
add_protocol batadv_legacy
Loading…
Cancel
Save