diff options
author | Andre Heider <a.heider@gmail.com> | 2021-01-26 09:00:49 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2021-02-08 21:43:00 +0100 |
commit | 42fc827b119cecea003e2631e92e37bb1b3e9cc1 (patch) | |
tree | 4c0e19c662cbb382b4524df0529a126402b9f44a /package/network/config | |
parent | 5372205ca9afea8e51c1762eabcaf5a97350bbaf (diff) | |
download | upstream-42fc827b119cecea003e2631e92e37bb1b3e9cc1.tar.gz upstream-42fc827b119cecea003e2631e92e37bb1b3e9cc1.tar.bz2 upstream-42fc827b119cecea003e2631e92e37bb1b3e9cc1.zip |
ltq-adsl-app: add ubus support to get metrics
As with ltq-vdsl-app, see previous commit.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'package/network/config')
-rw-r--r-- | package/network/config/ltq-adsl-app/Makefile | 7 | ||||
-rw-r--r-- | package/network/config/ltq-adsl-app/patches/300-ubus.patch | 50 |
2 files changed, 56 insertions, 1 deletions
diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile index 38d2ef06a5..0e8bacdbec 100644 --- a/package/network/config/ltq-adsl-app/Makefile +++ b/package/network/config/ltq-adsl-app/Makefile @@ -35,7 +35,7 @@ define Package/ltq-adsl-app CATEGORY:=Network TITLE:=Lantiq DSL userland tool URL:=http://www.lantiq.com/ - DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread +ltq-dsl-base + DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread +ltq-dsl-base +libubox +libubus MENU:=1 endef @@ -75,6 +75,11 @@ CONFIGURE_ARGS += \ TARGET_CFLAGS += -I$(LINUX_DIR)/include +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) ../ltq-vdsl-app/src/src/dsl_cpe_ubus.c $(PKG_BUILD_DIR)/src/ +endef + define Package/ltq-adsl-app/install $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl $(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/ diff --git a/package/network/config/ltq-adsl-app/patches/300-ubus.patch b/package/network/config/ltq-adsl-app/patches/300-ubus.patch new file mode 100644 index 0000000000..1951efd4f6 --- /dev/null +++ b/package/network/config/ltq-adsl-app/patches/300-ubus.patch @@ -0,0 +1,50 @@ +--- a/src/dsl_cpe_control.c ++++ b/src/dsl_cpe_control.c +@@ -139,6 +139,9 @@ extern DSL_Error_t DSL_CPE_Pipe_StaticRe + #endif /* INCLUDE_DSL_RESOURCE_STATISTICS*/ + #endif + ++extern void ubus_init(); ++extern void ubus_deinit(); ++ + DSL_char_t *g_sFirmwareName1 = DSL_NULL; + DSL_char_t *g_sFirmwareName2 = DSL_NULL; + #ifdef INCLUDE_SCRIPT_NOTIFICATION +@@ -5343,6 +5346,8 @@ DSL_int_t dsl_cpe_daemon ( + signal (SIGINT, DSL_CPE_TerminationHandler); + #endif /* RTEMS*/ + ++ ubus_init(); ++ + /* Open DSL_CPE_MAX_DEVICE_NUMBER devices*/ + for (nDevice = 0; nDevice < DSL_CPE_MAX_DEVICE_NUMBER; nDevice++) + { +@@ -5738,6 +5743,7 @@ DSL_int_t dsl_cpe_daemon ( + #endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */ + + DSL_CPE_CONTROL_EXIT: ++ ubus_deinit(); + + #ifdef INCLUDE_DSL_BONDING + DSL_CPE_BND_Stop((DSL_CPE_BND_Context_t*)pCtrlCtx->pBnd); +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -11,7 +11,7 @@ else + dsl_cpe_control_common_ldflags = + endif + +-dsl_cpe_control_LDADD = -lpthread ++dsl_cpe_control_LDADD = -lpthread -lubox -lubus + + if INCLUDE_DSL_CPE_SOAP_SUPPORT + dsl_cpe_control_LDADD += -lm +@@ -70,7 +70,8 @@ dsl_cpe_control_SOURCES = \ + dsl_cpe_control.c \ + dsl_cpe_init_cfg.c \ + dsl_cpe_linux.c \ +- dsl_cpe_debug.c ++ dsl_cpe_debug.c \ ++ dsl_cpe_ubus.c + + dsl_cpe_control_SOURCES += \ + $(dsl_cpe_control_dti_sources) |