Skip to content
Snippets Groups Projects
Unverified Commit 4ca67dcc authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-mesh-batman-adv-*: unify into a single source package

For simplicity, we don't use different MTUs for compat 14 and 15 anymore,
there's no harm in using 1532 for batman-adv-legacy as well.
parent a502295e
No related branches found
No related tags found
No related merge requests found
Showing
with 78 additions and 82 deletions
......@@ -125,7 +125,7 @@ If the new platform works fine with the definitions found in ``default.c``, noth
create a definition for the added target or subtarget, either by symlinking one of the files in the ``templates``
directory, or adding a new source file.
On many targets, Gluon's network setup scripts (mainly in the packages ``gluon-core`` and ``gluon-mesh-batman-adv-core``)
On many targets, Gluon's network setup scripts (mainly in the package ``gluon-core``)
won't run correctly without some adjustments, so better double check that everything is fine there (and the files
``primary_mac``, ``lan_ifname`` and ``wan_ifname`` in ``/lib/gluon/core/sysconfig/`` contain sensible values).
......
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-mesh-batman-adv-14
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
define Package/gluon-mesh-batman-adv-14
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Support for batman-adv meshing (compat level 14)
DEPENDS:=+gluon-mesh-batman-adv-core +kmod-batman-adv-legacy
PROVIDES:=gluon-mesh-batman-adv
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-mesh-batman-adv-14/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,gluon-mesh-batman-adv-14))
#!/bin/sh
exec /lib/gluon/mesh-batman-adv-core/config_mesh_interface setup 1528
#!/bin/sh
exec /lib/gluon/mesh-batman-adv-core/config_mesh_interface teardown
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-mesh-batman-adv-15
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
define Package/gluon-mesh-batman-adv-15
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Support for batman-adv meshing (compat level 15)
DEPENDS:=+gluon-mesh-batman-adv-core +kmod-batman-adv +batctl
PROVIDES:=gluon-mesh-batman-adv
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-mesh-batman-adv-15/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,gluon-mesh-batman-adv-15))
#!/bin/sh
exec /lib/gluon/mesh-batman-adv-core/config_mesh_interface setup 1532
#!/bin/sh
exec /lib/gluon/mesh-batman-adv-core/config_mesh_interface teardown
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-mesh-batman-adv-core
PKG_NAME:=gluon-mesh-batman-adv
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
......@@ -9,13 +9,26 @@ PKG_BUILD_DEPENDS := respondd
include ../gluon.mk
define Package/gluon-mesh-batman-adv-core
define Package/gluon-mesh-batman-adv/common
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Support for batman-adv meshing (core)
PROVIDES:=gluon-mesh-batman-adv
DEPENDS:=+gluon-core +libgluonutil +gluon-client-bridge +gluon-ebtables +firewall +libiwinfo +kmod-dummy +libnl-tiny
endef
define Package/gluon-mesh-batman-adv-14
$(Package/gluon-mesh-batman-adv/common)
TITLE:=Support for batman-adv meshing (compat level 14)
CONFLICTS:=gluon-mesh-batman-adv-15
DEPENDS+=+kmod-batman-adv-legacy
endef
define Package/gluon-mesh-batman-adv-15
$(Package/gluon-mesh-batman-adv/common)
TITLE:=Support for batman-adv meshing (compat level 15)
DEPENDS+=+kmod-batman-adv +batctl
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
......@@ -26,17 +39,32 @@ define Build/Compile
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-mesh-batman-adv-core/install
define Package/gluon-mesh-batman-adv/common/install
$(CP) ./files/* $(1)/
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(INSTALL_DIR) $(1)/lib/gluon/respondd
$(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/mesh-batman-adv-core.so
$(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/mesh-batman-adv.so
$(INSTALL_DIR) $(1)/lib/gluon/mesh-batman-adv
endef
define Package/gluon-mesh-batman-adv-14/install
$(Package/gluon-mesh-batman-adv/common/install)
echo 14 > $(1)/lib/gluon/mesh-batman-adv/compat
endef
define Package/gluon-mesh-batman-adv-15/install
$(Package/gluon-mesh-batman-adv/common/install)
echo 15 > $(1)/lib/gluon/mesh-batman-adv/compat
endef
define Package/gluon-mesh-batman-adv-core/postinst
define Package/gluon-mesh-batman-adv/common/postinst
#!/bin/sh
$(call GluonCheckSite,check_site.lua)
endef
Package/gluon-mesh-batman-adv-14/postinst := $(Package/gluon-mesh-batman-adv/common/postinst)
Package/gluon-mesh-batman-adv-15/postinst := $(Package/gluon-mesh-batman-adv/common/postinst)
$(eval $(call BuildPackage,gluon-mesh-batman-adv-core))
$(eval $(call BuildPackage,gluon-mesh-batman-adv-14))
$(eval $(call BuildPackage,gluon-mesh-batman-adv-15))
#!/bin/sh
exec /lib/gluon/mesh-batman-adv/config_mesh_interface setup
#!/bin/sh
exec /lib/gluon/mesh-batman-adv/config_mesh_interface teardown
......@@ -13,7 +13,7 @@ if cmd == 'setup' then
local fixed_mtu = tonumber(os.getenv('FIXED_MTU')) or 0
local transitive = tonumber(os.getenv('TRANSITIVE')) or 0
local mtu = tonumber(arg[2])
local mtu = 1532
if not fs.access('/sys/class/net/primary0') then
os.execute([[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment