bridgemngr: option to expose datamodel using dmf

This commit is contained in:
Xiaofeng Meng 2025-12-03 09:57:18 +01:00 committed by Vivek Dutta
parent 7c2fe283de
commit 948502f1b4
2 changed files with 21 additions and 2 deletions

View file

@ -20,4 +20,9 @@ config BRIDGEMNGR_BRIDGE_VENDOR_EXT
config BRIDGEMNGR_BRIDGE_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
config BRIDGEMNGR_USE_DM_FRAMEWORK
bool "Use new DM framework support"
default n
endif

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bridgemngr
PKG_VERSION:=1.1.6
PKG_VERSION:=1.2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr.git
PKG_SOURCE_VERSION:=882f8c8cc9a97372297d192cc916c4f8ffe7c25a
PKG_SOURCE_VERSION:=3c8b4bbc53cf89dc98a54fa1490c160a77e24c66
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif
@ -21,12 +21,14 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
include ../dm-framework/dm-framework.mk
define Package/bridgemngr
CATEGORY:=Utilities
TITLE:=Bridge Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
DEPENDS+= +BRIDGEMNGR_USE_DM_FRAMEWORK:dm-framework
endef
define Package/bridgemngr/description
@ -37,7 +39,9 @@ define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifneq ($(CONFIG_BRIDGEMNGR_USE_DM_FRAMEWORK),y)
MAKE_PATH:=src
endif
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
@ -55,15 +59,25 @@ ifeq ($(CONFIG_BRIDGEMNGR_COPY_PBITS),y)
TARGET_CFLAGS+=-DBRIDGEMNGR_COPY_PBITS
endif
ifeq ($(CONFIG_BRIDGEMNGR_USE_DM_FRAMEWORK),y)
define Build/Compile
$(call Build/Compile/DM,$(PKG_BUILD_DIR)/dmf,$(PKG_BUILD_DIR)/dmf,$(VENDOR_PREFIX))
endef
endif
define Package/bridgemngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
ifeq ($(CONFIG_BRIDGEMNGR_USE_DM_FRAMEWORK),y)
$(call Build/Install/DM,$(PKG_BUILD_DIR)/dmf,$(PKG_BUILD_DIR)/dmf,$(1),bridgemngr)
else
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libbridgemngr.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_EXT), y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME) 10
$(BBFDM_INSTALL_MS_PLUGIN) -v ${VENDOR_PREFIX} ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME) 11
endif
endif
$(INSTALL_BIN) ./files/etc/init.d/bridging $(1)/etc/init.d/