mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-27 22:50:19 +08:00
Compare commits
401 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 | ||
|
|
8f0e98f50b | ||
|
|
d3cf57ef77 | ||
|
|
036e27876a | ||
|
|
69f8fcb047 | ||
|
|
c344fbe2ea | ||
|
|
0a29c12e09 | ||
|
|
68ca5f7fb8 | ||
|
|
8cb7c61007 | ||
|
|
61359cb291 | ||
|
|
4a439783c8 | ||
|
|
cd1ad2ec7a | ||
|
|
9a25147997 | ||
|
|
ad4c0f5cf1 | ||
|
|
3f6076369f | ||
|
|
fbc699524a | ||
|
|
f7c45760da | ||
|
|
e03c14ae2b | ||
|
|
355e042820 | ||
|
|
53d2088715 | ||
|
|
833c97d216 | ||
|
|
59d2324acd | ||
|
|
e3cb3586d7 | ||
|
|
a5e43567b3 | ||
|
|
e03568f9b1 | ||
|
|
ea23e1489c | ||
|
|
32db63deb0 | ||
|
|
5211a49f67 | ||
|
|
907f2fc59b | ||
|
|
cf8571b217 | ||
|
|
86bab4da22 | ||
|
|
3bdf2ba11b | ||
|
|
4ee3a92064 | ||
|
|
f1b4cbc520 | ||
|
|
dff5045437 | ||
|
|
80a057b727 | ||
|
|
84a8afe5da | ||
|
|
609035d250 | ||
|
|
bb0299fe26 | ||
|
|
57f6e54646 | ||
|
|
859a2af38e | ||
|
|
477284e1a6 | ||
|
|
a9d10a8642 | ||
|
|
01cf113338 | ||
|
|
7da94735b5 | ||
|
|
baccd9ad56 | ||
|
|
1642841acd | ||
|
|
c3157ef44e | ||
|
|
127f732831 | ||
|
|
be91f797dc | ||
|
|
ae7a3e329f | ||
|
|
ef37f8d9c1 | ||
|
|
07ca78f548 | ||
|
|
10a11f0cb8 | ||
|
|
4c11cdac89 | ||
|
|
8b51e8c03b | ||
|
|
2d9f03d6ab | ||
|
|
e19674ea70 | ||
|
|
0af09b123c | ||
|
|
6e6f7289ad | ||
|
|
25f6109691 | ||
|
|
7e0fe946cd | ||
|
|
c831c34a94 | ||
|
|
a9180d3a2b | ||
|
|
3ad8ef4b40 | ||
|
|
17fd0ab28a | ||
|
|
8ae15aa39b | ||
|
|
1ed5f0c0f6 | ||
|
|
939ff109c2 | ||
|
|
5c9469589c | ||
|
|
d6dae7cd0b | ||
|
|
0872d45d63 | ||
|
|
14e54fbf04 | ||
|
|
105edbfada | ||
|
|
a77deb3f36 | ||
|
|
38f737fa20 | ||
|
|
600209795d | ||
|
|
6819ccef9c | ||
|
|
8d257729ef | ||
|
|
78c84db435 | ||
|
|
1b1e071b1b | ||
|
|
38bf0e3c89 | ||
|
|
2506c9874a | ||
|
|
ee486af38b | ||
|
|
bf871111a5 | ||
|
|
1388b566bc | ||
|
|
a63295be52 | ||
|
|
450b9eaee9 | ||
|
|
e22a60c637 | ||
|
|
32817656e1 | ||
|
|
da017f98e2 | ||
|
|
1e3c338abb | ||
|
|
034f69408a | ||
|
|
d86e277461 | ||
|
|
2f333148b2 | ||
|
|
8a275944e3 | ||
|
|
76d40e2e1e | ||
|
|
e00394f158 | ||
|
|
64944425f5 | ||
|
|
9d996bdf9e | ||
|
|
5c8e7cb740 | ||
|
|
201fb45c6c | ||
|
|
7e2cdb88fb | ||
|
|
f750ab67d7 | ||
|
|
1ba812351d | ||
|
|
efc11f8c6d | ||
|
|
69cf19cc8e | ||
|
|
085ec84436 | ||
|
|
faec0f002a | ||
|
|
436a57f8d6 | ||
|
|
e3d0362d1f | ||
|
|
3135ad4865 | ||
|
|
12f4a5380b | ||
|
|
3887bab7f7 | ||
|
|
a6a54316e8 | ||
|
|
0273969b9c | ||
|
|
0781d5620d | ||
|
|
d8d42400b1 | ||
|
|
c3ee0a2d8a | ||
|
|
d66c3c0bbf | ||
|
|
a57d03d7e9 | ||
|
|
ec35396ffc | ||
|
|
7e9a109466 | ||
|
|
21c9d13b7a | ||
|
|
f467f2a90f | ||
|
|
8ffe458009 | ||
|
|
a9122f9909 | ||
|
|
cea453c91c | ||
|
|
4b707a26f4 | ||
|
|
81a39308cc | ||
|
|
73d7e51afa | ||
|
|
557f2693d3 | ||
|
|
c9b2973ac8 | ||
|
|
6f15e7ff27 | ||
|
|
f431a3ddf5 | ||
|
|
4ce6578aa7 | ||
|
|
39ab8e9282 | ||
|
|
e5694c1429 | ||
|
|
0c998dbb66 | ||
|
|
d8b5f3e1f0 | ||
|
|
0b39626067 | ||
|
|
5665076321 | ||
|
|
db5c1613f5 | ||
|
|
c82cf9ebb0 | ||
|
|
1f7565536d | ||
|
|
1922fa2560 | ||
|
|
fe86ade858 | ||
|
|
f49c4f4a64 | ||
|
|
ac7491c010 | ||
|
|
63db10eb1f | ||
|
|
651ad4ce22 | ||
|
|
51a3b0ad35 | ||
|
|
0c8b1ea046 | ||
|
|
104805a36e | ||
|
|
a1bfb1b568 | ||
|
|
5c744f71e3 | ||
|
|
20ca483d80 | ||
|
|
7a466c989c | ||
|
|
ff63939e84 | ||
|
|
3b283b8f3a | ||
|
|
d93d72587e | ||
|
|
b098ef3dc2 | ||
|
|
8c69fc062a | ||
|
|
8ad4f32786 | ||
|
|
71b66376f0 | ||
|
|
48525b051a | ||
|
|
753e894b69 | ||
|
|
ce701702c5 | ||
|
|
11550d140a | ||
|
|
f622a96054 | ||
|
|
3f19a43df2 | ||
|
|
d2fedc407a | ||
|
|
783fd44680 | ||
|
|
614774cb8b | ||
|
|
84521942ca | ||
|
|
bbbbdf9650 | ||
|
|
98071d157d | ||
|
|
d829f00e07 | ||
|
|
640535a2ef | ||
|
|
7837417219 | ||
|
|
269cbe364e | ||
|
|
54cc458a2d | ||
|
|
fdc882b6e0 | ||
|
|
346eaf0414 | ||
|
|
d946f11c32 | ||
|
|
c0957a425a | ||
|
|
8015a503ac | ||
|
|
a7d09f5ede | ||
|
|
8a5b49d585 | ||
|
|
ac69ea616e | ||
|
|
f358d6338d | ||
|
|
c514903145 | ||
|
|
dd69c371ae | ||
|
|
4a1ab17bd4 | ||
|
|
208b2cc8e5 | ||
|
|
2e934a7169 | ||
|
|
b06980688a | ||
|
|
29b9605e02 | ||
|
|
0afa721bca | ||
|
|
3c0de388d1 | ||
|
|
aa1741e87a | ||
|
|
3040359e85 | ||
|
|
237286f42d | ||
|
|
7758b30397 | ||
|
|
7b0dce915c | ||
|
|
b6fdd0115a | ||
|
|
392e08e2fc | ||
|
|
2ae2110799 | ||
|
|
773e7af7f6 | ||
|
|
75e9a5360f | ||
|
|
db5e42434e | ||
|
|
00fd7efa3b | ||
|
|
34f495f0a5 | ||
|
|
e3b7c9c238 | ||
|
|
e3f2e715c1 | ||
|
|
4c149ff680 | ||
|
|
959b0546bc | ||
|
|
e39430ceaf | ||
|
|
6ea9942320 | ||
|
|
a5e812f785 | ||
|
|
a604987a3e | ||
|
|
7b2d8edacf | ||
|
|
47b2b4fc51 | ||
|
|
6b3e6bcd11 | ||
|
|
52726289cc | ||
|
|
6c2aac5db5 | ||
|
|
bfc2b17a72 | ||
|
|
e98422f81e | ||
|
|
841a76a7e6 | ||
|
|
1760ea526c | ||
|
|
b5a493e540 | ||
|
|
7f00d0419f | ||
|
|
64da6686af | ||
|
|
8cc1877efd | ||
|
|
6673a85a21 | ||
|
|
3e07ea7f8d | ||
|
|
8b4ef46681 | ||
|
|
f35e41cc0c | ||
|
|
0aff258e29 | ||
|
|
d919f4440e | ||
|
|
9d20839041 | ||
|
|
36ec134e33 | ||
|
|
ea57418313 | ||
|
|
c61aa804ce | ||
|
|
19bbb87682 | ||
|
|
3ee01927b1 | ||
|
|
d9f6b37bd7 | ||
|
|
c3dd0a996b |
@@ -16,12 +16,4 @@ config BBF_TR143
|
||||
bool "Compile with tr143 diagnostics features"
|
||||
default y
|
||||
|
||||
config BBF_TR157
|
||||
bool "Compile with tr157 bulkdata collector features"
|
||||
default y
|
||||
|
||||
config BBF_TR064
|
||||
bool "Compile with tr064 features"
|
||||
default n
|
||||
|
||||
endif
|
||||
|
||||
31
bbf/Makefile
31
bbf/Makefile
@@ -5,11 +5,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=2.6-2020-11-13
|
||||
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:=192a2f48b0d066e182e2bbe193a826487c90f11f
|
||||
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
|
||||
@@ -44,7 +44,7 @@ define Package/libbbf_api/description
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/description
|
||||
Library contains the data model tree. It includes TR181, TR104, TR143, TR157 and TR064 data models
|
||||
Library contains the data model tree. It includes TR181, TR104 and TR143 data models
|
||||
endef
|
||||
|
||||
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
|
||||
@@ -74,16 +74,6 @@ CONFIGURE_ARGS += \
|
||||
--enable-tr143
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR157),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr157
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR064),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr064
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_libopenssl),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-libopenssl
|
||||
@@ -102,20 +92,23 @@ endef
|
||||
define Package/libbbfdm/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/prerm
|
||||
#!/bin/sh
|
||||
rm -rf /etc/bbfdm/*
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
|
||||
$(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
|
||||
$(CP) $(PKG_BUILD_DIR)/dmtree/tr181/*.h $(1)/usr/include/libbbfdm/
|
||||
$(CP) $(PKG_BUILD_DIR)/dmtree/tr157/*.h $(1)/usr/include/libbbfdm/
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
|
||||
|
||||
@@ -5,7 +5,7 @@ PROG_OBJS = bulkdata.o common.o config.o http.o log.o report.o times.o buci.o
|
||||
LIB_OBJS = datamodel.o
|
||||
|
||||
PROG_CFLAGS = $(CFLAGS) -Wall -Werror -fPIC
|
||||
PROG_LDFLAGS = $(LDFLAGS) -lubus -luci -lubox -ljson-c -lcurl -lblobmsg_json -lbbfdm
|
||||
PROG_LDFLAGS = $(LDFLAGS) -lubus -luci -lubox -ljson-c -lcurl -lblobmsg_json -lbbfdm -lbbf_api
|
||||
LIB_LDFLAGS = $(LDFLAGS) -lbbf_api
|
||||
|
||||
%.o: %.c
|
||||
|
||||
@@ -17,7 +17,7 @@ static pathnode *temphead = NULL;
|
||||
int bulkdata_dm_ctx_init(struct dmctx *ctx)
|
||||
{
|
||||
struct bulkdata *bulkdata = &bulkdata_main;
|
||||
dm_ctx_init(ctx, DM_CWMP, bulkdata->amd_version, bulkdata->instance_mode);
|
||||
dm_ctx_init(ctx, bulkdata->instance_mode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <libbbfdm/deviceinfo.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "config.h"
|
||||
@@ -77,9 +76,9 @@ int get_device_id_config(struct bulkdata *bulkdata)
|
||||
struct dmctx dmctx = {0};
|
||||
|
||||
bulkdata_dm_ctx_init(&dmctx);
|
||||
bulkdata->device_id.manufacturer_oui = strdup(get_deviceid_manufactureroui());
|
||||
bulkdata->device_id.product_class = strdup(get_deviceid_productclass());
|
||||
bulkdata->device_id.serial_number = strdup(get_deviceid_serialnumber());
|
||||
bulkdata->device_id.manufacturer_oui = bulkdata_get_value_param("Device.DeviceInfo.ManufacturerOUI");
|
||||
bulkdata->device_id.product_class = bulkdata_get_value_param("Device.DeviceInfo.ProductClass");
|
||||
bulkdata->device_id.serial_number = bulkdata_get_value_param("Device.DeviceInfo.SerialNumber");
|
||||
bulkdata_dm_ctx_clean(&dmctx);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -36,8 +36,8 @@ static int browseBulkDataProfileInst(struct dmctx *dmctx, DMNODE *parent_node, v
|
||||
synchronize_specific_config_sections_with_dmmap("bulkdata", "profile", "dmmap_bulkdata", &dup_list);
|
||||
list_for_each_entry(p, &dup_list, list) {
|
||||
|
||||
inst = handle_update_instance(1, dmctx, &max_inst, update_instance_alias, 5,
|
||||
p->dmmap_section, "profile_instance", "profile_alias", "dmmap_bulkdata", "profile");
|
||||
inst = handle_update_instance(1, dmctx, &max_inst, update_instance_alias, 3,
|
||||
p->dmmap_section, "profile_instance", "profile_alias");
|
||||
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p->config_section, inst) == DM_STOP)
|
||||
break;
|
||||
@@ -65,8 +65,8 @@ static int browseBulkDataProfileParameterInst(struct dmctx *dmctx, DMNODE *paren
|
||||
browse_args.option = "profile_id";
|
||||
browse_args.value = prev_profile_id;
|
||||
|
||||
inst = handle_update_instance(2, dmctx, &max_inst, update_instance_alias, 7,
|
||||
p->dmmap_section, "parameter_instance", "parameter_alias", "dmmap_bulkdata", "profile_parameter",
|
||||
inst = handle_update_instance(2, dmctx, &max_inst, update_instance_alias, 5,
|
||||
p->dmmap_section, "parameter_instance", "parameter_alias",
|
||||
check_browse_section, (void *)&browse_args);
|
||||
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p->config_section, inst) == DM_STOP)
|
||||
@@ -95,8 +95,8 @@ static int browseBulkDataProfileHTTPRequestURIParameterInst(struct dmctx *dmctx,
|
||||
browse_args.option = "profile_id";
|
||||
browse_args.value = prev_profile_id;
|
||||
|
||||
inst = handle_update_instance(2, dmctx, &max_inst, update_instance_alias, 7,
|
||||
p->dmmap_section, "requesturiparameter_instance", "requesturiparameter_alias", "dmmap_bulkdata", "profile_http_request_uri_parameter",
|
||||
inst = handle_update_instance(2, dmctx, &max_inst, update_instance_alias, 5,
|
||||
p->dmmap_section, "requesturiparameter_instance", "requesturiparameter_alias",
|
||||
check_browse_section, (void *)&browse_args);
|
||||
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p->config_section, inst) == DM_STOP)
|
||||
@@ -112,13 +112,12 @@ static int browseBulkDataProfileHTTPRequestURIParameterInst(struct dmctx *dmctx,
|
||||
static int addObjBulkDataProfile(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
struct uci_section *profile, *dmmap_bulkdata;
|
||||
char prof_id[16], *last_inst = NULL, *value, *v;
|
||||
char prof_id[16], *last_inst = NULL;
|
||||
|
||||
check_create_dmmap_package("dmmap_bulkdata");
|
||||
last_inst = get_last_instance_bbfdm("dmmap_bulkdata", "profile", "profile_instance");
|
||||
snprintf(prof_id, sizeof(prof_id), "%d", last_inst ? atoi(last_inst)+1 : 1);
|
||||
|
||||
dmuci_add_section_and_rename("bulkdata", "profile", &profile, &value);
|
||||
dmuci_add_section("bulkdata", "profile", &profile);
|
||||
dmuci_set_value_by_section(profile, "profile_id", prof_id);
|
||||
dmuci_set_value_by_section(profile, "enable", "0");
|
||||
dmuci_set_value_by_section(profile, "nbre_of_retained_failed_reports", "0");
|
||||
@@ -139,9 +138,9 @@ static int addObjBulkDataProfile(char *refparam, struct dmctx *ctx, void *data,
|
||||
dmuci_set_value_by_section(profile, "http_retry_minimum_wait_interval", "5");
|
||||
dmuci_set_value_by_section(profile, "http_persist_across_reboot", "0");
|
||||
|
||||
dmuci_add_section_bbfdm("dmmap_bulkdata", "profile", &dmmap_bulkdata, &v);
|
||||
dmuci_add_section_bbfdm("dmmap_bulkdata", "profile", &dmmap_bulkdata);
|
||||
dmuci_set_value_by_section(dmmap_bulkdata, "section_name", section_name(profile));
|
||||
*instance = update_instance(last_inst, 4, dmmap_bulkdata, "profile_instance", "dmmap_bulkdata", "profile");
|
||||
*instance = update_instance(last_inst, 2, dmmap_bulkdata, "profile_instance");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -221,24 +220,24 @@ static int delObjBulkDataProfile(char *refparam, struct dmctx *ctx, void *data,
|
||||
static int addObjBulkDataProfileParameter(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
struct uci_section *profile_parameter, *dmmap_bulkdata;
|
||||
char *value, *last_inst, *prev_profile_id, *v;
|
||||
char *last_inst, *prev_profile_id;
|
||||
struct browse_args browse_args = {0};
|
||||
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "profile_id", &prev_profile_id);
|
||||
|
||||
last_inst = get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_bulkdata", "profile_parameter", "parameter_instance", "profile_id", prev_profile_id);
|
||||
|
||||
dmuci_add_section_and_rename("bulkdata", "profile_parameter", &profile_parameter, &value);
|
||||
dmuci_add_section("bulkdata", "profile_parameter", &profile_parameter);
|
||||
dmuci_set_value_by_section(profile_parameter, "profile_id", prev_profile_id);
|
||||
|
||||
browse_args.option = "profile_id";
|
||||
browse_args.value = prev_profile_id;
|
||||
|
||||
dmuci_add_section_bbfdm("dmmap_bulkdata", "profile_parameter", &dmmap_bulkdata, &v);
|
||||
dmuci_add_section_bbfdm("dmmap_bulkdata", "profile_parameter", &dmmap_bulkdata);
|
||||
dmuci_set_value_by_section(dmmap_bulkdata, "section_name", section_name(profile_parameter));
|
||||
dmuci_set_value_by_section(dmmap_bulkdata, "profile_id", prev_profile_id);
|
||||
|
||||
*instance = update_instance(last_inst, 6, dmmap_bulkdata, "parameter_instance", "dmmap_bulkdata", "profile_parameter", check_browse_section, (void *)&browse_args);
|
||||
*instance = update_instance(last_inst, 5, dmmap_bulkdata, "parameter_instance", NULL, check_browse_section, (void *)&browse_args);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -275,24 +274,24 @@ static int delObjBulkDataProfileParameter(char *refparam, struct dmctx *ctx, voi
|
||||
static int addObjBulkDataProfileHTTPRequestURIParameter(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
struct uci_section *profile_http_request_uri_parameter, *dmmap_bulkdata;
|
||||
char *value, *last_inst, *prev_profile_id, *v;
|
||||
char *last_inst, *prev_profile_id;
|
||||
struct browse_args browse_args = {0};
|
||||
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "profile_id", &prev_profile_id);
|
||||
|
||||
last_inst = get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_bulkdata", "profile_http_request_uri_parameter", "requesturiparameter_instance", "profile_id", prev_profile_id);
|
||||
|
||||
dmuci_add_section_and_rename("bulkdata", "profile_http_request_uri_parameter", &profile_http_request_uri_parameter, &value);
|
||||
dmuci_add_section("bulkdata", "profile_http_request_uri_parameter", &profile_http_request_uri_parameter);
|
||||
dmuci_set_value_by_section(profile_http_request_uri_parameter, "profile_id", prev_profile_id);
|
||||
|
||||
browse_args.option = "profile_id";
|
||||
browse_args.value = prev_profile_id;
|
||||
|
||||
dmuci_add_section_bbfdm("dmmap_bulkdata", "profile_http_request_uri_parameter", &dmmap_bulkdata, &v);
|
||||
dmuci_add_section_bbfdm("dmmap_bulkdata", "profile_http_request_uri_parameter", &dmmap_bulkdata);
|
||||
dmuci_set_value_by_section(dmmap_bulkdata, "section_name", section_name(profile_http_request_uri_parameter));
|
||||
dmuci_set_value_by_section(dmmap_bulkdata, "profile_id", prev_profile_id);
|
||||
|
||||
*instance = update_instance(last_inst, 6, dmmap_bulkdata, "requesturiparameter_instance", "dmmap_bulkdata", "profile_http_request_uri_parameter", check_browse_section, (void *)&browse_args);
|
||||
*instance = update_instance(last_inst, 5, dmmap_bulkdata, "requesturiparameter_instance", NULL, check_browse_section, (void *)&browse_args);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -332,7 +331,7 @@ static int delObjBulkDataProfileHTTPRequestURIParameter(char *refparam, struct d
|
||||
/*#Device.BulkData.Enable!UCI:bulkdata/bulkdata,bulkdata/enable*/
|
||||
static int get_BulkData_Enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_option_value_string("bulkdata", "bulkdata", "enable", value);
|
||||
*value = dmuci_get_option_value_fallback_def("bulkdata", "bulkdata", "enable", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -416,7 +415,7 @@ static int get_BulkData_ProfileNumberOfEntries(char *refparam, struct dmctx *ctx
|
||||
/*#Device.BulkData.Profile.{i}.Enable!UCI:bulkdata/profile,@i-1/enable*/
|
||||
static int get_BulkDataProfile_Enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "enable", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "enable", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -563,7 +562,7 @@ static int set_BulkDataProfile_EncodingType(char *refparam, struct dmctx *ctx, v
|
||||
/*#Device.BulkData.Profile.{i}.ReportingInterval!UCI:bulkdata/profile,@i-1/reporting_interval*/
|
||||
static int get_BulkDataProfile_ReportingInterval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "reporting_interval", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "reporting_interval", "86400");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1001,7 +1000,7 @@ static int set_BulkDataProfileHTTP_Method(char *refparam, struct dmctx *ctx, voi
|
||||
/*#Device.BulkData.Profile.{i}.HTTP.UseDateHeader!UCI:bulkdata/profile,@i-1/http_use_date_header*/
|
||||
static int get_BulkDataProfileHTTP_UseDateHeader(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "http_use_date_header", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "http_use_date_header", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1025,7 +1024,7 @@ static int set_BulkDataProfileHTTP_UseDateHeader(char *refparam, struct dmctx *c
|
||||
/*#Device.BulkData.Profile.{i}.HTTP.RetryEnable!UCI:bulkdata/profile,@i-1/http_retry_enable*/
|
||||
static int get_BulkDataProfileHTTP_RetryEnable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "http_retry_enable", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "http_retry_enable", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1049,7 +1048,7 @@ static int set_BulkDataProfileHTTP_RetryEnable(char *refparam, struct dmctx *ctx
|
||||
/*#Device.BulkData.Profile.{i}.HTTP.RetryMinimumWaitInterval!UCI:bulkdata/profile,@i-1/http_retry_minimum_wait_interval*/
|
||||
static int get_BulkDataProfileHTTP_RetryMinimumWaitInterval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "http_retry_minimum_wait_interval", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "http_retry_minimum_wait_interval", "5");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1070,7 +1069,7 @@ static int set_BulkDataProfileHTTP_RetryMinimumWaitInterval(char *refparam, stru
|
||||
/*#Device.BulkData.Profile.{i}.HTTP.RetryIntervalMultiplier!UCI:bulkdata/profile,@i-1/http_retry_interval_multiplier*/
|
||||
static int get_BulkDataProfileHTTP_RetryIntervalMultiplier(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "http_retry_interval_multiplier", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "http_retry_interval_multiplier", "2000");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1109,7 +1108,7 @@ static int get_BulkDataProfileHTTP_RequestURIParameterNumberOfEntries(char *refp
|
||||
/*#Device.BulkData.Profile.{i}.HTTP.PersistAcrossReboot!UCI:bulkdata/profile,@i-1/http_persist_across_reboot*/
|
||||
static int get_BulkDataProfileHTTP_PersistAcrossReboot(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "http_persist_across_reboot", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "http_persist_across_reboot", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1174,120 +1173,120 @@ static int set_BulkDataProfileHTTPRequestURIParameter_Reference(char *refparam,
|
||||
|
||||
/* *** Device.BulkData. *** */
|
||||
DMOBJ tDeviceBulkDataObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"BulkData", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tBulkDataObj, tBulkDataParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"BulkData", &DMREAD, NULL, NULL, NULL, NULL, NULL, tBulkDataObj, tBulkDataParams, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
DMOBJ tBulkDataObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"Profile", &DMWRITE, addObjBulkDataProfile, delObjBulkDataProfile, NULL, browseBulkDataProfileInst, NULL, NULL, NULL, tBulkDataProfileObj, tBulkDataProfileParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"Profile", &DMWRITE, addObjBulkDataProfile, delObjBulkDataProfile, NULL, browseBulkDataProfileInst, NULL, tBulkDataProfileObj, tBulkDataProfileParams, NULL, BBFDM_BOTH, LIST_KEY{"Alias", NULL}},
|
||||
{0}
|
||||
};
|
||||
|
||||
DMLEAF tBulkDataParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_BulkData_Enable, set_BulkData_Enable, NULL, NULL, BBFDM_BOTH},
|
||||
{"Status", &DMREAD, DMT_STRING, get_BulkData_Status, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"MinReportingInterval", &DMREAD, DMT_UNINT, get_BulkData_MinReportingInterval, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"Protocols", &DMREAD, DMT_STRING, get_BulkData_Protocols, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"EncodingTypes", &DMREAD, DMT_STRING, get_BulkData_EncodingTypes, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"ParameterWildCardSupported", &DMREAD, DMT_BOOL, get_BulkData_ParameterWildCardSupported, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"MaxNumberOfProfiles", &DMREAD, DMT_INT, get_BulkData_MaxNumberOfProfiles, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"MaxNumberOfParameterReferences", &DMREAD, DMT_INT, get_BulkData_MaxNumberOfParameterReferences, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"ProfileNumberOfEntries", &DMREAD, DMT_UNINT, get_BulkData_ProfileNumberOfEntries, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_BulkData_Enable, set_BulkData_Enable, BBFDM_BOTH},
|
||||
{"Status", &DMREAD, DMT_STRING, get_BulkData_Status, NULL, BBFDM_BOTH},
|
||||
{"MinReportingInterval", &DMREAD, DMT_UNINT, get_BulkData_MinReportingInterval, NULL, BBFDM_BOTH},
|
||||
{"Protocols", &DMREAD, DMT_STRING, get_BulkData_Protocols, NULL, BBFDM_BOTH},
|
||||
{"EncodingTypes", &DMREAD, DMT_STRING, get_BulkData_EncodingTypes, NULL, BBFDM_BOTH},
|
||||
{"ParameterWildCardSupported", &DMREAD, DMT_BOOL, get_BulkData_ParameterWildCardSupported, NULL, BBFDM_BOTH},
|
||||
{"MaxNumberOfProfiles", &DMREAD, DMT_INT, get_BulkData_MaxNumberOfProfiles, NULL, BBFDM_BOTH},
|
||||
{"MaxNumberOfParameterReferences", &DMREAD, DMT_INT, get_BulkData_MaxNumberOfParameterReferences, NULL, BBFDM_BOTH},
|
||||
{"ProfileNumberOfEntries", &DMREAD, DMT_UNINT, get_BulkData_ProfileNumberOfEntries, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.BulkData.Profile.{i}. *** */
|
||||
DMOBJ tBulkDataProfileObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"Parameter", &DMWRITE, addObjBulkDataProfileParameter, delObjBulkDataProfileParameter, NULL, browseBulkDataProfileParameterInst, NULL, NULL, NULL, NULL, tBulkDataProfileParameterParams, NULL, BBFDM_BOTH},
|
||||
{"CSVEncoding", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tBulkDataProfileCSVEncodingParams, NULL, BBFDM_BOTH},
|
||||
{"JSONEncoding", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tBulkDataProfileJSONEncodingParams, NULL, BBFDM_BOTH},
|
||||
{"HTTP", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tBulkDataProfileHTTPObj, tBulkDataProfileHTTPParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"Parameter", &DMWRITE, addObjBulkDataProfileParameter, delObjBulkDataProfileParameter, NULL, browseBulkDataProfileParameterInst, NULL, NULL, tBulkDataProfileParameterParams, NULL, BBFDM_BOTH},
|
||||
{"CSVEncoding", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, tBulkDataProfileCSVEncodingParams, NULL, BBFDM_BOTH},
|
||||
{"JSONEncoding", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, tBulkDataProfileJSONEncodingParams, NULL, BBFDM_BOTH},
|
||||
{"HTTP", &DMREAD, NULL, NULL, NULL, NULL, NULL, tBulkDataProfileHTTPObj, tBulkDataProfileHTTPParams, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
DMLEAF tBulkDataProfileParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_BulkDataProfile_Enable, set_BulkDataProfile_Enable, NULL, NULL, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_BulkDataProfile_Alias, set_BulkDataProfile_Alias, NULL, NULL, BBFDM_BOTH},
|
||||
{"Name", &DMWRITE, DMT_STRING, get_BulkDataProfile_Name, set_BulkDataProfile_Name, NULL, NULL, BBFDM_BOTH},
|
||||
{"NumberOfRetainedFailedReports", &DMWRITE, DMT_INT, get_BulkDataProfile_NumberOfRetainedFailedReports, set_BulkDataProfile_NumberOfRetainedFailedReports, NULL, NULL, BBFDM_BOTH},
|
||||
{"Protocol", &DMWRITE, DMT_STRING, get_BulkDataProfile_Protocol, set_BulkDataProfile_Protocol, NULL, NULL, BBFDM_BOTH},
|
||||
{"EncodingType", &DMWRITE, DMT_STRING, get_BulkDataProfile_EncodingType, set_BulkDataProfile_EncodingType, NULL, NULL, BBFDM_BOTH},
|
||||
{"ReportingInterval", &DMWRITE, DMT_UNINT, get_BulkDataProfile_ReportingInterval, set_BulkDataProfile_ReportingInterval, NULL, NULL, BBFDM_BOTH},
|
||||
{"TimeReference", &DMWRITE, DMT_TIME, get_BulkDataProfile_TimeReference, set_BulkDataProfile_TimeReference, NULL, NULL, BBFDM_BOTH},
|
||||
{"ParameterNumberOfEntries", &DMREAD, DMT_UNINT, get_BulkDataProfile_ParameterNumberOfEntries, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
//{"StreamingHost", &DMWRITE, DMT_STRING, get_BulkDataProfile_StreamingHost, set_BulkDataProfile_StreamingHost, NULL, NULL, BBFDM_BOTH},
|
||||
//{"StreamingPort", &DMWRITE, DMT_UNINT, get_BulkDataProfile_StreamingPort, set_BulkDataProfile_StreamingPort, NULL, NULL, BBFDM_BOTH},
|
||||
//{"StreamingSessionID", &DMWRITE, DMT_UNINT, get_BulkDataProfile_StreamingSessionID, set_BulkDataProfile_StreamingSessionID, NULL, NULL, BBFDM_BOTH},
|
||||
//{"FileTransferURL", &DMWRITE, DMT_STRING, get_BulkDataProfile_FileTransferURL, set_BulkDataProfile_FileTransferURL, NULL, NULL, BBFDM_BOTH},
|
||||
//{"FileTransferUsername", &DMWRITE, DMT_STRING, get_BulkDataProfile_FileTransferUsername, set_BulkDataProfile_FileTransferUsername, NULL, NULL, BBFDM_BOTH},
|
||||
//{"FileTransferPassword", &DMWRITE, DMT_STRING, get_BulkDataProfile_FileTransferPassword, set_BulkDataProfile_FileTransferPassword, NULL, NULL, BBFDM_BOTH},
|
||||
//{"ControlFileFormat", &DMWRITE, DMT_STRING, get_BulkDataProfile_ControlFileFormat, set_BulkDataProfile_ControlFileFormat, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_BulkDataProfile_Enable, set_BulkDataProfile_Enable, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_BulkDataProfile_Alias, set_BulkDataProfile_Alias, BBFDM_BOTH},
|
||||
{"Name", &DMWRITE, DMT_STRING, get_BulkDataProfile_Name, set_BulkDataProfile_Name, BBFDM_BOTH},
|
||||
{"NumberOfRetainedFailedReports", &DMWRITE, DMT_INT, get_BulkDataProfile_NumberOfRetainedFailedReports, set_BulkDataProfile_NumberOfRetainedFailedReports, BBFDM_BOTH},
|
||||
{"Protocol", &DMWRITE, DMT_STRING, get_BulkDataProfile_Protocol, set_BulkDataProfile_Protocol, BBFDM_BOTH},
|
||||
{"EncodingType", &DMWRITE, DMT_STRING, get_BulkDataProfile_EncodingType, set_BulkDataProfile_EncodingType, BBFDM_BOTH},
|
||||
{"ReportingInterval", &DMWRITE, DMT_UNINT, get_BulkDataProfile_ReportingInterval, set_BulkDataProfile_ReportingInterval, BBFDM_BOTH},
|
||||
{"TimeReference", &DMWRITE, DMT_TIME, get_BulkDataProfile_TimeReference, set_BulkDataProfile_TimeReference, BBFDM_BOTH},
|
||||
{"ParameterNumberOfEntries", &DMREAD, DMT_UNINT, get_BulkDataProfile_ParameterNumberOfEntries, NULL, BBFDM_BOTH},
|
||||
//{"StreamingHost", &DMWRITE, DMT_STRING, get_BulkDataProfile_StreamingHost, set_BulkDataProfile_StreamingHost, BBFDM_BOTH},
|
||||
//{"StreamingPort", &DMWRITE, DMT_UNINT, get_BulkDataProfile_StreamingPort, set_BulkDataProfile_StreamingPort, BBFDM_BOTH},
|
||||
//{"StreamingSessionID", &DMWRITE, DMT_UNINT, get_BulkDataProfile_StreamingSessionID, set_BulkDataProfile_StreamingSessionID, BBFDM_BOTH},
|
||||
//{"FileTransferURL", &DMWRITE, DMT_STRING, get_BulkDataProfile_FileTransferURL, set_BulkDataProfile_FileTransferURL, BBFDM_BOTH},
|
||||
//{"FileTransferUsername", &DMWRITE, DMT_STRING, get_BulkDataProfile_FileTransferUsername, set_BulkDataProfile_FileTransferUsername, BBFDM_BOTH},
|
||||
//{"FileTransferPassword", &DMWRITE, DMT_STRING, get_BulkDataProfile_FileTransferPassword, set_BulkDataProfile_FileTransferPassword, BBFDM_BOTH},
|
||||
//{"ControlFileFormat", &DMWRITE, DMT_STRING, get_BulkDataProfile_ControlFileFormat, set_BulkDataProfile_ControlFileFormat, BBFDM_BOTH},
|
||||
//{"Controller", &DMREAD, DMT_STRING, get_BulkDataProfile_Controller, NULL, NULL, NULL, BBFDM_USP},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.BulkData.Profile.{i}.Parameter.{i}. *** */
|
||||
DMLEAF tBulkDataProfileParameterParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Name", &DMWRITE, DMT_STRING, get_BulkDataProfileParameter_Name, set_BulkDataProfileParameter_Name, NULL, NULL, BBFDM_BOTH},
|
||||
{"Reference", &DMWRITE, DMT_STRING, get_BulkDataProfileParameter_Reference, set_BulkDataProfileParameter_Reference, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"Name", &DMWRITE, DMT_STRING, get_BulkDataProfileParameter_Name, set_BulkDataProfileParameter_Name, BBFDM_BOTH},
|
||||
{"Reference", &DMWRITE, DMT_STRING, get_BulkDataProfileParameter_Reference, set_BulkDataProfileParameter_Reference, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.BulkData.Profile.{i}.CSVEncoding. *** */
|
||||
DMLEAF tBulkDataProfileCSVEncodingParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"FieldSeparator", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_FieldSeparator, set_BulkDataProfileCSVEncoding_FieldSeparator, NULL, NULL, BBFDM_BOTH},
|
||||
{"RowSeparator", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_RowSeparator, set_BulkDataProfileCSVEncoding_RowSeparator, NULL, NULL, BBFDM_BOTH},
|
||||
{"EscapeCharacter", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_EscapeCharacter, set_BulkDataProfileCSVEncoding_EscapeCharacter, NULL, NULL, BBFDM_BOTH},
|
||||
{"ReportFormat", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_ReportFormat, set_BulkDataProfileCSVEncoding_ReportFormat, NULL, NULL, BBFDM_BOTH},
|
||||
{"RowTimestamp", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_RowTimestamp, set_BulkDataProfileCSVEncoding_RowTimestamp, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"FieldSeparator", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_FieldSeparator, set_BulkDataProfileCSVEncoding_FieldSeparator, BBFDM_BOTH},
|
||||
{"RowSeparator", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_RowSeparator, set_BulkDataProfileCSVEncoding_RowSeparator, BBFDM_BOTH},
|
||||
{"EscapeCharacter", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_EscapeCharacter, set_BulkDataProfileCSVEncoding_EscapeCharacter, BBFDM_BOTH},
|
||||
{"ReportFormat", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_ReportFormat, set_BulkDataProfileCSVEncoding_ReportFormat, BBFDM_BOTH},
|
||||
{"RowTimestamp", &DMWRITE, DMT_STRING, get_BulkDataProfileCSVEncoding_RowTimestamp, set_BulkDataProfileCSVEncoding_RowTimestamp, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.BulkData.Profile.{i}.JSONEncoding. *** */
|
||||
DMLEAF tBulkDataProfileJSONEncodingParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"ReportFormat", &DMWRITE, DMT_STRING, get_BulkDataProfileJSONEncoding_ReportFormat, set_BulkDataProfileJSONEncoding_ReportFormat, NULL, NULL, BBFDM_BOTH},
|
||||
{"ReportTimestamp", &DMWRITE, DMT_STRING, get_BulkDataProfileJSONEncoding_ReportTimestamp, set_BulkDataProfileJSONEncoding_ReportTimestamp, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"ReportFormat", &DMWRITE, DMT_STRING, get_BulkDataProfileJSONEncoding_ReportFormat, set_BulkDataProfileJSONEncoding_ReportFormat, BBFDM_BOTH},
|
||||
{"ReportTimestamp", &DMWRITE, DMT_STRING, get_BulkDataProfileJSONEncoding_ReportTimestamp, set_BulkDataProfileJSONEncoding_ReportTimestamp, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.BulkData.Profile.{i}.HTTP. *** */
|
||||
DMOBJ tBulkDataProfileHTTPObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"RequestURIParameter", &DMWRITE, addObjBulkDataProfileHTTPRequestURIParameter, delObjBulkDataProfileHTTPRequestURIParameter, NULL, browseBulkDataProfileHTTPRequestURIParameterInst, NULL, NULL, NULL, NULL, tBulkDataProfileHTTPRequestURIParameterParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"RequestURIParameter", &DMWRITE, addObjBulkDataProfileHTTPRequestURIParameter, delObjBulkDataProfileHTTPRequestURIParameter, NULL, browseBulkDataProfileHTTPRequestURIParameterInst, NULL, NULL, tBulkDataProfileHTTPRequestURIParameterParams, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
DMLEAF tBulkDataProfileHTTPParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"URL", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_URL, set_BulkDataProfileHTTP_URL, NULL, NULL, BBFDM_BOTH},
|
||||
{"Username", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_Username, set_BulkDataProfileHTTP_Username, NULL, NULL, BBFDM_BOTH},
|
||||
{"Password", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_Password, set_BulkDataProfileHTTP_Password, NULL, NULL, BBFDM_BOTH},
|
||||
{"CompressionsSupported", &DMREAD, DMT_STRING, get_BulkDataProfileHTTP_CompressionsSupported, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"Compression", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_Compression, set_BulkDataProfileHTTP_Compression, NULL, NULL, BBFDM_BOTH},
|
||||
{"MethodsSupported", &DMREAD, DMT_STRING, get_BulkDataProfileHTTP_MethodsSupported, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"Method", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_Method, set_BulkDataProfileHTTP_Method, NULL, NULL, BBFDM_BOTH},
|
||||
{"UseDateHeader", &DMWRITE, DMT_BOOL, get_BulkDataProfileHTTP_UseDateHeader, set_BulkDataProfileHTTP_UseDateHeader, NULL, NULL, BBFDM_BOTH},
|
||||
{"RetryEnable", &DMWRITE, DMT_BOOL, get_BulkDataProfileHTTP_RetryEnable, set_BulkDataProfileHTTP_RetryEnable, NULL, NULL, BBFDM_BOTH},
|
||||
{"RetryMinimumWaitInterval", &DMWRITE, DMT_UNINT, get_BulkDataProfileHTTP_RetryMinimumWaitInterval, set_BulkDataProfileHTTP_RetryMinimumWaitInterval, NULL, NULL, BBFDM_BOTH},
|
||||
{"RetryIntervalMultiplier", &DMWRITE, DMT_UNINT, get_BulkDataProfileHTTP_RetryIntervalMultiplier, set_BulkDataProfileHTTP_RetryIntervalMultiplier, NULL, NULL, BBFDM_BOTH},
|
||||
{"RequestURIParameterNumberOfEntries", &DMREAD, DMT_UNINT, get_BulkDataProfileHTTP_RequestURIParameterNumberOfEntries, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"PersistAcrossReboot", &DMWRITE, DMT_BOOL, get_BulkDataProfileHTTP_PersistAcrossReboot, set_BulkDataProfileHTTP_PersistAcrossReboot, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"URL", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_URL, set_BulkDataProfileHTTP_URL, BBFDM_BOTH},
|
||||
{"Username", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_Username, set_BulkDataProfileHTTP_Username, BBFDM_BOTH},
|
||||
{"Password", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_Password, set_BulkDataProfileHTTP_Password, BBFDM_BOTH},
|
||||
{"CompressionsSupported", &DMREAD, DMT_STRING, get_BulkDataProfileHTTP_CompressionsSupported, NULL, BBFDM_BOTH},
|
||||
{"Compression", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_Compression, set_BulkDataProfileHTTP_Compression, BBFDM_BOTH},
|
||||
{"MethodsSupported", &DMREAD, DMT_STRING, get_BulkDataProfileHTTP_MethodsSupported, NULL, BBFDM_BOTH},
|
||||
{"Method", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTP_Method, set_BulkDataProfileHTTP_Method, BBFDM_BOTH},
|
||||
{"UseDateHeader", &DMWRITE, DMT_BOOL, get_BulkDataProfileHTTP_UseDateHeader, set_BulkDataProfileHTTP_UseDateHeader, BBFDM_BOTH},
|
||||
{"RetryEnable", &DMWRITE, DMT_BOOL, get_BulkDataProfileHTTP_RetryEnable, set_BulkDataProfileHTTP_RetryEnable, BBFDM_BOTH},
|
||||
{"RetryMinimumWaitInterval", &DMWRITE, DMT_UNINT, get_BulkDataProfileHTTP_RetryMinimumWaitInterval, set_BulkDataProfileHTTP_RetryMinimumWaitInterval, BBFDM_BOTH},
|
||||
{"RetryIntervalMultiplier", &DMWRITE, DMT_UNINT, get_BulkDataProfileHTTP_RetryIntervalMultiplier, set_BulkDataProfileHTTP_RetryIntervalMultiplier, BBFDM_BOTH},
|
||||
{"RequestURIParameterNumberOfEntries", &DMREAD, DMT_UNINT, get_BulkDataProfileHTTP_RequestURIParameterNumberOfEntries, NULL, BBFDM_BOTH},
|
||||
{"PersistAcrossReboot", &DMWRITE, DMT_BOOL, get_BulkDataProfileHTTP_PersistAcrossReboot, set_BulkDataProfileHTTP_PersistAcrossReboot, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.BulkData.Profile.{i}.HTTP.RequestURIParameter.{i}. *** */
|
||||
DMLEAF tBulkDataProfileHTTPRequestURIParameterParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Name", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTPRequestURIParameter_Name, set_BulkDataProfileHTTPRequestURIParameter_Name, NULL, NULL, BBFDM_BOTH},
|
||||
{"Reference", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTPRequestURIParameter_Reference, set_BulkDataProfileHTTPRequestURIParameter_Reference, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"Name", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTPRequestURIParameter_Name, set_BulkDataProfileHTTPRequestURIParameter_Name, BBFDM_BOTH},
|
||||
{"Reference", &DMWRITE, DMT_STRING, get_BulkDataProfileHTTPRequestURIParameter_Reference, set_BulkDataProfileHTTPRequestURIParameter_Reference, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ static size_t http_get_response(void *buffer, size_t size, size_t rxed, char **m
|
||||
{
|
||||
char *c;
|
||||
|
||||
if (asprintf(&c, "%s%.*s", *msg_in, size * rxed, (char *)buffer) == -1) {
|
||||
if (asprintf(&c, "%s%.*s", *msg_in, (int) (size * rxed), (char *)buffer) == -1) {
|
||||
FREE(*msg_in);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ static void create_json_bulkdata_report_object_hierarchy(struct profile *profile
|
||||
strcpy(buf, param_name);
|
||||
for (pch = strtok_r(buf, ".", &pchr); pch != NULL; pch = strtok_r(NULL, ".", &pchr)) {
|
||||
argv[j] = pch;
|
||||
json_obj1 = (json_object *)dmjson_select_obj(json_obj, argv);
|
||||
json_obj1 = (json_object *)bbf_api_dmjson_select_obj(json_obj, argv);
|
||||
if (json_obj1)
|
||||
json_obj2 = json_obj1;
|
||||
else {
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (C) 2015 inteno.org
|
||||
#
|
||||
|
||||
START=71
|
||||
USE_PROCD=1
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=cifsd-tools
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/namjaejeon/cifsd-tools.git
|
||||
PKG_SOURCE_DATE:=2019-02-14
|
||||
PKG_SOURCE_VERSION:=a7d7dfc40524b88dbcb2052034a75f446b3cefdd
|
||||
PKG_MIRROR_HASH:=a74f95a79c3cdcc78e66c080729141abee0d821e21a326d88b11d849738314fb
|
||||
|
||||
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/cifsd-tools
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=Kernel CIFS/SMB server support and userspace tools
|
||||
DEPENDS:=+kmod-fs-cifsd +glib2 +libnl-core +libnl-genl $(ICONV_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/cifsd-tools/description
|
||||
Userspace tools (cifsd, cifsadmin) for the CIFS/SMB kernel fileserver.
|
||||
The config file location is /etc/cifs/smb.conf
|
||||
endef
|
||||
|
||||
define Package/cifsd-tools/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcifsdtools.so* $(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/cifs
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/smb.conf.example $(1)/etc/cifs
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/cifsd.config $(1)/etc/config/cifsd
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/cifsd.init $(1)/etc/init.d/cifsd
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{cifsadmin,cifsd} $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cifsd-tools))
|
||||
@@ -1,9 +0,0 @@
|
||||
config global 'global'
|
||||
option server_string 'CIFSD on OpenWRT'
|
||||
option ipc_timeout '8' # IPC timeout is used as a workaround for uninterruptible sleep until this is fixed upstream.
|
||||
|
||||
config share
|
||||
option name 'share'
|
||||
option comment 'Default guest share'
|
||||
option path '/mnt'
|
||||
option guest_ok 'yes'
|
||||
@@ -1,161 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=90
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/cifsd
|
||||
USER_DB=/etc/cifs/cifsdpwd.db
|
||||
CIFS_ADMIN=cifsadmin
|
||||
|
||||
EXTRA_COMMANDS="users"
|
||||
EXTRA_HELP=" users Show list of users created by cifsadmin"
|
||||
|
||||
users() {
|
||||
[ -f "$USER_DB" ] && cut -d ':' $USER_DB -f1 || \
|
||||
printf "No users available.\n"
|
||||
}
|
||||
|
||||
validate_cifsd_global() {
|
||||
uci_validate_section cifsd global global \
|
||||
'server_string:string' \
|
||||
'workgroup:string' \
|
||||
'netbios_name:string' \
|
||||
'interface:string' \
|
||||
'ipc_timeout:uinteger'
|
||||
}
|
||||
|
||||
validate_cifsd_share() {
|
||||
uci_validate_section cifsd share "${1}" \
|
||||
'name:string' \
|
||||
'comment:string' \
|
||||
'path:string' \
|
||||
'guest_ok:bool' \
|
||||
'read_only:bool' \
|
||||
'allow_hosts:list' \
|
||||
'deny_hosts:list' \
|
||||
'users:string' \
|
||||
'invalid_users:string' \
|
||||
'create_mask:string' \
|
||||
'dir_mask:string' \
|
||||
'max_connections:uinteger' \
|
||||
'veto_files:list'
|
||||
}
|
||||
|
||||
validate_cifsd_users() {
|
||||
uci_validate_section cifsd users "${1}" \
|
||||
'user:string' \
|
||||
'password:string' \
|
||||
'desc:string'
|
||||
}
|
||||
|
||||
load_cifsd_global() {
|
||||
local server_string
|
||||
local workgroup
|
||||
local netbios_name
|
||||
local ipc_timeout
|
||||
|
||||
validate_cifsd_global
|
||||
|
||||
echo -e "[global]" >> /var/etc/cifsd.conf
|
||||
[ -n "$server_string" ] && echo -e "\tserver string = $server_string" >> /var/etc/cifsd.conf
|
||||
[ -n "$workgroup" ] && echo -e "\tworkgroup = $workgroup" >> /var/etc/cifsd.conf
|
||||
[ -n "$netbios_name" ] && echo -e "\tnetbios name = $netbios_name" >> /var/etc/cifsd.conf
|
||||
[ -n "$ipc_timeout" ] && echo -e "\tipc timeout name = $ipc_timeout" >> /var/etc/cifsd.conf || \
|
||||
echo -e "\tipc timeout name = 8" >> /var/etc/cifsd.conf
|
||||
}
|
||||
|
||||
load_cifsd_share() {
|
||||
local name
|
||||
local comment
|
||||
local path
|
||||
local guest_ok
|
||||
local allow_hosts
|
||||
local deny_hosts
|
||||
local users
|
||||
local invalid_users
|
||||
local max_connections
|
||||
local veto_files
|
||||
local dir_mask
|
||||
local create_mask
|
||||
local read_only
|
||||
|
||||
validate_cifsd_share ${1}
|
||||
|
||||
if [ -z "$name" -o -z "$path" ]; then
|
||||
logread -t ${0} "Missing name or path."
|
||||
return
|
||||
fi
|
||||
|
||||
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/cifsd.conf
|
||||
[ -n "$comment" ] && echo -e "\tcomment = $comment" >> /var/etc/cifsd.conf
|
||||
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/cifsd.conf
|
||||
[ -n "$allow_hosts" ] && echo -e "\tallow hosts = $allow_hosts" >> /var/etc/cifsd.conf
|
||||
[ -n "$deny_hosts" ] && echo -e "\tdeny hosts = $deny_hosts" >> /var/etc/cifsd.conf
|
||||
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/cifsd.conf
|
||||
[ -n "$invalid_users" ] && echo -e "\tinvalid users = $invalid_users" >> /var/etc/cifsd.conf
|
||||
[ -n "$max_connections" ] && echo -e "\tmax connections = $max_connections" >> /var/etc/cifsd.conf
|
||||
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/cifsd.conf
|
||||
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/cifsd.conf
|
||||
|
||||
if [ -n "$read_only" ]; then
|
||||
echo -e "\tread only = $read_only" >> /var/etc/cifsd.conf
|
||||
if [ "${read_only}" -eq "0" ]; then
|
||||
echo -e "\twrite ok = 1" >> /var/etc/cifsd.conf
|
||||
fi
|
||||
else
|
||||
echo -e "\twrite ok = 1" >> /var/etc/cifsd.conf
|
||||
fi
|
||||
|
||||
[ -n "$veto_files" ] && echo -e "\tveto files = $veto_files" >> /var/etc/cifsd.conf
|
||||
}
|
||||
|
||||
load_cifsd_users() {
|
||||
local user
|
||||
local password
|
||||
local desc
|
||||
|
||||
validate_cifsd_users ${1}
|
||||
[ $(which ${CIFS_ADMIN}) ] || {
|
||||
logread -t ${0} "${CIFS_ADMIN} tools is not available"
|
||||
return;
|
||||
}
|
||||
|
||||
cifsadmin -a "${user}" -p "${password}"
|
||||
if [ "$?" -ne 0 ]; then
|
||||
logread -t ${0} "Failed to create/update ${user}"
|
||||
fi
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_config_trigger "config.change" "cifsd" /etc/init.d/cifsd restart
|
||||
}
|
||||
|
||||
init_config() {
|
||||
[ -f "/var/etc/cifsd.conf" ] && rm /var/etc/cifsd.conf
|
||||
|
||||
config_load cifsd
|
||||
load_cifsd_global
|
||||
|
||||
# Delete existing users
|
||||
[ -f "${USER_DB}" ] && {
|
||||
rm -f "${USER_DB}"
|
||||
}
|
||||
config_foreach load_cifsd_users users
|
||||
config_foreach load_cifsd_share share
|
||||
}
|
||||
|
||||
start_service() {
|
||||
. /lib/functions.sh
|
||||
init_config
|
||||
|
||||
[ ! "$(grep cifsd /proc/modules)" ] && modprobe cifsd
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/bin/env LANG=en_US.UTF-8 $PROG -c /var/etc/cifsd.conf
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
killall cifsd
|
||||
# IPC timeout will kill the remaining processes.
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
For some reason, fs.h on Inteno kernel is missing inode->i_mutex nesting subclasses for the lock validator
|
||||
which is triggering implicit declaration error. To workaround this hardcore use of mutex_lock by removing
|
||||
kernel version check.
|
||||
---
|
||||
--- a/vfs.c
|
||||
+++ b/vfs.c
|
||||
@@ -544,15 +544,9 @@ int cifsd_vfs_setattr(struct cifsd_work
|
||||
|
||||
attrs->ia_valid |= ATTR_CTIME;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_lock(inode);
|
||||
- err = notify_change(dentry, attrs, NULL);
|
||||
- inode_unlock(inode);
|
||||
-#else
|
||||
mutex_lock(&inode->i_mutex);
|
||||
err = notify_change(dentry, attrs, NULL);
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
-#endif
|
||||
|
||||
if (update_size)
|
||||
put_write_access(inode);
|
||||
@@ -753,11 +747,8 @@ int cifsd_vfs_remove_file(char *name)
|
||||
if (!dir->d_inode)
|
||||
goto out;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_lock_nested(dir->d_inode, I_MUTEX_PARENT);
|
||||
-#else
|
||||
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
|
||||
-#endif
|
||||
+
|
||||
dentry = lookup_one_len(last, dir, strlen(last));
|
||||
if (IS_ERR(dentry)) {
|
||||
err = PTR_ERR(dentry);
|
||||
@@ -783,11 +774,7 @@ int cifsd_vfs_remove_file(char *name)
|
||||
|
||||
dput(dentry);
|
||||
out_err:
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_unlock(dir->d_inode);
|
||||
-#else
|
||||
mutex_unlock(&dir->d_inode->i_mutex);
|
||||
-#endif
|
||||
out:
|
||||
path_put(&parent);
|
||||
return err;
|
||||
@@ -1302,11 +1289,8 @@ int cifsd_vfs_unlink(struct dentry *dir,
|
||||
int err = 0;
|
||||
|
||||
dget(dentry);
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_lock(dir->d_inode);
|
||||
-#else
|
||||
mutex_lock(&dir->d_inode->i_mutex);
|
||||
-#endif
|
||||
+
|
||||
if (!dentry->d_inode || !dentry->d_inode->i_nlink) {
|
||||
err = -ENOENT;
|
||||
goto out;
|
||||
@@ -1318,11 +1302,8 @@ int cifsd_vfs_unlink(struct dentry *dir,
|
||||
err = vfs_unlink(dir->d_inode, dentry, NULL);
|
||||
|
||||
out:
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_unlock(dir->d_inode);
|
||||
-#else
|
||||
mutex_unlock(&dir->d_inode->i_mutex);
|
||||
-#endif
|
||||
+
|
||||
dput(dentry);
|
||||
if (err)
|
||||
cifsd_debug("failed to delete, err %d\n", err);
|
||||
@@ -1,60 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=cifsd
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/namjaejeon/cifsd.git
|
||||
PKG_SOURCE_DATE:=2019-03-05
|
||||
PKG_SOURCE_VERSION:=e1715ce125d55b125b1b58a6f1819ef8e54cc3ba
|
||||
PKG_MIRROR_HASH:=521585ebfda0ecc02372b1a38ebf762fbbcead6d0b754a47599a5bf6bfdb3fb6
|
||||
|
||||
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/fs-cifsd
|
||||
SUBMENU:=Filesystems
|
||||
TITLE:=CIFS/SMB kernel server support
|
||||
FILES:=$(PKG_BUILD_DIR)/cifsd.$(LINUX_KMOD_SUFFIX)
|
||||
DEPENDS+= \
|
||||
+kmod-nls-base \
|
||||
+kmod-nls-utf8 \
|
||||
+kmod-crypto-md4 \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm
|
||||
KCONFIG:= \
|
||||
CONFIG_KEYS=y \
|
||||
CONFIG_CRYPTO_ARC4=y
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cifsd/description
|
||||
Kernel module for a CIFS/SMBv2,3 fileserver.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS+= -DCONFIG_CIFSD_ACL
|
||||
|
||||
MAKE_OPTS:=\
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
M="$(PKG_BUILD_DIR)"
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" \
|
||||
$(MAKE_OPTS) \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
CONFIG_CIFS_SERVER=m \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-cifsd))
|
||||
@@ -1,69 +0,0 @@
|
||||
--- a/vfs.c
|
||||
+++ b/vfs.c
|
||||
@@ -544,15 +544,9 @@ int cifsd_vfs_setattr(struct cifsd_work
|
||||
|
||||
attrs->ia_valid |= ATTR_CTIME;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_lock(inode);
|
||||
- err = notify_change(dentry, attrs, NULL);
|
||||
- inode_unlock(inode);
|
||||
-#else
|
||||
mutex_lock(&inode->i_mutex);
|
||||
err = notify_change(dentry, attrs, NULL);
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
-#endif
|
||||
|
||||
if (update_size)
|
||||
put_write_access(inode);
|
||||
@@ -753,11 +747,8 @@ int cifsd_vfs_remove_file(char *name)
|
||||
if (!dir->d_inode)
|
||||
goto out;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_lock_nested(dir->d_inode, I_MUTEX_PARENT);
|
||||
-#else
|
||||
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
|
||||
-#endif
|
||||
+
|
||||
dentry = lookup_one_len(last, dir, strlen(last));
|
||||
if (IS_ERR(dentry)) {
|
||||
err = PTR_ERR(dentry);
|
||||
@@ -783,11 +774,7 @@ int cifsd_vfs_remove_file(char *name)
|
||||
|
||||
dput(dentry);
|
||||
out_err:
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_unlock(dir->d_inode);
|
||||
-#else
|
||||
mutex_unlock(&dir->d_inode->i_mutex);
|
||||
-#endif
|
||||
out:
|
||||
path_put(&parent);
|
||||
return err;
|
||||
@@ -1302,11 +1289,8 @@ int cifsd_vfs_unlink(struct dentry *dir,
|
||||
int err = 0;
|
||||
|
||||
dget(dentry);
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_lock(dir->d_inode);
|
||||
-#else
|
||||
mutex_lock(&dir->d_inode->i_mutex);
|
||||
-#endif
|
||||
+
|
||||
if (!dentry->d_inode || !dentry->d_inode->i_nlink) {
|
||||
err = -ENOENT;
|
||||
goto out;
|
||||
@@ -1318,11 +1302,8 @@ int cifsd_vfs_unlink(struct dentry *dir,
|
||||
err = vfs_unlink(dir->d_inode, dentry, NULL);
|
||||
|
||||
out:
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
- inode_unlock(dir->d_inode);
|
||||
-#else
|
||||
mutex_unlock(&dir->d_inode->i_mutex);
|
||||
-#endif
|
||||
+
|
||||
dput(dentry);
|
||||
if (err)
|
||||
cifsd_debug("failed to delete, err %d\n", err);
|
||||
@@ -24,7 +24,7 @@ What we need is the public key for the clients.
|
||||
For dropbear "dropbearkey -y -f files/etc/dropbear/logid" will generate the public key.
|
||||
|
||||
----------
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwn9RaDAzxW1dTmIhXgFBnpi1lhj8xhYpCVQiPxxdk9IEmH8zjo4y9j3sPkqKOlRnkwjpZIpLEKBnpQTwVIMCU/AG7nDJX3OH9RfS9mLJQLfFL8HyGCyqDezFWldbyovhJZvdUeK4tAXJWv2W3OVHiz2L8IlncBgP/E9DJElsyhhQHsM96UE6tBkXsvXkoDbMSYXFcLbgiUwBKfmM2BF/aPDL45iznGur7/2j9v95PwJ0gtMu9jjNRq+pXCXhTh3bsnczm0MpZC1aiRc9nJAeGIMmhrf15E4jBKgTnrstzJxGVAdajKeR954KcNsS33cS2Wmui2YjmPbBXjqf1frzJ log@inteno
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwn9RaDAzxW1dTmIhXgFBnpi1lhj8xhYpCVQiPxxdk9IEmH8zjo4y9j3sPkqKOlRnkwjpZIpLEKBnpQTwVIMCU/AG7nDJX3OH9RfS9mLJQLfFL8HyGCyqDezFWldbyovhJZvdUeK4tAXJWv2W3OVHiz2L8IlncBgP/E9DJElsyhhQHsM96UE6tBkXsvXkoDbMSYXFcLbgiUwBKfmM2BF/aPDL45iznGur7/2j9v95PwJ0gtMu9jjNRq+pXCXhTh3bsnczm0MpZC1aiRc9nJAeGIMmhrf15E4jBKgTnrstzJxGVAdajKeR954KcNsS33cS2Wmui2YjmPbBXjqf1frzJ log@iopsys
|
||||
----------
|
||||
|
||||
The public key should be just one line. Add that line to the
|
||||
|
||||
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
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dslmngr
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_VERSION:=1.1.0
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=63525fe43aa57a710bb097e4c0ed496c4032db6d
|
||||
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
|
||||
@@ -25,9 +25,7 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_PLATFORM=MEDIATEK
|
||||
|
||||
@@ -19,7 +19,7 @@ define Package/easy-qos
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Easy QoS
|
||||
DEPENDS:=@(TARGET_intel_mips||TARGET_iopsys_brcm63xx_arm||TARGET_iopsys_brcm63xx_mips)
|
||||
DEPENDS:=@(TARGET_intel_mips||TARGET_iopsys_brcm63xx_arm)
|
||||
endef
|
||||
|
||||
define Package/easy-qos/description
|
||||
|
||||
@@ -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:=5.3.15
|
||||
PKG_VERSION:=6.1.20
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=a2289131c5d1f602568a2e8cac1295442504827f
|
||||
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,52 +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_mips),y)
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCONFIG_BCM963138 \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
|
||||
KERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
TARGET_CFLAGS +=-DIOPSYS_BROADCOM \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm_panther),y)
|
||||
TARGET_CFLAGS +=-DCONFIG_BCM96846
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm_tiger),y)
|
||||
TARGET_CFLAGS +=-DCONFIG_BCM96858
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm_eagle),y)
|
||||
TARGET_CFLAGS +=-DCONFIG_BCM963178
|
||||
else
|
||||
TARGET_CFLAGS +=-DCONFIG_BCM963138
|
||||
endif
|
||||
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/userspace/public/include
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_PLATFORM=MEDIATEK
|
||||
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
|
||||
@@ -96,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 \
|
||||
@@ -130,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
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.3
|
||||
PKG_SOURCE_VERSION:=34ae1996beda98691d779e49f231bd662fc87cda
|
||||
PKG_VERSION:=0.4
|
||||
PKG_SOURCE_VERSION:=510b885c049b8ba06772dae59e64b370d0fded3e
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
ifeq ($(CONFIG_ENDPT_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=endptmngr-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://download.iopsys.eu/iopsys/opensdk/
|
||||
PKG_SOURCE_URL:=https://download.iopsys.eu/iopsys/opensdk/
|
||||
PKG_NAME:=endptmngr-open
|
||||
PATCH_DIR:=
|
||||
PKG_HASH:=skip
|
||||
@@ -31,6 +31,16 @@ export BUILD_DIR
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
# All config variable that are passed to the make invocation, directly or
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_TARGET_BOARD
|
||||
|
||||
export CONFIG_BRCM_SDK_VER_504001
|
||||
export CONFIG_BRCM_SDK_VER_504002
|
||||
export CONFIG_BRCM_SDK_VER_504003
|
||||
export CONFIG_BRCM_SDK_VER_504004
|
||||
export CONFIG_BRCM_SDK_VER_504005
|
||||
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@@ -43,7 +53,7 @@ define Package/endptmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Brcmslic
|
||||
URL:=
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +bcmkernel @TARGET_HAS_VOICE @!TARGET_NO_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:=5.0-2020-10-13
|
||||
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:=85ffabf799f769f9100068e887ed4f5ca8286620
|
||||
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)
|
||||
@@ -32,20 +32,12 @@ CWMP_REVISION=$(shell svnversion ./src/ -n|cut -f2 -d:)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/icwmp-tr098
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=CWMP client for TR-098 Data Model
|
||||
DEPENDS:=+PACKAGE_icwmp-tr098:libuci +PACKAGE_icwmp-tr098:libmicroxml +PACKAGE_icwmp-tr098:libubox +PACKAGE_icwmp-tr098:jshn +PACKAGE_icwmp-tr098:libubus +PACKAGE_icwmp-tr098:libblobmsg-json +PACKAGE_icwmp-tr098:libpthread +PACKAGE_icwmp-tr098:ubusd +PACKAGE_icwmp-tr098:shflags +PACKAGE_icwmp-tr098:getopt +PACKAGE_icwmp-tr098:zlib +PACKAGE_icwmp-tr098:libjson-c +PACKAGE_icwmp-tr098:libopenssl +PACKAGE_icwmp-tr098:curl +PACKAGE_icwmp-tr098:libcurl +PACKAGE_icwmp-tr098:libtr098
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
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
|
||||
@@ -66,11 +58,6 @@ endif
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE -D_AADJ
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_icwmp-tr098),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-icwmp_tr098
|
||||
endif
|
||||
|
||||
ifneq ($(CWMP_REVISION)_,_)
|
||||
ifneq ($(CWMP_REVISION),exported)
|
||||
ifneq ($(CWMP_REVISION),Unversioned directory)
|
||||
@@ -122,11 +109,6 @@ endif
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
define Package/icwmp-tr098/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/icwmp_tr098d $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/postinst
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
@@ -146,4 +128,3 @@ define Package/$(PKG_NAME)/prerm
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,icwmp-tr098))
|
||||
|
||||
@@ -15,6 +15,7 @@ config acs 'acs'
|
||||
option retry_interval_multiplier '2000'
|
||||
option https_ssl_capath ''
|
||||
option ipv6_enable '0'
|
||||
option ip_version '4'
|
||||
|
||||
config cpe 'cpe'
|
||||
option interface 'eth0.1'
|
||||
|
||||
@@ -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() {
|
||||
@@ -28,10 +27,6 @@ validate_url() {
|
||||
return 1
|
||||
}
|
||||
|
||||
build_dmmap_instance() {
|
||||
[ ! -e /etc/icwmpd/.icwmpd_backup_session.xml ] && /usr/sbin/icwmp get name "" 0 >/dev/null 2>&1
|
||||
}
|
||||
|
||||
get_acs_url() {
|
||||
local default_acs="http://10.10.1.6:8000/openacs/acs"
|
||||
local acs_dhcp_discovery="$(uci -q get cwmp.acs.dhcp_discovery)"
|
||||
@@ -128,17 +123,6 @@ wait_for_option43() {
|
||||
fi
|
||||
}
|
||||
|
||||
wait_for_wifi() {
|
||||
local time=$1
|
||||
local tm=1
|
||||
|
||||
while [ ! -f /tmp/wifi.started ]; do
|
||||
sleep 1
|
||||
[ $tm -ge $time ] && break
|
||||
tm=$((tm+1))
|
||||
done
|
||||
}
|
||||
|
||||
wait_for_resolvfile() {
|
||||
local time=$1
|
||||
local tm=1
|
||||
@@ -153,17 +137,6 @@ wait_for_resolvfile() {
|
||||
done
|
||||
}
|
||||
|
||||
wait_for_asterisk() {
|
||||
local time=$1
|
||||
local tm=1
|
||||
|
||||
while [ -z "$(pidof asterisk)" ]; do
|
||||
sleep 1
|
||||
[ $tm -ge $time ] && break
|
||||
tm=$((tm+1))
|
||||
done
|
||||
}
|
||||
|
||||
set_wan_interface() {
|
||||
local l3_device=""
|
||||
local default_wan_interface=""
|
||||
@@ -183,13 +156,12 @@ start_service() {
|
||||
touch /tmp/.icwmpd_boot
|
||||
else
|
||||
[ -f /sbin/netifd ] && echo "Waiting for Network to be started ..." && ubus -t 5 wait_for network.interface
|
||||
[ -f /etc/config/wireless ] && echo "Waiting for WiFi to be started ..." && wait_for_wifi 20
|
||||
[ -f /etc/config/wireless ] && echo "Waiting for WiFi to be started ..." && ubus -t 5 wait_for network.wireless
|
||||
[ -f /usr/sbin/dnsmasq ] && echo "Waiting for DNS Proxy to be started ..." && ubus -t 5 wait_for dnsmasq
|
||||
[ -f /etc/config/dhcp ] && echo "Waiting for DNS Server(s) ..." && wait_for_resolvfile 20
|
||||
[ -f /usr/sbin/asterisk ] && echo "Waiting for Voice to be started ..." && wait_for_asterisk 5
|
||||
[ -f /usr/sbin/asterisk ] && echo "Waiting for Voice to be started ..." && ubus -t 5 wait_for asterisk
|
||||
|
||||
config_load cwmp
|
||||
build_dmmap_instance
|
||||
set_wan_interface
|
||||
wait_for_option43 20
|
||||
get_acs_url
|
||||
@@ -203,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
|
||||
}
|
||||
|
||||
@@ -214,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.0
|
||||
PKG_VERSION:=2.1.37
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5b712be46aadc0b54cdb72464150ab58892e9c3f
|
||||
PKG_SOURCE_VERSION:=65bed80b42fa4e339fe20a638a58009858edf11f
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
@@ -40,12 +40,22 @@ define Package/libieee1905
|
||||
TITLE:=IEEE1905 cmdu tlv utility library
|
||||
endef
|
||||
|
||||
define Package/libwsc
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Wifi Simple Configuration building and processing library
|
||||
DEPENDS= +libopenssl +libuci +libubus
|
||||
endef
|
||||
|
||||
define Package/lib1905hle
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IEEE1905 hle stack library
|
||||
endef
|
||||
|
||||
LIBS := \
|
||||
$(if $(CONFIG_PACKAGE_libwsc),libwsc.so)
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE \
|
||||
@@ -53,6 +63,9 @@ TARGET_CFLAGS += \
|
||||
-Wall \
|
||||
-Wextra
|
||||
|
||||
MAKE_FLAGS += \
|
||||
LIBS="$(LIBS)"
|
||||
|
||||
ifeq ($(CONFIG_IEEE1905_SPEED_UP_DISCOVERY),y)
|
||||
TARGET_CFLAGS += -DSPEED_UP_DISCOVERY
|
||||
endif
|
||||
@@ -97,6 +110,18 @@ define Package/libieee1905/install
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libieee1905.so $(1)/usr/lib/libieee1905.so
|
||||
endef
|
||||
|
||||
define Package/libwsc/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libwsc.so $(1)/usr/lib/libwsc.so
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libwsc.so
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwsc/include/wsc.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libwsc.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/include/ieee1905
|
||||
@@ -107,8 +132,10 @@ define Build/InstallDev
|
||||
$(CP) $(PKG_BUILD_DIR)/lib1905hle/include/*.h $(1)/usr/include/lib1905hle/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libieee1905.so $(1)/usr/lib
|
||||
$(foreach lib,$(LIBS),$(call Build/InstallDev/$(lib),$(1),$(2));)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libieee1905))
|
||||
$(eval $(call BuildPackage,lib1905hle))
|
||||
$(eval $(call BuildPackage,libwsc))
|
||||
$(eval $(call BuildPackage,ieee1905))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
15
iop/config
15
iop/config
@@ -23,10 +23,12 @@ CONFIG_PACKAGE_icwmp=y
|
||||
CONFIG_PACKAGE_ieee1905=y
|
||||
CONFIG_PACKAGE_map-1905=y
|
||||
CONFIG_PACKAGE_map-topology=y
|
||||
CONFIG_PACKAGE_mosquitto-client-ssl=y
|
||||
CONFIG_PACKAGE_mosquitto-ssl=y
|
||||
CONFIG_PACKAGE_wfadatad=y
|
||||
CONFIG_PACKAGE_imonitor=m
|
||||
CONFIG_PACKAGE_inbd=y
|
||||
CONFIG_PACKAGE_iopupgrade=m
|
||||
CONFIG_PACKAGE_iopupgrade=y
|
||||
CONFIG_PACKAGE_ip-full=y
|
||||
CONFIG_PACKAGE_iperf3=y
|
||||
CONFIG_PACKAGE_ipset=y
|
||||
@@ -35,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
|
||||
@@ -53,7 +56,6 @@ CONFIG_PACKAGE_libreswan=m
|
||||
CONFIG_PACKAGE_libwifi=y
|
||||
CONFIG_PACKAGE_lscpu=y
|
||||
CONFIG_PACKAGE_map=y
|
||||
CONFIG_PACKAGE_miniupnpc=y
|
||||
CONFIG_PACKAGE_miniupnpd=y
|
||||
CONFIG_PACKAGE_mwan3=y
|
||||
CONFIG_PACKAGE_nand-utils=y
|
||||
@@ -85,21 +87,21 @@ CONFIG_PACKAGE_relayd=y
|
||||
CONFIG_PACKAGE_resolveip=y
|
||||
CONFIG_PACKAGE_rpcd=y
|
||||
CONFIG_PACKAGE_rpcd-mod-rpcsys=y
|
||||
CONFIG_PACKAGE_rulengd=y
|
||||
CONFIG_PACKAGE_rsync=y
|
||||
CONFIG_PACKAGE_rulengd=y
|
||||
CONFIG_PACKAGE_strace=y
|
||||
CONFIG_PACKAGE_swmodd=m
|
||||
CONFIG_PACKAGE_tc=y
|
||||
CONFIG_PACKAGE_tcpdump=y
|
||||
CONFIG_PACKAGE_terminfo=y
|
||||
CONFIG_PACKAGE_traceroute6=y
|
||||
CONFIG_PACKAGE_uledd=y
|
||||
CONFIG_PACKAGE_umbim=y
|
||||
CONFIG_PACKAGE_uqmi=y
|
||||
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
|
||||
@@ -198,7 +200,7 @@ CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y
|
||||
CONFIG_KERNEL_DEVTMPFS=y
|
||||
CONFIG_KERNEL_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_BUSYBOX_CONFIG_IP is not set
|
||||
CONFIG_LOCALMIRROR="http://download.iopsys.eu/iopsys/mirror/"
|
||||
CONFIG_LOCALMIRROR="https://download.iopsys.eu/iopsys/mirror/"
|
||||
|
||||
# Generation of /etc/banner.
|
||||
CONFIG_IMAGEOPT=y
|
||||
@@ -218,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
|
||||
|
||||
@@ -35,7 +35,7 @@ _iop()
|
||||
iopcmds="bootstrap cfe_upgrade cfe_upgrade_latest extract_core \
|
||||
feeds_update genconfig generate_tarballs install_key \
|
||||
scp_changes setup_host ssh_install_key status \
|
||||
update_package update_feed_branches ssh_upgrade"
|
||||
update_package update_feed_branches ssh_upgrade smoketest"
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ] ; then
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ function feeds_update {
|
||||
fi
|
||||
|
||||
# targets need to be installed explicitly
|
||||
targets="iopsys-brcm63xx-mips iopsys-brcm63xx-arm iopsys-ramips intel_mips iopsys-x86 iopsys-armvirt"
|
||||
targets="iopsys-brcm63xx-arm iopsys-ramips intel_mips iopsys-x86 iopsys-armvirt iopsys-bcm27xx"
|
||||
for target in $targets
|
||||
do
|
||||
rm -f target/linux/$target
|
||||
|
||||
@@ -5,7 +5,7 @@ function genconfig {
|
||||
export IMPORT=1
|
||||
export SRCTREEOVERR=0
|
||||
export FILEDIR="files/"
|
||||
export THEMEDIR="themes"
|
||||
export THEMEDIR="tmp/juci-themes"
|
||||
CURRENT_CONFIG_FILE=".current_config_file"
|
||||
export CONFIGPATH="package/feeds/iopsys/iop"
|
||||
CUSTPATH="customerconfigs"
|
||||
@@ -13,8 +13,8 @@ function genconfig {
|
||||
export VERBOSE=0
|
||||
export DEVELOPER=0
|
||||
target="bogus"
|
||||
config_path=""
|
||||
brcm63xx_mips="target/linux/iopsys-brcm63xx-mips"
|
||||
target_config_path=""
|
||||
bcm27xx="target/linux/iopsys-bcm27xx"
|
||||
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
|
||||
ramips="target/linux/iopsys-ramips"
|
||||
intel_mips="target/linux/intel_mips"
|
||||
@@ -103,14 +103,12 @@ function genconfig {
|
||||
|
||||
if [ $pfound -eq 1 ]; then
|
||||
target="$(echo $TARGET | tr '-' '_')"
|
||||
config_path="$targetpath/config"
|
||||
target_config_path="$targetpath/config"
|
||||
fi
|
||||
|
||||
return
|
||||
fi
|
||||
|
||||
[ -e $brcm63xx_mips/genconfig ] &&
|
||||
iopsys_brcm63xx_mips=$(cd $brcm63xx_mips; ./genconfig)
|
||||
[ -e $brcm63xx_arm/genconfig ] &&
|
||||
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
|
||||
[ -e $ramips/genconfig ] &&
|
||||
@@ -121,9 +119,11 @@ function genconfig {
|
||||
iopsys_x86=$(cd $x86; ./genconfig)
|
||||
[ -e $armvirt/genconfig ] &&
|
||||
iopsys_armvirt=$(cd $armvirt; ./genconfig)
|
||||
[ -e $bcm27xx/genconfig ] &&
|
||||
iopsys_bcm27xx=$(cd $bcm27xx; ./genconfig)
|
||||
|
||||
if [ "$profile" == "LIST" ]; then
|
||||
for list in iopsys_brcm63xx_mips iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips iopsys_x86 iopsys_armvirt; do
|
||||
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips iopsys_x86 iopsys_armvirt iopsys_bcm27xx; do
|
||||
echo "$list based boards:"
|
||||
for b in ${!list}; do
|
||||
echo -e "\t$b"
|
||||
@@ -132,18 +132,10 @@ function genconfig {
|
||||
return
|
||||
fi
|
||||
|
||||
for p in $iopsys_brcm63xx_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_mips"
|
||||
config_path="$brcm63xx_mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
config_path="$brcm63xx_arm/config"
|
||||
target_config_path="$brcm63xx_arm/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -151,7 +143,7 @@ function genconfig {
|
||||
for p in $iopsys_ramips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_ramips"
|
||||
config_path="$ramips/config"
|
||||
target_config_path="$ramips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -159,7 +151,7 @@ function genconfig {
|
||||
for p in $iopsys_intel_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="intel_mips"
|
||||
config_path="$intel_mips/config"
|
||||
target_config_path="$intel_mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -167,7 +159,7 @@ function genconfig {
|
||||
for p in $iopsys_x86; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_x86"
|
||||
config_path="$x86/config"
|
||||
target_config_path="$x86/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -175,7 +167,15 @@ function genconfig {
|
||||
for p in $iopsys_armvirt; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_armvirt"
|
||||
config_path="$armvirt/config"
|
||||
target_config_path="$armvirt/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_bcm27xx; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_bcm27xx"
|
||||
target_config_path="$bcm27xx/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -339,11 +335,13 @@ function genconfig {
|
||||
v "cp $CONFIGPATH/config .config"
|
||||
cp $CONFIGPATH/config .config
|
||||
|
||||
if [ -f $config_path/config ]; then
|
||||
cat $config_path/config >> .config
|
||||
if [ -f $target_config_path/config ]; then
|
||||
cat $target_config_path/config >> .config
|
||||
echo "" >> .config
|
||||
fi
|
||||
if [ -f $config_path/$BOARDTYPE/config ]; then
|
||||
cat $config_path/$BOARDTYPE/config >> .config
|
||||
if [ -f $target_config_path/$BOARDTYPE/config ]; then
|
||||
cat $target_config_path/$BOARDTYPE/config >> .config
|
||||
echo "" >> .config
|
||||
fi
|
||||
|
||||
#special handling for intel_mips/iopsys_ramips which use TARGET_DEVICES
|
||||
@@ -360,6 +358,13 @@ function genconfig {
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
|
||||
elif [ "$target" = "iopsys_bcm27xx" ]; then
|
||||
subtarget="iopsys_bcm2711"
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
echo "CONFIG_TARGET_MULTI_PROFILE=y" >> .config
|
||||
echo "CONFIG_TARGET_PER_DEVICE_ROOTFS=y" >> .config
|
||||
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
|
||||
else
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
@@ -386,10 +391,12 @@ function genconfig {
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
|
||||
echo "" >> .config
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
|
||||
echo "" >> .config
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -410,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" ]
|
||||
@@ -433,7 +436,7 @@ function genconfig {
|
||||
touch package/kernel/linux/Makefile
|
||||
|
||||
# we need to signal to bradcom SDK that we have changed the board id
|
||||
# currently boardparms.c and boardparms_voice.c is the only place that is depending on inteno boardid name
|
||||
# currently boardparms.c and boardparms_voice.c is the only place that is depending on boardid name
|
||||
# so just touch that file.
|
||||
[ -d ./build_dir ] && find build_dir/ -name "boardparms*c" -print0 2>/dev/null | xargs -0 touch 2>/dev/null
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ function genconfig_min {
|
||||
export DEVELOPER=0
|
||||
target="bogus"
|
||||
config_path=""
|
||||
brcm63xx_mips="target/linux/iopsys-brcm63xx-mips"
|
||||
bcm27xx="target/linux/iopsys-bcm27xx"
|
||||
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
|
||||
ramips="target/linux/iopsys-ramips"
|
||||
intel_mips="target/linux/intel_mips"
|
||||
@@ -108,8 +108,6 @@ function genconfig_min {
|
||||
return
|
||||
fi
|
||||
|
||||
[ -e $brcm63xx_mips/genconfig ] &&
|
||||
iopsys_brcm63xx_mips=$(cd $brcm63xx_mips; ./genconfig)
|
||||
[ -e $brcm63xx_arm/genconfig ] &&
|
||||
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
|
||||
[ -e $ramips/genconfig ] &&
|
||||
@@ -120,9 +118,11 @@ function genconfig_min {
|
||||
iopsys_x86=$(cd $x86; ./genconfig)
|
||||
[ -e $armvirt/genconfig ] &&
|
||||
iopsys_armvirt=$(cd $armvirt; ./genconfig)
|
||||
[ -e $bcm27xx/genconfig ] &&
|
||||
iopsys_bcm27xx=$(cd $bcm27xx; ./genconfig)
|
||||
|
||||
if [ "$profile" == "LIST" ]; then
|
||||
for list in iopsys_brcm63xx_mips iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips iopsys_x86 iopsys_armvirt; do
|
||||
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips iopsys_x86 iopsys_armvirt iopsys_bcm27xx; do
|
||||
echo "$list based boards:"
|
||||
for b in ${!list}; do
|
||||
echo -e "\t$b"
|
||||
@@ -131,14 +131,6 @@ function genconfig_min {
|
||||
return
|
||||
fi
|
||||
|
||||
for p in $iopsys_brcm63xx_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_mips"
|
||||
config_path="$brcm63xx_mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
@@ -179,6 +171,14 @@ function genconfig_min {
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_bcm27xx; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_bcm27xx"
|
||||
config_path="$bcm27xx/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
git remote -v | grep -q http || {
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -337,6 +333,14 @@ function genconfig_min {
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
|
||||
elif [ "$target" = "iopsys_bcm27xx" ]; then
|
||||
subtarget="iopsys_bcm2711"
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
echo "CONFIG_TARGET_MULTI_PROFILE=y" >> .config
|
||||
echo "CONFIG_TARGET_PER_DEVICE_ROOTFS=y" >> .config
|
||||
device=$(echo $BOARDTYPE | tr a-z A-Z)
|
||||
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
|
||||
else
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
@@ -389,7 +393,7 @@ function genconfig_min {
|
||||
touch package/kernel/linux/Makefile
|
||||
|
||||
# we need to signal to bradcom SDK that we have changed the board id
|
||||
# currently boardparms.c and boardparms_voice.c is the only place that is depending on inteno boardid name
|
||||
# currently boardparms.c and boardparms_voice.c is the only place that is depending on boardid name
|
||||
# so just touch that file.
|
||||
[ -d ./build_dir ] && find build_dir/ -name "boardparms*c" -print0 2>/dev/null | xargs -0 touch 2>/dev/null
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -230,7 +230,7 @@ function ssh_upgrade {
|
||||
upd_fw_base=""
|
||||
upd_fw=""
|
||||
upd_host="192.168.1.1"
|
||||
upd_sysupgrade=0
|
||||
upd_sysupgrade=1
|
||||
do_dialog=0
|
||||
|
||||
while getopts "f:hnxt:iscb" opt; do
|
||||
@@ -280,6 +280,14 @@ function ssh_upgrade {
|
||||
set_config_string CONFIG_TARGET_BOARD
|
||||
firmwares=$(cd bin/targets/$CONFIG_TARGET_BOARD/generic/; ls -t *[0-9].y[3])
|
||||
|
||||
# if target uses pkgtb
|
||||
if [ -z "$firmwares"]
|
||||
then
|
||||
# pkgtb files can not be streamed so copy over the file witch scp
|
||||
use_scp=1
|
||||
firmwares=$(cd bin/targets/$CONFIG_TARGET_BOARD/generic/; ls -t last.pkgtb)
|
||||
fi
|
||||
|
||||
for upd_fw_base in $firmwares
|
||||
do
|
||||
#echo "firmware $upd_fw"
|
||||
@@ -313,10 +321,20 @@ function ssh_upgrade {
|
||||
[ $upd_forceboot -eq 1 ] && extra_args="$extra_args -b"
|
||||
|
||||
file_size_kb=`du -k "$upd_fw" | cut -f1`
|
||||
cat $upd_fw | pv -s ${file_size_kb}k | ssh root@$upd_host "iopu $extra_args"
|
||||
if [ "$use_scp" == "1" ]
|
||||
then
|
||||
scp $upd_fw root@$upd_host:/tmp/ &&
|
||||
ssh -o ConnectTimeout=60 root@$upd_host "iopu $extra_arg -f /tmp/$upd_fw_base"
|
||||
else
|
||||
cat $upd_fw | pv -s ${file_size_kb}k | ssh root@$upd_host "iopu $extra_args"
|
||||
fi
|
||||
else
|
||||
extra_args=""
|
||||
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args -d"
|
||||
[ $upd_keepconf -eq 0 ] && extra_args="$extra_args -n"
|
||||
|
||||
scp $upd_fw root@$upd_host:/tmp/ &&
|
||||
ssh -o ConnectTimeout=60 root@$upd_host "sysupgrade -v $3 /tmp/$upd_fw_base" &&
|
||||
ssh -o ConnectTimeout=60 root@$upd_host "sysupgrade -v $extra_args /tmp/$upd_fw_base" &&
|
||||
echo "sysupgrade done!"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
# this is a developer helper script to SCP changed files to remote host
|
||||
|
||||
ROOT=build_dir/target-mips_uClibc-0.9.33.2/root-iopsys-brcm63xx-mips/
|
||||
ROOT_OLD=tmp/root_old/
|
||||
ROOT_TMP=tmp/root_tmp/
|
||||
|
||||
function scp_changes_reset {
|
||||
{ cd `dirname $0`
|
||||
rm -rf "$ROOT_OLD"
|
||||
mkdir -p "$ROOT_OLD"
|
||||
cp -a "$ROOT"* "$ROOT_OLD"
|
||||
}
|
||||
}
|
||||
|
||||
function scp_changes {
|
||||
if [ -z "$1" ] ; then
|
||||
echo "usage: $0 scp_changes <host/-r(eset)/-p(retend)>"
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
{ cd `dirname $0`
|
||||
if [ ! -d $ROOT ]; then
|
||||
echo "$ROOT does not exist"
|
||||
echo "please build the project first"
|
||||
exit 1;
|
||||
fi
|
||||
if [ "$1" = "-r" ]; then
|
||||
echo "reset changes"
|
||||
scp_changes_reset
|
||||
exit 0
|
||||
fi
|
||||
if [ ! -d $ROOT_OLD ]; then
|
||||
echo "$ROOT_OLD does not exist"
|
||||
echo "you didn't store state of previous buildroot"
|
||||
#echo "please run ./scp_changes_reset.sh"
|
||||
echo "doing it now"
|
||||
scp_changes_reset
|
||||
exit 1;
|
||||
fi
|
||||
FILES=`diff -rq "$ROOT" "$ROOT_OLD" 2>&1 | sed -ne "s?^Files .* and $ROOT_OLD\\(.*\\) differ?\\1?p" -ne "s?^Only in $ROOT\\(.*\\): \\(.*\\)?\\1/\\2?p"`
|
||||
if [ "$1" = "-p" ]; then
|
||||
echo "files that would be copied:"
|
||||
echo $FILES
|
||||
exit 0
|
||||
fi
|
||||
for f in $FILES
|
||||
do
|
||||
mkdir -p "$ROOT_TMP`dirname $f`"
|
||||
cp -af "$ROOT$f" "$ROOT_TMP$f"
|
||||
done
|
||||
if [ -d "$ROOT_TMP" ]; then
|
||||
echo "scp changed files to $1"
|
||||
pushd "$ROOT_TMP" 2>&1 >/dev/null
|
||||
scp -r * root@$1:/
|
||||
RETVAL=$?
|
||||
popd 2>&1 >/dev/null
|
||||
rm -rf "$ROOT_TMP"
|
||||
if [ "$RETVAL" -eq 0 ]; then
|
||||
scp_changes_reset
|
||||
else
|
||||
echo "scp error"
|
||||
exit $RETVAL
|
||||
fi
|
||||
else
|
||||
echo "no change"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
register_command "scp_changes" "<host/-r(eset)/-p(retend)> SCP only changed files to device"
|
||||
95
iop/scripts/taas.sh
Normal file
95
iop/scripts/taas.sh
Normal file
@@ -0,0 +1,95 @@
|
||||
|
||||
# Shorthand command for doing a HIL runtime smoketest on the
|
||||
# latest built image. Does the image boot up correctly?
|
||||
# More info here:
|
||||
# https://dev.iopsys.eu/iopsys/iopsys-taas
|
||||
|
||||
|
||||
#--------------------------------------------------------------
|
||||
function taas-init() {
|
||||
local f
|
||||
|
||||
# Path to TaaS binarys. Try some likely ones.
|
||||
if ! which taas-smoketest >/dev/null; then
|
||||
PATH="${PATH}:${PWD}/../iopsys-taas/bin"
|
||||
PATH="${PATH}:${PWD}/../taas/bin"
|
||||
PATH="${PATH}:${HOME}/iopsys-taas/bin"
|
||||
PATH="${PATH}:${HOME}/taas/bin"
|
||||
PATH="${PATH}:${HOME}/bin"
|
||||
PATH="${PATH}:/opt/iopsys-taas/bin"
|
||||
PATH="${PATH}:/opt/taas/bin"
|
||||
fi
|
||||
|
||||
if ! which taas-smoketest >/dev/null; then
|
||||
echo "Error; TaaS is missing! Install it with:"
|
||||
echo "git clone git@dev.iopsys.eu:iopsys/iopsys-taas.git ../iopsys-taas"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# NAND erase block size.
|
||||
nandBlkSz=$(grep CONFIG_TARGET_NAND_BLOCKSZ .config | \
|
||||
tr -s "=\"" " " | cut -d " " -f 2)
|
||||
nandBlkSz=$((nandBlkSz / 1024))
|
||||
|
||||
# Create a list of all images which might be of use.
|
||||
for f in ${PWD}/bin/targets/iopsys-*/generic/last.* \
|
||||
${PWD}/build_dir/target-arm*/bcmkernel/bcm963xx/targets/9*/bcm*_linux_raw_image_${nandBlkSz}.bin; do
|
||||
[[ -s "$f" ]] && images+=("$f")
|
||||
done
|
||||
|
||||
# Convert Iopsys target name to the TaaS product name format
|
||||
# according to what is available in the remote lab for HIL.
|
||||
# Also find a suitable image.
|
||||
product=$(grep CONFIG_TARGET_PROFILE .config | \
|
||||
tr -s "=\"" " " | cut -d " " -f 2) || exit
|
||||
case "$product" in
|
||||
smarthub3)
|
||||
export product="SmartHub3a"
|
||||
;;
|
||||
dg400prime|eg400|ex600)
|
||||
export product=$(echo -n "$product" | tr [[:lower:]] [[:upper:]])
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported target; skipping!"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ ${#images[@]} -eq 0 ]]; then
|
||||
echo "No image found"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------
|
||||
function taas-smoketest {
|
||||
declare -a images
|
||||
|
||||
taas-init || return
|
||||
echo "Testing a $product with ${images[@]}..."
|
||||
command taas-smoketest "${images[@]}" "$product" "$@"
|
||||
}
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------
|
||||
function taas-bootstrap {
|
||||
declare -a images
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
taas-init || return
|
||||
echo "Flashing $1..."
|
||||
command taas-bootstrap "${images[@]}" "$@"
|
||||
else
|
||||
echo "Usage: ./iop taas-bootstrap dutX"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
register_command "taas-bootstrap" "Write image to a remote lab device."
|
||||
register_command "taas-smoketest" "Write image to a remote lab device and test it."
|
||||
|
||||
@@ -163,6 +163,7 @@ function usage {
|
||||
echo " -x Force install even if firmware is not for this board"
|
||||
echo " -b Force install of bootloader regardless of version installed"
|
||||
echo " -r Jump into chroot env of other system"
|
||||
echo " -f Firmware file to use"
|
||||
echo " -C \"command\" Execute command in chroot env of other system"
|
||||
}
|
||||
|
||||
@@ -177,6 +178,64 @@ function newroot_exec {
|
||||
|
||||
}
|
||||
|
||||
function system_is_y_image {
|
||||
|
||||
# find out what rootfs volume is active.
|
||||
cur_vol=$(get_flashbank_current)
|
||||
upd_vol=$(get_flashbank_next)
|
||||
|
||||
# convert volume name "rootfs_$upd_vol" into ubi volume id
|
||||
upd_ubi_id=$(ubinfo -d 0 -N rootfs_$upd_vol | awk "/Volume ID:/ {print \$3}")
|
||||
log "installing Root Fileystem into UBI volume rootfs_$upd_vol"
|
||||
|
||||
# prepare to match dsl.
|
||||
function_call upd_conf_dsl
|
||||
|
||||
log "now starting writing data to flash with [ iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id ]"
|
||||
run_cleanup=1 # When we start to actually write data there might be some
|
||||
# things that need cleanup if we get an error/crash
|
||||
if ! iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id; then
|
||||
log "iopupgrade program Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Firmware programmed to flash."
|
||||
|
||||
# Force upgrade of boot loader
|
||||
[ $upd_forceboot -eq 1 ] && chroot_cmdline="$chroot_cmdline -b"
|
||||
|
||||
if [ $upd_keepconfig -eq 1 ]; then
|
||||
log "Transfering configuration to new system."
|
||||
chroot_cmdline="$chroot_cmdline -c"
|
||||
fi
|
||||
|
||||
mount_newroot
|
||||
if ! chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline; then
|
||||
log "Configuration migration failed!"
|
||||
exit 1
|
||||
fi
|
||||
umount_newroot
|
||||
|
||||
log "New firmware fully installed."
|
||||
run_cleanup=0
|
||||
|
||||
|
||||
# Now make sure that we actually boot the new system on the next reboot
|
||||
upd_finnish
|
||||
|
||||
}
|
||||
|
||||
function system_is_FIT_image {
|
||||
|
||||
# prepare to match dsl.
|
||||
#function_call upd_conf_dsl
|
||||
|
||||
#here we write data
|
||||
bcm_flasher $firmware_file
|
||||
bcm_bootstate 1
|
||||
log "Firmware programmed to flash."
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
# just one instance
|
||||
@@ -194,7 +253,7 @@ trap ctrl_c INT
|
||||
trap timeout SIGALRM
|
||||
trap sig_pipe SIGPIPE
|
||||
|
||||
while getopts "nrxbhcC:" opt; do
|
||||
while getopts "nrxbhcC:f:" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
upd_noreboot=1
|
||||
@@ -216,6 +275,9 @@ while getopts "nrxbhcC:" opt; do
|
||||
newroot_exec "${OPTARG}"
|
||||
exit
|
||||
;;
|
||||
f)
|
||||
firmware_file="${OPTARG}"
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 1
|
||||
@@ -235,59 +297,18 @@ log "Firmware upgrade started"
|
||||
# Should board name be checked
|
||||
if [ $upd_forceimage -eq 0 ]
|
||||
then
|
||||
board=$(db get hw.board.iopVerBoard)
|
||||
board=$(db get hw.board.model_name)
|
||||
cmdline_match="board=$board"
|
||||
fi
|
||||
|
||||
# find out what rootfs volume is active.
|
||||
cur_vol=$(get_flashbank_current)
|
||||
upd_vol=$(get_flashbank_next)
|
||||
|
||||
# convert volume name "rootfs_$upd_vol" into ubi volume id
|
||||
upd_ubi_id=$(ubinfo -d 0 -N rootfs_$upd_vol | awk "/Volume ID:/ {print \$3}")
|
||||
log "installing Root Fileystem into UBI volume rootfs_$upd_vol"
|
||||
|
||||
# prepare to match dsl.
|
||||
function_call upd_conf_dsl
|
||||
|
||||
# prepare to update CFE if it exists
|
||||
function_call upd_conf_cfe
|
||||
|
||||
# prepare to update kernel if it is stored in MTD/JFFS2
|
||||
function_call upd_conf_kernel
|
||||
|
||||
log "now starting writing data to flash with [ iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id ]"
|
||||
run_cleanup=1 # When we start to actually write data there might be some
|
||||
# things that need cleanup if we get an error/crash
|
||||
if ! iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id; then
|
||||
log "iopupgrade program Failed"
|
||||
exit 1
|
||||
# BUG: should probably read a config file.
|
||||
if [ -f /proc/nvram/boardid ]
|
||||
then
|
||||
system_is_FIT_image
|
||||
else
|
||||
system_is_y_image
|
||||
fi
|
||||
|
||||
log "Firmware programmed to flash."
|
||||
|
||||
# Force upgrade of boot loader
|
||||
[ $upd_forceboot -eq 1 ] && chroot_cmdline="$chroot_cmdline -b"
|
||||
|
||||
if [ $upd_keepconfig -eq 1 ]; then
|
||||
log "Transfering configuration to new system."
|
||||
chroot_cmdline="$chroot_cmdline -c"
|
||||
fi
|
||||
|
||||
mount_newroot
|
||||
if ! chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline; then
|
||||
log "Configuration migration failed!"
|
||||
exit 1
|
||||
fi
|
||||
umount_newroot
|
||||
|
||||
log "New firmware fully installed."
|
||||
run_cleanup=0
|
||||
|
||||
|
||||
# Now make sure that we actually boot the new system on the next reboot
|
||||
upd_finnish
|
||||
|
||||
# spawn the reboot to a subshell to allow the main program to quit before reset
|
||||
# to avoid any hanged network connection like ssh
|
||||
if [ $upd_noreboot -eq 0 ]
|
||||
|
||||
@@ -11,7 +11,7 @@ PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.3
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libpicoevent.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f4ab03b22fca57cec6c959fb5c54bcdd64c32467
|
||||
PKG_SOURCE_VERSION:=f446f186102539cceedaa15a95a33547ac3c1fd7
|
||||
PKG_NAME:=libpicoevent
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1-only
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-1905
|
||||
PKG_VERSION:=0.0.13
|
||||
PKG_VERSION:=0.0.16
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=31e30c589cb2a522fb66261640ff1a5f8ff58ac4
|
||||
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:=2.0.1
|
||||
PKG_VERSION:=3.4.2
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=362ddbaf2b9a5510c89b740fcc23d8425770da3d
|
||||
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
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libmaputils +libwsc +libeasy
|
||||
endef
|
||||
|
||||
define Package/map-agent/description
|
||||
@@ -51,6 +51,7 @@ endef
|
||||
|
||||
define Package/map-agent/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_BUILD_DIR)/src/utils/*.so* $(1)/usr/lib/
|
||||
|
||||
62
map-agent/files/etc/config/mapagent
Normal file
62
map-agent/files/etc/config/mapagent
Normal file
@@ -0,0 +1,62 @@
|
||||
config wifiagent
|
||||
option enabled '1'
|
||||
option debug '6'
|
||||
option profile '2'
|
||||
|
||||
config fh-iface
|
||||
option ifname 'wl0'
|
||||
option steer 'rssi bssload'
|
||||
list exclude '00:11:22:33:44:55'
|
||||
list exclude_btm '00:aa:bb:cc:dd:ee'
|
||||
list assoc_ctrl '00:10:20:30:40:50'
|
||||
option btm_retry '3'
|
||||
option btm_retry_secs '180'
|
||||
option fallback_legacy '1'
|
||||
option steer_legacy_reassoc_secs '30'
|
||||
option steer_legacy_retry_secs '3600'
|
||||
option assoc_ctrl_secs '30'
|
||||
option band '2'
|
||||
|
||||
config fh-iface
|
||||
option ifname 'wl1'
|
||||
option steer 'rssi bssload'
|
||||
list exclude '00:11:22:33:44:55'
|
||||
list exclude_btm '00:aa:bb:cc:dd:ee'
|
||||
option band '5'
|
||||
|
||||
#config bk-iface
|
||||
# option ifname 'apclii0'
|
||||
# option enabled '1'
|
||||
# option onboarded '0'
|
||||
# option disallow_bsta '1 # bitmap, 1 for disallow p1, 2 to disallow p2, 3 to disallow both (probably never applicable)
|
||||
|
||||
config steer-param 'rssi'
|
||||
option priority '0'
|
||||
option rssi_threshold '-68'
|
||||
option hysteresis '5'
|
||||
option margin '3'
|
||||
option diffsnr '8'
|
||||
|
||||
config steer-param 'bssload'
|
||||
option priority '0'
|
||||
option bssload_threshold '80'
|
||||
|
||||
### custom rules follows ###
|
||||
config rule-custom
|
||||
option action steer
|
||||
option sta 'd8:32:e3:4d:35:d2'
|
||||
option bss '00:22:07:11:22:33'
|
||||
|
||||
config rule-custom
|
||||
option action restrict
|
||||
option sta 'd8:32:e3:4d:35:d2'
|
||||
option bss '00:22:07:11:22:33'
|
||||
|
||||
#config bk-iface
|
||||
# option ifname 'wlan1_1'
|
||||
#
|
||||
#config fh-iface
|
||||
# option ifname 'wlan0'
|
||||
#
|
||||
#config fh-iface
|
||||
# option ifname 'wlan1'
|
||||
31
map-agent/files/etc/init.d/mapagent
Executable file
31
map-agent/files/etc/init.d/mapagent
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
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
|
||||
# procd_set_param stdout 1
|
||||
# procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "ieee1905"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_VERSION:=2.3.1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=3a55c1f41f0e2c233c28834dea0e881cd2cd0c22
|
||||
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
|
||||
DEPENDS:=+libuci +libubox +ubus +libmaputils +libwsc +libeasy
|
||||
endef
|
||||
|
||||
define Package/map-controller/description
|
||||
@@ -42,6 +42,7 @@ MAKE_PATH:=src
|
||||
|
||||
define Package/map-controller/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapcontroller $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
111
map-controller/files/etc/config/mapcontroller
Normal file
111
map-controller/files/etc/config/mapcontroller
Normal file
@@ -0,0 +1,111 @@
|
||||
config wificntlr
|
||||
option enabled '1'
|
||||
option registrar '5 2' #bands on which wps registrar supported
|
||||
option debug '6'
|
||||
|
||||
config fh-credentials
|
||||
option band '5'
|
||||
option encryption 'psk2'
|
||||
option key '1234567890'
|
||||
option ssid 'map-net5'
|
||||
option vlan '101'
|
||||
|
||||
config fh-credentials
|
||||
option band '2'
|
||||
option encryption 'psk2'
|
||||
option key '1234567890'
|
||||
option ssid 'map-net2'
|
||||
option vlan '0' # 0 - 2 rsvd, 3 - 4094 => vlan id
|
||||
|
||||
config bk-credentials
|
||||
option band '5'
|
||||
option encryption 'psk2'
|
||||
option key '5555555555'
|
||||
option ssid 'map-bkhaul-5'
|
||||
option multi_ap '2'
|
||||
# option multi_ap_backhaul_sta '1' # possible future TODO
|
||||
# option multi_ap_backhaul_key 'multiap_key123' # possible future TODO
|
||||
# option multi_ap_backhaul_ssid 'MultiAP-0022077E9CD6' # possible future TODO
|
||||
option disallow_bsta '1' # bitmap, 1 for disallow p1, 2 to disallow p2, 3 to disallow both (probably never applicable)
|
||||
|
||||
config bk-credentials
|
||||
option band '2'
|
||||
option encryption 'psk2'
|
||||
option key '2222222222'
|
||||
option ssid 'map-bkhaul-2'
|
||||
option multi_ap '2'
|
||||
# option multi_ap_backhaul_sta '1' # possible future TODO
|
||||
# option multi_ap_backhaul_key 'multiap_key123' # possible future TODO
|
||||
# option multi_ap_backhaul_ssid 'MultiAP-0022077E9CD6' # possible future TODO
|
||||
option disallow_bsta '0' # 0 or 1 profile-1 bSTA
|
||||
|
||||
config agent-policy
|
||||
option agent_id '00:22:07:7E:9C:D6' # 1905al macaddress of agent
|
||||
list steer_exclude '00:11:22:33:44:55'
|
||||
list steer_exclude_btm '00:aa:bb:cc:dd:ee'
|
||||
option steer_policy '2' # 0, 1, 2 - see MultiAP spec
|
||||
option util_threshold '200' # channel-util as in BSS load
|
||||
option rcpi_threshold '30' # 0 - 220 valid range
|
||||
option report_scan '0' # 0 or 1 for independent sc include_sta_metric '0' # sta metric in AP metric resp
|
||||
option pvid '100' # primary vlan id
|
||||
option pcp_default '5' # default vlan pcp
|
||||
option disallow_bsta_p1 '0' # 0 or 1 profile20 valid range
|
||||
option report_scan '0' # 0 or 1 for independent scans
|
||||
option report_sta_assocfails '1' # 0 or 1 - stas assoc failure
|
||||
option report_metric_periodic '0' # 0, or 1 - 255 in secs
|
||||
option report_rcpi_threshold '30' # 0 - 220 valid range
|
||||
option report_scan '0' # 0 or 1 for independent scans
|
||||
option report_sta_assocfails '1' # 0 or 1 - stas assoc failure
|
||||
option report_metric_periodic '0' # 0, or 1 - 255 in secs
|
||||
option report_rcpi_threshold '0' # 0, or 1 - 220
|
||||
option report_util_threshold '0' # 0, or channel-util value
|
||||
option include_sta_stats '0' # sta stats in AP metric resp
|
||||
option include_sta_metric '0' # sta metric in AP metric resp
|
||||
option pvid '100' # primary vlan id
|
||||
option pcp_default '5' # default vlan pcp
|
||||
option disallow_bsta_p1 '0' # 0 or 1 profile-1 bSTA
|
||||
option disallow_bsta_p2 '0' # 0 or 1 profile-2 bSTA
|
||||
|
||||
config agent-policy
|
||||
option agent_id '00:00:00:00:00:00'
|
||||
list steer_exclude '00:11:22:33:44:55'
|
||||
list steer_exclude_btm '00:aa:bb:cc:dd:ee'
|
||||
option steer_policy '2' # 0, 1, 2 - see MultiAP spec
|
||||
option util_threshold '200' # channel-util as in BSS load
|
||||
option rcpi_threshold '30' # 0 - 220 valid range
|
||||
option report_scan '0' # 0 or 1 for independent sc include_sta_metric '0' # sta metric in AP metric resp
|
||||
option pvid '100' # primary vlan id
|
||||
option pcp_default '5' # default vlan pcp
|
||||
option disallow_bsta_p1 '0' # 0 or 1 profile20 valid range
|
||||
option report_scan '0' # 0 or 1 for independent scans
|
||||
option report_sta_assocfails '1' # 0 or 1 - stas assoc failure
|
||||
option report_metric_periodic '0' # 0, or 1 - 255 in secs
|
||||
option report_rcpi_threshold '30' # 0 - 220 valid range
|
||||
option report_scan '0' # 0 or 1 for independent scans
|
||||
option report_sta_assocfails '1' # 0 or 1 - stas assoc failure
|
||||
option report_metric_periodic '0' # 0, or 1 - 255 in secs
|
||||
option report_rcpi_threshold '0' # 0, or 1 - 220
|
||||
option report_util_threshold '0' # 0, or channel-util value
|
||||
option include_sta_stats '0' # sta stats in AP metric resp
|
||||
option include_sta_metric '0' # sta metric in AP metric resp
|
||||
option pvid '100' # primary vlan id
|
||||
option pcp_default '5' # default vlan pcp
|
||||
option disallow_bsta_p1 '0' # 0 or 1 profile-1 bSTA
|
||||
option disallow_bsta_p2 '0' # 0 or 1 profile-2 bSTA
|
||||
|
||||
config agent-policy
|
||||
option agent_id '00:22:07:A3:6C:DA' # 1905al macaddress of agent
|
||||
list steer_exclude '00:11:22:33:44:55'
|
||||
list steer_exclude_btm '00:aa:bb:cc:dd:ee'
|
||||
option steer_policy '2' # 0, 1, 2 - see MultiAP spec
|
||||
option util_threshold '200' # channel-util as in BSS load
|
||||
option report_metric_periodic '0' # 0, or 1 - 255 in secs
|
||||
option report_rcpi_threshold '0' # 0, or 1 - 220
|
||||
option report_util_threshold '0' # 0, or channel-util value
|
||||
option include_sta_stats '0' # sta stats in 3:4d:35:d2'
|
||||
option bss '00:22:07:11:22:33'
|
||||
|
||||
config rule-custom
|
||||
option action restrict
|
||||
option sta 'd8:32:e3:4d:35:d2'
|
||||
option bss '00:22:07:11:22:33'
|
||||
31
map-controller/files/etc/init.d/mapcontroller
Executable file
31
map-controller/files/etc/init.d/mapcontroller
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
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
|
||||
# procd_set_param stdout 1
|
||||
# procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "ieee1905"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2013 Inteno
|
||||
# Copyright (C) 2020 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
@@ -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:=http://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:=2.0.22
|
||||
PKG_VERSION:=3.0.0.12
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=06270b7a45b77d6d883eb244e6d854efce10f17f
|
||||
PKG_SOURCE_VERSION:=bc1dba1efe9ec49f468592359d03895f45699abf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
@@ -22,14 +22,13 @@ PKG_FIXUP:=autoreconf
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/obuspa
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=USP agent
|
||||
DEPENDS:=+libcoap +libopenssl +libcurl +libsqlite3 +libcares +libubox +libubus +libblobmsg-json +uspd
|
||||
DEPENDS:=+libopenssl +libcurl +libsqlite3 +libubox +libubus +uspd +libmosquitto
|
||||
endef
|
||||
|
||||
define Package/obuspa/description
|
||||
@@ -38,18 +37,7 @@ endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-fstrict-aliasing \
|
||||
-Werror=format-overflow \
|
||||
-Wno-error=unused-parameter \
|
||||
-Wno-error=sign-compare
|
||||
|
||||
|
||||
ifneq ($(CONFIG_USE_MUSL),)
|
||||
TARGET_CFLAGS += -DUSE_MUSL
|
||||
endif
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
@@ -62,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))
|
||||
|
||||
@@ -1,44 +1,43 @@
|
||||
# controller, mtp, connection makes a group and related to one another
|
||||
# ex: first controller will be mapped to first mtp and first connection
|
||||
# details, always defined in groups
|
||||
|
||||
config obuspa
|
||||
option enable 'true'
|
||||
option cert '/etc/obuspa/rootCA.pem'
|
||||
config obuspa 'global'
|
||||
option enabled 'true'
|
||||
option interface 'wan'
|
||||
#option ifname 'eth0.1'
|
||||
option debug 'false'
|
||||
option log_level '1'
|
||||
#option db_file '/tmp/usp.db'
|
||||
#option trust_cert '/etc/obuspa/rootCA.pem'
|
||||
#option client_cert '/etc/obuspa/client.pem'
|
||||
#option log_dest '/var/log/obuspa'
|
||||
|
||||
config controller
|
||||
option endpointid 'self::usp-controller.com'
|
||||
option enable 'true'
|
||||
# Trust cerificate number
|
||||
option AssignedRole 1
|
||||
option PeriodicNotifInterval "86400"
|
||||
option PeriodicNotifTime "0001-01-01T00:00:00Z"
|
||||
option USPRetryMinimumWaitInterval "5"
|
||||
option USPRetryIntervalMultiplier "2000"
|
||||
option ControllerCode ""
|
||||
option protocol 'STOMP'
|
||||
config localagent 'localagent'
|
||||
option Enable 'true'
|
||||
|
||||
# Adds Device.LocalAgent.Controller.
|
||||
config controller 'localcontroller'
|
||||
option EndpointID 'proto::interop-usp-controller'
|
||||
option Protocol 'MQTT'
|
||||
option Topic '/usp/controller'
|
||||
option mqtt 'localmqtt'
|
||||
|
||||
# Adds Device.LocalAgent.MTP.
|
||||
config mtp
|
||||
option enable 'true'
|
||||
option protocol 'STOMP'
|
||||
option destination ''
|
||||
option Protocol 'MQTT'
|
||||
option ResponseTopicConfigured '/usp/endpoint'
|
||||
option mqtt 'localmqtt'
|
||||
|
||||
config connection
|
||||
option host 'usp-controller.com'
|
||||
option username 'username'
|
||||
option password 'password'
|
||||
option encryption 'true'
|
||||
option enable 'true'
|
||||
option port 61613
|
||||
option virtualhost '/'
|
||||
option EnableHeartbeats "true"
|
||||
option OutgoingHeartbeat "30000"
|
||||
option IncomingHeartbeat "300000"
|
||||
option ServerRetryInitialInterval "60"
|
||||
option ServerRetryIntervalMultiplier "2000"
|
||||
option ServerRetryMaxInterval "30720"
|
||||
# Adds Device.MQTT.Client.
|
||||
config mqtt 'localmqtt'
|
||||
option BrokerAddress '127.0.0.1'
|
||||
option BrokerPort '1883'
|
||||
option TransportProtocol 'TCP/IP'
|
||||
option Username 'admin'
|
||||
option Password 'admin'
|
||||
|
||||
# Add Device.LocalAgent.Subscription.
|
||||
config subscription
|
||||
option ID 'default-boot-event-ACS'
|
||||
option NotifType 'Event'
|
||||
option ReferenceList 'Device.Boot!'
|
||||
option Persistent 'true'
|
||||
option controller 'localcontroller'
|
||||
|
||||
|
||||
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
|
||||
|
||||
@@ -2,14 +2,23 @@
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
PROG=/usr/sbin/obuspa
|
||||
l3device=""
|
||||
certificate=""
|
||||
|
||||
EXTRA_COMMANDS="remove_db"
|
||||
EXTRA_HELP=" remove_db Removes obuspa persistent db before restarting"
|
||||
|
||||
PARAM_FILE="/tmp/obuspa_param_reset.txt"
|
||||
conn_num=1
|
||||
mtp_num=1
|
||||
stomp_num=1
|
||||
CONFIGURATION=obuspa
|
||||
KEEP_FILES="/lib/upgrade/keep.d/obuspa"
|
||||
USP_TEMP_FILE="/tmp/usp.tmp"
|
||||
controller_num=0
|
||||
mtp_num=0
|
||||
stomp_num=0
|
||||
mqtt_num=0
|
||||
subs_num=0
|
||||
index=0
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t obuspa -p debug
|
||||
@@ -23,54 +32,113 @@ db_set() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_index() {
|
||||
index=$(( index + 1 ))
|
||||
if [ "$1" = "$2" ]; then
|
||||
echo "${index}" > ${USP_TEMP_FILE}
|
||||
fi
|
||||
}
|
||||
|
||||
get_uci_ref_index() {
|
||||
local val;
|
||||
|
||||
[ -f ${USP_TEMP_FILE} ] && rm -f ${USP_TEMP_FILE}
|
||||
|
||||
index=0
|
||||
config_load $CONFIGURATION
|
||||
config_foreach get_index $1 $2
|
||||
val=$(cat ${USP_TEMP_FILE})
|
||||
|
||||
if [ -z $val ]; then
|
||||
val=0
|
||||
fi
|
||||
|
||||
rm -f ${USP_TEMP_FILE}
|
||||
|
||||
echo $val
|
||||
}
|
||||
|
||||
validate_obuspa_section()
|
||||
{
|
||||
uci_validate_section obuspa obuspa "${1}" \
|
||||
'enable:bool:true' \
|
||||
'cert:string:"/etc/obuspa/rootCA.pem"' \
|
||||
'interface:string:wan' \
|
||||
uci_validate_section ${CONFIGURATION} obuspa "${1}" \
|
||||
'enabled:bool:true' \
|
||||
'trust_cert:string' \
|
||||
'client_cert:string' \
|
||||
'interface:string' \
|
||||
'ifname:string:"br-lan"' \
|
||||
'debug:bool:false' \
|
||||
'log_level:uinteger:2' \
|
||||
'log_dest:string:stdout'
|
||||
'log_level:uinteger' \
|
||||
'log_dest:string' \
|
||||
'db_file:string'
|
||||
}
|
||||
|
||||
validate_localagent_section()
|
||||
{
|
||||
uci_validate_section ${CONFIGURATION} localagent "${1}" \
|
||||
'Enable:bool:true' \
|
||||
'ParameterName:string:Device.DeviceInfo.SoftwareVersion' \
|
||||
'EndpointID:string'
|
||||
}
|
||||
|
||||
validate_controller_section()
|
||||
{
|
||||
uci_validate_section obuspa controller "${1}" \
|
||||
'endpointid:string:"self:usp-controller.com"' \
|
||||
'enable:bool:true' \
|
||||
'AssignedRole:uinteger:1' \
|
||||
uci_validate_section ${CONFIGURATION} controller "${1}" \
|
||||
'EndpointID:string' \
|
||||
'Enable:bool:true' \
|
||||
'AssignedRole:string:Device.LocalAgent.ControllerTrust.Role.1' \
|
||||
'PeriodicNotifInterval:uinteger:86400' \
|
||||
'PeriodicNotifTime:string:"0001-01-01T00:00:00Z"' \
|
||||
'USPRetryMinimumWaitInterval:uinteger:5' \
|
||||
'USPRetryIntervalMultiplier:uinteger:2000' \
|
||||
'PeriodicNotifTime:string' \
|
||||
'USPNotifRetryMinimumWaitInterval:uinteger:5' \
|
||||
'USPNotifRetryIntervalMultiplier:uinteger:2000' \
|
||||
'ControllerCode:string' \
|
||||
'protocol:or("STOMP","CoAP")' \
|
||||
'CoAPHost:string' \
|
||||
'CoAPPath:string' \
|
||||
'CoAPPort:uinteger'
|
||||
'Protocol:or("STOMP","CoAP","MQTT")' \
|
||||
'Reference:string' \
|
||||
'Destination:string:controller-notify-dest' \
|
||||
'Topic:string' \
|
||||
'coap_host:string' \
|
||||
'coap_path:string' \
|
||||
'coap_port:uinteger' \
|
||||
'mqtt:string' \
|
||||
'stomp:string'
|
||||
}
|
||||
|
||||
validate_subscription_section()
|
||||
{
|
||||
uci_validate_section ${CONFIGURATION} subscription "${1}" \
|
||||
'Enable:bool:true' \
|
||||
'ID:string' \
|
||||
'NotifType:string' \
|
||||
'ReferenceList:string' \
|
||||
'Persistent:bool:true' \
|
||||
'Recipient:string' \
|
||||
'controller:string'
|
||||
}
|
||||
|
||||
validate_mtp_section()
|
||||
{
|
||||
uci_validate_section obuspa mtp "${1}" \
|
||||
'enable:bool:true' \
|
||||
'protocol:or("STOMP","CoAP")' \
|
||||
'destination:string' \
|
||||
'CoAPPath:string' \
|
||||
'CoAPPort:uinteger'
|
||||
uci_validate_section ${CONFIGURATION} mtp "${1}" \
|
||||
'Enable:bool:true' \
|
||||
'Protocol:or("STOMP","CoAP","MQTT")' \
|
||||
'Reference:string' \
|
||||
'ResponseTopicConfigured:string' \
|
||||
'PublishQoS:uinteger' \
|
||||
'Destination:string' \
|
||||
'coap_path:string' \
|
||||
'coap_port:uinteger' \
|
||||
'mqtt:string' \
|
||||
'stomp:string'
|
||||
}
|
||||
|
||||
validate_connection_section()
|
||||
validate_stomp_connection_section()
|
||||
{
|
||||
uci_validate_section obuspa connection "${1}" \
|
||||
'host:string:"usp-controller.com"' \
|
||||
'username:string:""' \
|
||||
'password:string:""' \
|
||||
uci_validate_section ${CONFIGURATION} stomp "${1}" \
|
||||
'Host:string:usp-controller.com' \
|
||||
'Username:string' \
|
||||
'Password:string' \
|
||||
'encryption:bool:true' \
|
||||
'enable:bool:true' \
|
||||
'port:uinteger:61613' \
|
||||
'virtualhost:string:"/"' \
|
||||
'Enable:bool:true' \
|
||||
'Port:uinteger:61613' \
|
||||
'VirtualHost:string:/' \
|
||||
'EnableHeartbeats:bool:true' \
|
||||
'OutgoingHeartbeat:uinteger:30000' \
|
||||
'IncomingHeartbeat:uinteger:300000' \
|
||||
@@ -79,82 +147,227 @@ validate_connection_section()
|
||||
'ServerRetryMaxInterval:uinteger:30720'
|
||||
}
|
||||
|
||||
configure_controller() {
|
||||
local endpointid enable AssignedRole PeriodicNotifInterval PeriodicNotifTime USPRetryMinimumWaitInterval
|
||||
local USPRetryIntervalMultiplier ControllerCode protocol CoAPHost CoAPPath CoAPPort
|
||||
validate_mqtt_client_section()
|
||||
{
|
||||
uci_validate_section ${CONFIGURATION} mqtt "${1}" \
|
||||
'BrokerAddress:string' \
|
||||
'BrokerPort:uinteger:1883' \
|
||||
'Enable:bool:true' \
|
||||
'Username:string' \
|
||||
'Password:string' \
|
||||
'ProtocolVersion:string:5.0' \
|
||||
'TransportProtocol:string:TCP/IP' \
|
||||
'KeepAliveTime:uinteger:60' \
|
||||
'ClientID:string' \
|
||||
'ConnectRetryTime:uinteger:5' \
|
||||
'ConnectRetryIntervalMultiplier:uinteger:2000' \
|
||||
'ConnectRetryMaxInterval:uinteger:60'
|
||||
}
|
||||
|
||||
validate_controller_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
configure_localagent() {
|
||||
local Enable ParameterName EndpointID
|
||||
local _num
|
||||
|
||||
validate_localagent_section 'localagent' || {
|
||||
log "Validation of localagent section failed"
|
||||
return 1;
|
||||
}
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.EndpointID "${endpointid}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.Alias "cpe-${conn_num}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.Enable "true"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.AssignedRole "Device.LocalAgent.ControllerTrust.Role.${AssignedRole}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.PeriodicNotifInterval "${PeriodicNotifInterval}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.PeriodicNotifTime "${PeriodicNotifTime}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.USPRetryMinimumWaitInterval "${USPRetryMinimumWaitInterval}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.USPRetryIntervalMultiplier "${USPRetryIntervalMultiplier}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.ControllerCode "${ControllerCode}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.Alias "cpe-${conn_num}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.Enable "${enable}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.Protocol "${protocol}"
|
||||
if [ "${protocol}"=="STOMP" ]; then
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.STOMP.Reference "Device.STOMP.Connection.${conn_num}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.STOMP.Destination "controller-notify-dest"
|
||||
elif [ "${protocol}"=="CoAP" ]; then
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.CoAP.Host "${CoAPHost}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.CoAP.Path "${CoAPPath}"
|
||||
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.CoAP.Port "${CoAPPort}"
|
||||
else
|
||||
log "Unsupported protocol ${protocol}"
|
||||
|
||||
if [ -n "${EndpointID}" ]; then
|
||||
db_set Device.LocalAgent.EndpointID "${EndpointID}"
|
||||
fi
|
||||
|
||||
_num=1
|
||||
while [ ${_num} -le ${controller_num} ]
|
||||
do
|
||||
db_set Device.LocalAgent.Controller.${_num}.BootParameter.1.Alias "cpe-1"
|
||||
db_set Device.LocalAgent.Controller.${_num}.BootParameter.1.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.Controller.${_num}.BootParameter.1.ParameterName "${ParameterName}"
|
||||
_num=$(( ${_num} + 1 ))
|
||||
done
|
||||
|
||||
db_set
|
||||
conn_num=$((conn_num+1))
|
||||
}
|
||||
|
||||
configure_controller() {
|
||||
local EndpointID Enable AssignedRole PeriodicNotifInterval PeriodicNotifTime USPNotifRetryMinimumWaitInterval
|
||||
local USPNotifRetryIntervalMultiplier ControllerCode Protocol Destination coap_host coap_path coap_port
|
||||
local Reference Topic mqtt stomp
|
||||
|
||||
validate_controller_section "${1}" || {
|
||||
log "Validation of controller section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
if [ -z ${EndpointID} -o -z ${Protocol} ]; then
|
||||
log "controller:: EndpointID id and Protocol cannot be empty"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
if [ -z "${stomp}" -a -z "${Reference}" -a -z "${mqtt}" -a -z "${coap_path}" ]; then
|
||||
log "controller:: Invalid configuration"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
if [ -z ${Reference} ]; then
|
||||
if [ ${Protocol} = "STOMP" ]; then
|
||||
val=$(get_uci_ref_index stomp ${stomp})
|
||||
if [ ${val} -eq 0 ]; then
|
||||
log "Not able to find the referred stomp section"
|
||||
return 1;
|
||||
fi
|
||||
Reference="Device.STOMP.Connection.${val}"
|
||||
elif [ ${Protocol} = "MQTT" ]; then
|
||||
val=$(get_uci_ref_index mqtt ${mqtt})
|
||||
if [ ${val} -eq 0 ]; then
|
||||
log "Not able to find the referred mqtt section"
|
||||
return 1;
|
||||
fi
|
||||
Reference="Device.MQTT.Client.${val}"
|
||||
fi
|
||||
fi
|
||||
|
||||
controller_num=$(( controller_num + 1 ))
|
||||
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.Alias "cpe-${controller_num}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.EndpointID "${EndpointID}"
|
||||
#db_set Device.LocalAgent.Controller.${controller_num}.AssignedRole "${AssignedRole}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.PeriodicNotifInterval "${PeriodicNotifInterval}"
|
||||
if [ -n "${PeriodicNotifTime}" ]; then
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.PeriodicNotifTime "${PeriodicNotifTime}"
|
||||
else
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.PeriodicNotifTime "0001-01-01T00:00:00Z"
|
||||
fi
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.USPNotifRetryMinimumWaitInterval "${USPNotifRetryMinimumWaitInterval}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.USPNotifRetryIntervalMultiplier "${USPNotifRetryIntervalMultiplier}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.ControllerCode "${ControllerCode}"
|
||||
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.Alias "cpe-${controller_num}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.Protocol "${Protocol}"
|
||||
# only support configuration of one mtp path per controller using uci
|
||||
if [ "${Protocol}" = "MQTT" ]; then
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.MQTT.Reference "${Reference}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.MQTT.Topic "${Topic}"
|
||||
elif [ "${Protocol}" = "STOMP" ]; then
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.STOMP.Reference "${Reference}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.STOMP.Destination "${Destination}"
|
||||
elif [ "${Protocol}" = "CoAP" ]; then
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Host "${coap_host}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Path "${coap_path}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Port "${coap_port}"
|
||||
else
|
||||
log "Unsupported Protocol ${Protocol}"
|
||||
fi
|
||||
|
||||
db_set
|
||||
}
|
||||
|
||||
configure_subscription(){
|
||||
local ID Enable NotifType ReferenceList Persistent Recipient
|
||||
local controller
|
||||
|
||||
validate_subscription_section "${1}" || {
|
||||
log "Validation of subscription section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
if [ -z "${Recipient}" -a -z "${controller}" ]; then
|
||||
log "No recipient for subscription"
|
||||
fi
|
||||
|
||||
if [ -z ${Recipient} ]; then
|
||||
val=$(get_uci_ref_index controller ${controller})
|
||||
if [ ${val} -eq 0 ]; then
|
||||
log "Not able to find the referred controller section"
|
||||
return 1;
|
||||
fi
|
||||
Recipient="Device.LocalAgent.Controller.${val}"
|
||||
fi
|
||||
|
||||
subs_num=$(( subs_num + 1))
|
||||
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.Alias "cpe-${subs_num}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.ID "${ID}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.NotifType "${NotifType}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.ReferenceList "${ReferenceList}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.Persistent "${Persistent}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.Recipient "${Recipient}"
|
||||
}
|
||||
|
||||
configure_mtp() {
|
||||
local protocol enable destination CoAPPath CoAPPort
|
||||
local Enable Protocol Reference ResponseTopicConfigured PublishQoS
|
||||
local stomp mqtt
|
||||
|
||||
validate_mtp_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
log "Validation of mtp section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
if [ -z ${Reference} ]; then
|
||||
if [ ${Protocol} = "STOMP" ]; then
|
||||
val=$(get_uci_ref_index stomp ${stomp})
|
||||
if [ ${val} -eq 0 ]; then
|
||||
log "Referred stomp section not found"
|
||||
return 1;
|
||||
fi
|
||||
Reference="Device.STOMP.Connection.${val}"
|
||||
elif [ ${Protocol} = "MQTT" ]; then
|
||||
val=$(get_uci_ref_index mqtt ${mqtt})
|
||||
if [ ${val} -eq 0 ]; then
|
||||
log "Referred mqtt section not found"
|
||||
return 1;
|
||||
fi
|
||||
Reference="Device.MQTT.Client.${val}"
|
||||
fi
|
||||
fi
|
||||
mtp_num=$(( mtp_num + 1 ))
|
||||
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.Alias "cpe-${mtp_num}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.Enable "${enable}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.Protocol "${protocol}"
|
||||
if [ "${protocol}"=="STOMP" ]; then
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.STOMP.Reference "Device.STOMP.Connection.${mtp_num}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.STOMP.Destination "${destination}"
|
||||
elif [ "${protocol}"=="CoAP" ]; then
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Path "${CoAPPath}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Port "${CoAPPort}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.Protocol "${Protocol}"
|
||||
if [ "${Protocol}" = "MQTT" ]; then
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.MQTT.Reference "${Reference}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.MQTT.ResponseTopicConfigured "${ResponseTopicConfigured}"
|
||||
if [ -n "${PublishQoS}" ]; then
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.MQTT.PublishQoS "${PublishQoS}"
|
||||
fi
|
||||
elif [ "${Protocol}" = "STOMP" ]; then
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.STOMP.Reference "${Reference}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.STOMP.Destination "${Destination}"
|
||||
elif [ "${Protocol}" = "CoAP" ]; then
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Path "${coap_path}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Port "${coap_port}"
|
||||
else
|
||||
log "Unsupported protocol ${protocol}"
|
||||
log "Unsupported Protocol ${Protocol} in mtp"
|
||||
fi
|
||||
db_set
|
||||
mtp_num=$((mtp_num+1))
|
||||
}
|
||||
|
||||
configure_connection() {
|
||||
local host username password encryption enable port virtualhost EnableHeartbeats
|
||||
configure_stomp_connection() {
|
||||
local Host Username Password Enable Port VirtualHost EnableHeartbeats
|
||||
local OutgoingHeartbeat IncomingHeartbeat ServerRetryInitialInterval
|
||||
local ServerRetryIntervalMultiplier ServerRetryMaxInterval
|
||||
local encryption
|
||||
|
||||
validate_connection_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
validate_stomp_connection_section "${1}" || {
|
||||
log "Validation of stomp section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Host "${host}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Username "${username}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Password "${password}"
|
||||
stomp_num=$(( stomp_num + 1 ))
|
||||
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Host "${Host}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Username "${Username}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Password "${Password}"
|
||||
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Alias "cpe-${stomp_num}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Enable "${enable}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Port "${port}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Enable "${Enable}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Port "${Port}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.X_ARRIS-COM_EnableEncryption "${encryption}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.VirtualHost "${virtualhost}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.VirtualHost "${VirtualHost}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.EnableHeartbeats "${EnableHeartbeats}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.OutgoingHeartbeat "${OutgoingHeartbeat}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.IncomingHeartbeat "${IncomingHeartbeat}"
|
||||
@@ -162,20 +375,51 @@ configure_connection() {
|
||||
db_set Device.STOMP.Connection.${stomp_num}.ServerRetryIntervalMultiplier "${ServerRetryIntervalMultiplier}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.ServerRetryMaxInterval "${ServerRetryMaxInterval}"
|
||||
db_set
|
||||
stomp_num=$((stomp_num+1))
|
||||
}
|
||||
|
||||
configure_obuspa() {
|
||||
local enable cert interface debug log_level log_dest
|
||||
configure_mqtt_client(){
|
||||
local BrokerAddress BrokerPort Enable Username Password ProtocolVersion KeepAliveTime
|
||||
local TransportProtocol ConnectRetryTime ConnectRetryMaxInterval ConnectRetryIntervalMultiplier
|
||||
|
||||
validate_obuspa_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
validate_mqtt_client_section "${1}" || {
|
||||
log "Validation of mqtt section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
[ ${enable} -eq 0 ] && \
|
||||
echo "obuspa not enabled" >>/dev/console && \
|
||||
exit
|
||||
if [ -z "${BrokerAddress}" ]; then
|
||||
log "Broker address can not be empty for mqtt"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
mqtt_num=$(( mqtt_num + 1 ))
|
||||
|
||||
db_set Device.MQTT.Client.${mqtt_num}.Alias "cpe-${mqtt_num}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.Enable "${Enable}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.BrokerAddress "${BrokerAddress}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.BrokerPort "${BrokerPort}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.Username "${Username}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.Password "${Password}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.ProtocolVersion "${ProtocolVersion}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.TransportProtocol "${TransportProtocol}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.KeepAliveTime "${KeepAliveTime}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.ClientID "${ClientID}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.ConnectRetryTime "${ConnectRetryTime}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.ConnectRetryIntervalMultiplier "${ConnectRetryIntervalMultiplier}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.ConnectRetryMaxInterval "${ConnectRetryMaxInterval}"
|
||||
|
||||
db_set
|
||||
}
|
||||
|
||||
|
||||
configure_obuspa() {
|
||||
local enabled trust_cert ifname interface debug log_level db_file log_dest
|
||||
|
||||
validate_obuspa_section "global" || {
|
||||
log "Validation of global section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
[ ${enabled} -eq 0 ] && exit 0
|
||||
|
||||
if [ ${debug} -eq 1 ]; then
|
||||
# Forward stdout of the command to logd
|
||||
@@ -184,42 +428,112 @@ configure_obuspa() {
|
||||
procd_set_param stderr 1
|
||||
procd_append_param command -p
|
||||
fi
|
||||
procd_append_param command -v ${log_level} -l ${log_dest}
|
||||
|
||||
# Get wan L3 interface
|
||||
json_load "$(ubus -t 2 call network.interface.${interface} status)"
|
||||
json_get_var l3device l3_device
|
||||
export USP_BOARD_IFNAME=${l3device}
|
||||
if [ -n ${log_level} ]; then
|
||||
procd_append_param command -v ${log_level}
|
||||
fi
|
||||
|
||||
# Set this variable for root user
|
||||
grep -q USP_BOARD_IFNAME /root/.profile || \
|
||||
echo "export USP_BOARD_IFNAME=${l3device}" >> /root/.profile
|
||||
if [ -n "${log_dest}" ]; then
|
||||
procd_append_param command -l ${log_dest}
|
||||
fi
|
||||
|
||||
[ -f $cert ] && certificate=$cert
|
||||
if [ -n "${interface}" ]; then
|
||||
network_get_device ifname ${interface}
|
||||
log "ifname from ${interface} is ${ifname}"
|
||||
fi
|
||||
|
||||
# Set this variable for root user and obuspa -c tool
|
||||
grep -q "export USP_BOARD_IFNAME=${ifname}" /root/.profile || \
|
||||
echo "export USP_BOARD_IFNAME=${ifname}" >> /root/.profile
|
||||
|
||||
if [ -n "${db_file}" ]; then
|
||||
echo "${db_file}" >>${KEEP_FILES}
|
||||
procd_append_param command -f ${db_file}
|
||||
fi
|
||||
|
||||
if [ -n "${trust_cert}" ]; then
|
||||
echo "${trust_cert}" >>${KEEP_FILES}
|
||||
if [ -f "${trust_cert}" ]; then
|
||||
procd_append_param command -t ${trust_cert}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${client_cert}" ]; then
|
||||
echo "${client_cert}" >>${KEEP_FILES}
|
||||
if [ -f "${client_cert}" ]; then
|
||||
procd_append_param command -a ${client_cert}
|
||||
fi
|
||||
fi
|
||||
|
||||
procd_set_param env USP_BOARD_IFNAME=${ifname}
|
||||
}
|
||||
|
||||
# Create factory reset file
|
||||
db_init() {
|
||||
[ -f ${PARAM_FILE} ] && rm -f ${PARAM_FILE}
|
||||
[ -f /tmp/usp.db ] && rm -f /tmp/usp.db
|
||||
[ -f ${KEEP_FILES} ] && rm -f ${KEEP_FILES}
|
||||
|
||||
config_load obuspa
|
||||
# Load configuration
|
||||
config_load $CONFIGURATION
|
||||
config_foreach configure_obuspa obuspa
|
||||
config_foreach configure_controller controller
|
||||
config_foreach configure_connection connection
|
||||
config_foreach configure_localagent localagent
|
||||
config_foreach configure_mtp mtp
|
||||
config_foreach configure_stomp_connection stomp
|
||||
config_foreach configure_mqtt_client mqtt
|
||||
config_foreach configure_subscription subscription
|
||||
|
||||
db_set Internal.Reboot.Cause "LocalFactoryReset"
|
||||
}
|
||||
|
||||
# if uci changes for obuspa remove persistent db and then reload
|
||||
remove_db() {
|
||||
local db_file
|
||||
|
||||
config_load obuspa
|
||||
config_get db_file global db_file
|
||||
|
||||
log "Removing db file (${db_file})"
|
||||
[ -f ${db_file} ] && rm -f ${db_file}
|
||||
|
||||
sed -i "g/export USP_BOARD_IFNAME/d" /root/.profile
|
||||
|
||||
log "Restarting service"
|
||||
stop
|
||||
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 obuspa
|
||||
procd_set_param env USP_BOARD_IFNAME=${l3device}
|
||||
procd_open_instance ${CONFIGURATION}
|
||||
procd_set_param command ${PROG}
|
||||
db_init
|
||||
procd_append_param command -r ${PARAM_FILE}
|
||||
if [ -f "${certificate}" ]; then
|
||||
procd_append_param command -t ${certificate}
|
||||
fi
|
||||
procd_set_param respawn
|
||||
procd_set_param respawn \
|
||||
${respawn_threshold:-5} \
|
||||
${respawn_timeout:-10} ${respawn_retry:-3}
|
||||
|
||||
procd_set_param watch usp.raw
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
@@ -233,5 +547,33 @@ reload_service() {
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_config_trigger "config.change" "obuspa" /etc/init.d/obuspa restart
|
||||
procd_add_reload_trigger "uspd" "mosquitto"
|
||||
procd_add_config_trigger "config.change" "${CONFIGURATION}" /etc/init.d/obuspa remove_db
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2013 Inteno
|
||||
# Copyright (C) 2020 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
|
||||
PKG_VERSION:=1.0.5
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=0513e171013512bc14ef8b650c715e3fd9c59820
|
||||
PKG_SOURCE_VERSION:=dd4a72aca663bf3c9a57f20e889e43a55d3da1b3
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/peripheral-manager
|
||||
|
||||
@@ -51,7 +51,7 @@ TARGET_CFLAGS := \
|
||||
|
||||
PERIPHERAL_OPTONS:=-DSELECT_BRCM_BOARD=0
|
||||
|
||||
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm)$(CONFIG_TARGET_iopsys_brcm63xx_mips),)
|
||||
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
|
||||
PERIPHERAL_OPTONS:= -DSELECT_BRCM_BOARD=1
|
||||
endif
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@ populate_config(){
|
||||
done
|
||||
|
||||
uci commit ports
|
||||
|
||||
[ $DEBUG ] && cat /etc/config/ports
|
||||
}
|
||||
|
||||
[ -f /sbin/db -a -f /lib/db/config/hw ] && populate_config
|
||||
[ -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() {
|
||||
|
||||
@@ -24,15 +24,17 @@ generate_queue(){
|
||||
fi
|
||||
|
||||
i=0
|
||||
local total_q=$((${no_of_q##* } + 1))
|
||||
for i in $no_of_q; do
|
||||
order=$((total_q - i))
|
||||
uci add qos queue
|
||||
uci rename qos.@queue[-1]="q_${i}_${ifname}"
|
||||
uci set qos.@queue[-1].enable="1"
|
||||
uci set qos.@queue[-1].ifname="$ifname"
|
||||
uci set qos.@queue[-1].precedence="$i"
|
||||
uci set qos.@queue[-1].precedence="$order"
|
||||
uci set qos.@queue[-1].scheduling="SP"
|
||||
uci set qos.@queue[-1].rate="0"
|
||||
uci set qos.@queue[-1].burst_size="-1"
|
||||
uci set qos.@queue[-1].burst_size="0"
|
||||
uci set qos.@queue[-1].weight="1"
|
||||
done
|
||||
|
||||
|
||||
@@ -3,30 +3,144 @@
|
||||
|
||||
IP_RULE=""
|
||||
BR_RULE=""
|
||||
is_bcm968=0
|
||||
|
||||
POLICER_SKIP=0
|
||||
POLICER_COUNT=0
|
||||
INTF_NAME=""
|
||||
Q_COUNT=0
|
||||
ITER=0
|
||||
PREV_ORDER=""
|
||||
CURR_ORDER=""
|
||||
MAX_ORDER=""
|
||||
|
||||
#function to handle a queue section
|
||||
handle_queue() {
|
||||
# Function to handle a queue order and
|
||||
# update total number of queues
|
||||
handle_q_order() {
|
||||
qid="$1" #queue section ID
|
||||
|
||||
config_get is_enable "$qid" "enable"
|
||||
|
||||
#no need to configure disabled queues
|
||||
# No need to configure disabled queues
|
||||
if [ $is_enable == '0' ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
config_get ifname "$qid" "ifname"
|
||||
#if ifname is empty that is good enough to break
|
||||
# If ifname is empty that is good enough to break
|
||||
if [ -z "$ifname" ];then
|
||||
return
|
||||
fi
|
||||
|
||||
# Create precedence file containing queue order per
|
||||
# interface.
|
||||
local precedence_file="/tmp/qos/$ifname/q_order"
|
||||
local q_no=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
|
||||
#lower the value, lower the priority of queue on this chip
|
||||
config_get order "$qid" "precedence"
|
||||
|
||||
config_get precedence "$qid" "precedence"
|
||||
value=${precedence}_q${q_no}
|
||||
echo $value >> $precedence_file
|
||||
|
||||
# Update the number of queues per interface.
|
||||
q_no=$((q_no + 1))
|
||||
echo $q_no > /tmp/qos/queue_stats/$ifname/q_idx
|
||||
}
|
||||
|
||||
# Function to check if values are greater than (total number
|
||||
# of queue -1) and map them to corresponding value.
|
||||
configure_precedence_to_file() {
|
||||
order="$1"
|
||||
line="$2"
|
||||
order_file="$3"
|
||||
|
||||
if [ $order == $PREV_ORDER ]; then
|
||||
queue_id=${line#*_}
|
||||
val=${CURR_ORDER}_${queue_id}
|
||||
echo $val >> $order_file
|
||||
else
|
||||
PREV_ORDER=$order
|
||||
queue_id=${line#*_}
|
||||
val=${MAX_ORDER}_${queue_id}
|
||||
echo $val >> $order_file
|
||||
CURR_ORDER=$MAX_ORDER
|
||||
MAX_ORDER=$((MAX_ORDER - 1))
|
||||
fi
|
||||
}
|
||||
|
||||
# Fucntion to map queue precedence per interface
|
||||
# ranging from 1-X to 0-(no of queues -1)
|
||||
map_queue_precedence() {
|
||||
ifname="$1"
|
||||
total_q=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
|
||||
q_no=`expr $total_q - 1`
|
||||
|
||||
MAX_ORDER=$q_no
|
||||
|
||||
local precedence_file="/tmp/qos/$ifname/q_precedence"
|
||||
local order_file="/tmp/qos/$ifname/q_order"
|
||||
|
||||
sort -n -r -k1 $order_file >> $precedence_file
|
||||
rm $order_file
|
||||
|
||||
while read line
|
||||
do
|
||||
order=${line%_*}
|
||||
if [ $order -gt $q_no ]; then
|
||||
ITER=$((ITER + 1))
|
||||
configure_precedence_to_file $order $line $order_file
|
||||
else
|
||||
if [ $ITER == '0' ]; then
|
||||
echo $line >> $order_file
|
||||
else
|
||||
configure_precedence_to_file $order $line $order_file
|
||||
fi
|
||||
fi
|
||||
|
||||
done < $precedence_file
|
||||
}
|
||||
|
||||
map_precedence() {
|
||||
for interf in $(db -q get hw.board.ethernetPortOrder); do
|
||||
map_queue_precedence $interf
|
||||
done
|
||||
}
|
||||
|
||||
# function to handle a queue section
|
||||
handle_queue() {
|
||||
qid="$1" #queue section ID
|
||||
|
||||
config_get is_enable "$qid" "enable"
|
||||
|
||||
# no need to configure disabled queues
|
||||
if [ $is_enable == '0' ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
config_get ifname "$qid" "ifname"
|
||||
# if ifname is empty that is good enough to break
|
||||
if [ -z "$ifname" ];then
|
||||
return
|
||||
fi
|
||||
|
||||
# This is to get the qid per interface.
|
||||
if [ $INTF_NAME == $ifname ]; then
|
||||
Q_COUNT=$((Q_COUNT + 1))
|
||||
else
|
||||
Q_COUNT='0'
|
||||
fi
|
||||
|
||||
INTF_NAME=$ifname
|
||||
|
||||
local total_q=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
|
||||
q_no=`expr $total_q - 1` local
|
||||
precedence_file="/tmp/qos/$ifname/q_order"
|
||||
|
||||
# TR181 suggests lower the precedence value higher the priority
|
||||
# but in the chip its the opposite ie lower the value, lower
|
||||
# the priority of queue on this chip. So we need to reverse the
|
||||
# precedence value.
|
||||
precedence="$(grep -i q${Q_COUNT} $precedence_file)"
|
||||
precedence=${precedence%_*}
|
||||
order=`expr $q_no - $precedence`
|
||||
|
||||
config_get sc_alg "$qid" "scheduling"
|
||||
config_get wgt "$qid" "weight"
|
||||
@@ -47,12 +161,17 @@ handle_queue() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# ignore precedence value in case of WRR
|
||||
if [ $salg -eq 2 ]; then
|
||||
order=0
|
||||
fi
|
||||
|
||||
# Call tmctl which is a broadcomm command to configure queues on a port.
|
||||
tmctl setqcfg --devtype 0 --if $ifname --qid $q_no --priority $order --qsize $qsize --weight $wgt --schedmode $salg --shapingrate $rate --burstsize $bs
|
||||
tmctl setqcfg --devtype 0 --if $ifname --qid $Q_COUNT --priority $order --qsize $qsize --weight $wgt --schedmode $salg --shapingrate $rate --burstsize $bs
|
||||
|
||||
# In BCM968 chips, the counters for queues are read, on other model, its read and reset. So, to maintain counter
|
||||
# value and uniform behaviour, we are storing counter value for each queue in files
|
||||
local d_name="/tmp/qos/queue_stats/${ifname}/q_${q_no}"
|
||||
local d_name="/tmp/qos/queue_stats/${ifname}/q_${Q_COUNT}"
|
||||
mkdir $d_name
|
||||
local f_name="$d_name/txPackets"
|
||||
touch $f_name
|
||||
@@ -67,8 +186,6 @@ handle_queue() {
|
||||
touch $f_name
|
||||
echo 0 > $f_name
|
||||
|
||||
q_no=$((q_no + 1))
|
||||
echo $q_no > /tmp/qos/queue_stats/$ifname/q_idx
|
||||
}
|
||||
|
||||
#function to handle a policer section
|
||||
@@ -528,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
|
||||
}
|
||||
|
||||
@@ -589,7 +715,7 @@ handle_policer_rules() {
|
||||
fi
|
||||
|
||||
# The policer object is not available on non BCM968* chips
|
||||
if [ $is_bcm968 -eq 1 ]; then
|
||||
if [ $POLICER_SKIP -eq 1 ]; then
|
||||
assign_policer_to_port $ifname $pindex
|
||||
else
|
||||
config_ingress_rate_limit $ifname $ingress_rate $in_burst_size
|
||||
@@ -685,6 +811,8 @@ configure_queue() {
|
||||
rm -rf /tmp/qos/queue_stats
|
||||
|
||||
for intf in $(db get hw.board.ethernetPortOrder); do
|
||||
rm -rf /tmp/qos/$intf
|
||||
|
||||
mkdir -p /tmp/qos/queue_stats/$intf
|
||||
touch /tmp/qos/queue_stats/$intf/q_idx
|
||||
echo 0 > /tmp/qos/queue_stats/$intf/q_idx
|
||||
@@ -692,17 +820,23 @@ configure_queue() {
|
||||
for i in 0 1 2 3 4 5 6 7; do
|
||||
tmctl delqcfg --devtype 0 --if $intf --qid $i &>/dev/null
|
||||
done
|
||||
|
||||
mkdir -p /tmp/qos/$intf
|
||||
touch /tmp/qos/$intf/q_order
|
||||
touch /tmp/qos/$intf/q_precedence
|
||||
done
|
||||
|
||||
# Load UCI file
|
||||
config_load qos
|
||||
config_foreach handle_q_order queue
|
||||
map_precedence
|
||||
config_foreach handle_queue queue
|
||||
}
|
||||
|
||||
configure_policer() {
|
||||
# The policer object is not available on non BCM968* chips, just clean up
|
||||
# the old config if any and return
|
||||
if [ $is_bcm968 -eq 0 ]; then
|
||||
if [ $POLICER_SKIP -eq 0 ]; then
|
||||
for intf in $(db get hw.board.ethernetPortOrder); do
|
||||
# setting rate and burst size to 0 disables rate limiting
|
||||
ethswctl -c rxratectrl -n 1 -p $intf -x 0 -y 0
|
||||
@@ -743,10 +877,10 @@ configure_qos() {
|
||||
|
||||
reload_qos() {
|
||||
local service_name="$1"
|
||||
local cpu_model="$(grep Hardware /proc/cpuinfo | awk '{print$NF}')"
|
||||
local cpu_model="$(brcm_fw_tool -k info)"
|
||||
|
||||
case $cpu_model in
|
||||
BCM968*) is_bcm968=1 ;;
|
||||
68*|6755) POLICER_SKIP=1 ;;
|
||||
esac
|
||||
|
||||
if [ -z "$service_name" ]; then
|
||||
@@ -761,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 [ $is_bcm968 -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 [ $is_bcm968 -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 [ $is_bcm968 -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="$(grep Hardware /proc/cpuinfo | awk '{print$NF}')"
|
||||
|
||||
case $cpu_model in
|
||||
BCM968*) is_bcm968=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
|
||||
|
||||
@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=5.1.12
|
||||
PKG_VERSION:=5.2.1
|
||||
|
||||
PKG_SOURCE_VERSION:=5de841c629d13bd8a5b90081343aaf5b75afc7c2
|
||||
PKG_SOURCE_VERSION:=d554541ac6fb8ef14431fcec9a31dbcb52181279
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_INSTALL:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/rulengd.git
|
||||
PKG_SOURCE_VERSION:=d7a4d24e653ea0dc02679e24f8ec3c817aafdb37
|
||||
PKG_SOURCE_VERSION:=ad94ccdd82b22527ab32937ca1a2682030319ed3
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_INSTALL:=1
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=swmodd
|
||||
PKG_VERSION:=1.0.2
|
||||
PKG_VERSION:=1.1.0
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=3bfc97cd6f8e22f561601c47b79203b17fdb0fbe
|
||||
PKG_SOURCE_VERSION:=c8cc4a3b332ea931dbf2fe7e6b94bebf5c4bcc33
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/swmodd.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
@@ -21,7 +21,7 @@ define Package/swmodd
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=SWMOD - software modules ubus backend
|
||||
DEPENDS:=+libuci +libubox +ubus +libuuid
|
||||
DEPENDS:=+libuci +libubox +ubus +libuuid +PACKAGE_liblxc:liblxc
|
||||
endef
|
||||
|
||||
define Package/swmodd/description
|
||||
@@ -32,6 +32,11 @@ TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_liblxc),y)
|
||||
MAKE_FLAGS += \
|
||||
SWMOD_LXC="yes"
|
||||
endif
|
||||
|
||||
define Package/swmodd/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/swmodd.init $(1)/etc/init.d/swmodd
|
||||
|
||||
107
tr064/.cproject
107
tr064/.cproject
@@ -1,107 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.1423203916">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1423203916" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1423203916" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1423203916." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.482080998" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1864775892" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/tr064}/Debug" id="cdt.managedbuild.builder.gnu.cross.84968765" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.912678595" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.732187738" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.406132207" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.656190220" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.894741631" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1987025848" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1506505331" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1176314661" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1134635640" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1076025733" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.862614592" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.638528350" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.390953300" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.517635632">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.517635632" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.517635632" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.517635632." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.2086871607" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1691338213" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/tr064}/Release" id="cdt.managedbuild.builder.gnu.cross.2045398730" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.804948441" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.422910401" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1240870180" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.118715116" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.119838407" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.198417757" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.380023243" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.751400281" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.398459196" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1354328537" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1258554594" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.2022763402" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1223740654" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="tr064.cdt.managedbuild.target.gnu.cross.exe.1457888368" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1423203916;cdt.managedbuild.config.gnu.cross.exe.debug.1423203916.;cdt.managedbuild.tool.gnu.cross.c.compiler.912678595;cdt.managedbuild.tool.gnu.c.compiler.input.656190220">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.517635632;cdt.managedbuild.config.gnu.cross.exe.release.517635632.;cdt.managedbuild.tool.gnu.cross.c.compiler.804948441;cdt.managedbuild.tool.gnu.c.compiler.input.118715116">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>tr064</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>openssl-1.0.2i</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<configuration id="cdt.managedbuild.config.gnu.cross.exe.debug.1423203916" name="Debug">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1404192411374960532" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
<configuration id="cdt.managedbuild.config.gnu.cross.exe.release.517635632" name="Release">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1404192411374960532" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
</project>
|
||||
@@ -1,82 +0,0 @@
|
||||
# Copyright (C) 2017 PIVA Software <www.pivasoftware.com>
|
||||
# Author: OMAR Kallel <omar.kallel@pivasoftware.com>
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tr064
|
||||
PKG_VERSION:=1.0
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/suite/tr-064.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=e53d492a09c433718a520987c419cb6a4d4ae8dc
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=LGPL-2.1-only Apache-2.0
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_TR064_DEBUG \
|
||||
CONFIG_TR064_DEVEL
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/tr064
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=tr064
|
||||
DEPENDS:=+libubus +libuci +libubox +libmicroxml +libjson-c +libpthread +libopenssl +libubus +libubox
|
||||
endef
|
||||
|
||||
define Package/tr064/description
|
||||
TR-064 protocol
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
TARGET_LDFLAGS += \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-uci-include-path=$(STAGING_DIR)/usr/include \
|
||||
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
|
||||
--with-libubus-include-path=$(STAGING_DIR)/usr/include
|
||||
|
||||
ifeq ($(CONFIG_TR064_DEBUG),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-debug
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TR064_DEVEL),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-devel
|
||||
endif
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-jsonc=1
|
||||
|
||||
define Package/tr064/conffiles
|
||||
/etc/config/tr064
|
||||
endef
|
||||
|
||||
define Package/tr064/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/upnp-md
|
||||
$(INSTALL_DIR) $(1)/etc/upnp-md/web
|
||||
$(INSTALL_DIR) $(1)/etc/upnp-md/x509
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/upnp-md-pupnp/upnp-md $(1)/usr/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/web/*.xml $(1)/etc/upnp-md/web
|
||||
$(CP) $(PKG_BUILD_DIR)/tools/parse_ftp_server_log.sh $(1)/usr/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/tools/kill_child.sh $(1)/usr/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/x509/*.pem $(1)/etc/upnp-md/x509
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/upnp-md.conf $(1)/etc/upnp-md
|
||||
$(CP) $(PKG_BUILD_DIR)/conf/DMconf.xml $(1)/etc/upnp-md
|
||||
$(CP) $(PKG_BUILD_DIR)/conf/CPID.csv $(1)/etc/upnp-md
|
||||
$(CP) $(PKG_BUILD_DIR)/conf/tr064 $(1)/etc/config
|
||||
$(CP) $(PKG_BUILD_DIR)/conf/tr064d $(1)/etc/init.d
|
||||
chmod 0744 $(1)/etc/init.d/tr064d
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,tr064))
|
||||
@@ -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))
|
||||
@@ -29,7 +29,7 @@ static char *get_last_instance_with_option(char *package, char *section, char *o
|
||||
char *inst = NULL;
|
||||
|
||||
uci_foreach_option_eq(package, section, option, val, s) {
|
||||
inst = update_instance(inst, 4, s, opt_inst, package, section);
|
||||
inst = update_instance(inst, 2, s, opt_inst);
|
||||
}
|
||||
return inst;
|
||||
}
|
||||
@@ -47,25 +47,19 @@ 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;
|
||||
char *value1, *last_inst, *id;
|
||||
struct uci_section *connection = NULL;
|
||||
|
||||
last_inst = get_last_instance_with_option("twamp", "twamp_reflector", "interface", section_name(((struct ip_args *)data)->ip_sec), "twamp_inst");
|
||||
id = get_last_id("twamp", "twamp_reflector");
|
||||
dmuci_add_section("twamp", "twamp_reflector", &connection, &value1);
|
||||
dmasprintf(instance, "%d", last_inst?atoi(last_inst)+1:1);
|
||||
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);
|
||||
dmasprintf(instance, "%d", last_inst ? atoi(last_inst)+1 : 1);
|
||||
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);
|
||||
@@ -103,7 +96,7 @@ static int delObjIPInterfaceTWAMPReflector(char *refparam, struct dmctx *ctx, vo
|
||||
|
||||
static int get_IPInterfaceTWAMPReflector_Enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "enable", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "enable", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -194,7 +187,7 @@ static int set_IPInterfaceTWAMPReflector_Alias(char *refparam, struct dmctx *ctx
|
||||
|
||||
static int get_IPInterfaceTWAMPReflector_Port(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "port", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "port", "862");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -214,7 +207,7 @@ static int set_IPInterfaceTWAMPReflector_Port(char *refparam, struct dmctx *ctx,
|
||||
|
||||
static int get_IPInterfaceTWAMPReflector_MaximumTTL(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "max_ttl", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "max_ttl", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -277,10 +270,10 @@ 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, 5,
|
||||
s, "twamp_inst", "twamp_alias", "twamp", "twamp_reflector");
|
||||
inst = handle_update_instance(2, dmctx, &max_inst, update_instance_alias, 3,
|
||||
s, "twamp_inst", "twamp_alias");
|
||||
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)s, inst) == DM_STOP)
|
||||
break;
|
||||
@@ -290,20 +283,20 @@ static int browseIPInterfaceTWAMPReflectorInst(struct dmctx *dmctx, DMNODE *pare
|
||||
|
||||
/* *** Device.IP.Interface. *** */
|
||||
DMOBJ tDeviceTWAMPReflectorObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"TWAMPReflector", &DMWRITE, addObjIPInterfaceTWAMPReflector, delObjIPInterfaceTWAMPReflector, NULL, browseIPInterfaceTWAMPReflectorInst, NULL, NULL, NULL, NULL, tIPInterfaceTWAMPReflectorParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"TWAMPReflector", &DMWRITE, addObjIPInterfaceTWAMPReflector, delObjIPInterfaceTWAMPReflector, NULL, browseIPInterfaceTWAMPReflectorInst, NULL, NULL, tIPInterfaceTWAMPReflectorParams, NULL, BBFDM_BOTH, LIST_KEY{"Alias", "Port", NULL}},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.IP.Interface.{i}.TWAMPReflector.{i}. *** */
|
||||
DMLEAF tIPInterfaceTWAMPReflectorParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_IPInterfaceTWAMPReflector_Enable, set_IPInterfaceTWAMPReflector_Enable, NULL, NULL, BBFDM_BOTH},
|
||||
{"Status", &DMREAD, DMT_STRING, get_IPInterfaceTWAMPReflector_Status, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_IPInterfaceTWAMPReflector_Alias, set_IPInterfaceTWAMPReflector_Alias, NULL, NULL, BBFDM_BOTH},
|
||||
{"Port", &DMWRITE, DMT_UNINT, get_IPInterfaceTWAMPReflector_Port, set_IPInterfaceTWAMPReflector_Port, NULL, NULL, BBFDM_BOTH},
|
||||
{"MaximumTTL", &DMWRITE, DMT_UNINT, get_IPInterfaceTWAMPReflector_MaximumTTL, set_IPInterfaceTWAMPReflector_MaximumTTL, NULL, NULL, BBFDM_BOTH},
|
||||
{"IPAllowedList", &DMWRITE, DMT_STRING, get_IPInterfaceTWAMPReflector_IPAllowedList, set_IPInterfaceTWAMPReflector_IPAllowedList, NULL, NULL, BBFDM_BOTH},
|
||||
{"PortAllowedList", &DMWRITE, DMT_STRING, get_IPInterfaceTWAMPReflector_PortAllowedList, set_IPInterfaceTWAMPReflector_PortAllowedList, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_IPInterfaceTWAMPReflector_Enable, set_IPInterfaceTWAMPReflector_Enable, BBFDM_BOTH},
|
||||
{"Status", &DMREAD, DMT_STRING, get_IPInterfaceTWAMPReflector_Status, NULL, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_IPInterfaceTWAMPReflector_Alias, set_IPInterfaceTWAMPReflector_Alias, BBFDM_BOTH},
|
||||
{"Port", &DMWRITE, DMT_UNINT, get_IPInterfaceTWAMPReflector_Port, set_IPInterfaceTWAMPReflector_Port, BBFDM_BOTH},
|
||||
{"MaximumTTL", &DMWRITE, DMT_UNINT, get_IPInterfaceTWAMPReflector_MaximumTTL, set_IPInterfaceTWAMPReflector_MaximumTTL, BBFDM_BOTH},
|
||||
{"IPAllowedList", &DMWRITE, DMT_STRING, get_IPInterfaceTWAMPReflector_IPAllowedList, set_IPInterfaceTWAMPReflector_IPAllowedList, BBFDM_BOTH},
|
||||
{"PortAllowedList", &DMWRITE, DMT_STRING, get_IPInterfaceTWAMPReflector_PortAllowedList, set_IPInterfaceTWAMPReflector_PortAllowedList, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ LIB_MAP_OBJ tRootDynamicObj[] = {
|
||||
|
||||
static int get_IPDiagnosticsUDPEchoConfig_Enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_option_value_string("udpechoserver", "udpechoserver", "enable", value);
|
||||
*value = dmuci_get_option_value_fallback_def("udpechoserver", "udpechoserver", "enable", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ static int set_IPDiagnosticsUDPEchoConfig_SourceIPAddress(char *refparam, struct
|
||||
|
||||
static int get_IPDiagnosticsUDPEchoConfig_UDPPort(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_option_value_string("udpechoserver", "udpechoserver", "server_port", value);
|
||||
*value = dmuci_get_option_value_fallback_def("udpechoserver", "udpechoserver", "server_port", "0");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ static int set_IPDiagnosticsUDPEchoConfig_UDPPort(char *refparam, struct dmctx *
|
||||
|
||||
static int get_IPDiagnosticsUDPEchoConfig_EchoPlusEnabled(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_option_value_string("udpechoserver", "udpechoserver", "plus", value);
|
||||
*value = dmuci_get_option_value_fallback_def("udpechoserver", "udpechoserver", "plus", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ static int get_IPDiagnosticsUDPEchoConfig_EchoPlusSupported(char *refparam, stru
|
||||
static inline char *udpechoconfig_get(char *option, char *def)
|
||||
{
|
||||
char *tmp;
|
||||
dmuci_get_varstate_string("udpechoserver", "udpechoserver", option, &tmp);
|
||||
varstate_get_value_string("udpechoserver", "udpechoserver", option, &tmp);
|
||||
if(tmp && tmp[0] == '\0')
|
||||
return dmstrdup(def);
|
||||
else
|
||||
@@ -177,37 +177,37 @@ static int get_IPDiagnosticsUDPEchoConfig_BytesResponded(char *refparam, struct
|
||||
|
||||
static int get_IPDiagnosticsUDPEchoConfig_TimeFirstPacketReceived(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
*value = udpechoconfig_get("TimeFirstPacketReceived", "0");
|
||||
*value = udpechoconfig_get("TimeFirstPacketReceived", "0001-01-01T00:00:00.000000Z");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_IPDiagnosticsUDPEchoConfig_TimeLastPacketReceived(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
*value = udpechoconfig_get("TimeLastPacketReceived", "0");
|
||||
*value = udpechoconfig_get("TimeLastPacketReceived", "0001-01-01T00:00:00.000000Z");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* *** Device.IP.Diagnostics. *** */
|
||||
DMOBJ tDeviceUDPEchoConfigObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"UDPEchoConfig", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tIPDiagnosticsUDPEchoConfigParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"UDPEchoConfig", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, tIPDiagnosticsUDPEchoConfigParams, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.IP.Diagnostics.UDPEchoConfig. *** */
|
||||
DMLEAF tIPDiagnosticsUDPEchoConfigParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_IPDiagnosticsUDPEchoConfig_Enable, set_IPDiagnosticsUDPEchoConfig_Enable, NULL, NULL, BBFDM_BOTH},
|
||||
{"Interface", &DMWRITE, DMT_STRING, get_IPDiagnosticsUDPEchoConfig_Interface, set_IPDiagnosticsUDPEchoConfig_Interface, NULL, NULL, BBFDM_BOTH},
|
||||
{"SourceIPAddress", &DMWRITE, DMT_STRING, get_IPDiagnosticsUDPEchoConfig_SourceIPAddress, set_IPDiagnosticsUDPEchoConfig_SourceIPAddress, NULL, NULL, BBFDM_BOTH},
|
||||
{"UDPPort", &DMWRITE, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_UDPPort, set_IPDiagnosticsUDPEchoConfig_UDPPort, NULL, NULL, BBFDM_BOTH},
|
||||
{"EchoPlusEnabled", &DMWRITE, DMT_BOOL, get_IPDiagnosticsUDPEchoConfig_EchoPlusEnabled, set_IPDiagnosticsUDPEchoConfig_EchoPlusEnabled, NULL, NULL, BBFDM_BOTH},
|
||||
{"EchoPlusSupported", &DMREAD, DMT_BOOL, get_IPDiagnosticsUDPEchoConfig_EchoPlusSupported, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"PacketsReceived", &DMREAD, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_PacketsReceived, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"PacketsResponded", &DMREAD, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_PacketsResponded, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"BytesReceived", &DMREAD, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_BytesReceived, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"BytesResponded", &DMREAD, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_BytesResponded, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"TimeFirstPacketReceived", &DMREAD, DMT_TIME, get_IPDiagnosticsUDPEchoConfig_TimeFirstPacketReceived, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"TimeLastPacketReceived", &DMREAD, DMT_TIME, get_IPDiagnosticsUDPEchoConfig_TimeLastPacketReceived, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_IPDiagnosticsUDPEchoConfig_Enable, set_IPDiagnosticsUDPEchoConfig_Enable, BBFDM_BOTH},
|
||||
{"Interface", &DMWRITE, DMT_STRING, get_IPDiagnosticsUDPEchoConfig_Interface, set_IPDiagnosticsUDPEchoConfig_Interface, BBFDM_BOTH},
|
||||
{"SourceIPAddress", &DMWRITE, DMT_STRING, get_IPDiagnosticsUDPEchoConfig_SourceIPAddress, set_IPDiagnosticsUDPEchoConfig_SourceIPAddress, BBFDM_BOTH},
|
||||
{"UDPPort", &DMWRITE, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_UDPPort, set_IPDiagnosticsUDPEchoConfig_UDPPort, BBFDM_BOTH},
|
||||
{"EchoPlusEnabled", &DMWRITE, DMT_BOOL, get_IPDiagnosticsUDPEchoConfig_EchoPlusEnabled, set_IPDiagnosticsUDPEchoConfig_EchoPlusEnabled, BBFDM_BOTH},
|
||||
{"EchoPlusSupported", &DMREAD, DMT_BOOL, get_IPDiagnosticsUDPEchoConfig_EchoPlusSupported, NULL, BBFDM_BOTH},
|
||||
{"PacketsReceived", &DMREAD, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_PacketsReceived, NULL, BBFDM_BOTH},
|
||||
{"PacketsResponded", &DMREAD, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_PacketsResponded, NULL, BBFDM_BOTH},
|
||||
{"BytesReceived", &DMREAD, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_BytesReceived, NULL, BBFDM_BOTH},
|
||||
{"BytesResponded", &DMREAD, DMT_UNINT, get_IPDiagnosticsUDPEchoConfig_BytesResponded, NULL, BBFDM_BOTH},
|
||||
{"TimeFirstPacketReceived", &DMREAD, DMT_TIME, get_IPDiagnosticsUDPEchoConfig_TimeFirstPacketReceived, NULL, BBFDM_BOTH},
|
||||
{"TimeLastPacketReceived", &DMREAD, DMT_TIME, get_IPDiagnosticsUDPEchoConfig_TimeLastPacketReceived, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uspd
|
||||
PKG_VERSION:=2.0.6
|
||||
PKG_VERSION:=2.1.11
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f4cb4407c275befee87cf761a51687d3b9869e99
|
||||
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,3 +1,4 @@
|
||||
config uspd 'usp'
|
||||
option granularitylevel '0'
|
||||
option debug '0'
|
||||
option loglevel '1'
|
||||
|
||||
@@ -1,14 +1,53 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=94
|
||||
START=98
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/uspd
|
||||
|
||||
validate_uspd_usp_section()
|
||||
{
|
||||
uci_validate_section uspd uspd "usp" \
|
||||
'enabled:bool:true' \
|
||||
'granularitylevel:uinteger' \
|
||||
'debug:bool:false' \
|
||||
'loglevel:uinteger' \
|
||||
'sock:string' \
|
||||
'transaction_timeout:string'
|
||||
}
|
||||
|
||||
configure_uspd()
|
||||
{
|
||||
local enabled debug sock transaction_timeout
|
||||
|
||||
config_load uspd
|
||||
|
||||
validate_uspd_usp_section || {
|
||||
log "Validation of usp section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
[ ${enabled} -eq 0 ] && exit 0
|
||||
|
||||
if [ ${debug} -eq 1 ]; then
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
fi
|
||||
|
||||
if [ -n "${sock}" ]; then
|
||||
procd_append_param command -s ${sock}
|
||||
fi
|
||||
|
||||
if [ -n "${transaction_timeout}" ]; then
|
||||
procd_append_param command -t ${transaction_timeout}
|
||||
fi
|
||||
}
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_open_instance usp
|
||||
procd_set_param command ${PROG}
|
||||
configure_uspd
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wfadatad
|
||||
PKG_VERSION:=2.3.1
|
||||
PKG_VERSION:=3.1.0
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=bdcf390f970facc20d7ac51fbb59ac4912b7fbfc
|
||||
PKG_SOURCE_VERSION:=6ee86bf2138edd680cc13f9d364f3e272a9e1e7c
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/wfadatad
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi Data Elements-1.0 Agent
|
||||
TITLE:=WiFi Data Elements-1.0 Agent and Collector
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libpthread +libnl-genl \
|
||||
+!WFA_DELM_STANDALONE:map-agent +WFA_DELM_MULTIAP_MODE:libmaputils
|
||||
endef
|
||||
@@ -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,14 +5,17 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=8.2.9
|
||||
PKG_VERSION:=8.5.5
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=ff879d814caba6807f64288de22db6f78c03438c
|
||||
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
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -38,15 +41,16 @@ TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/wifimngr/ $(PKG_BUILD_DIR)/
|
||||
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
|
||||
8
wifimngr/files/wifimngr.init → wifimngr/files/etc/init.d/wifimngr
Normal file → Executable file
8
wifimngr/files/wifimngr.init → wifimngr/files/etc/init.d/wifimngr
Normal file → Executable file
@@ -9,13 +9,19 @@ PROG=/usr/sbin/wifimngr
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
# procd_set_param env IOP_LLA_LIBS_DEBUG=3 #for debugging only
|
||||
procd_set_param env LIBWIFI_DEBUG_LEVEL=3 #for debugging only
|
||||
# procd_set_param stderr 1 #for debugging only
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
wps-monitor
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "wireless"
|
||||
}
|
||||
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
|
||||
@@ -25,32 +25,31 @@ LIB_MAP_OBJ tRootDynamicObj[] = {
|
||||
|
||||
static int add_xmpp_connection(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
struct uci_section *xmpp_con, *xmpp_con_srv, *dmmap_xmpp;
|
||||
char *con_name, *con_srv_name, *last_inst, *v, *id;
|
||||
struct uci_section *xmpp_con = NULL, *xmpp_con_srv = NULL, *dmmap_xmpp = NULL;
|
||||
char id[16];
|
||||
|
||||
check_create_dmmap_package("dmmap_xmpp");
|
||||
last_inst = get_last_instance_bbfdm("dmmap_xmpp", "connection", "con_inst");
|
||||
dmasprintf(&id, "%d", (last_inst) ? atoi(last_inst) + 1 : 1);
|
||||
char *last_inst = get_last_instance_bbfdm("dmmap_xmpp", "connection", "con_inst");
|
||||
snprintf(id, sizeof(id), "%d", (last_inst) ? atoi(last_inst) + 1 : 1);
|
||||
|
||||
dmuci_add_section_and_rename("xmpp", "connection", &xmpp_con, &con_name);
|
||||
dmuci_add_section("xmpp", "connection", &xmpp_con);
|
||||
dmuci_set_value_by_section(xmpp_con, "xmpp_id", id);
|
||||
dmuci_set_value_by_section(xmpp_con, "enable", "0");
|
||||
dmuci_set_value_by_section(xmpp_con, "interval", "30");
|
||||
dmuci_set_value_by_section(xmpp_con, "attempt", "16");
|
||||
dmuci_set_value_by_section(xmpp_con, "serveralgorithm", "DNS-SRV");
|
||||
|
||||
dmuci_add_section_and_rename("xmpp", "connection_server", &xmpp_con_srv, &con_srv_name);
|
||||
dmuci_add_section("xmpp", "connection_server", &xmpp_con_srv);
|
||||
dmuci_set_value_by_section(xmpp_con_srv, "con_id", id);
|
||||
dmuci_set_value_by_section(xmpp_con_srv, "enable", "0");
|
||||
dmuci_set_value_by_section(xmpp_con_srv, "port", "5222");
|
||||
|
||||
dmuci_add_section_bbfdm("dmmap_xmpp", "connection_server", &dmmap_xmpp, &v);
|
||||
dmuci_add_section_bbfdm("dmmap_xmpp", "connection_server", &dmmap_xmpp);
|
||||
dmuci_set_value_by_section(dmmap_xmpp, "section_name", section_name(xmpp_con_srv));
|
||||
dmuci_set_value_by_section(dmmap_xmpp, "con_srv_inst", "1");
|
||||
|
||||
dmuci_add_section_bbfdm("dmmap_xmpp", "connection", &dmmap_xmpp, &v);
|
||||
dmuci_add_section_bbfdm("dmmap_xmpp", "connection", &dmmap_xmpp);
|
||||
dmuci_set_value_by_section(dmmap_xmpp, "section_name", section_name(xmpp_con));
|
||||
*instance = update_instance(last_inst, 4, dmmap_xmpp, "con_inst", "dmmap_xmpp", "connection");
|
||||
*instance = update_instance(last_inst, 2, dmmap_xmpp, "con_inst");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -133,7 +132,7 @@ static int get_xmpp_connection_supported_server_connect_algorithms(char *refpara
|
||||
/*#Device.XMPP.Connection.{i}.Enable!UCI:xmpp/xmpp_connection,@i-1/enable*/
|
||||
static int get_connection_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "enable", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "enable", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -291,7 +290,7 @@ static int set_xmpp_connection_server_connect_algorithm(char *refparam, struct d
|
||||
/*#Device.XMPP.Connection.{i}.KeepAliveInterval!UCI:xmpp/xmpp_connection,@i-1/interval*/
|
||||
static int get_xmpp_connection_keepalive_interval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "interval", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "interval", "-1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -312,7 +311,7 @@ static int set_xmpp_connection_keepalive_interval(char *refparam, struct dmctx *
|
||||
/*#Device.XMPP.Connection.{i}.ServerConnectAttempts!UCI:xmpp/xmpp_connection,@i-1/attempt*/
|
||||
static int get_xmpp_connection_server_attempts(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "attempt", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "attempt", "16");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -333,7 +332,7 @@ static int set_xmpp_connection_server_attempts(char *refparam, struct dmctx *ctx
|
||||
/*#Device.XMPP.Connection.{i}.ServerRetryInitialInterval!UCI:xmpp/xmpp_connection,@i-1/initial_retry_interval*/
|
||||
static int get_xmpp_connection_retry_initial_interval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "initial_retry_interval", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "initial_retry_interval", "60");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -354,7 +353,7 @@ static int set_xmpp_connection_retry_initial_interval(char *refparam, struct dmc
|
||||
/*#Device.XMPP.Connection.{i}.ServerRetryIntervalMultiplier!UCI:xmpp/xmpp_connection,@i-1/retry_interval_multiplier*/
|
||||
static int get_xmpp_connection_retry_interval_multiplier(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "retry_interval_multiplier", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "retry_interval_multiplier", "2000");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -375,7 +374,7 @@ static int set_xmpp_connection_retry_interval_multiplier(char *refparam, struct
|
||||
/*#Device.XMPP.Connection.{i}.ServerRetryMaxInterval!UCI:xmpp/xmpp_connection,@i-1/retry_max_interval*/
|
||||
static int get_xmpp_connection_retry_max_interval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "retry_max_interval", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "retry_max_interval", "30720");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -396,7 +395,7 @@ static int set_xmpp_connection_retry_max_interval(char *refparam, struct dmctx *
|
||||
/*#Device.XMPP.Connection.{i}.UseTLS!UCI:xmpp/xmpp_connection,@i-1/usetls*/
|
||||
static int get_xmpp_connection_server_usetls(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "usetls", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "usetls", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -450,7 +449,7 @@ static int get_xmpp_connection_server_number_of_entries(char *refparam, struct d
|
||||
/*#Device.XMPP.Connection.{i}.Server.{i}.Enable!UCI:xmpp/xmpp_connection,@i-1/enable*/
|
||||
static int get_xmpp_connection_server_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "enable", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "enable", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -524,7 +523,7 @@ static int set_xmpp_connection_server_server_address(char *refparam, struct dmct
|
||||
/*#Device.XMPP.Connection.{i}.Server.{i}.Port!UCI:xmpp/xmpp_connection,@i-1/port*/
|
||||
static int get_xmpp_connection_server_port(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "port", value);
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "port", "5222");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -555,8 +554,8 @@ static int browsexmpp_connectionInst(struct dmctx *dmctx, DMNODE *parent_node, v
|
||||
synchronize_specific_config_sections_with_dmmap("xmpp", "connection", "dmmap_xmpp", &dup_list);
|
||||
list_for_each_entry(p, &dup_list, list) {
|
||||
|
||||
inst = handle_update_instance(1, dmctx, &max_inst, update_instance_alias, 5,
|
||||
p->dmmap_section, "con_inst", "con_alias", "dmmap_xmpp", "connection");
|
||||
inst = handle_update_instance(1, dmctx, &max_inst, update_instance_alias, 3,
|
||||
p->dmmap_section, "con_inst", "con_alias");
|
||||
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p->config_section, inst) == DM_STOP)
|
||||
break;
|
||||
@@ -578,8 +577,8 @@ static int browsexmpp_connection_serverInst(struct dmctx *dmctx, DMNODE *parent_
|
||||
|
||||
list_for_each_entry(p, &dup_list, list) {
|
||||
|
||||
inst = handle_update_instance(2, dmctx, &max_inst, update_instance_alias, 5,
|
||||
p->dmmap_section, "con_srv_inst", "con_srv_alias", "xmpp", "connection_server");
|
||||
inst = handle_update_instance(2, dmctx, &max_inst, update_instance_alias, 3,
|
||||
p->dmmap_section, "con_srv_inst", "con_srv_alias");
|
||||
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p->config_section, inst) == DM_STOP)
|
||||
break;
|
||||
@@ -590,58 +589,58 @@ static int browsexmpp_connection_serverInst(struct dmctx *dmctx, DMNODE *parent_
|
||||
|
||||
/* *** Device.XMPP. *** */
|
||||
DMOBJ tDeviceXMPPObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"XMPP", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tXMPPObj, tXMPPParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"XMPP", &DMREAD, NULL, NULL, NULL, NULL, NULL, tXMPPObj, tXMPPParams, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
DMOBJ tXMPPObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"Connection", &DMWRITE, add_xmpp_connection, delete_xmpp_connection, NULL, browsexmpp_connectionInst, NULL, NULL, NULL, tXMPPConnectionObj, tXMPPConnectionParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"Connection", &DMWRITE, add_xmpp_connection, delete_xmpp_connection, NULL, browsexmpp_connectionInst, NULL, tXMPPConnectionObj, tXMPPConnectionParams, NULL, BBFDM_BOTH, LIST_KEY{"Alias", "Username", "Domain", "Resource", NULL}},
|
||||
{0}
|
||||
};
|
||||
|
||||
DMLEAF tXMPPParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"ConnectionNumberOfEntries", &DMREAD, DMT_UNINT, get_xmpp_connection_nbr_entry, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"SupportedServerConnectAlgorithms", &DMREAD, DMT_STRING, get_xmpp_connection_supported_server_connect_algorithms, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"ConnectionNumberOfEntries", &DMREAD, DMT_UNINT, get_xmpp_connection_nbr_entry, NULL, BBFDM_BOTH},
|
||||
{"SupportedServerConnectAlgorithms", &DMREAD, DMT_STRING, get_xmpp_connection_supported_server_connect_algorithms, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.XMPP.Connection.{i}. *** */
|
||||
DMOBJ tXMPPConnectionObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
|
||||
{"Server", &DMREAD, NULL, NULL, NULL, browsexmpp_connection_serverInst, NULL, NULL, NULL, NULL, tXMPPConnectionServerParams, NULL, BBFDM_BOTH},
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"Server", &DMREAD, NULL, NULL, NULL, browsexmpp_connection_serverInst, NULL, NULL, tXMPPConnectionServerParams, NULL, BBFDM_BOTH, LIST_KEY{"Alias", "ServerAddress", "Port", NULL}},
|
||||
{0}
|
||||
};
|
||||
|
||||
DMLEAF tXMPPConnectionParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_connection_enable, set_connection_enable, NULL, NULL, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_xmpp_connection_alias, set_xmpp_connection_alias, NULL, NULL, BBFDM_BOTH},
|
||||
{"Username", &DMWRITE, DMT_STRING, get_xmpp_connection_username, set_xmpp_connection_username, NULL, NULL, BBFDM_BOTH},
|
||||
{"Password", &DMWRITE, DMT_STRING, get_xmpp_connection_password, set_xmpp_connection_password, NULL, NULL, BBFDM_BOTH},
|
||||
{"Domain", &DMWRITE, DMT_STRING, get_xmpp_connection_domain, set_xmpp_connection_domain, NULL, NULL, BBFDM_BOTH},
|
||||
{"Resource", &DMWRITE, DMT_STRING, get_xmpp_connection_resource, set_xmpp_connection_resource, NULL, NULL, BBFDM_BOTH},
|
||||
{"ServerConnectAlgorithm", &DMWRITE, DMT_STRING, get_xmpp_connection_server_connect_algorithm, set_xmpp_connection_server_connect_algorithm, NULL, NULL, BBFDM_BOTH},
|
||||
{"KeepAliveInterval", &DMWRITE, DMT_LONG, get_xmpp_connection_keepalive_interval, set_xmpp_connection_keepalive_interval, NULL, NULL, BBFDM_BOTH},
|
||||
{"ServerConnectAttempts", &DMWRITE, DMT_UNINT, get_xmpp_connection_server_attempts, set_xmpp_connection_server_attempts, NULL, NULL, BBFDM_BOTH},
|
||||
{"ServerRetryInitialInterval", &DMWRITE, DMT_UNINT, get_xmpp_connection_retry_initial_interval, set_xmpp_connection_retry_initial_interval, NULL, NULL, BBFDM_BOTH},
|
||||
{"ServerRetryIntervalMultiplier", &DMWRITE, DMT_UNINT, get_xmpp_connection_retry_interval_multiplier, set_xmpp_connection_retry_interval_multiplier, NULL, NULL, BBFDM_BOTH},
|
||||
{"ServerRetryMaxInterval", &DMWRITE, DMT_UNINT, get_xmpp_connection_retry_max_interval, set_xmpp_connection_retry_max_interval, NULL, NULL, BBFDM_BOTH},
|
||||
{"UseTLS", &DMWRITE, DMT_BOOL, get_xmpp_connection_server_usetls, set_xmpp_connection_server_usetls, NULL, NULL, BBFDM_BOTH},
|
||||
{"JabberID", &DMREAD, DMT_STRING, get_xmpp_connection_jabber_id, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"Status", &DMREAD, DMT_STRING, get_xmpp_connection_status, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"ServerNumberOfEntries", &DMREAD, DMT_UNINT, get_xmpp_connection_server_number_of_entries, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_connection_enable, set_connection_enable, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_xmpp_connection_alias, set_xmpp_connection_alias, BBFDM_BOTH},
|
||||
{"Username", &DMWRITE, DMT_STRING, get_xmpp_connection_username, set_xmpp_connection_username, BBFDM_BOTH},
|
||||
{"Password", &DMWRITE, DMT_STRING, get_xmpp_connection_password, set_xmpp_connection_password, BBFDM_BOTH},
|
||||
{"Domain", &DMWRITE, DMT_STRING, get_xmpp_connection_domain, set_xmpp_connection_domain, BBFDM_BOTH},
|
||||
{"Resource", &DMWRITE, DMT_STRING, get_xmpp_connection_resource, set_xmpp_connection_resource, BBFDM_BOTH},
|
||||
{"ServerConnectAlgorithm", &DMWRITE, DMT_STRING, get_xmpp_connection_server_connect_algorithm, set_xmpp_connection_server_connect_algorithm, BBFDM_BOTH},
|
||||
{"KeepAliveInterval", &DMWRITE, DMT_LONG, get_xmpp_connection_keepalive_interval, set_xmpp_connection_keepalive_interval, BBFDM_BOTH},
|
||||
{"ServerConnectAttempts", &DMWRITE, DMT_UNINT, get_xmpp_connection_server_attempts, set_xmpp_connection_server_attempts, BBFDM_BOTH},
|
||||
{"ServerRetryInitialInterval", &DMWRITE, DMT_UNINT, get_xmpp_connection_retry_initial_interval, set_xmpp_connection_retry_initial_interval, BBFDM_BOTH},
|
||||
{"ServerRetryIntervalMultiplier", &DMWRITE, DMT_UNINT, get_xmpp_connection_retry_interval_multiplier, set_xmpp_connection_retry_interval_multiplier, BBFDM_BOTH},
|
||||
{"ServerRetryMaxInterval", &DMWRITE, DMT_UNINT, get_xmpp_connection_retry_max_interval, set_xmpp_connection_retry_max_interval, BBFDM_BOTH},
|
||||
{"UseTLS", &DMWRITE, DMT_BOOL, get_xmpp_connection_server_usetls, set_xmpp_connection_server_usetls, BBFDM_BOTH},
|
||||
{"JabberID", &DMREAD, DMT_STRING, get_xmpp_connection_jabber_id, NULL, BBFDM_BOTH},
|
||||
{"Status", &DMREAD, DMT_STRING, get_xmpp_connection_status, NULL, BBFDM_BOTH},
|
||||
{"ServerNumberOfEntries", &DMREAD, DMT_UNINT, get_xmpp_connection_server_number_of_entries, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.XMPP.Connection.{i}.Server.{i}. *** */
|
||||
DMLEAF tXMPPConnectionServerParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_xmpp_connection_server_enable, set_xmpp_connection_server_enable, NULL, NULL, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_xmpp_connection_server_alias, set_xmpp_connection_server_alias, NULL, NULL, BBFDM_BOTH},
|
||||
{"ServerAddress", &DMWRITE, DMT_STRING, get_xmpp_connection_server_server_address, set_xmpp_connection_server_server_address, NULL, NULL, BBFDM_BOTH},
|
||||
{"Port", &DMWRITE, DMT_UNINT, get_xmpp_connection_server_port, set_xmpp_connection_server_port, NULL, NULL, BBFDM_BOTH},
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_xmpp_connection_server_enable, set_xmpp_connection_server_enable, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_xmpp_connection_server_alias, set_xmpp_connection_server_alias, BBFDM_BOTH},
|
||||
{"ServerAddress", &DMWRITE, DMT_STRING, get_xmpp_connection_server_server_address, set_xmpp_connection_server_server_address, BBFDM_BOTH},
|
||||
{"Port", &DMWRITE, DMT_UNINT, get_xmpp_connection_server_port, set_xmpp_connection_server_port, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user