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.
This commit is contained in:
parent
a502295eaf
commit
4ca67dcca5
@ -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``
|
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.
|
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
|
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).
|
``primary_mac``, ``lan_ifname`` and ``wan_ifname`` in ``/lib/gluon/core/sysconfig/`` contain sensible values).
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
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))
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec /lib/gluon/mesh-batman-adv-core/config_mesh_interface setup 1528
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec /lib/gluon/mesh-batman-adv-core/config_mesh_interface teardown
|
|
@ -1 +0,0 @@
|
|||||||
14
|
|
@ -1,33 +0,0 @@
|
|||||||
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))
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec /lib/gluon/mesh-batman-adv-core/config_mesh_interface setup 1532
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec /lib/gluon/mesh-batman-adv-core/config_mesh_interface teardown
|
|
@ -1 +0,0 @@
|
|||||||
15
|
|
@ -1,42 +0,0 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=gluon-mesh-batman-adv-core
|
|
||||||
PKG_VERSION:=1
|
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
|
||||||
PKG_BUILD_DEPENDS := respondd
|
|
||||||
|
|
||||||
include ../gluon.mk
|
|
||||||
|
|
||||||
|
|
||||||
define Package/gluon-mesh-batman-adv-core
|
|
||||||
SECTION:=gluon
|
|
||||||
CATEGORY:=Gluon
|
|
||||||
TITLE:=Support for batman-adv meshing (core)
|
|
||||||
DEPENDS:=+gluon-core +libgluonutil +gluon-client-bridge +gluon-ebtables +firewall +libiwinfo +kmod-dummy +libnl-tiny
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Prepare
|
|
||||||
mkdir -p $(PKG_BUILD_DIR)
|
|
||||||
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(call Build/Compile/Default)
|
|
||||||
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/gluon-mesh-batman-adv-core/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
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/gluon-mesh-batman-adv-core/postinst
|
|
||||||
#!/bin/sh
|
|
||||||
$(call GluonCheckSite,check_site.lua)
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,gluon-mesh-batman-adv-core))
|
|
70
package/gluon-mesh-batman-adv/Makefile
Normal file
70
package/gluon-mesh-batman-adv/Makefile
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=gluon-mesh-batman-adv
|
||||||
|
PKG_VERSION:=1
|
||||||
|
|
||||||
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
PKG_BUILD_DEPENDS := respondd
|
||||||
|
|
||||||
|
include ../gluon.mk
|
||||||
|
|
||||||
|
|
||||||
|
define Package/gluon-mesh-batman-adv/common
|
||||||
|
SECTION:=gluon
|
||||||
|
CATEGORY:=Gluon
|
||||||
|
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)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(call Build/Compile/Default)
|
||||||
|
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
|
||||||
|
endef
|
||||||
|
|
||||||
|
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.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/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-14))
|
||||||
|
$(eval $(call BuildPackage,gluon-mesh-batman-adv-15))
|
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
exec /lib/gluon/mesh-batman-adv/config_mesh_interface setup
|
@ -0,0 +1,3 @@
|
|||||||
|
#!/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 fixed_mtu = tonumber(os.getenv('FIXED_MTU')) or 0
|
||||||
local transitive = tonumber(os.getenv('TRANSITIVE')) 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
|
if not fs.access('/sys/class/net/primary0') then
|
||||||
os.execute([[
|
os.execute([[
|
@ -207,7 +207,7 @@ static struct json_object * get_mesh(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct json_object * get_batman_adv_compat(void) {
|
static struct json_object * get_batman_adv_compat(void) {
|
||||||
FILE *f = fopen("/lib/gluon/mesh-batman-adv-core/compat", "r");
|
FILE *f = fopen("/lib/gluon/mesh-batman-adv/compat", "r");
|
||||||
if (!f)
|
if (!f)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user