urstp: add R/STP support

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2021-08-25 14:15:10 +02:00
parent 79e8e2e005
commit 9d0b3d50c1
5 changed files with 58 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/blogic/ucentral-schema.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-02-15
PKG_SOURCE_VERSION:=e0c42658d720bcec1cb599aeb3b69dc331e0fb04
PKG_SOURCE_VERSION:=57564233f371b3e3df92236ab9ea7e6b0cd0be2e
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -0,0 +1,41 @@
#
# Copyright (C) 2014-2021 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:=ustp
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/nbd168/ustp
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-08-24
PKG_SOURCE_VERSION:=fd93aaef9ba99188e30731651c589a2ab9bfc421
PKG_MIRROR_HASH:=ef99770c4992e236feb46efef7ded68b77de8dbd0a8aa99ab71788e7b35f9b58
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/ustp
SECTION:=net
CATEGORY:=Network
TITLE:=OpenWrt STP/RSTP daemon
DEPENDS:=+libubox +libubus
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -flto
TARGET_LDFLAGS += -flto -fuse-linker-plugin
define Package/ustp/install
$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ipkg-install/sbin/* $(1)/sbin/
$(INSTALL_BIN) ./files/ustpd.init $(1)/etc/init.d/ustpd
endef
$(eval $(call BuildPackage,ustp))

View File

@@ -0,0 +1,14 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2021 OpenWrt.org
START=50
USE_PROCD=1
PROG=/sbin/ustpd
start_service() {
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance
}

View File

@@ -18,3 +18,4 @@ packages:
- kmod-sched-mqprio
- tc-full
- switch-fabric
- ustp

View File

@@ -42,6 +42,7 @@ packages:
- ucode
- udhcpsnoop
- usteer
- ustp
- libustream-openssl
- udevmand
- umdns