2013-03-14 18:43:13 +00:00
|
|
|
# Copyright (C) 2010 OpenWrt.org
|
2016-08-26 22:07:43 +00:00
|
|
|
# Copyright (C) 2015-2016 Lantiq Beteiligungs GmbH & Co KG.
|
2013-03-14 18:43:13 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
2022-08-23 13:18:49 +00:00
|
|
|
PKG_NAME:=ltq-vdsl-vr9-app
|
2016-08-26 22:07:43 +00:00
|
|
|
PKG_VERSION:=4.17.18.6
|
2021-10-03 10:05:51 +00:00
|
|
|
PKG_RELEASE:=$(AUTORELEASE)
|
2015-11-24 20:41:30 +00:00
|
|
|
PKG_BASE_NAME:=dsl_cpe_control
|
|
|
|
PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz
|
2021-01-30 20:54:44 +00:00
|
|
|
PKG_SOURCE_URL:=@OPENWRT
|
2016-12-16 16:32:10 +00:00
|
|
|
PKG_HASH:=da8bb929526a61aea0e153ef524331fcd472a1ebbc6d88ca017735a4f82ece02
|
2015-09-14 20:09:22 +00:00
|
|
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=BSD-2-Clause
|
2013-03-14 18:43:13 +00:00
|
|
|
|
2022-07-15 12:32:59 +00:00
|
|
|
PKG_BUILD_DEPENDS:=ltq-vdsl-vr9
|
2013-03-14 18:43:13 +00:00
|
|
|
|
2016-04-26 21:09:12 +00:00
|
|
|
PKG_FLAGS:=nonshared
|
ltq-vdsl-app: add ubus support to get metrics
Add a 'dsl' ubus object with a 'metrics' function to replace the
expensive shell parsing done by /etc/init.d/dsl_control [dsl|luci]stat.
All metrics are gathered by using syscalls. An additional thread is started
to handle ubus events.
$ time /etc/init.d/dsl_control dslstat
real 0m 2.66s
user 0m 0.90s
sys 0m 1.76s
$ time ubus call dsl metrics
real 0m 0.02s
user 0m 0.00s
sys 0m 0.01s
Example output:
{
"api_version": "4.17.18.6",
"firmware_version": "5.8.1.5.0.7",
"chipset": "Lantiq-VRX200",
"driver_version": "1.5.17.6",
"state": "Showtime with TC-Layer sync",
"up": true,
"uptime": 3891,
"atu_c": {
"vendor_id": [
181,
0,
66,
68,
67,
77,
178,
26
],
"vendor": "Broadcom 178.26",
"system_vendor_id": [
181,
0,
66,
68,
67,
77,
0,
0
],
"system_vendor": "Broadcom",
"version": [
49,
57,
46,
48,
46,
51,
53,
46,
50,
32,
86,
69,
95,
49,
49,
95
],
"serial": [
65,
65,
49,
52,
52,
54,
70,
69,
48,
90,
87,
45,
48,
56,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
"power_state": "L0 - Synchronized",
"xtse": [
0,
0,
0,
0,
0,
0,
0,
2
],
"annex": "B",
"standard": "G.993.2",
"profile": "17a",
"mode": "G.993.2 (VDSL2, Profile 17a, with down- and upstream vectoring)",
"upstream": {
"vector": true,
"trellis": true,
"bitswap": true,
"retx": true,
"virtual_noise": false,
"interleave_delay": 0,
"data_rate": 31999000,
"latn": 8.500000,
"satn": 8.400000,
"snr": 12.700000,
"actps": -90.100000,
"actatp": 13.400000,
"attndr": 37180000
},
"downstream": {
"vector": true,
"trellis": true,
"bitswap": true,
"retx": true,
"virtual_noise": false,
"interleave_delay": 140,
"data_rate": 89998000,
"latn": 9.500000,
"satn": 9.600000,
"snr": 13.300000,
"actps": -90.100000,
"actatp": -1.600000,
"attndr": 116315372
},
"errors": {
"near": {
"es": 1,
"ses": 0,
"loss": 3,
"uas": 424,
"lofs": 0,
"fecs": 0,
"hec": 0,
"ibe": 0,
"crc_p": 0,
"crcp_p": 0,
"cv_p": 0,
"cvp_p": 0,
"rx_corrupted": 27740,
"rx_uncorrected_protected": 27010,
"rx_retransmitted": 0,
"rx_corrected": 730,
"tx_retransmitted": 16222
},
"far": {
"es": 242,
"ses": 71,
"loss": 0,
"uas": 424,
"lofs": 0,
"fecs": 22687,
"hec": 0,
"ibe": 0,
"crc_p": 0,
"crcp_p": 0,
"cv_p": 0,
"cvp_p": 0,
"rx_corrupted": 1383552,
"rx_uncorrected_protected": 1220215,
"rx_retransmitted": 0,
"rx_corrected": 163337,
"tx_retransmitted": 1574051
}
}
}
Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Martin Schiller <ms@dev.tdt.de>
2021-01-26 08:00:48 +00:00
|
|
|
PKG_FIXUP:=autoreconf
|
2016-04-26 21:09:12 +00:00
|
|
|
|
2013-03-14 18:43:13 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2022-08-23 13:18:49 +00:00
|
|
|
define Package/ltq-vdsl-vr9-app
|
2013-03-14 18:43:13 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=Lantiq VDSL userland tool
|
|
|
|
URL:=http://www.lantiq.com/
|
ltq-vdsl-app: add ubus support to get metrics
Add a 'dsl' ubus object with a 'metrics' function to replace the
expensive shell parsing done by /etc/init.d/dsl_control [dsl|luci]stat.
All metrics are gathered by using syscalls. An additional thread is started
to handle ubus events.
$ time /etc/init.d/dsl_control dslstat
real 0m 2.66s
user 0m 0.90s
sys 0m 1.76s
$ time ubus call dsl metrics
real 0m 0.02s
user 0m 0.00s
sys 0m 0.01s
Example output:
{
"api_version": "4.17.18.6",
"firmware_version": "5.8.1.5.0.7",
"chipset": "Lantiq-VRX200",
"driver_version": "1.5.17.6",
"state": "Showtime with TC-Layer sync",
"up": true,
"uptime": 3891,
"atu_c": {
"vendor_id": [
181,
0,
66,
68,
67,
77,
178,
26
],
"vendor": "Broadcom 178.26",
"system_vendor_id": [
181,
0,
66,
68,
67,
77,
0,
0
],
"system_vendor": "Broadcom",
"version": [
49,
57,
46,
48,
46,
51,
53,
46,
50,
32,
86,
69,
95,
49,
49,
95
],
"serial": [
65,
65,
49,
52,
52,
54,
70,
69,
48,
90,
87,
45,
48,
56,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
"power_state": "L0 - Synchronized",
"xtse": [
0,
0,
0,
0,
0,
0,
0,
2
],
"annex": "B",
"standard": "G.993.2",
"profile": "17a",
"mode": "G.993.2 (VDSL2, Profile 17a, with down- and upstream vectoring)",
"upstream": {
"vector": true,
"trellis": true,
"bitswap": true,
"retx": true,
"virtual_noise": false,
"interleave_delay": 0,
"data_rate": 31999000,
"latn": 8.500000,
"satn": 8.400000,
"snr": 12.700000,
"actps": -90.100000,
"actatp": 13.400000,
"attndr": 37180000
},
"downstream": {
"vector": true,
"trellis": true,
"bitswap": true,
"retx": true,
"virtual_noise": false,
"interleave_delay": 140,
"data_rate": 89998000,
"latn": 9.500000,
"satn": 9.600000,
"snr": 13.300000,
"actps": -90.100000,
"actatp": -1.600000,
"attndr": 116315372
},
"errors": {
"near": {
"es": 1,
"ses": 0,
"loss": 3,
"uas": 424,
"lofs": 0,
"fecs": 0,
"hec": 0,
"ibe": 0,
"crc_p": 0,
"crcp_p": 0,
"cv_p": 0,
"cvp_p": 0,
"rx_corrupted": 27740,
"rx_uncorrected_protected": 27010,
"rx_retransmitted": 0,
"rx_corrected": 730,
"tx_retransmitted": 16222
},
"far": {
"es": 242,
"ses": 71,
"loss": 0,
"uas": 424,
"lofs": 0,
"fecs": 22687,
"hec": 0,
"ibe": 0,
"crc_p": 0,
"crcp_p": 0,
"cv_p": 0,
"cvp_p": 0,
"rx_corrupted": 1383552,
"rx_uncorrected_protected": 1220215,
"rx_retransmitted": 0,
"rx_corrected": 163337,
"tx_retransmitted": 1574051
}
}
}
Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Martin Schiller <ms@dev.tdt.de>
2021-01-26 08:00:48 +00:00
|
|
|
DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt +ltq-dsl-base +libubox +libubus
|
2022-09-02 07:48:22 +00:00
|
|
|
PROVIDES:=ltq-dsl-app
|
2013-03-14 18:43:13 +00:00
|
|
|
endef
|
|
|
|
|
2022-08-23 13:18:49 +00:00
|
|
|
define Package/ltq-vdsl-vr9-app/description
|
2013-03-14 18:43:13 +00:00
|
|
|
Userland tool needed to control Lantiq VDSL CPE
|
|
|
|
endef
|
|
|
|
|
2022-08-23 13:18:49 +00:00
|
|
|
# ltq-vdsl-vr9-app uses a header provided by the MEI driver which has some
|
2021-02-16 18:35:07 +00:00
|
|
|
# conditionals.
|
|
|
|
#
|
|
|
|
# Define them here with the default values they would get in the MEI driver,
|
|
|
|
# have the same view on both sides.
|
|
|
|
#
|
2022-08-23 13:18:49 +00:00
|
|
|
# If you change them, you need to change them for the ltq-vdsl-vr9-app as well
|
2021-02-16 18:35:07 +00:00
|
|
|
VDSL_APP_CFLAGS = \
|
|
|
|
-DMAX_CLI_PIPES=1 \
|
|
|
|
-DMEI_SUPPORT_DEBUG_STREAMS=1 \
|
|
|
|
-DMEI_SUPPORT_OPTIMIZED_FW_DL=1
|
|
|
|
|
2013-03-14 18:43:13 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-vrx \
|
2015-12-13 17:04:12 +00:00
|
|
|
--enable-vrx-device=vr9 \
|
2013-03-14 18:43:13 +00:00
|
|
|
--enable-driver-include="-I$(STAGING_DIR)/usr/include/drv_vdsl_cpe_api" \
|
|
|
|
--enable-device-driver-include="-I$(STAGING_DIR)/usr/include/vdsl/" \
|
|
|
|
--enable-ifxos \
|
|
|
|
--enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \
|
|
|
|
--enable-ifxos-library="-I$(STAGING_DIR)/usr/lib" \
|
2021-02-16 18:35:07 +00:00
|
|
|
--enable-add-appl-cflags="$(VDSL_APP_CFLAGS)" \
|
2015-12-13 17:04:02 +00:00
|
|
|
--enable-debug \
|
2015-12-13 17:04:12 +00:00
|
|
|
--disable-dti \
|
2021-02-16 18:35:07 +00:00
|
|
|
--with-channels-per-line="1"
|
2013-03-14 18:43:13 +00:00
|
|
|
|
2021-08-19 16:51:45 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-model=full \
|
|
|
|
--enable-dsl-ceoc=no
|
2013-03-14 18:43:13 +00:00
|
|
|
#CONFIGURE_ARGS += --enable-model=lite
|
|
|
|
#CONFIGURE_ARGS += --enable-model=footprint
|
2021-08-19 16:51:45 +00:00
|
|
|
#CONFIGURE_ARGS += --enable-model=typical
|
2013-03-14 18:43:13 +00:00
|
|
|
#CONFIGURE_ARGS += --enable-model=debug
|
|
|
|
|
2022-08-23 13:18:49 +00:00
|
|
|
define Package/ltq-vdsl-vr9-app/install
|
2018-01-06 17:38:35 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl
|
2013-03-14 18:43:13 +00:00
|
|
|
$(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/
|
2017-08-03 07:44:21 +00:00
|
|
|
$(INSTALL_BIN) ./files/10_atm.sh $(1)/etc/hotplug.d/dsl
|
|
|
|
$(INSTALL_BIN) ./files/10_ptm.sh $(1)/etc/hotplug.d/dsl
|
2013-03-14 18:43:13 +00:00
|
|
|
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin/vdsl_cpe_control
|
2015-11-24 20:41:18 +00:00
|
|
|
$(INSTALL_BIN) ./files/dsl_cpe_pipe.sh $(1)/sbin/
|
2013-03-14 18:43:13 +00:00
|
|
|
endef
|
|
|
|
|
2022-08-23 13:18:49 +00:00
|
|
|
$(eval $(call BuildPackage,ltq-vdsl-vr9-app))
|