mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-27 04:23:39 +08:00
Compare commits
154 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e37efb913 | ||
|
|
3e07e3cd0d | ||
|
|
c6be1e0c6b | ||
|
|
606e8e4518 | ||
|
|
4aaf074694 | ||
|
|
b3716a9f42 | ||
|
|
bfdb9eda4f | ||
|
|
3a92a09f66 | ||
|
|
78a07d7719 | ||
|
|
255d5ea39e | ||
|
|
d50a164af7 | ||
|
|
5d6c215f23 | ||
|
|
4de73e9cb0 | ||
|
|
bfee02596a | ||
|
|
f52a5fb870 | ||
|
|
4ec5d4ca03 | ||
|
|
fbdfe7493a | ||
|
|
495dec638a | ||
|
|
32e44b7b5e | ||
|
|
21d30f18a7 | ||
|
|
2617f831a2 | ||
|
|
130d8c243e | ||
|
|
e4494f9958 | ||
|
|
40228bda04 | ||
|
|
27e0257e6a | ||
|
|
4e812c4e18 | ||
|
|
1d6b8e3271 | ||
|
|
8f718e80fd | ||
|
|
6baa72c846 | ||
|
|
779c964b3f | ||
|
|
d120f2e63d | ||
|
|
bc2e7077ec | ||
|
|
924eb2e39c | ||
|
|
64ce9b009f | ||
|
|
50c6a07027 | ||
|
|
ac02982008 | ||
|
|
69c9f88730 | ||
|
|
cb5c1979e6 | ||
|
|
20d31ec7c6 | ||
|
|
f5b8fbb033 | ||
|
|
5e01100d14 | ||
|
|
748e2500f6 | ||
|
|
dc5001c949 | ||
|
|
b84fb8e456 | ||
|
|
6bbf691df1 | ||
|
|
ff6fcd8438 | ||
|
|
d454e5eb38 | ||
|
|
9cfeee53e9 | ||
|
|
2b8c0a26ae | ||
|
|
d752678875 | ||
|
|
6df6762cd7 | ||
|
|
40d4f72784 | ||
|
|
b7cd1f15f9 | ||
|
|
ff2ae72bd2 | ||
|
|
93180ac277 | ||
|
|
84831d3d95 | ||
|
|
09de34b98a | ||
|
|
7da60b67cc | ||
|
|
ce5541aef8 | ||
|
|
4b564df4c0 | ||
|
|
5e6580ccf2 | ||
|
|
15a055ffdd | ||
|
|
e68fac5e9b | ||
|
|
df82765a3b | ||
|
|
f9070e4c3f | ||
|
|
9d94b7d594 | ||
|
|
d1ed021a04 | ||
|
|
9987882a1c | ||
|
|
83b6fb7330 | ||
|
|
8c3d54ff7d | ||
|
|
4e78d1c075 | ||
|
|
2109e5ff4f | ||
|
|
e417f30841 | ||
|
|
6610f42769 | ||
|
|
81cdd1a9ea | ||
|
|
d69061f95e | ||
|
|
7f757e9291 | ||
|
|
5c4719c6e4 | ||
|
|
0ea0df8b82 | ||
|
|
2dceba94a8 | ||
|
|
f34380326f | ||
|
|
547a976981 | ||
|
|
116d6370ca | ||
|
|
6024f034ea | ||
|
|
4fb8ec2016 | ||
|
|
5dfa4996a6 | ||
|
|
eaf990c616 | ||
|
|
d6cf5b6dfe | ||
|
|
03c62cd618 | ||
|
|
ba0e921101 | ||
|
|
8428773a9c | ||
|
|
0c33f36c88 | ||
|
|
1c2b381072 | ||
|
|
4482e7defd | ||
|
|
3740560fd3 | ||
|
|
e4cea887e2 | ||
|
|
4e42c07257 | ||
|
|
26e48a7b83 | ||
|
|
105dab05d2 | ||
|
|
40e062550b | ||
|
|
7bc068c0c6 | ||
|
|
ae243101f1 | ||
|
|
613ef10273 | ||
|
|
06c2d704a9 | ||
|
|
14f7f0d328 | ||
|
|
a0324b3f5e | ||
|
|
16a9b07497 | ||
|
|
7c91b86d01 | ||
|
|
2076e35808 | ||
|
|
8f04c3e3b3 | ||
|
|
76b7d03f5e | ||
|
|
c3bf9de599 | ||
|
|
a3c0948a46 | ||
|
|
084995366f | ||
|
|
a2468234cd | ||
|
|
39445eaec0 | ||
|
|
898455ceee | ||
|
|
7a422d4244 | ||
|
|
cbc1f3b798 | ||
|
|
7e1d84b6d6 | ||
|
|
9821c3fbac | ||
|
|
1eb318b09a | ||
|
|
b1e3ef111b | ||
|
|
e57d5962d1 | ||
|
|
556cd32a18 | ||
|
|
61cf78c264 | ||
|
|
9dfcb15415 | ||
|
|
1420241d40 | ||
|
|
530a4b99bd | ||
|
|
21b3284b75 | ||
|
|
04d13dc7a4 | ||
|
|
a290ae71ee | ||
|
|
d45f42427f | ||
|
|
a230016663 | ||
|
|
60314e6a42 | ||
|
|
38702b44c4 | ||
|
|
75b9f292a0 | ||
|
|
2fc567be5d | ||
|
|
94db04db83 | ||
|
|
d9ae8fac97 | ||
|
|
34dda55644 | ||
|
|
a6ee4c8122 | ||
|
|
368ddf1d31 | ||
|
|
bcdc8e5dc0 | ||
|
|
781f3409ad | ||
|
|
4cc72a2dc6 | ||
|
|
93dee37808 | ||
|
|
42bc8f91ce | ||
|
|
5d16f075ab | ||
|
|
841751d7e2 | ||
|
|
8bc324c3b4 | ||
|
|
20287be7e2 | ||
|
|
6d1e026af4 | ||
|
|
2cfabc4eb2 |
@@ -5,11 +5,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=3.2.7
|
||||
PKG_VERSION:=3.6.0
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=ae196c54590dc343db14a70879f21ef88203c426
|
||||
PKG_SOURCE_VERSION:=a528164bad24d3ce8fd2f5bc34f9afd574003be7
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -32,7 +32,7 @@ define Package/libbbfdm
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for broadband-forum data model
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libbbf_api +libopenssl +libmbedtls
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libbbf_api +libopenssl +libmbedtls +libcurl
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/config
|
||||
|
||||
61
dectmngr/Makefile
Normal file
61
dectmngr/Makefile
Normal file
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# Copyright (C) 2021 IOPSYS Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.0.3
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=004098272e7b9518c25d746c93b2d1d88936379b
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
RSTRIP:=true
|
||||
export BUILD_DIR
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=DECT Manager
|
||||
DEPENDS:= +libubox +ubus
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
DECT manager is a daemon that provides UBUS RPC objects and sends UBUS events for communication with the DECT chip.
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -av --exclude=.* ~/git/voip/dectmngr/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS+="-Wall"
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/app/dectmngr $(1)/usr/sbin/
|
||||
$(STRIP) $(1)/usr/sbin/dectmngr
|
||||
$(CP) ./files/etc/* $(1)/etc/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
1968
dectmngr/files/config/dg400prime-5.3-kernel.config
Normal file
1968
dectmngr/files/config/dg400prime-5.3-kernel.config
Normal file
File diff suppressed because it is too large
Load Diff
6709
dectmngr/files/config/dg400prime-5.3.config
Normal file
6709
dectmngr/files/config/dg400prime-5.3.config
Normal file
File diff suppressed because it is too large
Load Diff
61
dectmngr/files/etc/init.d/dect
Executable file
61
dectmngr/files/etc/init.d/dect
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (C) 2021 OpenWrt.org
|
||||
#
|
||||
|
||||
source /lib/functions/uci-defaults.sh
|
||||
|
||||
START=70
|
||||
STOP=12
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=dectmngr
|
||||
PROG=/usr/sbin/dectmngr
|
||||
|
||||
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
|
||||
stop_and_wait_dectmngr() {
|
||||
pidof $NAME && killall -q $NAME
|
||||
|
||||
pidof $NAME && sleep 2 # wait for the process to stop gracefully
|
||||
while pidof $NAME; do
|
||||
killall -q -9 $NAME
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
start_service() {
|
||||
test $(db get hw.board.hasDect) = "0" && return
|
||||
|
||||
echo 1 > /sys/class/gpio/gpio14/value
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG -comname ttyH0
|
||||
procd_set_param respawn 6 2 3
|
||||
procd_set_param term_timeout 20
|
||||
procd_set_param triggers asterisk
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
test $(db get hw.board.hasDect) = "0" && return
|
||||
|
||||
echo 0 > /sys/class/gpio/gpio14/value
|
||||
stop_and_wait_dectmngr
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop_and_wait_dectmngr
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger asterisk
|
||||
}
|
||||
|
||||
boot() {
|
||||
echo 14 > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio14/direction
|
||||
start
|
||||
}
|
||||
|
||||
27
dectmngr/files/scripts/load_sound_modules.sh
Executable file
27
dectmngr/files/scripts/load_sound_modules.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
SOUND_BASE=/lib/modules/$(uname -r)/kernel/sound
|
||||
SOUND_MODULES="$SOUND_BASE/soundcore.ko $SOUND_BASE/core/snd.ko $SOUND_BASE/core/snd-timer.ko"
|
||||
SOUND_MODULES="$SOUND_MODULES $SOUND_BASE/core/snd-pcm.ko $SOUND_BASE/core/snd-hwdep.ko"
|
||||
SOUND_MODULES="$SOUND_MODULES $SOUND_BASE/core/seq/snd-seq-device.ko"
|
||||
SOUND_MODULES="$SOUND_MODULES $SOUND_BASE/core/seq/snd-seq.ko $SOUND_BASE/core/snd-rawmidi.ko "
|
||||
SOUND_MODULES="$SOUND_MODULES $SOUND_BASE/usb/snd-usbmidi-lib.ko $SOUND_BASE/usb/snd-usb-audio.ko"
|
||||
|
||||
load_sound_modules() {
|
||||
for mod in $SOUND_MODULES; do
|
||||
insmod $mod
|
||||
done
|
||||
}
|
||||
|
||||
unload_sound_modules() {
|
||||
local modules=
|
||||
|
||||
# reverse the order
|
||||
for mod in $SOUND_MODULES; do
|
||||
modules="$mod $modules"
|
||||
done
|
||||
|
||||
for mod in $modules; do
|
||||
rmmod $mod
|
||||
done
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=2c8990fd5275d469e8ab6c7a99e17fe0a56052ea
|
||||
PKG_NAME:=dectmngr2
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
export BUILD_DIR
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/dectmngr2
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Dectmngr2
|
||||
URL:=
|
||||
DEPENDS:= +natalie-dect-h bcmkernel +libubox +ubus +libpicoevent endptmngr
|
||||
endef
|
||||
|
||||
define Package/dectmngr2/description
|
||||
Dectmngr2
|
||||
endef
|
||||
|
||||
|
||||
define Package/dectmngr2/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/dect/
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults/
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/nvs_default $(1)/etc/dect/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
|
||||
$(CP) ./files/dect.config $(1)/etc/config/dect
|
||||
$(CP) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dectmngr2))
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
config dect 'dect'
|
||||
option radio 'auto'
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
# Workaround for product DG400 which has an
|
||||
# incorrect value in nvram from factory.
|
||||
|
||||
if [ -e "/proc/nvram/BoardId" ]; then
|
||||
boardid=$(cat /proc/nvram/BoardId)
|
||||
ulBoardStuffOption=$(cat /proc/nvram/ulBoardStuffOption)
|
||||
|
||||
if [ "$boardid" = "DG400R0" -a "$ulBoardStuffOption" = "0xffffffff" ]; then
|
||||
echo "0xfffffff2" >/proc/nvram/ulBoardStuffOption
|
||||
|
||||
db -q batch <<-EOT
|
||||
set hw.board.has_dect=1
|
||||
commit hw.board
|
||||
EOT
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -13,7 +13,7 @@ PKG_VERSION:=1.1.0
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=400cc66081f2b10b481d5a745bc505b78af098bd
|
||||
PKG_SOURCE_VERSION:=1fa1cee62c52c69c321ddf93399fef9483520996
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
if (PACKAGE_libwifi || PACKAGE_libdsl || PACKAGE_libethernet)
|
||||
menu "configurations"
|
||||
|
||||
config IOP_LLA_LIBS_DEBUG
|
||||
bool "Enable debugging support"
|
||||
default n
|
||||
|
||||
config LIBWIFI_DEBUG
|
||||
depends on PACKAGE_libwifi
|
||||
bool "Enable wifi debugging"
|
||||
default n
|
||||
|
||||
config LIBDSL_DEBUG
|
||||
depends on PACKAGE_libdsl
|
||||
bool "Enable xdsl debugging"
|
||||
default n
|
||||
|
||||
config LIBDSL_TEST
|
||||
depends on PACKAGE_libdsl
|
||||
bool "Libdsl test program"
|
||||
default n
|
||||
endmenu
|
||||
endif
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=6.0.2
|
||||
PKG_VERSION:=6.1.20
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=fee575f414324c68d0916fab06d10eccb78541fd
|
||||
PKG_SOURCE_VERSION:=c69171f8025a92c3224fd7eb0f6569126b86832e
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
@@ -29,39 +29,18 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/easy-soc-libs
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=IOPSYS easy SoC libraries
|
||||
SUBMENU:=IOPSYS easy SoC libraries
|
||||
TITLE:=IOPSYS Easy SoC libraries
|
||||
SUBMENU:=IOPSYS Easy SoC libraries
|
||||
DEPENDS:=+libopenssl
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libwifi/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libeasy
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= Common helper functions library (libeasy)
|
||||
DEPENDS+=+libnl +libnl-route
|
||||
endef
|
||||
|
||||
define Package/libwifi
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= WiFi library (libwifi)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy
|
||||
endef
|
||||
|
||||
define Package/libethernet
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= Ethernet library (libethernet)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_iopsys_ramips:swconfig
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
|
||||
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_PLATFORM=MEDIATEK
|
||||
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
|
||||
@@ -83,21 +62,20 @@ endif
|
||||
|
||||
export TARGET_PLATFORM
|
||||
|
||||
ifdef CONFIG_IOP_LLA_LIBS_DEBUG
|
||||
TARGET_CFLAGS += -DIOP_LLA_LIBS_DEBUG
|
||||
endif
|
||||
|
||||
define Package/libdsl
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= XDSL library (libdsl)
|
||||
DEPENDS+=+TARGET_intel_mips:dsl-cpe-api-vrx +TARGET_intel_mips:dsl-cpe-fapi +TARGET_intel_mips:kmod-ppa-drv
|
||||
endef
|
||||
|
||||
subdirs := \
|
||||
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
|
||||
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
|
||||
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
|
||||
$(if $(CONFIG_PACKAGE_libethernet),libethernet)
|
||||
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
|
||||
$(if $(CONFIG_PACKAGE_libqos),libqos)
|
||||
|
||||
EASY_SOC_LIBS := \
|
||||
libeasy \
|
||||
libwifi \
|
||||
libdsl \
|
||||
libethernet \
|
||||
libqos
|
||||
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
@@ -117,79 +95,36 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/InstallDev/libeasy
|
||||
$(INSTALL_DIR) $(1)/usr/include/easy
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/easy.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/event.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/utils.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/debug.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
|
||||
endef
|
||||
include easy.mk
|
||||
include wifi.mk
|
||||
include dsl.mk
|
||||
include ethernet.mk
|
||||
include qos.mk
|
||||
|
||||
define Build/InstallDev/libwifi
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/wifi.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
|
||||
ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),\
|
||||
$(PKG_BUILD_DIR)/.config_$(patsubst "%",%,$(CONFIG_TARGET_PROFILE)))
|
||||
define Build/Compile/rebuild
|
||||
$(FIND) $(PKG_BUILD_DIR) -name \*.o -or -name \*.so\* | $(XARGS) rm -f;
|
||||
$(if $(wildcard $(PKG_BUILD_DIR)/config_*), \
|
||||
rm -f $(PKG_BUILD_DIR)/.config_*)
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/InstallDev/libdsl
|
||||
$(INSTALL_DIR) $(1)/usr/include/xdsl
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/xdsl.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/xtm.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/common.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/libdsl.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libethernet
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/ethernet.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/libethernet.so $(1)/usr/lib/
|
||||
endef
|
||||
STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(TARGET_CFLAGS) | mkhash md5)
|
||||
|
||||
define Build/Compile
|
||||
$(Build/Compile/rebuild)
|
||||
touch $(PKG_BUILD_DIR)/.config_$(CONFIG_TARGET_PROFILE)
|
||||
$(call Build/Compile/Default)
|
||||
ifeq ($(CONFIG_LIBDSL_TEST),y)
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)/libdsl/test" $(MAKE_FLAGS)
|
||||
endif
|
||||
$(foreach dir,$(subdirs),$(call Build/Compile/$(dir)))
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(foreach dir,$(subdirs),$(call Build/InstallDev/$(dir),$(1),$(2));)
|
||||
endef
|
||||
|
||||
define Package/libeasy/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libwifi/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libethernet/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/libethernet.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libdsl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/libdsl.so* $(1)/usr/lib/
|
||||
ifeq ($(CONFIG_LIBDSL_TEST),y)
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/test/libdsl_test $(1)/usr/bin/
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/easy-soc-libs/install
|
||||
:
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libeasy))
|
||||
$(eval $(call BuildPackage,libwifi))
|
||||
$(eval $(call BuildPackage,libdsl))
|
||||
$(eval $(call BuildPackage,libethernet))
|
||||
$(eval $(foreach e,$(EASY_SOC_LIBS),$(call BuildPackage,$(e))))
|
||||
|
||||
47
easy-soc-libs/dsl.mk
Normal file
47
easy-soc-libs/dsl.mk
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
define Package/libdsl
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= XDSL library (libdsl)
|
||||
DEPENDS+=+TARGET_intel_mips:dsl-cpe-api-vrx \
|
||||
+TARGET_intel_mips:dsl-cpe-fapi \
|
||||
+TARGET_intel_mips:kmod-ppa-drv
|
||||
endef
|
||||
|
||||
define Package/libdsl/config
|
||||
if PACKAGE_libdsl
|
||||
config LIBDSL_DEBUG
|
||||
depends on PACKAGE_libdsl
|
||||
bool "Enable dsl debugging"
|
||||
default n
|
||||
|
||||
config LIBDSL_TEST
|
||||
depends on PACKAGE_libdsl
|
||||
bool "Enable dsl test program"
|
||||
default n
|
||||
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libdsl
|
||||
$(INSTALL_DIR) $(1)/usr/include/xdsl
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/xdsl.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/xtm.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/common.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/libdsl.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_LIBDSL_TEST),y)
|
||||
define Build/Compile/libdsl
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)/libdsl/test" $(MAKE_FLAGS)
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/libdsl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/libdsl.so* $(1)/usr/lib/
|
||||
ifeq ($(CONFIG_LIBDSL_TEST),y)
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/test/libdsl_test $(1)/usr/bin/
|
||||
endif
|
||||
endef
|
||||
24
easy-soc-libs/easy.mk
Normal file
24
easy-soc-libs/easy.mk
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
define Package/libeasy
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= Common helper functions library (libeasy)
|
||||
DEPENDS+=+libnl +libnl-route
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libeasy
|
||||
$(INSTALL_DIR) $(1)/usr/include/easy
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/easy.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/event.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/utils.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/if_utils.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/debug.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libeasy/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
27
easy-soc-libs/ethernet.mk
Normal file
27
easy-soc-libs/ethernet.mk
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
define Package/libethernet
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= Ethernet library (libethernet)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_iopsys_ramips:swconfig
|
||||
endef
|
||||
|
||||
define Package/libethernet/config
|
||||
config LIBETHERNET_DEBUG
|
||||
depends on PACKAGE_libethernet
|
||||
bool "Enable ethernet debugging"
|
||||
default n
|
||||
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libethernet
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/ethernet.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/libethernet.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libethernet/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/libethernet.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
27
easy-soc-libs/qos.mk
Normal file
27
easy-soc-libs/qos.mk
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
define Package/libqos
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= QoS library (libqos)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy
|
||||
endef
|
||||
|
||||
define Package/libqos/config
|
||||
config LIBQOS_DEBUG
|
||||
depends on PACKAGE_libqos
|
||||
bool "Enable qos debugging"
|
||||
default n
|
||||
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libqos
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libqos/qos.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libqos/libqos.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libqos/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libqos/libqos*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
29
easy-soc-libs/wifi.mk
Normal file
29
easy-soc-libs/wifi.mk
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
define Package/libwifi
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= WiFi library (libwifi)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_iopsys_brcm63xx_arm:bcmkernel
|
||||
endef
|
||||
|
||||
define Package/libwifi/config
|
||||
if PACKAGE_libdsl
|
||||
config LIBWIFI_DEBUG
|
||||
depends on PACKAGE_libwifi
|
||||
bool "Enable wifi debugging"
|
||||
default n
|
||||
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libwifi
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/wifi.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libwifi/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.4
|
||||
PKG_SOURCE_VERSION:=d87c1def50d9672dbeb9d5972f36a364b29334b9
|
||||
PKG_SOURCE_VERSION:=510b885c049b8ba06772dae59e64b370d0fded3e
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -53,7 +53,7 @@ define Package/endptmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Brcmslic
|
||||
URL:=
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +bcmkernel @TARGET_HAS_VOICE @BCM_VOICE
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +uci +bcmkernel @TARGET_HAS_VOICE @BCM_VOICE
|
||||
endef
|
||||
|
||||
define Package/endptmngr/description
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ethmngr
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_VERSION:=2.0.1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=b7135381aedf1bde6f7ab10b41be372a9bd7d155
|
||||
PKG_SOURCE_VERSION:=5a0ff3bc7c49dcb05129f423ef8e0c4929f6aa03
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -46,9 +46,10 @@ static ssize_t get_led_color(struct device *dev,
|
||||
/* [ln] todo: dummy implementation */
|
||||
int len;
|
||||
|
||||
len = sprintf(buf, "%d\n", 123);
|
||||
len = scnprintf(buf, PAGE_SIZE, "%d\n", 123);
|
||||
if (len <= 0) {
|
||||
dev_err(dev, "sk9822: Invalid sprintf len: %d\n", len);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return len;
|
||||
@@ -99,8 +100,69 @@ static ssize_t set_led_color(struct device *dev,
|
||||
}
|
||||
static DEVICE_ATTR(led_color, S_IRUGO | S_IWUSR, get_led_color, set_led_color);
|
||||
|
||||
static ssize_t get_led_brightness(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int len;
|
||||
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
|
||||
|
||||
if (IS_ERR(sk9822)) {
|
||||
printk(KERN_ERR "Platform get drvdata returned NULL\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
len = scnprintf(buf, PAGE_SIZE, "%x\n", sk9822->led_brightness);
|
||||
if (len <= 0) {
|
||||
dev_err(dev, "sk9822: Invalid sprintf len: %d\n", len);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set LED brightness
|
||||
* @retval count number of bytes written
|
||||
* @retval -EINVAL if the message is not a valid hexadecimal number
|
||||
* @retval -EIO for all other errors (e.g. leds cannot be configured)
|
||||
*/
|
||||
static ssize_t set_led_brightness(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int ret = 0;
|
||||
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
|
||||
unsigned long val = SK9822_DEFAULT_BRIGHTNESS;
|
||||
|
||||
if (IS_ERR(sk9822)) {
|
||||
printk(KERN_ERR "Platform get drvdata returned NULL\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (kstrtoul(buf, 16, &val)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if(val > SK9822_DEFAULT_BRIGHTNESS) {
|
||||
val = SK9822_DEFAULT_BRIGHTNESS;
|
||||
}
|
||||
|
||||
sk9822->led_brightness = (uint8_t)val;
|
||||
|
||||
// Now push to the HW
|
||||
ret = sk9822_update(sk9822);
|
||||
if (ret != 0) {
|
||||
printk(KERN_ERR "Failed to update led\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
static DEVICE_ATTR(led_brightness, S_IRUGO | S_IWUSR, get_led_brightness, set_led_brightness);
|
||||
|
||||
|
||||
static struct attribute *sk9822_dev_attrs[] = {
|
||||
&dev_attr_led_color.attr,
|
||||
&dev_attr_led_brightness.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=6.3.2-2020-12-21
|
||||
PKG_VERSION:=6.4.6-2021-02-09
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=495e905c30ac7423035a8c0c2c67effc0c607475
|
||||
PKG_SOURCE_VERSION:=196ae20ae8156aa01a4fb893031d3fcfb0481457
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -37,7 +37,7 @@ define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=CWMP client
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libcurl +libbbfdm +libbbf_api
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libcurl
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
|
||||
@@ -11,7 +11,6 @@ STOP=10
|
||||
USE_PROCD=1
|
||||
PROG="/usr/sbin/icwmpd"
|
||||
|
||||
EXTRA_COMMANDS="notify"
|
||||
EXTRA_HELP=" start [GetRPCMethods] Start icwmpd service and send GetRPCMethods"
|
||||
|
||||
validate_url() {
|
||||
@@ -176,9 +175,6 @@ start_service() {
|
||||
fi
|
||||
procd_set_param respawn "3" "7" "0"
|
||||
procd_close_instance
|
||||
#procd_open_instance
|
||||
#[ "$(uci -q get cwmp.cpe.notification)" == "1" ] && procd_append_param command "/usr/sbin/icwmp_notifd"
|
||||
#procd_close_instance
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -187,10 +183,6 @@ reload_service() {
|
||||
start
|
||||
}
|
||||
|
||||
notify() {
|
||||
ubus -t 1 call tr069 notify >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_config_trigger "config.change" "cwmp" /etc/init.d/icwmpd reload
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=2.1.32
|
||||
PKG_VERSION:=2.1.37
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=2bb1c564d31a99d80a3f977c1f817777722a601d
|
||||
PKG_SOURCE_VERSION:=65bed80b42fa4e339fe20a638a58009858edf11f
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=inbd
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_VERSION:=1.2.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=3135944f3357a7a2c1c206be7b65bbb7ac6d1e58
|
||||
PKG_SOURCE_VERSION:=dac9d6ceaabf7bf5a2c11b0f9e865d086c5732e1
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
|
||||
CONFIG_PACKAGE_iptables-mod-filter=y
|
||||
CONFIG_PACKAGE_iptables-mod-ipopt=y
|
||||
# CONFIG_PACKAGE_iwatchdog is not set
|
||||
CONFIG_PACKAGE_jq=y
|
||||
CONFIG_PACKAGE_juci=y
|
||||
CONFIG_PACKAGE_juci-dnsmasq-dhcp=y
|
||||
CONFIG_PACKAGE_juci-firewall-fw3=y
|
||||
@@ -101,7 +102,6 @@ CONFIG_PACKAGE_usb-modeswitch=y
|
||||
CONFIG_PACKAGE_usbreset=y
|
||||
CONFIG_PACKAGE_uspd=y
|
||||
CONFIG_PACKAGE_vsftpd-tls=m
|
||||
CONFIG_PACKAGE_wget=y
|
||||
CONFIG_PACKAGE_wwan=y
|
||||
CONFIG_PACKAGE_wifimngr=y
|
||||
CONFIG_PACKAGE_xl2tpd=y
|
||||
@@ -220,6 +220,9 @@ CONFIG_TARGET_PREINIT_IP=""
|
||||
CONFIG_TARGET_PREINIT_NETMASK=""
|
||||
CONFIG_TARGET_PREINIT_BROADCAST=""
|
||||
|
||||
# Generate rootfs tar file
|
||||
CONFIG_TARGET_ROOTFS_TARGZ=y
|
||||
|
||||
# The urandom-seed package is very strange. It seeds urandom with urandom...
|
||||
# Disable it. Most SoCs nowadays has HW random generators anyway.
|
||||
# CONFIG_PACKAGE_urandom-seed is not set
|
||||
|
||||
@@ -187,12 +187,8 @@ function genconfig {
|
||||
|
||||
bcmAllowed=0
|
||||
endptAllowed=0
|
||||
natalieAllowed=0
|
||||
#mediatekAllowed=0
|
||||
|
||||
git ls-remote git@dev.iopsys.eu:broadcom/bcmcreator.git -q 2>/dev/null && bcmAllowed=1
|
||||
#git ls-remote git@dev.iopsys.eu:mediatek/linux.git -q 2>/dev/null && mediatekAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:dialog/natalie-dect-12.26.git -q 2>/dev/null && natalieAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:iopsys/endptmngr.git -q 2>/dev/null && endptAllowed=1
|
||||
}
|
||||
|
||||
@@ -421,14 +417,10 @@ function genconfig {
|
||||
echo "CONFIG_GITMIRROR_REWRITE=y" >>.config
|
||||
[ $bcmAllowed -eq 0 ] && echo "CONFIG_BCM_OPEN=y" >> .config
|
||||
[ $endptAllowed -eq 0 ] && echo "CONFIG_ENDPT_OPEN=y" >> .config
|
||||
[ $natalieAllowed -eq 0 ] && echo "CONFIG_NATALIE_OPEN=y" >> .config
|
||||
#[ $mediatekAllowed -eq 0 ] && echo "CONFIG_MEDIATEK_OPEN=y" >> .config
|
||||
else
|
||||
echo "# CONFIG_GITMIRROR_REWRITE is not set" >>.config
|
||||
echo "CONFIG_BCM_OPEN=y" >> .config
|
||||
echo "CONFIG_ENDPT_OPEN=y" >> .config
|
||||
echo "CONFIG_NATALIE_OPEN=y" >> .config
|
||||
#echo "CONFIG_MEDIATEK_OPEN=y" >> .config
|
||||
fi
|
||||
|
||||
if [ -n "$BRCM_MAX_JOBS" ]
|
||||
|
||||
@@ -186,12 +186,8 @@ function genconfig_min {
|
||||
|
||||
bcmAllowed=0
|
||||
endptAllowed=0
|
||||
natalieAllowed=0
|
||||
mediatekAllowed=0
|
||||
|
||||
git ls-remote git@dev.iopsys.eu:broadcom/bcmcreator.git -q 2>/dev/null && bcmAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:mediatek/linux.git -q 2>/dev/null && mediatekAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:dialog/natalie-dect-12.26.git -q 2>/dev/null && natalieAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:iopsys/endptmngr.git -q 2>/dev/null && endptAllowed=1
|
||||
}
|
||||
|
||||
|
||||
@@ -30,25 +30,6 @@ build_bcmkernel_consumer() {
|
||||
cd "$curdir"
|
||||
}
|
||||
|
||||
build_natalie_consumer() {
|
||||
# create natalie-dect open version tar file
|
||||
local natalieversion nataliecommith
|
||||
grep -q "CONFIG_TARGET_NO_DECT=y" .config && return
|
||||
natalieversion=$(grep -w "PKG_VERSION:" ./feeds/iopsys/natalie-dect/Makefile | cut -d'=' -f2)
|
||||
nataliecommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/iopsys/natalie-dect/Makefile | cut -d'=' -f2)
|
||||
[ -n "$profile" ] && [ -n "$natalieversion" ] && [ -n "$nataliecommith" ] || return
|
||||
ssh $SERVER "test -f $FPATH/natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz" && return
|
||||
cd ./build_dir/target-*/natalie-dect-$natalieversion/
|
||||
mkdir natalie-dect-open-$natalieversion
|
||||
cp -f ipkg-*/natalie-dect/lib/modules/*/extra/dect.ko natalie-dect-open-$natalieversion/dect.ko
|
||||
tar -czv natalie-dect-open-$natalieversion/ -f natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz
|
||||
scp -pv natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz $SERVER:$FPATH/
|
||||
cp natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz $curdir/
|
||||
rm -rf natalie-dect-open-$natalieversion
|
||||
rm -f natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz
|
||||
cd "$curdir"
|
||||
}
|
||||
|
||||
build_endptmngr_consumer() {
|
||||
# create endptmngr open version tar file
|
||||
local endptversion endptcommith
|
||||
@@ -70,46 +51,6 @@ build_endptmngr_consumer() {
|
||||
cd "$curdir"
|
||||
}
|
||||
|
||||
build_mediatek_kernel() {
|
||||
local mediatek_commit kernel
|
||||
|
||||
mediatek_commit=$(grep CONFIG_KERNEL_GIT_COMMIT .config | cut -d '=' -f2 | tr -d '"')
|
||||
kernel=linux-git*
|
||||
[ -n "$mediatek_commit" ] || return
|
||||
ssh $SERVER "test -f $FPATH/mediatek-kernel-open-$mediatek_commit.tar.gz" && return
|
||||
echo "Building mediatek kernel tarball from kernel commit:"
|
||||
echo $mediatek_commit
|
||||
cd build_dir/target-mipsel_1004kc*/linux-iopsys-ramips*/linux-git*
|
||||
|
||||
# remove git repo
|
||||
rm -rf .git
|
||||
cd ..
|
||||
|
||||
tar -czv $kernel -f mediatek-kernel-open-$mediatek_commit.tar.gz
|
||||
scp -pv mediatek-kernel-open-$mediatek_commit.tar.gz $SERVER:$FPATH/
|
||||
cd "$curdir"
|
||||
}
|
||||
|
||||
build_mediatek_wifi_consumer() {
|
||||
local ver commit
|
||||
local chip=$1
|
||||
|
||||
ver=$(grep -w "PKG_VERSION:" ./feeds/mediatek/mt${chip}/Makefile | cut -d'=' -f2)
|
||||
commit=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/mediatek/mt${chip}/Makefile | cut -d'=' -f2)
|
||||
[ -n "$ver" ] && [ -n "$commit" ] || return
|
||||
ssh $SERVER "test -f $FPATH/mtk${chip}e-${ver}_${commit}.tar.xz" && return
|
||||
cd build_dir/target-mipsel_1004kc*/linux-iopsys-ramips*/mtk${chip}e-$ver/ipkg-*
|
||||
mkdir -p mtk${chip}e-$ver/src
|
||||
cp -rf kmod-mtk${chip}e/etc mtk${chip}e-$ver/src/
|
||||
cp -rf kmod-mtk${chip}e/lib mtk${chip}e-$ver/src/
|
||||
tar Jcf mtk${chip}e-${ver}_${commit}.tar.xz mtk${chip}e-$ver
|
||||
scp -pv mtk${chip}e-${ver}_${commit}.tar.xz $SERVER:$FPATH/
|
||||
cp mtk${chip}e-${ver}_${commit}.tar.xz $curdir/
|
||||
rm -rf mtk${chip}e-$ver
|
||||
rm -f mtk${chip}e-${ver}_${commit}.tar.xz
|
||||
cd "$curdir"
|
||||
}
|
||||
|
||||
function print_usage {
|
||||
echo "Usage: $0 generate_tarballs"
|
||||
echo " -t <target>"
|
||||
@@ -154,12 +95,7 @@ function generate_tarballs {
|
||||
|
||||
if [ "$stk_target" == "broadcom" ]; then
|
||||
build_bcmkernel_consumer
|
||||
build_natalie_consumer
|
||||
build_endptmngr_consumer
|
||||
elif [ "$stk_target" == "mediatek" ]; then
|
||||
build_mediatek_kernel
|
||||
build_mediatek_wifi_consumer 7603
|
||||
build_mediatek_wifi_consumer 7615
|
||||
else
|
||||
echo "Invalid target: $stk_target"
|
||||
print_usage
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-1905
|
||||
PKG_VERSION:=0.0.15
|
||||
PKG_VERSION:=0.0.16
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=405e44f14d623db7a5f03e76945315774d2b6deb
|
||||
PKG_SOURCE_VERSION:=08363369ba225facad7485d5b1a6a502e620ac21
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-agent
|
||||
PKG_VERSION:=3.1.3
|
||||
PKG_VERSION:=3.4.2
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=1f9e4c5beafa216ff16110f3715dc901a25eb897
|
||||
PKG_SOURCE_VERSION:=9edf3ac509a2cf8301a50b38185734d70818262a
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
@@ -23,7 +23,7 @@ define Package/map-agent
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libmaputils +libwsc
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libmaputils +libwsc +libeasy
|
||||
endef
|
||||
|
||||
define Package/map-agent/description
|
||||
|
||||
@@ -6,6 +6,12 @@ STOP=20
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
config_load "mapagent"
|
||||
|
||||
local enabled
|
||||
config_get_bool enabled agent enabled 1
|
||||
[ "$enabled" -eq 0 ] && return 1
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/mapagent" "-d"
|
||||
procd_set_param respawn
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=2.0.3
|
||||
PKG_VERSION:=2.3.1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=ae4d7c0279cf2f40b8f3ae0afa3e0f004e27e1f5
|
||||
PKG_SOURCE_VERSION:=e8afbab1030189b99356aba3f1bfc4adf2d81d5d
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -22,7 +22,7 @@ define Package/map-controller
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi Multi-AP Controller (EasyMesh R2)
|
||||
DEPENDS:=+libuci +libubox +ubus +libmaputils +libwsc
|
||||
DEPENDS:=+libuci +libubox +ubus +libmaputils +libwsc +libeasy
|
||||
endef
|
||||
|
||||
define Package/map-controller/description
|
||||
|
||||
@@ -6,6 +6,12 @@ STOP=20
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
config_load "mapcontroller"
|
||||
|
||||
local enabled
|
||||
config_get_bool enabled controller enabled 1
|
||||
[ "$enabled" -eq 0 ] && return 1
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/mapcontroller" "-d"
|
||||
procd_set_param respawn
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2006-2008 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:=natalie-dect-h
|
||||
PKG_VERSION:=12.26
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/dialog/natalie-dect-h.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f3889dc3f80bed10374f46430009aca24448bdcc
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY RTX
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
define Package/natalie-dect-h
|
||||
SECTION:=net
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Dect stack headers
|
||||
URL:=
|
||||
endef
|
||||
|
||||
define Package/natalie-dect-h/description
|
||||
Kernel dect driver headers
|
||||
endef
|
||||
|
||||
|
||||
define Package/natalie-dect-h/install
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/natalie-dect
|
||||
$(CP) -r $(PKG_BUILD_DIR)/SrcHeaders/* $(STAGING_DIR)/usr/include/natalie-dect/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,natalie-dect-h))
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
config NATALIE_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
@@ -1,73 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=natalie-dect
|
||||
PKG_VERSION:=12.26
|
||||
|
||||
PKG_SOURCE_VERSION:=378c404fba3efc8f1bcde54370a5370670fa1853
|
||||
ifeq ($(CONFIG_NATALIE_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://download.iopsys.eu/iopsys/opensdk/
|
||||
PKG_NAME:=natalie-dect-open
|
||||
else
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/dialog/natalie-dect-12.26.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
endif
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
|
||||
BCM_KERNEL_VERSION=`cat $(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-*/include/config/kernel.release`
|
||||
|
||||
export BUILD_DIR
|
||||
export BCM_KERNEL_VERSION
|
||||
export CONFIG_BCM_CHIP_ID := $(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
|
||||
export CONFIG_BCM_KERNEL_PROFILE := $(patsubst "%",%,$(CONFIG_BCM_KERNEL_PROFILE))
|
||||
export CONFIG_ARCH := $(patsubst "%",%,$(CONFIG_ARCH))
|
||||
export TOOLS := $(CONFIG_BCM_TOOLCHAIN)/usr/bin/
|
||||
export TOOLPREFIX := $(CONFIG_BCM_TOOLTUPLE)
|
||||
export BRCM_MAX_JOBS := $(patsubst "%",%,$(CONFIG_BRCM_MAX_JOBS))
|
||||
export MAKE_J
|
||||
export BRCM_VERBOSE := $(if $(findstring c,$(OPENWRT_VERBOSE)),1,)
|
||||
export PKG_BUILD_DIR
|
||||
export BCM_SDK_PATH := $(BUILD_DIR)/bcmkernel/bcm963xx
|
||||
|
||||
define Package/natalie-dect
|
||||
SECTION:=net
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Dect stack
|
||||
URL:=
|
||||
DEPENDS:=bcmkernel
|
||||
endef
|
||||
|
||||
define Package/natalie-dect/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/natalie-dect/description
|
||||
Kernel dect driver
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_NATALIE_OPEN),y)
|
||||
define Build/Compile
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/natalie-dect/install
|
||||
$(INSTALL_DIR) $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
|
||||
$(CP) $(PKG_BUILD_DIR)/dect.ko $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/dect.ko
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,natalie-dect))
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=3.0.0.9
|
||||
PKG_VERSION:=3.0.0.12
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=09c1959e36f7084486a4d39548cef422a1ece483
|
||||
PKG_SOURCE_VERSION:=bc1dba1efe9ec49f468592359d03895f45699abf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
@@ -50,9 +50,11 @@ define Package/obuspa/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/obuspa
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspa $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/obuspa $(1)/etc/init.d/
|
||||
$(INSTALL_DATA) ./files/etc/config/obuspa $(1)/etc/config/
|
||||
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-obuspa $(1)/etc/hotplug.d/iface/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,obuspa))
|
||||
|
||||
9
obuspa/files/etc/hotplug.d/iface/85-obuspa
Normal file
9
obuspa/files/etc/hotplug.d/iface/85-obuspa
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$(uci -q get obuspa.global.interface)" == "$INTERFACE" ] || exit 0
|
||||
|
||||
[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
|
||||
[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" ] && exit 0
|
||||
|
||||
/etc/init.d/obuspa reload
|
||||
|
||||
@@ -504,6 +504,26 @@ remove_db() {
|
||||
start
|
||||
}
|
||||
|
||||
service_running() {
|
||||
local AgentEndpointID serial oui
|
||||
|
||||
ubus -t 10 wait_for usp.raw
|
||||
config_load obuspa
|
||||
config_get AgentEndpointID localagent EndpointID ""
|
||||
if [ -z "${AgentEndpointID}" ]; then
|
||||
serial=$(ubus -t 1 call usp.raw get '{"path":"Device.DeviceInfo.SerialNumber"}'|jsonfilter -e '@["parameters"][0].value')
|
||||
oui=$(ubus -t 1 call usp.raw get '{"path":"Device.DeviceInfo.ManufacturerOUI"}'|jsonfilter -e '@["parameters"][0].value')
|
||||
AgentEndpointID="os::${oui}-${serial}"
|
||||
fi
|
||||
|
||||
# publish Agent's EndpointID in mosquito broker for discovery
|
||||
# This is a work around till obuspa does not support advertising
|
||||
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker"
|
||||
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}"
|
||||
|
||||
procd_running ${CONFIGURATION}
|
||||
}
|
||||
|
||||
start_service() {
|
||||
procd_open_instance ${CONFIGURATION}
|
||||
procd_set_param command ${PROG}
|
||||
@@ -527,11 +547,33 @@ reload_service() {
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "uspd"
|
||||
procd_add_reload_trigger "uspd" "mosquitto"
|
||||
procd_add_config_trigger "config.change" "${CONFIGURATION}" /etc/init.d/obuspa remove_db
|
||||
|
||||
local interface
|
||||
config_load obuspa
|
||||
config_get interface global interface
|
||||
[ -n "$interface" ] && procd_add_interface_trigger "interface.*" "$interface" /etc/init.d/obuspa reload
|
||||
# Create a reload trigger if schema update avaialble
|
||||
procd_open_trigger
|
||||
json_add_array
|
||||
json_add_string "" "usp.raw"
|
||||
json_add_array
|
||||
json_add_string "" "if"
|
||||
json_add_array
|
||||
json_add_string "" "eq"
|
||||
json_add_string "" "action"
|
||||
json_add_string "" "schema_update_available"
|
||||
json_close_array
|
||||
json_add_array
|
||||
json_add_string "" "run_script"
|
||||
json_add_string "" "/etc/init.d/obuspa"
|
||||
json_add_string "" "reload"
|
||||
json_close_array
|
||||
json_close_array
|
||||
json_add_int "" "1000"
|
||||
json_close_array
|
||||
procd_close_trigger
|
||||
|
||||
|
||||
# local interface
|
||||
# config_load obuspa
|
||||
# config_get interface global interface
|
||||
# [ -n "$interface" ] && procd_add_interface_trigger "interface.*" "$interface" /etc/init.d/obuspa reload
|
||||
}
|
||||
|
||||
@@ -33,8 +33,6 @@ populate_config(){
|
||||
done
|
||||
|
||||
uci commit ports
|
||||
|
||||
[ $DEBUG ] && cat /etc/config/ports
|
||||
}
|
||||
|
||||
[ -f /sbin/db -a -f /etc/board-db/config/hw ] && populate_config
|
||||
|
||||
54
prj-unish/Makefile
Normal file
54
prj-unish/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (C) 2020 Iopsys
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=prj-unish
|
||||
PKG_VERSION:=0.1.0
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=3180908081492a6cfc11adbcf80845dbba12633a
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/prj-unish.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/prj-unish
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Project unish
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libpthread +libnl-genl
|
||||
endef
|
||||
|
||||
define Package/prj-unish/description
|
||||
This package provides unish-paanch.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/prj-unish/ $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/prj-unish/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/i1905d $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,prj-unish))
|
||||
23
prj-unish/files/etc/config/ieee1905
Normal file
23
prj-unish/files/etc/config/ieee1905
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
config ieee1905 'ieee1905'
|
||||
option enabled '1'
|
||||
option extension 0
|
||||
#option macaddress 'ba:c9:a6:90:6c:b0'
|
||||
option registrar '2 5'
|
||||
|
||||
config ap
|
||||
option band '2'
|
||||
option ssid 'TestSSID'
|
||||
option encryption 'psk2'
|
||||
option key '1234567890'
|
||||
|
||||
config ap
|
||||
option band '5'
|
||||
option ssid 'TestSSID'
|
||||
option encryption 'psk2'
|
||||
option key '1234567890'
|
||||
|
||||
config al-iface
|
||||
option enabled 1
|
||||
option ifname 'br-lan'
|
||||
option type 'bridge'
|
||||
@@ -8,8 +8,15 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
PKG_NAME:=qosmngr
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=03df56c6eb7c6737ce95576e89c915df77396953
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/qosmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -19,22 +26,24 @@ define Package/qosmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=QoS Manager
|
||||
DEPENDS:=@(TARGET_iopsys_brcm63xx_arm)
|
||||
DEPENDS:=@(TARGET_iopsys_brcm63xx_arm) +libuci +libubox +libubus +libblobmsg-json +libjson-c +libqos
|
||||
endef
|
||||
|
||||
define Package/qosmngr/description
|
||||
Configures L2 QoS and collects queue statistics
|
||||
endef
|
||||
|
||||
#define Build/Prepare
|
||||
# $(CP) -rf ./qosmngr/* $(PKG_BUILD_DIR)/
|
||||
#endef
|
||||
|
||||
define Build/Compile
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ./qosmngr/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/qosmngr/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/qosmngr $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,qosmngr))
|
||||
|
||||
@@ -4,18 +4,23 @@
|
||||
# include /lib/qos
|
||||
|
||||
START=21
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=qosmngr
|
||||
PROG=/usr/sbin/qosmngr
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/qos
|
||||
|
||||
start_service() {
|
||||
if [ -f "/etc/config/qos" ]; then
|
||||
ubus -S call qos reload
|
||||
reload_qos
|
||||
procd_open_instance qosmngr
|
||||
procd_set_param command ${PROG}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
@@ -645,18 +645,27 @@ assign_policer_to_port() {
|
||||
local pindex="$2"
|
||||
local portorder="$(db -q get hw.board.ethernetPortOrder)"
|
||||
local wanport="$(db -q get hw.board.ethernetWanPort)"
|
||||
local board="$(db -q get hw.board.model_name | cut -c 1-2)"
|
||||
|
||||
local i=0
|
||||
if [ "$board" == "FT" ]; then
|
||||
i=3
|
||||
fi
|
||||
|
||||
for port in $portorder; do
|
||||
if [ "$ifname" == "$port" ]; then
|
||||
if [ "$wanport" == "$port" ]; then
|
||||
bs /b/configure port/index=wan0 ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure port/index=wan0 ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
else
|
||||
bs /b/configure port/index=lan$i ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure port/index=lan$i ingress_rate_limit={traffic_types=8,policer={policer/dir=us,index=$pindex}}
|
||||
fi
|
||||
break
|
||||
fi
|
||||
i=$((i + 1))
|
||||
if [ "$board" == "FT" ]; then
|
||||
i=$((i - 1))
|
||||
else
|
||||
i=$((i + 1))
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
@@ -886,228 +895,3 @@ reload_qos() {
|
||||
configure_policer
|
||||
fi
|
||||
}
|
||||
|
||||
get_queue_stats() {
|
||||
local ifname
|
||||
local f_name
|
||||
local tmp_val
|
||||
local q_index=0
|
||||
local max_q_index=0
|
||||
|
||||
json_init
|
||||
json_add_array "queues"
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
ifname=$1
|
||||
max_q_index=$(cat /tmp/qos/queue_stats/${ifname}/q_idx)
|
||||
while :
|
||||
do
|
||||
if [ $q_index -eq $max_q_index ]; then
|
||||
break
|
||||
fi
|
||||
stats="$(tmctl getqstats --devtype 0 --if $ifname --qid $q_index)"
|
||||
ret="$(echo $stats | awk '{print substr($0,0,5)}')"
|
||||
#check tmctl ERROR condition
|
||||
if [ $ret == 'ERROR' ]; then
|
||||
q_index=$((q_index + 1))
|
||||
continue
|
||||
fi
|
||||
json_add_object ""
|
||||
json_add_int "qid" "$q_index"
|
||||
json_add_string "iface" "$ifname"
|
||||
|
||||
IFS=$'\n'
|
||||
for stat in $stats; do
|
||||
pname="$(echo $stat | awk '{print$1}')"
|
||||
if [ $pname == 'ret' ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
val="$(echo $stat | awk '{print$2}')"
|
||||
|
||||
# remove trailing : from the name
|
||||
pname="${pname::-1}"
|
||||
local f_name="/tmp/qos/queue_stats/${ifname}/q_${q_index}/${pname}"
|
||||
# In non BCM968* chips, read operation on queues is actually a read and reset,
|
||||
# so values need to be maintained to present cumulative value
|
||||
if [ $POLICER_SKIP -eq 0 ]; then
|
||||
tmp_val=$(cat $f_name)
|
||||
val=$((val + tmp_val))
|
||||
fi
|
||||
echo $val > $f_name
|
||||
|
||||
# convert to iopsyswrt names
|
||||
case "$pname" in
|
||||
txPackets)
|
||||
json_add_int "tx_packets" "$val"
|
||||
;;
|
||||
txBytes)
|
||||
json_add_int "tx_bytes" "$val"
|
||||
;;
|
||||
droppedPackets)
|
||||
json_add_int "tx_dropped_packets" "$val"
|
||||
;;
|
||||
droppedBytes)
|
||||
json_add_int "tx_dropped_bytes" "$val"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
json_close_object
|
||||
|
||||
q_index=$((q_index + 1))
|
||||
done
|
||||
else
|
||||
for intf in $(db get hw.board.ethernetPortOrder); do
|
||||
ifname=$intf
|
||||
q_index=0
|
||||
max_q_index=$(cat /tmp/qos/queue_stats/${ifname}/q_idx)
|
||||
while :
|
||||
do
|
||||
if [ $q_index -eq $max_q_index ]; then
|
||||
break
|
||||
fi
|
||||
stats="$(tmctl getqstats --devtype 0 --if $ifname --qid $q_index)"
|
||||
ret="$(echo $stats | awk '{print substr($0,0,5)}')"
|
||||
#check tmctl ERROR condition
|
||||
if [ $ret == 'ERROR' ]; then
|
||||
q_index=$((q_index + 1))
|
||||
continue
|
||||
fi
|
||||
json_add_object ""
|
||||
json_add_int "qid" "$q_index"
|
||||
json_add_string "iface" "$ifname"
|
||||
|
||||
IFS=$'\n'
|
||||
for stat in $stats; do
|
||||
pname="$(echo $stat | awk '{print$1}')"
|
||||
if [ $pname == 'ret' ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
val="$(echo $stat | awk '{print$2}')"
|
||||
|
||||
# remove trailing : from the name
|
||||
pname="${pname::-1}"
|
||||
local f_name="/tmp/qos/queue_stats/${ifname}/q_${q_index}/${pname}"
|
||||
# In non BCM968* chips, read operation on queues is actually a read and reset,
|
||||
# so values need to be maintained to present cumulative value
|
||||
if [ $POLICER_SKIP -eq 0 ]; then
|
||||
tmp_val=$(cat $f_name)
|
||||
val=$((val + tmp_val))
|
||||
fi
|
||||
echo $val > $f_name
|
||||
|
||||
# convert to iopsyswrt names
|
||||
case "$pname" in
|
||||
txPackets)
|
||||
json_add_int "tx_packets" "$val"
|
||||
;;
|
||||
txBytes)
|
||||
json_add_int "tx_bytes" "$val"
|
||||
;;
|
||||
droppedPackets)
|
||||
json_add_int "tx_dropped_packets" "$val"
|
||||
;;
|
||||
droppedBytes)
|
||||
json_add_int "tx_dropped_bytes" "$val"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
json_close_object
|
||||
|
||||
q_index=$((q_index + 1))
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
json_close_array
|
||||
json_dump
|
||||
}
|
||||
|
||||
get_eth_q_stats() {
|
||||
json_init
|
||||
json_add_array "queues"
|
||||
|
||||
ifname="$1"
|
||||
local tmp_val=0
|
||||
|
||||
# if ifname is empty that is good enough to break
|
||||
if [ -z "$ifname" ];then
|
||||
return
|
||||
fi
|
||||
|
||||
qid="$2"
|
||||
if [ -z "$qid" ];then
|
||||
return
|
||||
fi
|
||||
|
||||
stats="$(tmctl getqstats --devtype 0 --if $ifname --qid $qid)"
|
||||
ret="$(echo $stats | awk '{print substr($0,0,5)}')"
|
||||
|
||||
#check tmctl ERROR condition
|
||||
if [ $ret == 'ERROR' ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
json_add_object ""
|
||||
json_add_int "qid" "$qid"
|
||||
json_add_string "iface" "$ifname"
|
||||
|
||||
IFS=$'\n'
|
||||
for stat in $stats; do
|
||||
pname="$(echo $stat | awk '{print$1}')"
|
||||
if [ $pname == 'ret' ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
val="$(echo $stat | awk '{print$2}')"
|
||||
|
||||
# remove trailing : from the name
|
||||
pname="${pname::-1}"
|
||||
local f_name="/tmp/qos/queue_stats/${ifname}/q_${qid}/${pname}"
|
||||
# In non BCM968* chips, read operation on queues is actually a read and reset,
|
||||
# so values need to be maintained to present cumulative value
|
||||
if [ $POLICER_SKIP -eq 0 ]; then
|
||||
tmp_val=$(cat $f_name)
|
||||
val=$((val + tmp_val))
|
||||
fi
|
||||
echo $val > $f_name
|
||||
|
||||
# convert to iopsyswrt names
|
||||
case "$pname" in
|
||||
txPackets)
|
||||
json_add_int "tx_packets" "$val"
|
||||
;;
|
||||
txBytes)
|
||||
json_add_int "tx_bytes" "$val"
|
||||
;;
|
||||
droppedPackets)
|
||||
json_add_int "tx_dropped_packets" "$val"
|
||||
;;
|
||||
droppedBytes)
|
||||
json_add_int "tx_dropped_bytes" "$val"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
json_close_object
|
||||
|
||||
json_close_array
|
||||
json_dump
|
||||
}
|
||||
|
||||
read_queue_stats() {
|
||||
itf="$1"
|
||||
q_idx="$2"
|
||||
local cpu_model="$(brcm_fw_tool -k info)"
|
||||
|
||||
case $cpu_model in
|
||||
68*|6755) POLICER_SKIP=1 ;;
|
||||
esac
|
||||
|
||||
if [ -n "$itf" -a -n "$q_idx" ]; then
|
||||
get_eth_q_stats $itf $q_idx
|
||||
else
|
||||
get_queue_stats $itf
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions.sh
|
||||
include /lib/qos
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "queue_stats": { "ifname":"String", "qid":"Integer" }, "reload": { "section":"String" } }'
|
||||
;;
|
||||
call)
|
||||
case "$2" in
|
||||
queue_stats)
|
||||
read input;
|
||||
json_load "$input"
|
||||
json_get_var iface ifname
|
||||
json_get_var qid qid
|
||||
|
||||
read_queue_stats $iface $qid
|
||||
;;
|
||||
reload)
|
||||
read input;
|
||||
json_load "$input"
|
||||
json_get_var service section
|
||||
reload_qos $service
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=5.2.1
|
||||
|
||||
PKG_SOURCE_VERSION:=d4ac29b535bf1ec0f58c4c9eea08ec7db08775d1
|
||||
PKG_SOURCE_VERSION:=d554541ac6fb8ef14431fcec9a31dbcb52181279
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
if PACKAGE_libtr098
|
||||
|
||||
config LIBTR098_VENDOR_PREFIX
|
||||
string "TR-098 Vendor Prefix"
|
||||
default "X_IOPSYS_EU_"
|
||||
|
||||
config UPNP_TR064
|
||||
bool "Compile with tr064 features"
|
||||
default n
|
||||
|
||||
endif
|
||||
@@ -1,73 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019 Iopsys
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libtr098
|
||||
PKG_VERSION:=1.0-2020-05-31
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/tr-098
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=dca7ba5ef0c5829ab0f450893cdd7aa077ccc2a8
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libtr098
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for broadband-forum data model
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace
|
||||
endef
|
||||
|
||||
define Package/libtr098/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libtr098/description
|
||||
Test description will update later.
|
||||
endef
|
||||
|
||||
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
|
||||
ifneq ($(USE_LOCAL),)
|
||||
define Build/Prepare
|
||||
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_LIBTR098_VENDOR_PREFIX)\\\"
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE -D_AADJ
|
||||
|
||||
ifeq ($(CONFIG_UPNP_TR064),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr064
|
||||
endif
|
||||
|
||||
define Package/libtr098/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libtr098.so* $(1)/lib/
|
||||
$(INSTALL_DIR) $(1)/etc/tr098
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/tr098
|
||||
$(INSTALL_DIR) $(1)/usr/share/tr098
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/tr098
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/include/libtr098
|
||||
$(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libtr098/
|
||||
$(CP) $(PKG_BUILD_DIR)/tr098/*.h $(1)/usr/include/libtr098/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libtr098.{a,so*} $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libtr098))
|
||||
@@ -47,17 +47,11 @@ static char *get_last_id(char *package, char *section)
|
||||
return id;
|
||||
}
|
||||
|
||||
struct ip_args
|
||||
{
|
||||
struct uci_section *ip_sec;
|
||||
char *ip_4address;
|
||||
};
|
||||
|
||||
static int addObjIPInterfaceTWAMPReflector(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
struct uci_section *connection = NULL;
|
||||
|
||||
char *last_inst = get_last_instance_with_option("twamp", "twamp_reflector", "interface", section_name(((struct ip_args *)data)->ip_sec), "twamp_inst");
|
||||
char *last_inst = get_last_instance_with_option("twamp", "twamp_reflector", "interface", section_name((struct uci_section *)data), "twamp_inst");
|
||||
char *id = get_last_id("twamp", "twamp_reflector");
|
||||
|
||||
dmuci_add_section("twamp", "twamp_reflector", &connection);
|
||||
@@ -65,7 +59,7 @@ static int addObjIPInterfaceTWAMPReflector(char *refparam, struct dmctx *ctx, vo
|
||||
dmuci_set_value_by_section(connection, "twamp_inst", *instance);
|
||||
dmuci_set_value_by_section(connection, "id", id);
|
||||
dmuci_set_value_by_section(connection, "enable", "0");
|
||||
dmuci_set_value_by_section(connection, "interface", section_name(((struct ip_args *)data)->ip_sec));
|
||||
dmuci_set_value_by_section(connection, "interface", section_name((struct uci_section *)data));
|
||||
dmuci_set_value_by_section(connection, "port", "862");
|
||||
dmuci_set_value_by_section(connection, "max_ttl", "1");
|
||||
return 0;
|
||||
@@ -76,16 +70,15 @@ static int delObjIPInterfaceTWAMPReflector(char *refparam, struct dmctx *ctx, vo
|
||||
int found = 0;
|
||||
struct uci_section *s, *ss = NULL;
|
||||
char *interface;
|
||||
struct uci_section *section = (struct uci_section *)data;
|
||||
|
||||
switch (del_action) {
|
||||
case DEL_INST:
|
||||
dmuci_delete_by_section(section, NULL, NULL);
|
||||
dmuci_delete_by_section((struct uci_section *)data, NULL, NULL);
|
||||
return 0;
|
||||
case DEL_ALL:
|
||||
uci_foreach_sections("twamp", "twamp_reflector", s) {
|
||||
dmuci_get_value_by_section_string(s, "interface", &interface);
|
||||
if(strcmp(interface, section_name(((struct ip_args *)data)->ip_sec)) != 0)
|
||||
if (strcmp(interface, section_name((struct uci_section *)data)) != 0)
|
||||
continue;
|
||||
if (found != 0) {
|
||||
dmuci_delete_by_section(ss, NULL, NULL);
|
||||
@@ -277,7 +270,7 @@ static int browseIPInterfaceTWAMPReflectorInst(struct dmctx *dmctx, DMNODE *pare
|
||||
struct uci_section *s = NULL;
|
||||
char *inst = NULL, *max_inst = NULL;
|
||||
|
||||
uci_foreach_option_eq("twamp", "twamp_reflector", "interface", section_name(((struct ip_args *)prev_data)->ip_sec), s) {
|
||||
uci_foreach_option_eq("twamp", "twamp_reflector", "interface", section_name((struct uci_section *)prev_data), s) {
|
||||
|
||||
inst = handle_update_instance(2, dmctx, &max_inst, update_instance_alias, 3,
|
||||
s, "twamp_inst", "twamp_alias");
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uspd
|
||||
PKG_VERSION:=2.1.8
|
||||
PKG_VERSION:=2.1.11
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=1dec7e4bcc8004d142fca195d82a013c1e6dbcb2
|
||||
PKG_SOURCE_VERSION:=68c23cead0aeb07887d23dea4cdae3c4d794edda
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=94
|
||||
START=98
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wfadatad
|
||||
PKG_VERSION:=3.0.1
|
||||
PKG_VERSION:=3.1.0
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=d9f4042963118f6786743554f2fc077f0128bd07
|
||||
PKG_SOURCE_VERSION:=6ee86bf2138edd680cc13f9d364f3e272a9e1e7c
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
@@ -59,7 +59,7 @@ define Package/wfadatad/install
|
||||
ifeq ($(CONFIG_WFA_DELM_STANDALONE),y)
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) ./files/wfa_delm.init $(1)/etc/init.d/wfadatad
|
||||
$(INSTALL_BIN) ./files/wfadatad.init $(1)/etc/init.d/wfadatad
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wfadatad $(1)/usr/sbin/
|
||||
else
|
||||
$(INSTALL_DIR) $(1)/usr/lib/map-plugins
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
STOP=11
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/wfadatad
|
||||
|
||||
service_running() {
|
||||
ubus -t 2 wait_for ieee1905
|
||||
}
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger wireless
|
||||
}
|
||||
41
wfadatad/files/wfadatad.init
Normal file
41
wfadatad/files/wfadatad.init
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
STOP=11
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/wfadatad
|
||||
|
||||
service_running() {
|
||||
ubus -t 2 wait_for ieee1905 map.1905
|
||||
}
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" "-d"
|
||||
#procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
[ -e "/etc/config/mapcontroller" ] && {
|
||||
local en
|
||||
|
||||
config_load mapcontroller
|
||||
config_get en controller enabled "0"
|
||||
|
||||
[ $en -gt 0 ] && {
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" "-d -C"
|
||||
procd_close_instance
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger wireless
|
||||
}
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=8.3.0
|
||||
PKG_VERSION:=8.5.5
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=7e1f7b600d93bc3f29fdc624040f4710e0d4623e
|
||||
PKG_SOURCE_VERSION:=c41e2aeb5189a04bc2eee8e5943c7fddd2e3eb24
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
@@ -48,14 +48,9 @@ endef
|
||||
endif
|
||||
|
||||
define Package/wifimngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/wifimngr.init $(1)/etc/init.d/wifimngr
|
||||
# $(INSTALL_DIR) $(1)/lib/upgrade/post-rootfs-fixup.d
|
||||
# $(INSTALL_BIN) ./files/*-uci-wireless $(1)/lib/upgrade/post-rootfs-fixup.d
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wifimngr $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/button
|
||||
$(INSTALL_BIN) ./files/wifi.button.hotplug $(1)/etc/hotplug.d/button/05-wifi
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,wifimngr))
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# As part of sysupgrade we migrate the users custom changes to the
|
||||
# new fs. (Those which differ from the first boot defaults.)
|
||||
|
||||
|
||||
# Abort on any error.
|
||||
set -e
|
||||
|
||||
|
||||
# Do nothing if user want to discard old settings.
|
||||
if [ -n "$SAVE_CONFIG" ] && [ $SAVE_CONFIG -eq 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Source functions.
|
||||
for f in /lib/upgrade/iopsys*.sh; do
|
||||
[ -r "$f" -a -s "$f" ] || continue
|
||||
source $f
|
||||
done
|
||||
|
||||
|
||||
# Does this system has WiFi?
|
||||
hasWifi=$(chroot "${2}" db -q get hw.board.hasWifi)
|
||||
[ "$hasWifi" = "1" ] || exit 0
|
||||
|
||||
|
||||
uci_possibly_migrate_package "wireless" "$2" || exit
|
||||
|
||||
# Report success.
|
||||
log "post-hooks" "UCI wireless migrated."
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -30,7 +30,15 @@ case "$ACTION" in
|
||||
[ "wpsbutton" == "$INTERFACE" ] && {
|
||||
[ -e "/tmp/wps_active" ] && return
|
||||
echo "WPS button is pressed" > /dev/console
|
||||
ubus call wifi.wps start
|
||||
# TODO: Proper implementation
|
||||
#ubus call wifi.wps start
|
||||
wpasupp="$(ubus list wpa_supplicant.* | head -1)"
|
||||
if [ -n "$wpasupp" ]; then
|
||||
ubus -t 1 call $wpasupp wps_start
|
||||
else
|
||||
dev5g="$(uci show wireless | grep 'hwmode=.11a' | head -1 | cut -d '.' -f2)"
|
||||
[ -n "$dev5g" ] && ubus -t 1 call hostapd.$dev5g wps_start
|
||||
fi
|
||||
}
|
||||
;;
|
||||
esac
|
||||
2
wifimngr/files/wifimngr.init → wifimngr/files/etc/init.d/wifimngr
Normal file → Executable file
2
wifimngr/files/wifimngr.init → wifimngr/files/etc/init.d/wifimngr
Normal file → Executable file
@@ -13,6 +13,8 @@ start_service() {
|
||||
# procd_set_param stderr 1 #for debugging only
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
wps-monitor
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
47
wifimngr/files/sbin/wps-monitor
Executable file
47
wifimngr/files/sbin/wps-monitor
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
if [ -f /tmp/wps-monitor.pid ]; then
|
||||
kill -9 $(cat /tmp/wps-monitor.pid) 2>/dev/null
|
||||
rm -f /tmp/wps-monitor.pid
|
||||
fi
|
||||
|
||||
[ "$1" == "stop" ] && exit
|
||||
|
||||
WPSENABLED=0
|
||||
for vif in $(uci show wireless | grep wifi-iface | awk -F[.,=] '{print$2}'); do
|
||||
[ "$(uci -q get wireless.$vif.wps_pushbutton)" == "1" ] && WPSENABLED=1
|
||||
done
|
||||
|
||||
if [ $WPSENABLED -eq 0 ]; then
|
||||
ubus call led.wps set '{"state":"off"}'
|
||||
exit
|
||||
fi
|
||||
|
||||
ubus listen wifi.ap wifi.bsta | \
|
||||
while read wpsevent ; do
|
||||
#echo "wps-monitor got event: $event" >/dev/console
|
||||
json_load "$wpsevent"
|
||||
if json_select wifi.ap >/dev/null; then
|
||||
json_get_var event event
|
||||
if [ "$event" == "wps-pbc-active" ]; then
|
||||
ubus call led.wps set '{"state":"notice"}'
|
||||
elif [ "$event" == "wps-reg-success" ]; then
|
||||
ubus call led.wps set '{"state":"ok","timeout":30}'
|
||||
elif [ "$event" == "wps-timeout" ]; then
|
||||
ubus call led.wps set '{"state":"off"}'
|
||||
fi
|
||||
elif json_select wifi.bsta >/dev/null; then
|
||||
json_get_var event event
|
||||
if [ "$event" == "wps-pbc-active" ]; then
|
||||
ubus call led.wps set '{"state":"notice"}'
|
||||
elif [ "$event" == "wps-success" ]; then
|
||||
ubus call led.wps set '{"state":"ok","timeout":30}'
|
||||
elif [ "$event" == "wps-timeout" ]; then
|
||||
ubus call led.wps set '{"state":"off"}'
|
||||
fi
|
||||
fi
|
||||
done &
|
||||
|
||||
echo $(($!-1)) $! >/tmp/wps-monitor.pid
|
||||
Reference in New Issue
Block a user