Compare commits

..

498 Commits

Author SHA1 Message Date
nevadita.chatterjee
02800eac8a map-controller: 2.8.0.29 2023-09-21 17:55:38 +05:30
Filip Matusiak
8fc0f4d52a map-controller: 2.8.0.28 2023-09-20 09:42:26 +02:00
Filip Matusiak
f6bad19bbc map-controller: 2.8.0.27 2023-09-19 09:56:43 +02:00
Lukasz Kotasa
27adda5eec libbbfdm: 6.8.9.38, endptmngr:0.11 2023-09-13 11:16:26 +02:00
Filip Matusiak
dc8526c40a map-agent: 2.10.4.6 2023-09-08 14:06:20 +00:00
Wenpeng Song
ceb25a46a7 endptmngr:0.10
Support decode codecs cap list to improve decoding flexibility and robustness
2023-09-06 09:16:52 +00:00
Grzegorz Sluja
d715cfff40 endptmngr: 0.9
791c997 Convert latency from Broadcom in ms to tr104 averageRoundTripDelay in us
197d765 Free ubus context memory when closing it
2023-09-04 09:57:12 +02:00
Grzegorz Sluja
e417e5bd3c dectmngr-3.5.14: upgrading to DSPG 4.13 Build19 2023-08-31 11:42:39 +00:00
Marek Puzyniak
7a5f25c60b decollector: 2.10.1.3 2023-08-17 21:52:59 +00:00
Marek Puzyniak
7f237dd5c1 map-controller: 2.8.0.26 2023-08-17 21:48:55 +00:00
Marek Puzyniak
0a104811cc map-topology: 2.5.0.19 2023-08-17 21:46:29 +00:00
Marek Puzyniak
8687492bc9 map-agent: 2.10.4.5 2023-08-17 21:40:14 +00:00
Marek Puzyniak
b13df199eb ieee1905: 4.10.41 2023-08-17 21:35:18 +00:00
Grzegorz Sluja
963fe0b277 dectmngr: 3.5.12
Fix getting handset's string after call mode changes
2023-08-16 17:10:23 +02:00
Jakob Olsson
3f9598b816 map-agent: 2.10.4.4 2023-08-14 15:25:01 +02:00
Jakob Olsson
ab548fca8e map-agent: traffic_separation: guest-to-guest isolation fixes and refactor 2023-08-14 13:19:09 +00:00
Grzegorz Sluja
6f8f7933e8 endptmngr: 0.8
Add support for single/multiple call mode
2023-08-11 15:27:52 +02:00
Grzegorz Sluja
7cb2008549 dectmngr: 3.5.11
fixup! Handle DECT call modes correctly with call_waiting settings
2023-08-11 15:26:32 +02:00
Jakob Olsson
58dc0045de map-agent: 2.10.4.3 2023-08-09 17:52:05 +02:00
Grzegorz Sluja
8fd3a93874 endptmngr: Remove unused event EPEVT_MEDIA 2023-08-01 10:42:54 +02:00
Grzegorz Sluja
6904c169c5 dectmngr: Handle DECT call modes correctly with call_waiting settings 2023-07-28 10:40:03 +02:00
Grzegorz Sluja
52f6c72128 endptmngr: Handle clid info in call waiting 2023-07-21 12:08:18 +02:00
nevadita.chatterjee
d3474707e7 map-agent: 2.10.4.2 2023-07-18 19:16:07 +05:30
nevadita.chatterjee
8a2ff8f7cf map-topology: 2.5.0.18 2023-07-14 16:22:41 +05:30
Vivek Kumar Dutta
4ec57ab51a bbf: 6.8.9.37 2023-07-11 08:57:30 +05:30
Wenpeng Song
c0c180ac96 endptmngr: Back port codec and ptime changes from devel 2023-06-28 12:50:55 +00:00
Vivek Kumar Dutta
40a189ed96 bbf: 6.8.9.36 2023-06-27 13:09:50 +05:30
Yalu Zhang
953dea8b87 dectmngr-3.5.9: Play keypad tones on DECT handset during dialling 2023-06-26 15:29:25 +02:00
nevadita.chatterjee
b7597b920d ieee1905: 4.10.40 2023-06-21 12:14:45 +05:30
Grzegorz Sluja
749678804a Update package dectmngr 3.5.8
Anonymous call to DECT should be displayed as "Withheld"
2023-06-15 12:33:56 +02:00
Vivek Kumar Dutta
d6d623e761 icwmp: 8.4.26.10 2023-06-15 09:12:09 +05:30
Grzegorz Sluja
2264847f69 Update package dectmngr
6ea57b3 Fix the bug that missed calls are not cleared after reading from the handset
ae9e8f3 Change narrow band to wide band for incoming calls to DECT handsets
a9b4e71 Fix memory corruption in converAsciiToHexString()
b48f408 CI: move code-analysis to own container registry (IOP-9341)
903ea46 Fix the second caller id display issue
83f89a8 Stop building libdect.so
a3ce12a Always use pthread_t as the type of thread id other than u32
2023-06-13 10:49:16 +02:00
Filip Matusiak
4e773fb976 map-agent: 2.10.4.1 2023-06-12 09:44:20 +02:00
Jakob Olsson
68f5ac2402 map-agent: remove legacy parts of vlan teardown 2023-06-08 15:52:46 +02:00
Jakob Olsson
5cb9293bd9 map-agent: traffic_separation: set guest zone default fw rule to DROP 2023-06-08 14:29:14 +02:00
nevadita.chatterjee
6fb739d980 ieee1905: 4.10.39 2023-06-08 16:21:46 +05:30
Jakob Olsson
19d34e3417 map-agent: 2.10.4.0 2023-06-03 19:28:27 +02:00
Jakob Olsson
2bf41d47b0 map-agent: traffic_separation: remove patch and diff teardown usage 2023-06-03 19:28:27 +02:00
Jakob Olsson
fb4abd07eb map-agent: traffic_separation: update guest ping fw rule 2023-06-02 13:57:50 +02:00
Jakob Olsson
cedcb18ce9 map-agent: traffic_separation: refactor teardown 2023-06-02 13:57:50 +02:00
Jakob Olsson
41c4512235 Revert "Revert "map-agent: traffic_separation: allow al-bridge to untag primary""
This reverts commit 5fe134d348.
2023-06-02 13:57:29 +02:00
Jakob Olsson
fc87cf8197 map-agent: traffic_separation: create 8021q interfaces from network cfg 2023-06-02 13:57:29 +02:00
Marek Puzyniak
9a119ba0dd map-agent: 2.10.3.4 2023-05-31 11:10:20 +00:00
Jakob Olsson
5fe134d348 Revert "map-agent: traffic_separation: allow al-bridge to untag primary"
This reverts commit b5f38bf1f5.
2023-05-24 16:49:10 +02:00
Filip Matusiak
de057f0d58 map-agent: 2.10.3.3 2023-05-24 10:52:59 +02:00
Jakob Olsson
ffc0f1cad1 map-agent: 2.10.3.2 2023-05-23 13:52:40 +02:00
Jakob Olsson
379f1bc95a map-agent: traffic_separation: fixes to fw rules and their teardown 2023-05-23 13:50:30 +02:00
Filip Matusiak
ec7a8d0244 map-controller: 2.8.0.25
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-05-22 13:32:41 +02:00
Filip Matusiak
ffa7f9bbc6 map-controller: 2.8.0.24
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-05-17 16:25:02 +02:00
Jakob Olsson
0d3da06f85 map-agent: 2.10.3.1 2023-05-17 14:16:44 +00:00
Jakob Olsson
55cc54e7f7 map-agent: traffic_separation: update ebtable isolation rules for ethports 2023-05-17 14:16:44 +00:00
Jakob Olsson
b5f38bf1f5 map-agent: traffic_separation: allow al-bridge to untag primary 2023-05-17 14:16:44 +00:00
Jakob Olsson
e43631ecaa map-agent: traffic_separation: allow guests only access to DHCP and DNS 2023-05-17 14:16:44 +00:00
Jakob Olsson
ddf478f77a map-agent: multiap: attempt to update ebtable rules when uplink changes 2023-05-17 14:16:44 +00:00
nevadita.chatterjee
38d9ef7526 decollector: 2.10.1.2 2023-05-17 17:02:50 +05:30
Jakob Olsson
6b8ee5491a map-agent: traffic_separation: add support for guest-to-guest isolation across eth backhaul 2023-05-15 12:16:49 +02:00
Jakob Olsson
38b64c584e map-agent: traffic_separation: fixes and properly set tags on extender bridge 2023-05-11 09:45:30 +02:00
Amit Kumar
492cc5c029 map-topology: Added flag to get active connection
Added compilation flag in Makefile that enables fetch of
active connection using netlink from libconntrack.
2023-05-10 16:10:02 +05:30
Filip Matusiak
f030674f68 map-controller: 2.8.0.23
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-05-10 12:10:29 +02:00
Filip Matusiak
32a13d12f0 ieee1905: 4.10.38
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-05-09 14:44:12 +02:00
nevadita.chatterjee
3dbe7f7f3e map-topology: 2.5.0.16 2023-05-04 17:16:35 +05:30
Jakob Olsson
f1b3ec5a7d map-agent: 2.10.3.0 2023-05-02 14:39:40 +00:00
Jakob Olsson
b839ad3a35 map-agent: add dependency on patch and diff 2023-05-02 14:39:40 +00:00
Jakob Olsson
50d8f9536c map-agent: platform scripts: fix guest-to-guest isolation and guest pkt leak 2023-05-02 14:39:40 +00:00
suvendhu
1829f69726 icwmpd: remove DHCP option 125 deletion 2023-05-02 19:57:59 +05:30
Vivek Kumar Dutta
d228445386 icwmp: 8.4.26.8 2023-05-01 12:17:36 +05:30
Vivek Kumar Dutta
80dbe5da48 icwmp: 8.4.26.7 2023-04-27 10:52:15 +05:30
Filip Matusiak
11540c919a map-controller: 2.8.0.22 2023-04-26 14:51:20 +02:00
Filip Matusiak
1278e4d936 ieee1905: 4.10.37
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-04-24 10:50:43 +02:00
Vivek Kumar Dutta
402ac6f5b2 icwmp: 8.4.26.6 2023-04-21 16:02:11 +05:30
Vivek Kumar Dutta
5097780ae3 icwmp: 8.4.26.5 2023-04-13 10:48:41 +05:30
Anjan Chanda
16d0184b73 ieee1905: 4.10.36 2023-04-12 08:31:26 +02:00
Vivek Kumar Dutta
282026b14d bbf: 6.8.9.35 2023-04-11 11:08:48 +05:30
Marek Puzyniak
faf81bbe2b ieee1905: 4.10.35 2023-04-06 07:08:27 +00:00
Marek Puzyniak
cfce60fd58 map-controller: 2.8.0.21 2023-04-06 06:52:59 +00:00
Marek Puzyniak
486b6c4b1f map-agent: 2.10.2.12 2023-04-06 06:01:44 +00:00
Vivek Kumar Dutta
e180e17bfe icwmp: 8.4.26.4 2023-04-03 15:43:59 +05:30
Vivek Kumar Dutta
14b3cf4657 icwmp: 8.4.26.3 2023-03-31 15:10:57 +05:30
Vivek Kumar Dutta
77d641c688 icwmp: Fix duplicate Bootstap 2023-03-30 13:02:47 +05:30
Grzegorz Sluja
5cfc71114c endptmngr: Fix for congestion tone not played 2023-03-27 09:02:58 +02:00
vdutta
9fdc3d6126 icwmp: Fix probable crashes 2023-03-23 19:04:01 +05:30
Anjan Chanda
316e6d080a wfadatad: 2.10.1.1 2023-03-22 15:51:54 +01:00
Anjan Chanda
652e6335e5 easy-soc-libs: 6.5.60 2023-03-22 15:32:33 +01:00
nevadita.chatterjee
82a68b2f27 ieee1905: 4.10.34 2023-03-17 15:07:49 +05:30
Filip Matusiak
2d638220b2 map-agent: 2.10.2.11 2023-03-10 12:59:51 +01:00
Filip Matusiak
0811488af9 map-controller: 2.8.0.20 2023-03-10 12:59:43 +01:00
Omar Kallel
18eb5d7f58 icwmp: Fix Vendor Conf Download issue 2023-03-08 17:31:32 +01:00
Jakob Olsson
14d2d0934f map-agent: 2.10.2.10 2023-02-21 10:01:08 +01:00
vdutta
3fd9ca090d bbf: 6.8.9.34 2023-02-17 10:45:22 +05:30
vdutta
8ea89f2b98 icwmp: 8.4.25.17 2023-02-15 18:17:52 +05:30
Jakob Olsson
39f8886e25 map-agent: 2.10.2.9 2023-02-15 10:55:18 +01:00
vdutta
22d496ac67 obuspa: 5.0.0.16.7 2023-02-13 14:56:29 +05:30
Jakob Olsson
cc7ad3a31c map-agent: 2.10.2.8 2023-02-06 10:06:23 +01:00
vdutta
29e9923bf7 icwmp: 8.4.25.16 2023-02-03 18:46:34 +05:30
Anjan Chanda
9fa6c02fa7 wfadatad: 2.10.1.0 2023-02-03 10:46:10 +01:00
vdutta
35396ea204 icwmp: 8.4.25.15 2023-02-03 15:10:46 +05:30
vdutta
7f108c27ee bbf: 6.8.9.33 2023-01-31 20:19:49 +05:30
vdutta
9d3db6e1a0 icwmp: 8.4.25.14 2023-01-31 20:18:18 +05:30
Omar Kallel
767aff87b8 icwmp: Update dhcp option 60 handling 2023-01-31 14:46:35 +00:00
nevadita.chatterjee
65cf5ba958 map-topology:2.5.0.15 2023-01-31 19:07:37 +05:30
Jakob Olsson
c8cfbc194d map-agent: 2.10.2.7 2023-01-31 10:22:31 +01:00
Jakob Olsson
364b6223fa map-controller: 2.8.0.19 2023-01-31 10:21:11 +01:00
Omar Kallel
64fb2de39a icwmp: set dslforum.org as value for option 60 2023-01-27 14:37:00 +01:00
vdutta
98ea0bbf05 bbf: align with icwmp 2023-01-27 16:30:04 +05:30
vdutta
901666827e icwmp: Updated notification handling 2023-01-27 16:26:17 +05:30
vdutta
08a9824d5e uspd: 2.2.14.3 2023-01-26 18:54:49 +05:30
vdutta
330ce960fc bbf: 6.8.9.31 2023-01-26 18:54:12 +05:30
vdutta
ea8a6fd790 Revert "bbf: 6.8.9.31"
This reverts commit 531b441f80.
2023-01-26 18:52:09 +05:30
vdutta
531b441f80 bbf: 6.8.9.31 2023-01-26 18:49:44 +05:30
Jakob Olsson
471c8d8e5e map-controller: 2.8.0.18 2023-01-26 14:05:16 +01:00
Amin Ben Romdhane
5981e5b563 ssdpd: 1.0.5
(cherry picked from commit a715e0a659)
2023-01-26 04:20:01 +00:00
Anjan Chanda
90ca84517c easy-soc-libs: 6.5.57 2023-01-25 14:23:38 +01:00
Anjan Chanda
0fe517315e ieee1905: 4.10.33 2023-01-25 14:08:31 +01:00
Anjan Chanda
21f18cfd34 easy-soc-libs: 6.5.55 2023-01-25 08:21:00 +01:00
nevadita.chatterjee
ad39e7603b ieee1905: 4.10.32 2023-01-24 17:32:51 +05:30
Marek Puzyniak
be0595cb13 easy-soc-libs: 6.4.54 2023-01-24 09:30:53 +00:00
Filip Matusiak
1b9c7328a3 map-controller: validate thresholds in sta_steering section of config
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-01-16 11:07:21 +00:00
Sukru Senli
3aa9e7fbe2 iop: genconfig: in customerconfigs use the same branch as in iowrt repo 2023-01-16 11:59:18 +01:00
Marek Puzyniak
6c1a16b3b4 wifimngr: 14.0.10 2023-01-13 13:10:39 +00:00
Marek Puzyniak
860c9ce9e9 easy-soc-libs: 6.4.53 2023-01-13 13:07:59 +00:00
Jakob Olsson
c5de1a939f wfadatad: 2.10.0.8 2023-01-13 13:09:20 +01:00
vdutta
7ccd66f2e0 bbf: 6.8.9.30 2023-01-13 17:04:23 +05:30
vdutta
886bc94363 ssdpd: 1.0.4 2023-01-13 12:29:02 +05:30
vdutta
03bd91650b sulu: 1.3.26 2023-01-13 12:28:26 +05:30
suvendhu
b6d834467d icwmp: cherry-pick option43 handling 2023-01-12 12:47:48 +05:30
Amit Kumar
a69268966c map-topology: enhanced wan per host statistics 2023-01-11 09:21:22 +05:30
Amit Kumar
35c02b68d3 topologyd: enabled timestamp flag in nf conntrack 2023-01-10 14:10:59 +05:30
Wenpeng Song
8605c1e455 Update packages endptmngr and dectmngr
dectmngr-3.5.6: Send CALL_REJECT only for an unanswered incoming call 
endptmngr: Fix CALL_REJECT and ON-HOOK handling
2023-01-03 13:24:41 +00:00
vdutta
76457bc80a ssdpd: 1.0.3 2022-12-23 13:53:15 +05:30
vdutta
0a17b21d66 obuspa: 5.0.0.16.6 2022-12-22 16:24:25 +05:30
vdutta
579e188bc8 icwmp: 8.4.25.11 2022-12-22 16:10:41 +05:30
vdutta
42c3fd9ce4 bbf: 6.8.9.29 2022-12-22 15:54:51 +05:30
nevadita.chatterjee
d3d638dd6f map-topology: 2.5.0.14 2022-12-22 10:28:20 +05:30
Jakob Olsson
3c9aabbc1b ieee1905: 4.10.31 2022-12-21 15:52:40 +01:00
Jakob Olsson
ccb83f2c91 map-agent: 2.10.2.6 2022-12-21 15:51:59 +01:00
sverma
6d9b07317b add psk mode on i1905, agent and controller 2022-12-21 17:17:00 +05:30
sverma
69cca97ff6 map-agent: add support for other enc modes 2022-12-21 14:48:46 +05:30
sverma
fdf4abda52 map-controller: add support for wpa/wpa2 2022-12-21 14:40:17 +05:30
Jakob Olsson
cbbdbca752 map-agent: 2.10.2.5 2022-12-20 16:13:15 +01:00
Jakob Olsson
1bb1733238 map-controller: 2.8.0.17 2022-12-20 16:12:35 +01:00
Saurabh Verma
6b44d95bd5 map-controller: init.d: add support for other enc methods 2022-12-20 14:56:43 +00:00
suvendhu
8289dce603 Fix GW info overwrite on boot
(cherry picked from commit 7353a6bfe7)
2022-12-20 12:51:30 +00:00
sverma
d0ca976d71 wfadatad: 2.10.0.7 2022-12-19 12:17:07 +00:00
Anjan Chanda
2bb5272e3d ieee1905: 4.10.30 2022-12-19 13:14:09 +01:00
Amin Ben Romdhane
7bc170188b Add ssdpd package
(cherry picked from commit 39f2dab3f2)
2022-12-19 11:24:48 +00:00
vdutta
6bd264e6d5 sulu: 1.3.24 2022-12-19 16:53:03 +05:30
vdutta
d0e229743c bbf: 6.8.9.28 2022-12-19 16:27:15 +05:30
vdutta
79edd055bf bbf: gateway info fallback 2022-12-19 15:54:56 +05:30
Vivek Kumar Dutta
2408f215ac icwmp: dhcp handling for option 125 2022-12-19 07:28:46 +00:00
Jakob Olsson
d66e7fab9b map-controller: 2.8.0.16 2022-12-14 12:34:43 +01:00
Jakob Olsson
b96ebeb84c map-agent: 2.10.2.4 2022-12-14 12:34:09 +01:00
vdutta
2a7ba5608f bbf: 6.8.9.26 2022-12-09 17:16:09 +05:30
Jakob Olsson
ec61d302c5 map-agent: 2.10.2.3 2022-12-09 11:52:43 +01:00
Jakob Olsson
186e8a960d map-agent: traffic_separation: check for existing bridge-vlan section before appending new one 2022-12-09 11:51:59 +01:00
Jakob Olsson
1692ed2afe map-agent: 2.10.2.2 2022-12-07 15:50:26 +01:00
vdutta
404ae888a8 sulu: 1.3.15 2022-12-07 19:40:08 +05:30
vdutta
bbe4473f40 uspd: 2.2.14.2 2022-12-07 19:37:56 +05:30
vdutta
51707f0272 bbf: 6.8.9.25 2022-12-07 16:56:05 +05:30
Jakob Olsson
c598a47281 map-agent: traffic_separation: fix bridge var typo 2022-12-07 10:45:39 +01:00
Jakob Olsson
63c5275f42 map-agent: 2.10.2.1 2022-12-07 10:44:46 +01:00
Jakob Olsson
8875203b9b map-topology: 2.5.0.13 2022-12-06 16:17:45 +01:00
vdutta
1d9e70a1d2 sulu: 1.3.13 2022-12-05 18:54:39 +05:30
Jakob Olsson
c8042b2b6c Revert "mapagent: port add delete to bridge using uci ubus"
This reverts commit a316b74555.
2022-12-05 09:32:06 +01:00
Amit Kumar
a316b74555 mapagent: port add delete to bridge using uci ubus 2022-12-05 08:22:47 +05:30
Jakob Olsson
91a81169bc map-agent: 2.10.2.0 2022-11-30 16:30:04 +01:00
Marek Puzyniak
d12aff727c easy-soc-libs: 6.4.52 2022-11-29 14:28:07 +00:00
Jakob Olsson
0daddcd84f ieee1905: uci-default: change al-iface ifname from list to option 2022-11-29 14:18:19 +01:00
vdutta
7a684f0a40 bbf: 6.8.9.24 2022-11-29 18:44:43 +05:30
vdutta
bc8bc4bd48 bbf: 6.8.9.23 2022-11-28 15:43:59 +05:30
vdutta
5316eb2cca obuspa: 5.0.0.16.5 2022-11-28 15:43:30 +05:30
vdutta
37621309e8 uspd: 2.2.14.1 2022-11-28 15:43:04 +05:30
Wenpeng Song
ac7abe0536 bbf: 6.8.9.22 2022-11-23 10:04:41 +00:00
Yalu Zhang
242fc21967 Update package endptmngr
Correction of codec names for codecs ubus call
2022-11-23 10:30:03 +01:00
Filip Matusiak
8d4453b107 map-agent: 2.10.1.2
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-11-22 10:47:28 +01:00
vdutta
5213d64579 sulu: 1.3.8 2022-11-17 11:57:58 +00:00
Jakob Olsson
3e872da3ce map-controller: 2.8.0.15 2022-11-15 16:59:13 +01:00
Anjan Chanda
c35824f5ec wfadatad: 2.10.0.6 2022-11-15 10:34:08 +01:00
Grzegorz Sluja
bf6e0244f4 endptmngr: Refactor inconsistency about call_id, pcm_id and pcm_state 2022-11-11 10:29:49 +01:00
Yalu Zhang
dc20fe3654 Update package voicemngr
Fix a compiling error for release-6.5 branch
2022-11-10 16:09:52 +01:00
Yalu Zhang
c3b0ecb042 Add package voicemngr 2022-11-10 15:39:21 +01:00
vdutta
38c0a6b60f bbf: 6.8.9.21 2022-11-03 12:26:13 +05:30
vdutta
fc475de4da icwmp: 8.4.25.10 2022-11-03 12:24:42 +05:30
Jakob Olsson
74f4716ccd map-agent: 2.11.1.1 2022-10-28 12:57:19 +02:00
Jakob Olsson
24f125ff94 map-agent: 2.11.1.0 2022-10-27 15:08:20 +02:00
Sukru Senli
caccbdfdf0 icwmp: 8.4.25.9
Make the enable/disable of GetRPCMethods ACS methods done via cwmp uci option
2022-10-27 11:44:38 +02:00
Jakob Olsson
ce124fc5da map-agent: 2.10.0.28 2022-10-26 12:16:39 +02:00
Jakob Olsson
8abc606452 map-agent: config: add missing otpions options 2022-10-26 10:48:06 +02:00
Jakob Olsson
6417542d62 map-agent: 2.10.0.27 2022-10-26 10:46:12 +02:00
Jakob Olsson
98ef763849 map-agent: 2.10.0.26 2022-10-25 16:31:51 +02:00
Jakob Olsson
e0f501a75f map-agent: 2.10.0.25 2022-10-25 10:14:47 +02:00
Jakob Olsson
a9850c25cb map-agent: traffic_seperation: add func isolate guest by ebtables 2022-10-24 17:41:18 +02:00
Jakob Olsson
91509243e5 map-agent: 2.10.0.24 2022-10-21 15:14:02 +02:00
Jakob Olsson
3b8c236546 map-agent: 2.10.0.23 2022-10-20 15:55:02 +02:00
Anjan Chanda
c2ccb89855 ieee1905: 4.10.28 2022-10-19 17:18:44 +02:00
Jakob Olsson
1994c26d23 map-agent: 2.10.0.22 2022-10-19 16:09:49 +02:00
vdutta
6ece55c134 bbf: 6.8.9.20 2022-10-19 18:19:12 +05:30
vdutta
ed58db0758 obuspa: 5.0.0.16.4 2022-10-19 18:18:46 +05:30
Anjan Chanda
d2f317c20c wfadatad: 2.10.0.2 2022-10-19 10:17:04 +02:00
Jakob Olsson
efb4429e76 easy-soc-libs: 6.4.51 2022-10-18 20:50:15 +02:00
Anjan Chanda
e3836e6dff ieee1905: 4.10.27 2022-10-18 16:40:52 +02:00
Jakob Olsson
cb9ddf3b59 map-controller: 2.8.0.14 2022-10-18 15:44:40 +02:00
Grzegorz Sluja
956ae7d35e dectmngr: Play dial tone if called number is not included in call establish message 2022-10-18 11:26:45 +02:00
Jakob Olsson
b7767e0333 map-controller: 2.8.0.13 2022-10-17 11:35:57 +02:00
Jakob Olsson
255aab4ef2 map-agent: 2.10.0.21 2022-10-14 17:04:35 +02:00
Jakob Olsson
827d19e557 map-agent: multiap: disable_lower_prio: always enable passed ifname 2022-10-14 16:14:44 +02:00
Marek Puzyniak
096310eca3 map-agent: don't enable bsta
When call bsta_disable_lower_priority
do not enable bsta.

Signed-off-by: Marek Puzyniak <marek.puzyniak@iopsys.eu>
2022-10-14 11:05:00 +00:00
Anjan Chanda
4afc0d6b10 ieee1905: 4.10.26 2022-10-14 09:53:58 +02:00
vdutta
01b12e0f59 bbf: 6.8.9.19 2022-10-13 19:20:59 +05:30
vdutta
f164d0f23f icwmp: 8.4.25.8 2022-10-13 17:24:26 +05:30
vdutta
bb8e213cdd icwmp: 8.4.25.7 2022-10-13 12:17:36 +05:30
vdutta
3998edded4 bbf: 6.8.9.18 2022-10-13 12:16:21 +05:30
Jakob Olsson
478e87d472 map-controller: 2.8.0.12 2022-10-12 17:23:58 +02:00
Rahul Thakur
05829038fa ponmngr: update serial number generation logic 2022-10-12 13:22:29 +00:00
Jakob Olsson
5cffc3cae3 map-agent: add ip-bridge dependency 2022-10-12 09:54:08 +02:00
Jakob Olsson
904f18411d map-agent: initd: remove legacy vlan setup 2022-10-12 09:29:57 +02:00
Anjan Chanda
f8ba7f0dcf ieee1905: 4.10.15 2022-10-11 22:32:14 +02:00
Jakob Olsson
5cb8608927 map-agent: 2.10.0.20 2022-10-11 16:34:14 +02:00
Jakob Olsson
9acead4347 map-controller: 2.8.0.11 2022-10-11 15:44:48 +02:00
Janusz Dziedzic
42bec0b4c8 wifimngr: 14.0.9
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-10-11 08:31:21 +00:00
Janusz Dziedzic
f038e661b6 easy-soc-libs: 6.4.50
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-10-11 08:30:20 +00:00
Jakob Olsson
84f93c585d map-controller: 2.8.0.10 2022-10-10 18:16:38 +02:00
Jakob Olsson
f609fe8845 Revert "map-agent: 2.10.0.20"
This reverts commit f254adbfb2.
2022-10-10 18:15:58 +02:00
Jakob Olsson
f254adbfb2 map-agent: 2.10.0.20 2022-10-10 18:15:44 +02:00
vdutta
a41fa2790e bbf: 6.8.9.17 2022-10-10 10:48:05 +05:30
vdutta
6c16e88598 icwmp: 8.4.25.6 2022-10-10 10:32:48 +05:30
Jakob Olsson
3c581fca1a map-agent: 2.10.0.19 2022-10-07 15:12:27 +02:00
Jakob Olsson
035263a450 map-agent: 2.10.0.18 2022-10-06 15:40:42 +02:00
vdutta
11287b6faa bbf: 6.8.9.16 2022-10-06 18:22:24 +05:30
suvendhu
b6371cba1a icwmpd: 8.4.25.5 2022-10-06 18:19:46 +05:30
vdutta
c5097fc375 obuspa: 5.0.0.16.3 2022-10-06 14:42:20 +05:30
Grzegorz Sluja
ebaab686ed dectmngr: Change DECT handset presence check to RSSI request 2022-10-05 14:54:42 +02:00
vdutta
c758ec49fe bulkdata: 2.0.3.1 2022-10-04 12:11:45 +05:30
vdutta
84a52004bb bbf: 6.8.9.15 2022-10-04 12:10:28 +05:30
Marek Puzyniak
85df013680 map-agent: 2.10.0.17 2022-10-03 17:12:20 +00:00
Jakob Olsson
5c491c84dd map-agent: multiap: del vid on iface teardown 2022-10-03 17:04:17 +02:00
Jakob Olsson
ef34422a54 map-agent: 2.10.0.16 2022-10-03 16:01:27 +02:00
Jakob Olsson
50949e63b0 map-controller: 2.8.0.9 2022-09-30 16:11:56 +02:00
Filip Matusiak
38a07a87a0 map-controller: load rcpi plugin by default
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-09-30 14:09:45 +00:00
Jakob Olsson
eb0cf4f1fa map-controller: 2.8.0.8 2022-09-30 12:49:55 +02:00
Jakob Olsson
1a15a4c42d map-topology: 2.5.0.12 2022-09-30 12:49:23 +02:00
Jakob Olsson
cd262d78b6 map-agent: 2.10.0.15 2022-09-30 12:48:57 +02:00
Jakob Olsson
654c047df7 map-controller: pass CFLAGS EASYMESH_VENDOR_EXT 2022-09-30 12:48:32 +02:00
Jakob Olsson
28cf302e58 map-agent: pass CFLAGS EASYMESH_VENDOR_EXT 2022-09-30 12:48:32 +02:00
Janusz Dziedzic
972eb125f0 easy-soc-libs: 6.4.49
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-27 13:18:27 +00:00
vdutta
d429fd24ee icwmp: 8.4.25.4 2022-09-26 19:10:36 +05:30
vdutta
6dda009eb5 twamp: 1.2.2
(cherry picked from commit 2660d8ad2e)
2022-09-26 09:07:26 +00:00
Janusz Dziedzic
84754a2704 map-agent: enable pktfwd when no TS
Enable pktfwd again when we disable
traffic separation.
Flush also FlowCache rules.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-23 10:21:30 +00:00
vdutta
4a0a34cc19 bbf: 6.8.9.14 2022-09-23 15:29:02 +05:30
vdutta
4c0aac777e icwmp: 8.4.25.3 2022-09-23 08:51:45 +05:30
Anjan Chanda
0c14c69c2c wfadatad: 2.10.0.1 2022-09-22 21:21:55 +02:00
Jakob Olsson
f44fdd8db1 map-agent: 2.10.0.14 2022-09-22 10:58:44 +02:00
Jakob Olsson
1d849bd57a map-agent: ts: add func to clean stale vids from network conf 2022-09-22 10:58:28 +02:00
Janusz Dziedzic
d906c17eb0 easy-soc-libs: 6.4.48
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-21 18:22:51 +00:00
Jakob Olsson
dffe253f12 map-agent: 2.10.0.13 2022-09-21 12:17:22 +02:00
Sukru Senli
b26ddb4edb evoice: remove from 6.5 as it is incomplete 2022-09-20 17:47:59 +02:00
Jakob Olsson
eff6d9b96b map-agent: 2.10.0.12 2022-09-20 16:26:07 +02:00
suvendhu
2e852c5a99 twamp: 1.2.1
(cherry picked from commit 2391836769)
2022-09-20 13:02:26 +00:00
vdutta
3ee627c4ce bbf: 6.8.9.13 2022-09-20 15:06:13 +05:30
Jakob Olsson
726982c3e6 map-agent: 2.10.0.11 2022-09-20 10:50:10 +02:00
Janusz Dziedzic
ab6c67f643 map-agent: 2.10.0.10
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-19 13:10:22 +00:00
vdutta
06f7f65b4d icwmp: 8.4.25.2 2022-09-19 16:28:21 +05:30
Jakob Olsson
77f7315b53 map-agent: 2.10.0.9 2022-09-19 12:03:27 +02:00
Janusz Dziedzic
47f8651078 map-agent: 2.10.0.8
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-19 09:25:31 +00:00
Janusz Dziedzic
b903a4f332 wifimngr: 14.0.8
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-19 08:45:34 +00:00
Janusz Dziedzic
b627749ae6 easy-soc-libs: 6.4.47
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-19 08:44:28 +00:00
Jakob Olsson
62120c6769 map-agent: 2.10.0.7 2022-09-16 16:18:14 +02:00
Jakob Olsson
13bf602a93 map-agent: 2.10.0.6 2022-09-15 13:58:44 +02:00
Grzegorz Sluja
be36ca0ab0 endptmngr: Add debug for RTP statistics received from Brcm 2022-09-15 08:06:32 +02:00
Jakob Olsson
3bf9566a62 map-agent: 2.10.0.5 2022-09-14 11:47:00 +02:00
Jakob Olsson
3a6295d370 map-topology: 2.5.0.11 2022-09-13 12:03:02 +02:00
Jakob Olsson
7418afc3e1 map-agent: 2.10.0.4 2022-09-12 10:44:20 +02:00
vdutta
026814da18 bbf: 6.8.9.12 2022-09-09 15:26:00 +05:30
Jakob Olsson
a11c28214c map-agent: 2.10.0.3 2022-09-09 11:34:11 +02:00
Jakob Olsson
9af889d28e map-agent: 2.10.0.2 2022-09-09 09:48:43 +02:00
Jakob Olsson
70294978f5 6.5 vlan teardown 2022-09-08 13:28:07 +00:00
Anjan Chanda
be01ee85f6 ieee1905: 4.10.14 2022-09-08 10:16:38 +02:00
Erik Karlsson
72e5126a0f icwmp: fix starting of icwmpd when enabled
When disabling, it is necessary to run start after stop. This will not
actually start icwmpd as there is a condition in start_service but it
is needed for the triggers to be registered. Otherwise, icwmpd will
not start later when enabled.
2022-09-08 11:52:04 +05:30
vdutta
038f5af58f bbf: 6.8.9.11 2022-09-08 11:50:14 +05:30
Anjan Chanda
9d6d189707 wfadatad: 2.8.1.5 2022-09-06 20:45:59 +02:00
Jakob Olsson
3f1aae0d5a map-agent: 2.10.0.0 2022-09-06 16:09:03 +02:00
Janusz Dziedzic
e15dd68933 map-agent: ts: use PVID for eth ports
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-06 16:08:51 +02:00
Janusz Dziedzic
5cd72947e9 map-agent: ts: skip eth name check add wlanX.staY
On DSA platform we could have lan/lanX/wan ports.
Tested on ex400.

Version: 2.10.2.0

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-06 16:08:51 +02:00
Janusz Dziedzic
24cb62f6e3 map-agent: verD: files traffic_separation
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-06 16:08:51 +02:00
vdutta
9910cde335 obuspa: Fix zombie instances for non-existent parameters 2022-09-06 11:52:31 +05:30
Anjan Chanda
63cfcd9968 wfadatad: 2.8.1.1 2022-09-05 21:16:16 +02:00
vdutta
cf91dc7a2a bbf: 6.8.9.10 2022-09-05 16:49:20 +05:30
Anjan Chanda
122b14c8b0 map-topology: add config EASYMESH_VENDOR_EXT_OUI 2022-09-02 13:44:22 +02:00
Anjan Chanda
7eb490ce87 map-controller: add config EASYMESH_VENDOR_EXT_OUI 2022-09-02 13:44:13 +02:00
Anjan Chanda
38cb923a38 map-agent: add config EASYMESH_VENDOR_EXT_OUI 2022-09-02 13:44:00 +02:00
Jakob Olsson
5b8dca53e9 map-topology: 2.5.0.10 2022-09-02 10:39:24 +02:00
Jakob Olsson
4799456b48 Map-agent: 2.9.1.2 2022-09-02 10:38:18 +02:00
Jakob Olsson
50492f67c3 map-controller: 2.8.0.7 2022-09-02 10:36:55 +02:00
Sukru Senli
717b83f0e4 sulu: 1.0.16 2022-08-31 15:12:40 +02:00
vdutta
d7da9d900c swmodd: Added cgroup mount handler package 2022-08-31 17:57:45 +05:30
Jakob Olsson
ebf076b539 map-agent: 2.9.1.1 2022-08-31 13:42:10 +02:00
vdutta
4a843187c8 bbf: 6.8.9.9 2022-08-31 16:09:49 +05:30
Jakob Olsson
94aa904234 map-agent: 2.9.1.0 2022-08-31 12:27:38 +02:00
Jakob Olsson
ebc7ab4334 map-agent: multiap: update bsta_clear_bssid API 2022-08-30 17:06:32 +02:00
Grzegorz Sluja
f30abfe5bd dectmngr: Send CMBS_EV_DEE_CALL_ANSWER to target when the remote party answers an outgoing call 2022-08-30 14:30:52 +02:00
Grzegorz Sluja
61882e980a endptmngr: Inform dectmngr about answer-call signal from asterisk 2022-08-30 14:29:32 +02:00
Sukru Senli
739faa80fe sulu: 1.0.15 2022-08-26 14:28:26 +02:00
Jakob Olsson
3ccc122539 wfadatad: 2.8.1.0 2022-08-26 13:41:04 +02:00
Jakob Olsson
eac510d7ea map-agent: 2.9.0.8 2022-08-25 16:57:46 +02:00
vdutta
1d34ac77e5 bbf: 6.8.9.8 2022-08-22 09:35:57 +05:30
Sukru Senli
e79f917e7e sulu-1.0.14 2022-08-19 13:37:53 +02:00
vdutta
bf59291610 bbf: 6.8.9.7 2022-08-19 15:58:38 +05:30
Jakob Olsson
17b223d35f map-agent: 2.9.0.7 2022-08-19 11:42:29 +02:00
Jakob Olsson
755efd42ae map-agent: 2.9.0.6 2022-08-19 10:58:05 +02:00
Rahul
46b8d717d5 urlfilter: update dns transaction id generation 2022-08-19 08:16:55 +05:30
Rahul Thakur
9be656695c ponmngr: configure serial no. at start 2022-08-17 17:51:19 +00:00
Jakob Olsson
8c242bbdad wfa-capi: 1.1.3 2022-08-17 10:20:51 +02:00
Jakob Olsson
d36da9d94b map-topology: 2.5.0.9 2022-08-15 09:08:22 +02:00
Anjan Chanda
ec4ac5a195 wfadatad: 2.8.0.2 2022-08-12 10:32:14 +02:00
Grzegorz Sluja
238f8bf928 dectmngr: Release the incoming call if it cannot be proceeded 2022-08-09 12:33:49 +02:00
Grzegorz Sluja
787abf300f endptmngr: Send DECT_UNAVAILABLE event to Asterisk if there is no handset available for an incoming call 2022-08-09 12:31:31 +02:00
Erik Karlsson
a96c18eb17 mosquitto-auth-shadow: initial implementation
Plugin for the mosquitto MQTT broker that allows authentication of
users via /etc/shadow
2022-08-09 12:11:05 +05:30
vdutta
f3d05939c8 sulu: Use system login credential for mqtt auth 2022-08-09 10:49:52 +05:30
vdutta
d438d4d269 bbf: 6.8.9.6 2022-08-09 10:43:04 +05:30
vdutta
b4985825c6 bbf: Free mem check before up/download diagnostics 2022-08-05 09:33:09 +05:30
nevadita.chatterjee
9fa8f7c8a6 ieee1905: 4.10.6 2022-08-04 09:35:55 +02:00
Grzegorz Sluja
5195434ee0 dectmngr: Release the incoming call if it cannot be proceeded 2022-08-03 11:09:04 +02:00
Grzegorz Sluja
1c4fee3b2d endptmngr: Send DECT_UNAVAILABLE event to Asterisk if there is no free DECT handset 2022-08-03 11:07:29 +02:00
vdutta
4d609b0d4c bbf: 6.8.9.4 2022-08-01 20:57:48 +05:30
Marek Puzyniak
9f2e663c66 easy-soc-libs: 6.4.46
Signed-off-by: Marek Puzyniak <marek.puzyniak@iopsys.eu>
2022-07-29 12:58:29 +00:00
Rahul
02de70ad19 qosmngr: update queue setup
Update q setup that allows better coverage of q setup specially in
mixed mode scheduling.
Also remove dead code related to stats since that is already taken
care of by qosmngr daemon now.
And lastly, simplify the logic to calculate q precedence.
2022-07-29 10:47:35 +00:00
vdutta
15dd3f227c bbf: Optimal memory allocation for json plugins 2022-07-29 10:45:46 +05:30
Grzegorz Sluja
2dab01fcf7 dectmngr: Add new dspg FW 4.13 Build17 2022-07-28 09:54:49 +02:00
vdutta
f1f31b1373 bbf: 6.8.9.2 2022-07-27 13:04:31 +05:30
vdutta
c405f8d9aa obuspa: Support for async operate restart callback 2022-07-27 12:58:29 +05:30
vdutta
2a3128f08c uspd: 2.2.14 2022-07-27 11:23:35 +05:30
vdutta
3d4aac4cef uspd: 2.2.13 2022-07-27 11:23:24 +05:30
vdutta
0f7d11e247 bbf: 6.8.9.1 2022-07-22 19:25:58 +05:30
Amin Ben Ramdhane
10407ee99a bbf: 6.8.9 2022-07-22 19:21:05 +05:30
Amin Ben Ramdhane
9ee39a451f uspd: 2.2.12 2022-07-22 19:20:24 +05:30
Jakob Olsson
141fd56567 map-controller: 2.8.0.6: add enable_ts uci docs and validator 2022-07-22 10:28:51 +02:00
nevadita.chatterjee
2f91df7419 map-topology: 2.5.0.8 2022-07-22 10:49:34 +05:30
Rahul
5e4a805880 ponmngr: resolve pon startup issues 2022-07-22 03:54:41 +00:00
Jakob Olsson
11f5012b63 map-controller: add enable_ts to example config 2022-07-21 17:01:57 +02:00
Jakob Olsson
4776861483 map-agent: 2.9.0.5 2022-07-21 16:34:15 +02:00
Jakob Olsson
40f255189f ieee1905: 4.10.5 2022-07-19 17:29:27 +02:00
Jakob Olsson
b71991ac56 map-agent: traffic_separation: do network restart if vid mapping is incorrect on reload 2022-07-19 15:28:34 +00:00
vdutta
5c9d1f09a6 stunc: 1.1.12 2022-07-18 19:16:43 +05:30
vdutta
c3ba98f2f3 icwmp: 8.4.25.1 2022-07-18 19:16:00 +05:30
Amin Ben Ramdhane
307b828994 bbf: 6.8.8 2022-07-15 17:33:29 +05:30
Jakob Olsson
1dbacbb880 ieee1905: 4.10.4 2022-07-15 13:59:46 +02:00
suvendhu
387be147e6 icwmp: fix icwmpd infinite restart 2022-07-14 15:59:10 +05:30
vdutta
75988519f5 icwmp: 8.4.24 2022-07-14 15:58:57 +05:30
Jakob Olsson
f46f994ce2 map-controller: 2.8.0.5 2022-07-13 17:46:27 +02:00
Jakob Olsson
40a43b643c map-topology: 2.5.0.7 2022-07-13 13:35:38 +02:00
Anjan Chanda
80fe362716 ieee1905: 4.10.3 2022-07-12 15:52:09 +02:00
Jakob Olsson
72b385e50f map-agent: 2.9.0.4 2022-07-12 15:06:36 +02:00
Jakob Olsson
853f895c6d map-controller: 2.8.0.4 2022-07-12 09:56:03 +02:00
Jakob Olsson
03b1576b8d map-agent: 2.9.0.3 2022-07-12 09:56:03 +02:00
Jakob Olsson
6e738b7fcb ieee1905: 4.9.9 2022-07-12 09:56:03 +02:00
Amin Ben Ramdhane
5b3e5d157d bbf: 6.8.7 2022-07-11 19:22:53 +05:30
vdutta
018a530f35 icwmp: 8.4.23 2022-07-11 15:57:48 +05:30
Jakob Olsson
12d3905280 ieee1905: add default script setting alid 2022-07-08 13:55:30 +02:00
Jakob Olsson
47b176a94c Map-agent: 2.9.0.2 2022-07-06 22:18:29 +02:00
Sukru Senli
12ff0f953d sulu: 1.0.12 2022-07-06 17:09:18 +02:00
Jakob Olsson
47a250754f map-controller: 2.8.0.3 2022-07-06 17:07:43 +02:00
Jakob Olsson
5b0e926cd9 ieee1905: 4.9.8 2022-07-06 15:59:49 +02:00
Jakob Olsson
18453ce68e map-agent: 2.9.0.1 2022-07-06 15:50:29 +02:00
Jakob Olsson
12645e7525 map-controller: 2.8.0.2 2022-07-06 15:49:30 +02:00
Sukru Senli
73e354c8cc sulu: 1.0.11 2022-07-06 10:33:46 +02:00
Jakob Olsson
abdd812601 map-agent: simplify pvid unset default script 2022-07-01 16:58:54 +02:00
Jakob Olsson
e56c279786 map-agent: add uci-default script setting pvid to 0 2022-07-01 16:33:34 +02:00
Yalu Zhang
e01fbf3fad Update package bbf: Fix voice CallLog filter
Fix the SIP response code handling and optimization
(cherry picked from commit d70c637aa4)
2022-07-01 14:00:21 +00:00
Amin Ben Ramdhane
22b37efad9 bbf: 6.8.6 2022-06-30 14:30:57 +02:00
Jakob Olsson
5628a1bee6 ieee1905: 4.9.7 2022-06-30 14:23:44 +02:00
Janusz Dziedzic
6d9c8d1090 map-agent: check no HT configured
We hit this on arcee - simplest workaround.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-06-29 16:58:51 +00:00
vdutta
dee5ea0da3 icwmp: 8.4.22 2022-06-29 21:01:31 +05:30
Jakob Olsson
0c6dad2c58 ieee1905: 4.9.6 2022-06-29 16:43:30 +02:00
Amin Ben Ramdhane
f9cd9c627e bbf: 6.8.5 2022-06-28 21:41:44 +05:30
Grzegorz Sluja
31f03a7b47 dectmngr-3.5.4: Fix for setting extension_id for handset 2022-06-28 17:27:23 +02:00
Jakob Olsson
50d2408ddb map-topology: 2.5.0.6 2022-06-28 14:15:00 +02:00
Amin Ben Ramdhane
79f5bbd0cf bbf: 6.8.4 2022-06-28 15:43:42 +05:30
Amin Ben Ramdhane
58fdac62b0 icwmp: 8.4.21 2022-06-28 15:43:20 +05:30
Amin Ben Ramdhane
32192f5423 icwmp: regenerate ssl link in boot() 2022-06-28 09:05:39 +05:30
Amin Ben Ramdhane
35bb02b726 bbf: 6.8.2 2022-06-27 20:31:30 +05:30
vdutta
77536709f0 bbf: 6.8.1 2022-06-24 13:19:15 +05:30
vdutta
e67a5e505f icwmp: 8.4.20 2022-06-24 13:18:45 +05:30
vdutta
cd7826de33 obuspa: 5.0.0.16 2022-06-24 13:18:22 +05:30
vdutta
c09a4a0ca5 uspd: Move TransferComplete event to obuspa 2022-06-24 13:17:30 +05:30
Grzegorz Sluja
49e7f2e349 dectmngr: Fix for setting extension_id for handset 2022-06-24 09:45:24 +02:00
vdutta
44e614d8e2 inbd: Fix static code analysis warnings 2022-06-24 00:09:28 +02:00
Jakob Olsson
dba358a542 map-agent: traffic_separation: reload netifd by ubus call uci commit 2022-06-23 12:02:40 +02:00
vdutta
6688812576 obuspa: 5.0.0.15 2022-06-23 15:26:32 +05:30
vdutta
9b14d0574f icwmp: 8.4.19 2022-06-23 15:19:09 +05:30
Amin Ben Ramdhane
82bf3bbba4 bbf: 6.8.0 2022-06-23 15:18:06 +05:30
Amin Ben Ramdhane
311273865d bbf: 6.7.9 2022-06-23 15:17:44 +05:30
vdutta
e64714e538 obuspa: Added option to verify the mqtt received topic 2022-06-23 15:15:07 +05:30
Jakob Olsson
f29ade1e60 map-topology: 2.5.0.5 2022-06-22 13:48:00 +02:00
vdutta
ddf6d7ba32 icwmp: 8.4.18 2022-06-22 11:10:29 +05:30
suvendhu
803be5fcad icwmp: 8.4.17 2022-06-22 11:10:00 +05:30
Amin Ben Ramdhane
08abbdfe5b periodicstats: 1.2.0 2022-06-22 11:09:32 +05:30
Grzegorz Sluja
3ad949442c Update package endptmngr
Return to the first call without playing any tones on DECT handset when the second call ends
2022-06-21 15:20:44 +02:00
Jakob Olsson
6b37f2fccb map-controller: 2.8.0.1 2022-06-17 13:51:08 +02:00
Jakob Olsson
8d3aa2aa60 map-controller: 2.8.0.0 2022-06-17 11:07:01 +02:00
Jakob Olsson
9f5d5eb347 map-agent: 2.9.0.0 2022-06-17 11:07:01 +02:00
Stanislaw Gruszka
2d9a47073b map-agent: ts: reload firewall 2022-06-16 17:55:41 +02:00
Stanislaw Gruszka
dc0ab5dbd3 map-agent: ts: configure firewall 2022-06-16 17:55:41 +02:00
Stanislaw Gruszka
f513b5ba46 map-agent: traffic separation script rework 2022-06-16 17:55:41 +02:00
vdutta
aa5e98a35c obuspa: 5.0.0.13 2022-06-16 19:27:56 +05:30
Amin Ben Ramdhane
051c6f2cc1 bbf: 6.7.8 2022-06-16 19:27:30 +05:30
vdutta
aa2a78e211 obuspa: 5.0.0.12 2022-06-15 20:30:34 +05:30
vdutta
063d20932a urlfilter: 1.1.3 2022-06-15 17:57:09 +05:30
vdutta
59752df3d4 bbf: 6.7.7 2022-06-15 17:56:33 +05:30
Grzegorz Sluja
66f28e376d endptmngr: Fixes for call waiting and 3way call scenarios 2022-06-15 10:32:41 +02:00
Jakob Olsson
fbb6a84da8 map-agent: add missing uci validation and new cfg option to default 2022-06-14 15:13:13 +02:00
vdutta
bcd8b4f010 bbf: 6.7.6 2022-06-14 18:34:26 +05:30
vdutta
e98ef22bc5 icwmp: 8.4.16 2022-06-14 18:33:59 +05:30
Jakob Olsson
c45938f5ad map-topology: 2.5.0.4 2022-06-14 09:50:03 +02:00
Jakob Olsson
05b24396af map-agent: 2.8.1.2 2022-06-13 17:34:57 +02:00
Jakob Olsson
ba0e9e25ba map-agent: 2.8.1.1 2022-06-13 17:21:10 +02:00
Jakob Olsson
a6005cb439 map-agent: 2.8.1.0 2022-06-13 16:50:32 +02:00
Jakob Olsson
3ebb026453 map-agent: multiap: manage wpa_supplicant bssid_ignore 2022-06-13 16:50:32 +02:00
Jakob Olsson
921b0fc335 map-agent: multiap: introduce func to clear bssid of all bstas 2022-06-13 16:04:00 +02:00
vdutta
10eeef5a32 bbf: 6.7.5 2022-06-10 20:15:17 +05:30
vdutta
a55c39c32e uspd: 2.2.10 2022-06-10 20:12:26 +05:30
vdutta
70422f048b icwmp: 8.4.15 2022-06-10 18:42:05 +05:30
Jakob Olsson
8670fb8e7d map-topology: 2.5.0.3 2022-06-10 10:51:46 +02:00
Jakob Olsson
54ddfb5b2d map-topology: 2.5.0.2 2022-06-09 14:17:58 +02:00
Amin Ben Ramdhane
e8cdea9a79 bbf: 6.7.5 2022-06-09 17:09:43 +05:30
Amin Ben Ramdhane
7613b55f49 uspd: 2.2.9 2022-06-09 16:10:03 +05:30
Amin Ben Ramdhane
ecc65760b7 bbf: 6.7.3 2022-06-09 16:10:03 +05:30
Amit Kumar
053c36c1c7 qosmngr: updated QoS clasification
l3 iptables rule with ethx was not matching this was causing incorrect classification to wrong queue.
ebtables rule correction done with ethertype,protocol and port to classify packet for destination queue.
2022-06-09 06:31:02 +00:00
Grzegorz Sluja
7d9325abff dectmngr: Fix scenario when active call hangs up and return to onhold call 2022-06-08 17:55:07 +02:00
vdutta
baee22e19f urlfilter: 1.1.2 2022-06-08 19:57:25 +05:30
vdutta
cc765c2704 uspd: 2.2.8 2022-06-08 09:34:43 +05:30
vdutta
2ae8cd2987 bbf: 6.7.2 2022-06-08 09:33:47 +05:30
Sukru Senli
1ce681afac sulu: 1.0.10 2022-06-07 19:59:59 +02:00
vdutta
b66629350d icwmp: 8.4.14 2022-06-07 20:53:57 +05:30
vdutta
3a6dce64de stunc: 1.1.11 2022-06-07 19:13:09 +05:30
Jakob Olsson
fbf4c2d7ed map-topology: 2.5.0.1 2022-06-03 17:07:09 +02:00
Yalu Zhang
57386b0e87 Update packages endptmngr and dectmngr
Support call waiting and 3 way call for DECT
2022-06-03 13:58:32 +02:00
Jakob Olsson
37505a1c24 map-agent: 2.8.0.5 2022-06-03 09:36:44 +02:00
Jakob Olsson
4b28a1cd4a map-agent: 2.8.0.4 2022-06-02 15:16:25 +02:00
Jakob Olsson
26fff3a9ac wfadatad: 2.8.0.1 2022-06-02 09:59:34 +02:00
Jakob Olsson
fe3592b382 map-controller: 2.7.0.1 2022-06-01 10:17:23 +02:00
Jakob Olsson
78cc239b3d map-agent: 2.8.0.3 2022-05-31 15:58:50 +02:00
Yalu Zhang
714c822e7d Update package endptmngr and dectmngr
dectmngr-3.5.2: Release the call completely when the first handset rejects an incoming call
endptmngr: Send CALL_REJECT event to Asterisk when DECT handset rejects the call
2022-05-31 14:48:56 +02:00
Anjan Chanda
d5d8cbff6e ieee1905: 4.9.5 2022-05-31 10:57:28 +02:00
Jakob Olsson
66f5f5315a map-agent: 2.8.0.2 2022-05-30 17:08:09 +02:00
Jakob Olsson
96a8f4f8fa map-agent: 2.8.0.1 2022-05-30 16:05:12 +02:00
Jakob Olsson
80b71b4a9c map-agent: 2.8.0.0 with new license update for release-6.5 2022-05-30 14:49:31 +02:00
Jakob Olsson
cb86ec3c50 Revert "map-agent: 2.8.0.0 with new license update"
This reverts commit 2e30eb75b5.
2022-05-30 14:48:18 +02:00
Sukru Senli
6451da621d wfadatad: 2.8.0.0 BSD-3-Clause license change 2022-05-30 14:41:11 +02:00
Sukru Senli
8596640c59 map-agent: update license to BSD-3-Clause 2022-05-30 14:35:42 +02:00
Sukru Senli
e61adabad1 map-controller: update license to BSD-3-Clause 2022-05-30 14:35:29 +02:00
Sukru Senli
2e30eb75b5 map-agent: 2.8.0.0 with new license update 2022-05-30 13:28:22 +02:00
Sukru Senli
b00dbbfc16 map-topology: 2.5.0.0 with new license update 2022-05-30 13:24:34 +02:00
suvendhu
7acb31977c twamp: 1.2.0 2022-05-30 14:19:21 +05:30
Jakob Olsson
8f075c2dde map-agent: 2.7.2.6 2022-05-30 10:33:31 +02:00
Sukru Senli
15ab530afb usp-js: add license 2022-05-28 18:38:18 +02:00
Sukru Senli
d7d28d4d53 smwodd: add license 2022-05-28 18:34:41 +02:00
Sukru Senli
ac05fc5e09 map-topology: correct license 2022-05-28 18:07:20 +02:00
Sukru Senli
affd3a59ee shflags: remove unused package 2022-05-28 18:07:17 +02:00
Sukru Senli
702558940f libmicroxml: remove unused package 2022-05-28 18:07:09 +02:00
Sukru Senli
96af293828 sulu: 1.0.9 2022-05-27 16:07:31 +02:00
vdutta
9220eaab7f bbf: 6.6.43 2022-05-26 18:56:25 +05:30
Jakob Olsson
d2e6343808 map-topology: 2.4.0.5 2022-05-25 18:52:49 +02:00
sverma
8b71e43391 wfadatad: 2.7.0.7 2022-05-25 20:42:01 +05:30
Sukru Senli
b12b3dcf79 sulu: 1.0.8 2022-05-25 17:08:48 +02:00
vdutta
2af76e93d6 bbf: 6.6.42 2022-05-25 20:10:31 +05:30
Jakob Olsson
8eff3b57e7 map-agent: 2.7.2.5 2022-05-25 16:31:56 +02:00
vdutta
24470ed5f8 icwmp: 8.4.12 2022-05-25 19:40:16 +05:30
Sukru Senli
aba55434de sulu: 1.0.7 2022-05-25 15:33:40 +02:00
vdutta
49a4936cc0 swmodd: 2.1.5 2022-05-25 18:17:30 +05:30
vdutta
1d63ac6583 questd: 5.2.4 2022-05-25 18:13:52 +05:30
vdutta
bb9f180b77 rulengd: 1.2.7 2022-05-25 18:13:28 +05:30
Jakob Olsson
64c624c281 ieee1905: 4.9.2 2022-05-25 12:40:59 +02:00
vdutta
d7946e13f1 bbf: 6.6.41 2022-05-24 19:18:44 +05:30
vdutta
baa19aad3f bbf: Heartbeat support 2022-05-24 19:12:42 +05:30
vdutta
48c0d51e0e icwmp: Heartbeat support 2022-05-24 19:12:01 +05:30
vdutta
f0301c8a45 bbf: 6.6.39 2022-05-24 11:59:32 +05:30
vdutta
458a57bbb7 swmodd: 2.1.4 2022-05-24 11:58:55 +05:30
Sukru Senli
ebcee30bce sulu: 1.0.6 2022-05-23 11:41:00 +02:00
Sukru Senli
34f90babf5 sulu: 1.0.5 2022-05-20 15:44:41 +02:00
Jakob Olsson
34dc1fed4b map-topology: 2.4.0.4 2022-05-20 13:09:08 +02:00
vdutta
7633ca403c periodicstats: 1.1.3 2022-05-20 10:15:46 +05:30
vdutta
ec392c923c icwmp: 8.4.10 2022-05-20 10:14:59 +05:30
Stanislaw Gruszka
24205bf73f iop: config: enable ip-bridge 2022-05-19 14:42:33 +00:00
Jakob Olsson
76b1e43b6f map-topology: 2.4.0.3 2022-05-19 14:52:09 +02:00
Jakob Olsson
4672afb6de ieee1905: 4.9.1 2022-05-19 13:16:15 +02:00
Jakob Olsson
d2ff5738cd wfadatad: 2.7.0.6 2022-05-19 13:13:45 +02:00
Jakob Olsson
43246014e1 map-topology: 2.4.0.2 2022-05-19 13:03:44 +02:00
Amin Ben Ramdhane
115b752ade bbf: 6.6.38
(cherry picked from commit 62935f5016)
2022-05-19 03:26:06 +00:00
Amin Ben Ramdhane
26b06548f6 udpecho: 2.0.1
(cherry picked from commit 3b7b6fd627)
2022-05-19 03:25:18 +00:00
vdutta
6c99b9fc72 icwmp: 8.4.9
(cherry picked from commit d68a6add62)
2022-05-19 03:24:23 +00:00
vdutta
135ebebd44 stunc: 1.1.9
(cherry picked from commit 12b6a72a48)
2022-05-19 03:23:13 +00:00
Jakob Olsson
2d188b5c37 map-agent: 2.7.2.4 2022-05-18 14:53:58 +02:00
Amit KUmar
14ce1429a4 map-topology: per host statistics collection
included conntrack netfilter library
2022-05-18 10:32:31 +02:00
Jakob Olsson
a6b585cccf map-agent: multiap: lock operations on backhaul file 2022-05-18 10:29:40 +02:00
Amit KUmar
6db304b6ff qosmngr: WRR schdeuling configuration
sequence corrected in initialization as first tm initialization
then delcfg. porttminit bydefault does queue configuration as SP.
2022-05-17 17:07:46 +02:00
Amin Ben Ramdhane
817a7e8301 bbf: 6.6.37 2022-05-17 17:06:49 +02:00
Jakob Olsson
e8790801d0 map: prepend all multiap packages version number with the supported revision 2022-05-17 15:11:03 +02:00
Jakob Olsson
a6790ac523 map-agent: 7.2.3 2022-05-17 15:07:40 +02:00
Jakob Olsson
76656bb043 map-controller: 6.0.22 2022-05-17 13:08:18 +02:00
247 changed files with 6354 additions and 13595 deletions

78
ated/Makefile Normal file
View File

@@ -0,0 +1,78 @@
#
# Copyright (C) 2019 iopsys Software Solutions AB. All rights reserved.
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ated
PKG_VERSION:=1.2.2
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=f614cba983d827d5185c60a6a5a35530621d44d2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/mediatek/ated.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
# support parallel build
#PKG_BUILD_PARALLEL:=1
#re create configure scripts if not present.
#PKG_FIXUP:=autoreconf
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
# this way we don't need to pick out the resulting files from the build dir.
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/ated
CATEGORY:=Utilities
TITLE:=Daemon for handling wifi calibration
URL:=
DEPENDS:= libc
endef
define Package/ated/description
Daemon for handling wifi calibration
endef
#TARGET_CFLAGS += -I$(LINUX_DIR)/include -I$(LINUX_DIR)/arch/mips/include
MAKE_FLAGS += \
v=2 \
m=3
#TARGET_CPPFLAGS := \
# -I$(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx \
# -I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
# $(TARGET_CPPFLAGS)
# we donot wwant to have any install.
define Build/Install/Default
endef
define Package/ated/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ated $(1)/sbin/
endef
$(eval $(call BuildPackage,ated))

View File

@@ -18,10 +18,6 @@ config BBF_TR143
bool "Enable TR-143 Data Model Support"
default y
config BBF_TR471
bool "Enable TR-471 Data Model Support"
default y
config BBFDM_ENABLE_JSON_PLUGIN
bool "Enable json plugin to extend datamodel"
default y

181
bbf/Makefile Normal file
View File

@@ -0,0 +1,181 @@
#
# Copyright (C) 2022 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=6.8.9.38
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=aa2ce1bf46bb5ff271402fccb9e73e6c63c65695
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libbbf_api
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for libbbfdm API
endef
define Package/libbbfdm/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libcurl
endef
define Package/libbbfdm
$(Package/libbbfdm/default)
TITLE += (internal)
VARIANT:=internal
endef
define Package/libbbfdm-mbedtls
$(Package/libbbfdm/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_libbbfdm-mbedtls:libmbedtls
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
endef
define Package/libbbfdm-openssl
$(Package/libbbfdm/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
CONFLICTS := libbbfdm-mbedtls
VARIANT:=openssl
endef
define Package/libbbfdm-wolfssl
$(Package/libbbfdm/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_libbbfdm-wolfssl:libwolfssl
CONFLICTS := libbbfdm-mbedtls libbbfdm-openssl
VARIANT:=wolfssl
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
define Package/libbbf_api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
define Package/libbbfdm/description
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)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
ifeq ($(CONFIG_BBF_TR104),y)
CMAKE_OPTIONS += \
-DBBF_TR104=ON
endif
ifeq ($(CONFIG_BBF_TR143),y)
CMAKE_OPTIONS += \
-DBBF_TR143=ON
endif
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
CMAKE_OPTIONS += \
-DBBF_VENDOR_EXTENSION=ON
CMAKE_OPTIONS += \
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
endif ##CONFIG_BBF_VENDOR_EXTENSION
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
CMAKE_OPTIONS += \
-DBBF_JSON_PLUGIN=ON
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
CMAKE_OPTIONS += \
-DBBF_DOTSO_PLUGIN=ON
endif
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
endif
define Package/libbbf_api/install
$(INSTALL_DIR) $(1)/lib
endef
define Package/libbbfdm/default/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
endef
define Package/libbbfdm/default/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
endef
Package/libbbfdm-openssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-wolfssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-mbedtls/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-openssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-wolfssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-mbedtls/install = $(Package/libbbfdm/default/install)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
touch $(1)/usr/lib/libbbf_api.so
endef
$(eval $(call BuildPackage,libbbf_api))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,libbbfdm-openssl))
$(eval $(call BuildPackage,libbbfdm-wolfssl))
$(eval $(call BuildPackage,libbbfdm-mbedtls))

View File

@@ -1,263 +0,0 @@
#
# Copyright (C) 2023 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.0.20
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=4a8d286201efdff814f106e92147c697c32a94a9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libbbfdm-api
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF datamodel library, provides API to extend datamodel using DotSO plugins
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
ABI_VERSION:=1.0
endef
define Package/libbbfdm/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl +libbbfdm-api \
+BBF_TR471:obudpst
endef
define Package/libbbfdm
$(Package/libbbfdm/default)
TITLE += (default)
VARIANT:=default
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
DEFAULT_VARIANT:=1
endef
define Package/libbbfdm-mbedtls
$(Package/libbbfdm/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_libbbfdm-mbedtls:libmbedtls
VARIANT:=mbedtls
CONFLICTS := libbbfdm libbbfdm-openssl libbbfdm-wolfssl
endef
define Package/libbbfdm-openssl
$(Package/libbbfdm/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
VARIANT:=openssl
CONFLICTS := libbbfdm libbbfdm-mbedtls libbbfdm-wolfssl
endef
define Package/libbbfdm-wolfssl
$(Package/libbbfdm/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_libbbfdm-wolfssl:libwolfssl
VARIANT:=wolfssl
CONFLICTS := libbbfdm libbbfdm-mbedtls libbbfdm-openssl
endef
define Package/bbfdmd
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Datamodel ubus backend
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +PACKAGE_libbbfdm-mbedtls:libbbfdm-mbedtls \
+PACKAGE_libbbfdm-openssl:libbbfdm-openssl +PACKAGE_libbbfdm-wolfssl:libbbfdm-wolfssl \
+PACKAGE_libbbfdm:libbbfdm
endef
define Package/userinterface
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Package to add Device.UserInterface. datamodel support
endef
define Package/userinterface/description
Package to add Device.UserInterface. datamodel support
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
define Package/libbbfdm-api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
define Package/libbbfdm/description
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)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
-DBBF_WIFI_DATAELEMENTS=ON
ifeq ($(CONFIG_BBF_TR104),y)
CMAKE_OPTIONS += \
-DBBF_TR104=ON
endif
ifeq ($(CONFIG_BBF_TR143),y)
CMAKE_OPTIONS += \
-DBBF_TR143=ON
endif
ifeq ($(CONFIG_BBF_TR471),y)
CMAKE_OPTIONS += \
-DBBF_TR471=ON
endif
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
CMAKE_OPTIONS += \
-DBBF_VENDOR_EXTENSION=ON
CMAKE_OPTIONS += \
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
endif ##CONFIG_BBF_VENDOR_EXTENSION
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
CMAKE_OPTIONS += \
-DBBF_JSON_PLUGIN=ON
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
CMAKE_OPTIONS += \
-DBBF_DOTSO_PLUGIN=ON
endif
ifeq ($(BUILD_VARIANT),default)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
endif
ifeq ($(CONFIG_PACKAGE_bbfdmd),y)
CMAKE_OPTIONS += \
-DBBFDMD_MAX_MSG_LEN:Integer=10485760
endif
define Package/libbbfdm-api/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/lib/
endef
define Package/libbbfdm/default/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/lib/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
ifeq ($(CONFIG_BBF_TR143),y)
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
endif
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
$(INSTALL_DIR) $(1)/etc/bbfdm/json
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
endif
endef
define Package/libbbfdm/default/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
endef
define Package/bbfdmd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/src/bbfdmd $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/json/input.json $(1)/etc/bbfdm/
endef
define Package/userinterface/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_DATA) ./files/etc/config/userinterface $(1)/etc/config/userinterface
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/userinterface $(1)/lib/upgrade/keep.d/userinterface
$(INSTALL_BIN) ./files/etc/init.d/userinterface $(1)/etc/init.d/userinterface
$(INSTALL_BIN) ./files/etc/uci-defaults/93-userinterface-firewall $(1)/etc/uci-defaults/93-userinterface-firewall
$(INSTALL_BIN) ./files/etc/uci-defaults/94-userinterface-json $(1)/etc/uci-defaults/94-userinterface-json
$(INSTALL_BIN) ./files/etc/firewall.userinterface $(1)/etc/firewall.userinterface
endef
Package/libbbfdm/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-openssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-wolfssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-mbedtls/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-openssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-wolfssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-mbedtls/install = $(Package/libbbfdm/default/install)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-api
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm/dmtree/tr181/device.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm/dmtree/vendor/vendor.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbfdm-api/
# Work around for backward compatibility
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbf_api/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/libbbfdm_api.h $(1)/usr/include/libbbf_api.h
endef
$(eval $(call BuildPackage,libbbfdm-api))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,libbbfdm-openssl))
$(eval $(call BuildPackage,libbbfdm-wolfssl))
$(eval $(call BuildPackage,libbbfdm-mbedtls))
$(eval $(call BuildPackage,bbfdmd))
$(eval $(call BuildPackage,userinterface))

View File

@@ -1,7 +0,0 @@
config bbfdmd 'bbfdmd'
option enabled '1'
option loglevel '1'
option refresh_time '10'
option transaction_timeout '10'

View File

@@ -1,3 +0,0 @@
config userinterface 'global'
option enable '1'

View File

@@ -1,125 +0,0 @@
#!/bin/sh
. /lib/functions.sh
IDENTIFIER="UI-REMOTE-ACCESS-WAN"
log() {
echo "${@}"|logger -t firewall.userinterface -p info
}
if [ ! -f "/etc/config/userinterface" ] || [ ! -f "/etc/config/nginx" ]; then
exit 0;
fi
exec_cmd() {
if ! "$@"; then
log "Failed to run [$*]"
fi
}
delete_ui_firewall_rules() {
input_chains=$(iptables -S | grep -E "^-N zone[a-zA-Z0-9_]+input$" | cut -d' ' -f 2)
output_chains=$(iptables -S | grep -E "^-N zone[a-zA-Z0-9_]+output$" | cut -d' ' -f 2)
for chain in ${input_chains}; do
CMD="iptables -w 1 -t filter -nL ${chain} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd iptables -w 1 -t filter -D "${chain}" "${rule_num}";
fi
done
done
for chain in ${output_chains}; do
CMD="iptables -w 1 -t filter -nL ${chain} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd iptables -w 1 -t filter -D "${chain}" "${rule_num}";
fi
done
done
input6_chains=$(ip6tables -S | grep -E "^-N zone[a-zA-Z0-9_]+input$" | cut -d' ' -f 2)
output6_chains=$(ip6tables -S | grep -E "^-N zone[a-zA-Z0-9_]+output$" | cut -d' ' -f 2)
for chain in ${input6_chains}; do
CMD="ip6tables -w 1 -t filter -nL ${chain} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd ip6tables -w 1 -t filter -D "${chain}" "${rule_num}";
fi
done
done
for chain in ${output6_chains}; do
CMD="ip6tables -w 1 -t filter -nL ${chain} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd ip6tables -w 1 -t filter -D "${chain}" "${rule_num}";
fi
done
done
}
configure_ui_firewall_rule() {
local sec="${1}"
local enabled access interface
local port=""
config_get_bool enabled "${sec}" uci_enable '1'
config_get access "${sec}" uci_access ""
config_get interface "${sec}" uci_interface ""
if [ "${enabled}" -eq "1" ] && [ "${access}" == "remote" ] && [ -n "${interface}" ]; then
port_list=$(uci -q show nginx."${1}".listen|cut -d'=' -f 2|sed "s/'/ /g"|sed "s/\[\:\:\]\://g")
for item in ${port_list}; do
if [ -z "${item##[0-9]*}" ]; then
port="${item}"
break
fi
done
if [ -z "${port}" ]; then
return 0
fi
zone="zone_${interface}_input"
iptables -w 1 -t filter -nL ${zone} 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate NEW,ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
ip6tables -w 1 -t filter -nL ${zone} 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
ip6tables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate NEW,ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
zone="zone_${interface}_output"
iptables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
ip6tables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
ip6tables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
fi
}
# Delete existing remote access rules
delete_ui_firewall_rules
config_load userinterface
config_get_bool serv_enable global enable 1
if [ "${serv_enable}" -eq "1" ]; then
config_load nginx
# Configure the User Interface rule
config_foreach configure_ui_firewall_rule server
fi

View File

@@ -1,17 +0,0 @@
#!/bin/sh
[ "$ACTION" = "ifup" ] || exit 0
apply_sysctl_configuration() {
local sysctl_conf
sysctl_conf="/etc/bbfdm/sysctl.conf"
[ -f "${sysctl_conf}" ] || touch "${sysctl_conf}"
sysctl -e -p "${sysctl_conf}" >&-
}
ubus -t 10 wait_for network.device
apply_sysctl_configuration

View File

@@ -1,80 +0,0 @@
#!/bin/sh /etc/rc.common
START=96
STOP=10
USE_PROCD=1
PROG=/usr/sbin/bbfdmd
BBFDM_JSON_INPUT="/etc/bbfdm/input.json"
log() {
echo "${@}"|logger -t bbfdmd.init -p info
}
validate_bbfdm_bbfdmd_section()
{
uci_validate_section bbfdm bbfdmd "bbfdmd" \
'enabled:bool:true' \
'debug:bool:false' \
'loglevel:uinteger' \
'sock:string' \
'refresh_time:uinteger' \
'transaction_timeout:uinteger' \
'subprocess_level:uinteger'
}
configure_bbfdmd()
{
local enabled debug sock
config_load bbfdm
validate_bbfdm_bbfdmd_section || {
log "Validation of bbfdmd section failed"
return 1;
}
[ "${enabled}" -eq 0 ] && return 0
[ ! -f "${BBFDM_JSON_INPUT}" ] && return 0
if [ -n "${loglevel}" ]; then
echo "$(jq --arg res ${loglevel} '.daemon.config += {"loglevel": $res}' ${BBFDM_JSON_INPUT})" > ${BBFDM_JSON_INPUT}
fi
if [ -n "${refresh_time}" ]; then
echo "$(jq --arg res ${refresh_time} '.daemon.config += {"refresh_time": $res}' ${BBFDM_JSON_INPUT})" > ${BBFDM_JSON_INPUT}
fi
if [ -n "${transaction_timeout}" ]; then
echo "$(jq --arg res ${transaction_timeout} '.daemon.config += {"transaction_timeout": $res}' ${BBFDM_JSON_INPUT})" > ${BBFDM_JSON_INPUT}
fi
if [ -n "${subprocess_level}" ]; then
echo "$(jq --arg res ${subprocess_level} '.daemon.config += {"subprocess_level": $res}' ${BBFDM_JSON_INPUT})" > ${BBFDM_JSON_INPUT}
fi
procd_set_param command ${PROG}
if [ "${debug}" -eq 1 ]; then
procd_set_param stdout 1
procd_set_param stderr 1
fi
if [ -f "${sock}" ]; then
procd_append_param command -s "${sock}"
fi
}
start_service()
{
procd_open_instance "bbfdm"
configure_bbfdmd
procd_set_param respawn
procd_close_instance "bbfdm"
}
service_triggers()
{
procd_add_reload_trigger "bbfdm"
}

View File

@@ -1,33 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
STOP=01
USE_PROCD=1
start_service() {
local enable
config_load userinterface
config_get_bool enable global enable 1
if [ ! -f "/etc/config/nginx" ]; then
return 0
fi
if [ "${enable}" -eq "1" ]; then
ubus call service state '{"name":"nginx", "spawn":true}'
else
ubus call service state '{"name":"nginx", "spawn":false}'
fi
# Inject firewall rules
procd_open_instance userinterface
/etc/firewall.userinterface
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger "userinterface" "nginx"
}

View File

@@ -1,12 +0,0 @@
#!/bin/sh
uci -q batch <<-EOT
delete firewall.userinterface
set firewall.userinterface=include
set firewall.userinterface.path=/etc/firewall.userinterface
set firewall.userinterface.reload=1
commit firewall
EOT
exit 0

View File

@@ -1,9 +0,0 @@
#!/bin/sh
# This deletes the userinterface json plugin if exists in case of upgrade
if [ -f "/etc/bbfdm/json/UserInterface.json" ]; then
rm /etc/bbfdm/json/UserInterface.json
fi
exit 0

View File

@@ -1 +0,0 @@
/etc/bbfdm/sysctl.conf

View File

@@ -1 +0,0 @@
/etc/nginx/allow_host_*

View File

@@ -1,26 +1,32 @@
#
# Copyright (C) 2022 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:=bulkdata
PKG_VERSION:=2.1.0
PKG_VERSION:=2.0.3.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
PKG_SOURCE_VERSION:=2dd55d9c9eb01ed1b11e16bad9e2c3e8badfffeb
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
PKG_SOURCE_VERSION:=33a6648de9ee0af33c44518656b56b0a30b6c1ab
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
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
PKG_BUILD_DEPENDS:=bbf
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
@@ -28,7 +34,7 @@ define Package/$(PKG_NAME)
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json +zlib
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json
endef
TARGET_CFLAGS += \
@@ -44,8 +50,8 @@ endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.json $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.so $(1)/usr/lib/bbfdm
$(CP) ./files/* $(1)/
endef

View File

@@ -7,19 +7,22 @@ USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
start_service() {
local enable
local enable=$(uci -q get bulkdata.bulkdata.enable)
config_load bulkdata
config_get_bool enable bulkdata enable 1
procd_open_instance bulkdata
[ "$enable" -eq "1" ] && {
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
[ "$enable" != "1" ] && {
return 0
}
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
procd_close_instance
}
boot() {
start
}
reload_service() {
stop
start

View File

@@ -16,8 +16,8 @@ get_next_count()
fi
while [ "${found}" -ne 1 ]; do
uci -q get "${config}"."${default_name}"_${count} >/dev/null
if [ "$?" -eq 0 ]; then
uci -q get ${config}.${default_name}_${count} >/dev/null
if [ $? -eq 0 ]; then
count=$((count + 1))
else
found=1;
@@ -39,8 +39,8 @@ translate_profile_id_to_profile_name() {
[ "${curr_profile_id}" != "${profile_id}" ] && return
uci -q set bulkdata."${section}".profile_name="${profile_name}"
uci -q set bulkdata."${section}".profile_id=""
uci -q set bulkdata.${section}.profile_name="${profile_name}"
uci -q set bulkdata.${section}.profile_id=""
}
update_profile_sections() {
@@ -54,7 +54,7 @@ update_profile_sections() {
case "${section}" in
"cfg"*)
profile_name="$(get_next_count bulkdata "${default}" ${PROFILE_COUNT})"
profile_name="$(get_next_count bulkdata ${default} ${PROFILE_COUNT})"
uci_rename bulkdata "${section}" "${profile_name}"
;;
esac
@@ -62,7 +62,7 @@ update_profile_sections() {
[ -n "$profile_name" ] && section="${profile_name}"
uci -q set bulkdata."${section}".profile_id=""
uci -q set bulkdata.${section}.profile_id=""
config_foreach translate_profile_id_to_profile_name profile_parameter "${profile_id}" "${profile_name}"
config_foreach translate_profile_id_to_profile_name profile_http_request_uri_parameter "${profile_id}" "${profile_name}"

View File

@@ -1,7 +0,0 @@
menu "Configuration"
config DECOLLECTOR_EASYMESH_VERSION
int "Support Easymesh version"
default 2
endmenu

View File

@@ -1,80 +0,0 @@
#
# Copyright (C) 2021-2023 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=4.0.2.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=fa1b24690ca00a73401fec1386dbf98932545d05
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/decollector
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi DataElements Collector Proxy
DEPENDS:=+libuci +libubox +ubus +libpthread +libnl-genl \
+libeasy +libwifiutils +libieee1905 +map-plugin
endef
define Package/decollector/description
It implements the WiFi DataElements Agent as defined in the Wi-Fi Alliance's
DataElements specification.
endef
define Package/decollector/config
source "$(SOURCE)/Config.in"
endef
ifneq (,$(findstring ALPHA,$(CONFIG_VERSION_CODE)))
MAKE_FLAGS += DEBUG=1
endif
ifneq (,$(findstring BETA,$(CONFIG_VERSION_CODE)))
MAKE_FLAGS += DEBUG=1
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/decollector/ $(PKG_BUILD_DIR)/
endef
endif
MAKE_PATH:=src
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_DECOLLECTOR_EASYMESH_VERSION)
EXECS := \
$(if $(CONFIG_PACKAGE_decollector),decollector)
MAKE_FLAGS += EXECS="$(EXECS)"
define Package/decollector/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/decollector.init $(1)/etc/init.d/decollector
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/decollector $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,decollector))

View File

@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.5.9
PKG_VERSION:=3.5.14
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ae9e8f3406f1087464b994cdfbc64a4ce2f86ed4
PKG_SOURCE_VERSION:=4f16755f8ac09d373234565f050832c049bdf543
PKG_MIRROR_HASH:=skip
endif
@@ -34,7 +34,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=DECT Manager
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c +gpiod-tools
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c
endef
define Package/$(PKG_NAME)/description

View File

@@ -6,63 +6,31 @@ START=70
STOP=12
USE_PROCD=1
NAME=dectmngr
PROG=/usr/sbin/dectmngr
LOG_PATH=/var/log/dectmngr
DB_PATH=/etc/dect
DCX81_UART_DT_ALIAS=/proc/device-tree/aliases/dcx81-uart
DECT_GPIO="$(gpiofind DCX81_RSTN | cut -d ' ' -f 2 2>/dev/null)"
DECT_GPIO=$(db -q get hw.board.dect_gpio)
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
stop_and_wait_dectmngr() {
dect_pid=$(pidof $PROG)
[ -n "$dect_pid" ] && kill $dect_pid
pidof $NAME && killall -q $NAME
pidof $PROG > /dev/null 2>&1 && sleep 2 # wait for the process to stop gracefully
while pidof $PROG > /dev/null 2>&1; do
dect_pid=$(pidof $PROG)
[ -n "$dect_pid" ] && kill -9 $dect_pid
pidof $NAME && sleep 2 # wait for the process to stop gracefully
while pidof $NAME; do
killall -q -9 $NAME
sleep 1
done
}
has_dect() {
[ -f "$DCX81_UART_DT_ALIAS" ]
}
get_dcx81_device() {
readonly dcx81_uart_dt_node="/proc/device-tree/$(cat "$DCX81_UART_DT_ALIAS" 2>/dev/null)"
[ -e "$dcx81_uart_dt_node" ] || return 1
for tty_dt_node in /sys/class/tty/*/device/of_node; do
if [ "$tty_dt_node" -ef "$dcx81_uart_dt_node" ]; then
readonly uevent_file="${tty_dt_node%%/device/of_node}/uevent"
local device_name_line
device_name_line="$(grep '^DEVNAME=' "$uevent_file")" || return 1
readonly device="/dev/${device_name_line##DEVNAME=}"
[ -c "$device" ] || return 1
printf "%s" "$device"
return 0
fi
done
return 1
}
start_service() {
local opt_ext=
local rfpi=
local model_id=
local rxtun=
if ! has_dect; then
logger -t "$PROG" "Not starting because no DECT hardware is available."
return 0
fi
local dcx81_uart_device
if ! dcx81_uart_device="$(get_dcx81_device)"; then
logger -t "$PROG" -p daemon.warning "Could not determine DCX81 UART device. Falling back to default ttyH0."
dcx81_uart_device=/dev/ttyH0
fi
test $(db get hw.board.hasDect) = "0" && return
[ -n "$DECT_GPIO" ] && echo 1 > /sys/class/gpio/gpio${DECT_GPIO}/value
@@ -83,25 +51,18 @@ start_service() {
config_get log_dect_cmbs global log_dect_cmbs syslog
procd_open_instance
# dectmngr takes expects device without /dev
readonly dcx81_uart_device_wo_dev="${dcx81_uart_device##/dev/}"
case "$log_dect_cmbs" in
none)
if [ "$log_dect_cmbs" = "none" ]; then
echo "Starting dectmngr with cmbs logging disabled"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" $opt_ext
procd_set_param command $PROG -comname ttyH0 $opt_ext
rm -f $LOG_PATH/*
;;
file)
elif [ "$log_dect_cmbs" = "file" ]; then
echo "Starting dectmngr with cmbs logging enabled to file"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -log $LOG_PATH/dect-cmbs.log $opt_ext
;;
*)
procd_set_param command $PROG -comname ttyH0 -log $LOG_PATH/dect-cmbs.log $opt_ext
else
echo "Starting dectmngr with cmbs logging enabled to syslog"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -syslog $opt_ext
procd_set_param command $PROG -comname ttyH0 -syslog $opt_ext
rm -f $LOG_PATH/*
;;
esac
fi
procd_set_param respawn 6 2 3
procd_set_param term_timeout 20
@@ -110,7 +71,7 @@ start_service() {
}
stop_service() {
has_dect || return 0
test $(db get hw.board.hasDect) = "0" && return
[ -n "$DECT_GPIO" ] && echo 0 > /sys/class/gpio/gpio${DECT_GPIO}/value
stop_and_wait_dectmngr
@@ -120,7 +81,8 @@ reload_service() {
ubus call dect reload
}
service_triggers() {
service_triggers()
{
procd_add_config_trigger "config.change" "asterisk" /etc/init.d/dectmngr restart
procd_add_config_trigger "config.change" "dect" /etc/init.d/dectmngr reload
}
@@ -135,3 +97,4 @@ boot() {
[ ! -d $DB_PATH ] && mkdir -p $DB_PATH
start
}

View File

@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.2.0
PKG_VERSION:=1.1.2
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=43dec92b1c86be7859521da337e7bd1168848b26
PKG_SOURCE_VERSION:=bb754ae620a9fc66fd6fc0745f0fead0708c7a17
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -26,7 +26,7 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
TARGET_PLATFORM=BROADCOM
else
$(info Unexpected CONFIG_TARGET)
@@ -68,10 +68,6 @@ define Build/Compile
endef
define Package/dslmngr/install
$(CP) ./files/common/* $(1)/
ifeq ($(CONFIG_TARGET_brcmbca),y)
$(CP) ./files/broadcom/* $(1)/
endif
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
endef

View File

@@ -1,311 +0,0 @@
#!/bin/sh
. /lib/functions.sh
# ATM #
check_pvc() {
local vpi=$1
local vci=$2
local ret
ret=$(xtmctl operate conn --show | awk -v test="$vpi/$vci" '{if ($3==test ) print $5 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
check_xtm_list() {
local qclass=$1
local pcr scr mbs
local ret
case $# in
1)
pcr=0
scr=0
mbs=0
;;
2)
pcr=$2
scr=0
mbs=0
;;
4)
pcr=$2
scr=$3
mbs=$4
;;
esac
ret=$(xtmctl operate tdte --show | awk -v test="$qclass" -v pcr="$pcr" -v scr="$scr" -v mbs="$mbs" '{if ($2==test && $3==pcr && $4==scr && $5==mbs ) print $1 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
configure_atm_device() {
local name vpi vci device link_type encapsulation qos_class pcr mbs scr i
config_get name $1 name "ATM"
config_get vpi $1 vpi "8"
config_get vci $1 vci "35"
config_get device $1 device "atm0"
config_get link_type $1 link_type "eoa"
config_get encapsulation $1 encapsulation "llc"
config_get qos_class $1 qos_class "ubr"
config_get pcr $1 pcr
config_get mbs $1 mbs
config_get scr $1 scr
check_pvc $vpi $vci
ret=$?
if [ "$ret" -eq 0 ]; then
check_xtm_list $qos_class $pcr $scr $mbs
ret=$?
if [ "$ret" -eq 0 ]; then
case $qos_class in # ubr, cbr, gfr, vbr-nrt, vbr-rt, ubr+, abr
ubr)
xtmctl operate tdte --add "$qos_class"
;;
ubr_pcr|ubr+)
xtmctl operate tdte --add "$qos_class" $pcr
;;
cbr)
xtmctl operate tdte --add "$qos_class" $pcr
;;
nrtvbr|vbr-nrt)
xtmctl operate tdte --add "$qos_class" $pcr $scr $mbs
;;
rtvbr|vbr-rt)
xtmctl operate tdte --add "$qos_class" $pcr $scr $mbs
;;
gfr)
;;
abr)
;;
esac
fi
case $link_type in # EoA, IPoA, PPPoA, CIP
EoA|eoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_eth" || encapsulation="llcsnap_eth"
;;
PPPoA|pppoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_pppoa" || encapsulation="llcencaps_ppp"
;;
IPoA|ipoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_ipoa" || encapsulation="llcsnap_rtip"
;;
CIP|cip)
;;
esac
check_xtm_list $qos_class $pcr $scr $mbs
ret="$?"
xtmctl operate conn --add 1.$vpi.$vci aal5 $encapsulation 0 1 $ret
for i in `seq 0 7`; do
xtmctl operate conn --addq 1.$vpi.$vci $i wrr 1 dt # queue priority 0-7
done
xtmctl operate conn --createnetdev 1.$vpi.$vci $device
xtmctl operate intf --state 1 enable
fi
}
remove_atm_devices() {
local vpi vci rest
local vpivci=`xtmctl operate conn --show | grep "ATM\|mode" | awk '{if (NR!=1 && $1!="PTM") {print $3}}'`
for i in $vpivci
do
rest=${i#\/}
vpi=${rest%%\/*}
vci=${rest#*\/}
echo "xtmctl operate conn --delete 1.$vpi.$vci"
xtmctl operate conn --delete 1.$vpi.$vci
echo "xtmctl operate conn --deletenetdev 1.$vpi.$vci"
xtmctl operate conn --deletenetdev 1.$vpi.$vci
done
}
create_atm_devices() {
echo "Creating ATM Device(s)"
config_load dsl
config_foreach configure_atm_device atm-device
}
# ATM END #
# PTM #
check_ptm() {
local ret
local ptmprio=$1
local dslat=$2
if [ "$ptmprio" -eq 2 ]; then
ptmprio="high"
else
ptmprio="low"
fi
ret=$(xtmctl operate conn --show | awk -v dslat="$dslat" -v ptmprio="$ptmprio" '{if ($2 == dslat && $3 == ptmprio ) print $2 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
configure_ptm_device() {
local name device priority portid i
config_get name $1 name "PTM"
config_get device $1 device "ptm0"
config_get priority $1 priority 1
config_get portid $1 portid 1
check_ptm $priority $portid
ret=$?
if [ "$ret" -eq 0 ]; then
xtmctl operate conn --add $portid.$priority
for i in `seq 0 7`; do
xtmctl operate conn --addq $portid.$priority $i wrr 1 dt -1 -1 3000 # queue priority 0-7
done
echo "xtmctl operate conn --createnetdev $portid.$priority $device"
xtmctl operate conn --createnetdev $portid.$priority $device
xtmctl operate intf --state 1 enable
fi
}
remove_ptm_devices() {
local delptm
local x=0
IFS=$'\n'
for i in `xtmctl operate conn --show | grep "PTM\|mode"`
do
if [ $x -eq 1 ]; then
delptm=$(echo $i | awk '{if ($1!="ATM") print $2"."$11}')
echo "xtmctl operate conn --delete $delptm"
xtmctl operate conn --delete $delptm
xtmctl operate conn --deletenetdev $delptm
fi
x=1
done
unset IFS
}
create_ptm_devices() {
echo "Creating PTM Device(s)"
config_load dsl
config_foreach configure_ptm_device ptm-device
}
# PTM END #
prioritize_arp()
{
ebtables -t nat -D POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
ebtables -t nat -A POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
}
xtm_remove_devices() {
remove_atm_devices
remove_ptm_devices
}
xtm_create_devices() {
local tpstc="$(xdslctl info --show | grep TPS-TC)"
if echo "$tpstc" | grep -q "ATM Mode"; then
create_atm_devices
elif echo "$tpstc" | grep -q "PTM Mode"; then
create_ptm_devices
fi
}
xdsl_configure() {
local VDSL=0
local GFAST=0
local mod=""
local modes=""
local profile=""
config_load dsl
# Modes
config_get mode line mode
for mod in $mode; do
[ $mod == "gdmt" ] && modes="${modes}d"
[ $mod == "glite" ] && modes="${modes}l"
[ $mod == "t1413" ] && modes="${modes}t"
[ $mod == "adsl2" ] && modes="${modes}2"
[ $mod == "adsl2p" ] && modes="${modes}p"
[ $mod == "annexl" ] && modes="${modes}e"
[ $mod == "annexm" ] && modes="${modes}m"
[ $mod == "vdsl2" ] && modes="${modes}v" && VDSL=1
[ $mod == "gfast" ] && modes="${modes}f" && GFAST=1
done
# VDSL Profiles
config_get profile line profile
# Capabilities
config_get_bool bitswap line bitswap 1
[ $bitswap -eq 1 ] && bitswap="on" || bitswap="off"
config_get_bool sra line sra 1
[ $sra -eq 1 ] && sra="on" || sra="off"
# config_get_bool trellis line trellis 1
config_get_bool sesdrop line sesdrop 0
[ $sesdrop -eq 1 ] && sesdrop="on" || sesdrop="off"
# VDSL2 only
config_get_bool us0 line us0 1
[ $us0 -eq 1 ] && us0="on" || us0="off"
# config_get_bool dynamicd line dynamicd 1
# config_get_bool dynamicf line dynamicf 1
config_get_bool sos line sos 0
[ $sos -eq 1 ] && sos="on" || sos="off"
config_get_bool phyReXmtUs line phyReXmtUs 0
config_get_bool phyReXmtDs line phyReXmtDs 1
phyReXmt=$(( $((phyReXmtUs<<1)) + phyReXmtDs))
if [ $VDSL -eq 1 -o $GFAST -eq 1 ]; then
echo "xdslctl start --up --mod $modes --profile "$profile" --sra $sra --bitswap $bitswap --us0 $us0 --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt"
xdslctl start --up --mod $modes --profile "$profile" --sra $sra --bitswap $bitswap --us0 $us0 --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt
# G.Fast hardware to VDSL hardware, to set the driver bit kPhyCfg2EnableGfastVdslMMTimeOut0.
# Enable V43 tone for GFAST.
echo "xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400"
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400
else
echo "xdslctl start --up --mod $modes --sra $sra --bitswap $bitswap --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt"
xdslctl start --up --mod $modes --sra $sra --bitswap $bitswap --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt
fi
if [ $GFAST -eq 1 ]; then
# G.Fast hardware to VDSL hardware, to set the driver bit kPhyCfg2EnableGfastVdslMMTimeOut0.
# Enable V43 tone for GFAST.
echo "xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400"
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400
fi
}
xdsl_stop() {
# echo "Stopping DSL"
# stop causes IRQ issues
# xdslctl stop
return 0
}
xdsl_init() {
prioritize_arp
echo "Starting DSL"
xtmctl start
xtmctl operate intf --state 1 enable
}

View File

@@ -1,53 +0,0 @@
# OEM specific parameters
config oem-parameters 'oem'
# option country_code "0000" # 2 bytes hex
# option vendor_id "IO" # 4 bytes string
# option vendor_suffix "0000" # 2 bytes hex
# option sw_version "iopsys" # 16 bytes string
# option serial_nr "00000000" # 32 bytes string
# DSL Modes
config dsl-line line
list mode gdmt
list mode glite
list mode t1413
list mode adsl2
list mode adsl2p
list mode annexl
list mode annexm
list mode vdsl2
# VDSL2 profiles
list profile 8a
list profile 8b
list profile 8c
list profile 8d
list profile 12a
list profile 12b
list profile 17a
list profile 30a
option bitswap 1
option sra 1
option us0 1 # VDSL2 only
option sesdrop 0
option sos 0
option phyReXmtUs 0
option phyReXmtDs 1
config atm-device atm0
option name 'ATM'
option vpi '8'
option vci '35'
option device atm0
option link_type 'eoa' # EoA, IPoA, PPPoA, CIP
option encapsulation 'llc' # llc, vcmux
option qos_class 'ubr' # ubr, cbr, gfr, vbr-nrt, vbr-rt, ubr+, abr
# option pcr '512'
# option scr '256'
# option mbs '1024'
config ptm-device ptm0
option name 'PTM'
option device 'ptm0'
option priority '1'
option portid '1'

View File

@@ -1,7 +0,0 @@
[ "$STATUS" == "up" -o "$STATUS" == "down" ] || exit 0
. /lib/functions.sh
include /lib/dsl
xtm_remove_devices
xtm_create_devices

View File

@@ -1,7 +0,0 @@
if [ "$STATUS" == "up" ]; then
ubus call led.dsl set '{"state":"ok"}'
elif [ "$STATUS" == "down" ]; then
ubus call led.dsl set '{"state":"off"}'
elif [ "$STATUS" == "training" ]; then
ubus call led.dsl set '{"state":"alert"}'
fi

View File

@@ -1,45 +0,0 @@
#!/bin/sh /etc/rc.common
. /lib/functions.sh
include /lib/dsl
START=20
USE_PROCD=1
DSLMNGR=$(which dslmngr)
start_service() {
[ -n "$DSLMNGR" ] && {
procd_open_instance
procd_set_param command "$DSLMNGR"
procd_set_param respawn
procd_close_instance
}
xdsl_configure
xtm_create_devices
}
stop_service() {
xtm_remove_devices
xdsl_stop
}
boot() {
local HASADSL="$(db -q get hw.board.hasAdsl)"
local HASVDSL="$(db -q get hw.board.hasVdsl)"
[ "$HASADSL" == "1" -o "$HASVDSL" == "1" ] || return
xdsl_init
start
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger dsl
}

View File

@@ -19,7 +19,7 @@ define Package/easy-qos
SECTION:=net
CATEGORY:=Network
TITLE:=Easy QoS
DEPENDS:=@(TARGET_brcmbca||TARGET_airoha)
DEPENDS:=@TARGET_iopsys_brcm63xx_arm
endef
define Package/easy-qos/description

View File

@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/.config
ifneq ($(CONFIG_TARGET_brcmbca),)
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
LINUX_DIR=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.1
LINUX_VERSION := 4.1.52
LINUXINCLUDE=-Iarch/$(LINUX_KARCH)/mach-bcm963xx/include
@@ -85,7 +85,7 @@ define Build/Compile
endef
ifneq ($(CONFIG_TARGET_brcmbca),)
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
define KernelPackage/easy-soc-events/install-extra
cp $(PKG_BUILD_DIR)/easyevent.ko $(FS_DIR)/lib/modules/$(LINUX_VERSION)/extra
endef

5
easy-soc-libs/Config.in Normal file
View File

@@ -0,0 +1,5 @@
# libeasy configuration
config LIBWIFI_USE_CTRL_IFACE
bool "Use UNIX sockets"
default n

130
easy-soc-libs/Makefile Normal file
View File

@@ -0,0 +1,130 @@
#
# Copyright (C) 2020 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs
PKG_VERSION:=6.5.60
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ec2e8d0341e246ff371481ae20418d8301dfcf12
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
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/easy-soc-libs
SECTION:=libs
CATEGORY:=Libraries
TITLE:=IOPSYS Easy SoC libraries
SUBMENU:=IOPSYS Easy SoC libraries
DEPENDS:=+libopenssl
MENU:=1
endef
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
TARGET_PLATFORM=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_PLATFORM=MEDIATEK
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
else ifeq ($(CONFIG_TARGET_iopsys_x86),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_iopsys_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else
$(info Unexpected CONFIG_TARGET, use default MAC80211)
TARGET_PLATFORM=MAC80211
TARGET_CFLAGS +=-DIOPSYS_MAC80211
endif
export TARGET_PLATFORM
subdirs := \
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
$(if $(CONFIG_PACKAGE_libqos),libqos)
EASY_SOC_LIBS := \
libeasy \
libwifi \
libdsl \
libethernet \
libqos
ifeq ($(CONFIG_LIBWIFI_USE_CTRL_IFACE),y)
TARGET_CFLAGS +=-DLIBWIFI_USE_CTRL_IFACE
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)" \
PLATFORM="$(TARGET_PLATFORM)" \
subdirs="$(subdirs)"
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/easy-soc-libs/ $(PKG_BUILD_DIR)/
endef
endif
include easy.mk
include wifi.mk
include dsl.mk
include ethernet.mk
include qos.mk
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
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)
$(foreach dir,$(subdirs),$(call Build/Compile/$(dir)))
endef
define Build/InstallDev
$(foreach dir,$(subdirs),$(call Build/InstallDev/$(dir),$(1),$(2));)
endef
define Package/easy-soc-libs/install
:
endef
$(eval $(foreach e,$(EASY_SOC_LIBS),$(call BuildPackage,$(e))))

44
easy-soc-libs/dsl.mk Normal file
View File

@@ -0,0 +1,44 @@
define Package/libdsl
$(call Package/easy-soc-libs)
TITLE:= xDSL library (libdsl)
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

29
easy-soc-libs/easy.mk Normal file
View File

@@ -0,0 +1,29 @@
define Package/libeasy
$(call Package/easy-soc-libs)
TITLE:= Common helper functions library (libeasy)
DEPENDS+=+libnl +libnl-route
endef
define Package/libeasy/config
source "$(SOURCE)/Config.in"
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/hlist.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
View 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
View 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/include/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
View 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

4
endptmngr/Config.in Executable file
View File

@@ -0,0 +1,4 @@
config ENDPT_OPEN
bool "Use pre-compiled version for Open SDK"
default n

69
endptmngr/Makefile Normal file
View File

@@ -0,0 +1,69 @@
#
# Copyright (C) 2018 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:=endptmngr
PKG_VERSION:=0.11
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
PKG_SOURCE_VERSION:=2d56ea0d6c45e618c92bc6d63802ffdc5c307740
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
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_504021
export CONFIG_BCM_CHIP_ID
include $(INCLUDE_DIR)/package.mk
define Package/endptmngr/config
source "$(SOURCE)/Config.in"
endef
define Package/endptmngr
CATEGORY:=Utilities
TITLE:=Broadcom Voice Endpoint Manager
URL:=
DEPENDS:= +libubox +ubus +libpicoevent +uci +bcmkernel @TARGET_HAS_VOICE @BCM_VOICE
endef
define Package/endptmngr/description
endptmngr
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* ~/git/endptmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-Wall \
-Werror
define Package/endptmngr/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/endptmngr $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,endptmngr))

View File

@@ -0,0 +1,27 @@
#!/bin/sh /etc/rc.common
START=68
STOP=12
USE_PROCD=1
NAME=endptmngr
start_service() {
[ "$(db -q get hw.board.hasVoice)" = "1" ] || return
procd_open_instance
procd_set_param env hw_board_hasDect=$(db get hw.board.hasDect)
procd_set_param command $NAME
procd_set_param respawn "5" "0" "3"
procd_set_param nice -12
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger asterisk
}

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=2.1.0
PKG_VERSION:=2.0.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5a0ff3bc7c49dcb05129f423ef8e0c4929f6aa03
@@ -23,7 +23,7 @@ define Package/ethmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ethernet status and configration utility
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl
DEPENDS:=+libethernet +libuci +libubox +ubus +libpthread +libnl-genl
endef
define Package/ethmngr/description
@@ -37,22 +37,10 @@ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_mediatek),)
define Build/Compile
endef
endif
define Package/ethmngr/install
$(CP) ./files/common/* $(1)/
ifneq ($(CONFIG_TARGET_brcmbca),)
$(CP) ./files/broadcom/* $(1)/
else
$(CP) ./files/linux/* $(1)/
endif
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_mediatek),)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
$(INSTALL_BIN) ./files/ethmngr.init $(1)/etc/init.d/ethmngr
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
endif
endef
$(eval $(call BuildPackage,ethmngr))

View File

@@ -1,149 +0,0 @@
# arg1: port ifname, ex: eth0
get_max_port_speed() {
if [ -z "$1" ]; then
echo 0
return
fi
local ifname="$1"
local phycap="$(ethctl $ifname media-type 2>/dev/null | grep 'PHY Capabilities' | awk '{print$NF}' | cut -d'|' -f1)"
local speed=1000
case "$phycap" in
10GFD) speed=10000 ;;
5GFD) speed=5000 ;;
2.5GFD) speed=2500 ;;
1GFD|1GHD) speed=1000 ;;
100MFD|100MHD) speed=100 ;;
10MFD|10MHD) speed=10 ;;
esac
echo $speed
}
# arg1: port name, ex: eth0
get_port_number() {
[ -z "$1" ] && return
local ports="0 1 2 3 4 5 6 7 8"
local units="0 1"
local port="$1"
local ifname
for unit in $units; do
for prt in $ports; do
ifname="$(ethswctl getifname $unit $prt 2>/dev/null | awk '{print$NF}')"
if [ "$ifname" == "$port" ]; then
echo "$unit $prt"
return
fi
done
done
}
# arg1: port ifname, ex: eth0
reset_port() {
local ifname="$1"
ethctl $ifname phy-reset >/dev/null
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
power_updown() {
local ifname="$1"
local enabled=$2
local updown="up"
[ $enabled -eq 0 ] && updown="down"
ethctl $ifname phy-power $updown >/dev/null
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
# arg3: port speed, ex: 1000
# arg4: port duplex, ex: full
# arg5: port autoneg, ex: on
# arg6: port eee, ex: 0
# arg7: port pause, ex: 0
set_port_settings() {
local ifname="$1"
local enabled=$2
local speed="$3"
local duplex=$4
local autoneg=$5
local eee=$6
local pause=$7
[ -d /sys/class/net/$ifname ] || return
local unitport="$(get_port_number $ifname)"
local unit=$(echo $unitport | cut -d ' ' -f 1)
local port=$(echo $unitport | cut -d ' ' -f 2)
[ $autoneg -eq 1 ] && autoneg="on" || autoneg="off"
[ "$duplex" == "half" ] && duplex=0 || duplex=1
[ "$duplex" == 0 ] && dplx="HD" || dplx="FD"
[ "$autoneg" == "on" ] && media_type="auto" || media_type="$speed$dplx"
phycrossbar="$(ethctl $ifname phy-crossbar | head -1)"
crossbartype="$(echo $phycrossbar | awk '{print$2$3}')"
# Take only the last PHY Endpoint (non-Serdes) into account as Serdes port number precedes
[ "$crossbartype" == "oncrossbar" ] && pyhendpoint="$(echo $phycrossbar | awk '{print$NF}')"
phycaps="$(ethctl $ifname media-type ${pyhendpoint:+ port $pyhendpoint} | awk -F'PHY Capabilities: ' '{print$2}')"
numofcaps="$(echo $phycaps | tr '|' ' ' | wc -w)"
# Reset the port before setting new params
reset_port $ifname
if [ "$numofcaps" == "1" ]; then
logger -t "port-management" "$ifname is capable of $phycaps only; not setting speed/duplex"
else
logger -t "port-management" "$ifname is capable of $phycaps; setting speed/duplex to $media_type"
ethctl $ifname media-type $media_type ${pyhendpoint:+ port $pyhendpoint} &>/dev/null
fi
[ $eee -eq 1 ] && eee="on" || eee="off"
ethtool --set-eee $ifname eee $eee 2>/dev/null
case $pause in
off|0)
pause=0x0
auto=off
rx=off
tx=off
;;
on|1)
pause=0x2
auto=off
rx=on
tx=on
;;
auto)
pause=0x1
auto=on
rx=on
tx=on
;;
tx)
pause=0x3
auto=off
rx=off
tx=on
;;
rx)
pause=0x4
auto=off
rx=on
tx=off
;;
esac
if [ "$auto" == "on" ]; then
# Use ethswctl utility to set pause autoneg
# as ethtool is not setting it properly
ethswctl -c pause -n $unit -p $port -v $pause 2>&1 >/dev/null
else
ethtool --pause $ifname autoneg $auto rx $rx tx $tx 2>/dev/null
fi
power_updown $ifname $enabled
}

View File

@@ -0,0 +1,19 @@
#!/bin/sh /etc/rc.common
START=95
STOP=10
USE_PROCD=1
PROG=/usr/sbin/ethmngr
start_service() {
procd_open_instance
procd_set_param command ${PROG}
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}

View File

@@ -1,95 +0,0 @@
# arg1: port ifname, ex: eth0
get_max_port_speed() {
if [ -z "$1" ]; then
echo 0
return
fi
local ifname="$1"
local phycap="$(ethtool $ifname | grep -A 10 "Supported link modes" | grep 00 | tail -n 1 | awk '{print$NF}')"
local speed=1000
case "$phycap" in
10000*) speed=10000 ;;
5000*) speed=5000 ;;
2500*) speed=2500 ;;
1000*) speed=1000 ;;
100*) speed=100 ;;
10*) speed=10 ;;
esac
echo $speed
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
power_updown() {
local ifname="$1"
local enabled=$2
local updown="up"
[ $enabled -eq 0 ] && updown="down"
ip link set dev $ifname $updown
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
# arg3: port speed, ex: 1000
# arg4: port duplex, ex: full
# arg5: port autoneg, ex: on
# arg6: port eee, ex: 0
# arg7: port pause, ex: 0
set_port_settings() {
local ifname="$1"
local enabled=$2
local speed="$3"
local duplex=$4
local autoneg=$5
local eee=$6
local pause=$7
[ -d /sys/class/net/$ifname ] || return
[ $autoneg -eq 1 ] && autoneg="on" || autoneg="off"
ethtool --change $ifname speed $speed duplex $duplex autoneg $autoneg
[ $eee -eq 1 ] && eee="on" || eee="off"
ethtool --set-eee $ifname eee $eee 2>/dev/null
case $pause in
off|0)
pause=0x0
auto=off
rx=off
tx=off
;;
on|1)
pause=0x2
auto=off
rx=on
tx=on
;;
auto)
pause=0x1
auto=on
rx=on
tx=on
;;
tx)
pause=0x3
auto=off
rx=off
tx=on
;;
rx)
pause=0x4
auto=off
rx=on
tx=off
;;
esac
ethtool --pause $ifname autoneg $auto rx $rx tx $tx 2>/dev/null
power_updown $ifname $enabled
}

View File

@@ -12,7 +12,7 @@ PKG_VERSION:=1.0
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/fdtextract.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e3cefda3b26c9aea3021b20725ce7b31b33eebc4
PKG_SOURCE_VERSION:=0ebaf1e7d1f09318ae75d0f475a25280742b790e
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=GPLv2

View File

@@ -28,7 +28,7 @@ define KernelPackage/$(PKG_NAME)
FILES:=$(PKG_BUILD_DIR)/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
KCONFIG:=CONFIG_PACKAGE_kmod-gryphon-led-kernel-module=y
AUTOLOAD:=$(call AutoLoad,60,$(PKG_NAME))
DEPENDS:= +(TARGET_brcmbca):bcmkernel
DEPENDS:= +(TARGET_iopsys_brcm63xx_arm):bcmkernel
PKG_LICENSE:=GPLv2
PKG_LICENSE_URL:=
endef
@@ -41,8 +41,20 @@ EXTRA_KCONFIG:= CONFIG_RGB_LED=m
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
# support compilation against BCM SDK kernel
include ../../broadcom/bcmkernel/bcm-kernel-toolchain.mk
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
LINUX_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.19
MODULES_SUBDIR:=lib/modules/4.19.183
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_PREFIX)-
ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"63158" "6856" "6858"))
# These targets use a 64-bit kernel
LINUX_KARCH:=arm64
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_PREFIX)-
endif
# For some reason, Broadcom's kernel does not set the include paths correctly when compiling out-of-tree modules
EXTRA_KCPPFLAGS:="-I $(LINUX_DIR)/../bcmkernel/include -I $(LINUX_DIR)/arch/arm/mach-bcm963xx/include"
endif
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)/kdevlinks/

View File

@@ -220,6 +220,7 @@ static int canyon_led_probe(struct platform_device *pdev)
if (IS_ERR(leds->clock_gpio)) {
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
PTR_ERR(leds->clock_gpio));
leds->clock_gpio = NULL;
return PTR_ERR(leds->clock_gpio);
}
@@ -227,6 +228,7 @@ static int canyon_led_probe(struct platform_device *pdev)
if (IS_ERR(leds->clock_gpio)) {
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
PTR_ERR(leds->clock_gpio));
leds->clock_gpio = NULL;
return PTR_ERR(leds->clock_gpio);
} else {
printk(KERN_INFO "Got clock gpio\n");
@@ -244,6 +246,7 @@ static int canyon_led_probe(struct platform_device *pdev)
if (IS_ERR(leds->data_gpio)) {
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
PTR_ERR(leds->data_gpio));
leds->data_gpio = NULL;
return PTR_ERR(leds->data_gpio);
}
@@ -251,6 +254,7 @@ static int canyon_led_probe(struct platform_device *pdev)
if (IS_ERR(leds->data_gpio)) {
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
PTR_ERR(leds->data_gpio));
leds->data_gpio = NULL;
return PTR_ERR(leds->data_gpio);
} else {
printk(KERN_INFO "Got data gpio\n");

14
icwmp/Config_cwmp.in Normal file
View File

@@ -0,0 +1,14 @@
choice
prompt "Select ACS sever"
default CWMP_ACS_MULTI
depends on PACKAGE_icwmp || \
PACKAGE_icwmp-openssl || \
PACKAGE_icwmp-wolfssl || \
PACKAGE_icwmp-mbedtls
config CWMP_ACS_MULTI
bool "No specific ACS, follow standard"
config CWMP_ACS_HDM
bool "Select HDM as ACS server"
endchoice

View File

@@ -1,82 +1,76 @@
#
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
# Copyright (C) 2020-2022 IOPSYS Software Solutions AB
#
# This is free software, licensed under the BSD-3-Clause
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.3.5
PKG_VERSION:=8.4.26.10
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=caa4ac86b91b698e73e09a3ba8b60add36ea4b62
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_VERSION:=ac7410a726a7269dcaef4c80061cab7a4447f6d1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/icwmp/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=TR069 CWMP client
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libbbfdm-api
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml
endef
define Package/icwmp
$(Package/icwmp/default)
VARIANT:=default
DEFAULT_VARIANT:=1
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
endef
TARGET_CFLAGS += \
-D_GNU_SOURCE -g \
"-DCWMP_REVISION=\\\"$(PKG_SOURCE_VERSION)\\\""
define Package/icwmp-openssl
$(Package/icwmp/default)
TITLE += (openssl)
VARIANT:=openssl
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
CONFLICTS := icwmp icwmp-mbedtls icwmp-wolfssl
VARIANT:=openssl
endef
define Package/icwmp-wolfssl
$(Package/icwmp/default)
TITLE += (wolfssl)
VARIANT:=wolfssl
DEPENDS += +PACKAGE_icwmp-wolfssl:libwolfssl
CONFLICTS := icwmp icwmp-mbedtls icwmp-openssl
CONFLICTS := icwmp-openssl
VARIANT:=wolfssl
endef
define Package/icwmp-mbedtls
$(Package/icwmp/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_icwmp-mbedtls:libmbedtls
CONFLICTS := icwmp-openssl icwmp-wolfssl
VARIANT:=mbedtls
CONFLICTS := icwmp icwmp-wolfssl icwmp-openssl
DEFAULT_VARIANT:=1
endef
ifeq ($(BUILD_VARIANT),default)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
CONFIGURE_ARGS += --enable-libopenssl
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
CONFIGURE_ARGS += --enable-libwolfssl
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
CONFIGURE_ARGS += --enable-libmbedtls
endif
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
@@ -95,8 +89,6 @@ define Package/icwmp/default/install
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_DIR) $(1)/etc/bbfdm/json/
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libcwmpdm.so $(1)/usr/lib/bbfdm/libcwmpdm.so
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
@@ -110,12 +102,10 @@ define Package/icwmp/default/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
endef
Package/icwmp/install = $(Package/icwmp/default/install)
Package/icwmp-openssl/install = $(Package/icwmp/default/install)
Package/icwmp-wolfssl/install = $(Package/icwmp/default/install)
Package/icwmp-mbedtls/install = $(Package/icwmp/default/install)
$(eval $(call BuildPackage,icwmp))
$(eval $(call BuildPackage,icwmp-openssl))
$(eval $(call BuildPackage,icwmp-wolfssl))
$(eval $(call BuildPackage,icwmp-mbedtls))

View File

@@ -11,6 +11,8 @@ config acs 'acs'
option retry_min_wait_interval '5'
#­ possible configs interval :[1000:65535]
option retry_interval_multiplier '2000'
option ipv6_enable '0'
option ip_version '4'
config cpe 'cpe'
option enable '1'
@@ -30,13 +32,12 @@ config cpe 'cpe'
option amd_version '5'
# compression possible configs: InstanceNumber, InstanceAlias
option instance_mode 'InstanceNumber'
option session_timeout '300'
option session_timeout '60'
option notification '1'
option exec_download '0'
option periodic_notify_enable '1'
option periodic_notify_interval '10'
option incoming_rule 'Port_Only'
option active_notif_throttle '0'
config lwn 'lwn'
option enable '1'

View File

@@ -5,14 +5,14 @@ log() {
echo "${@}"|logger -t firewall.cwmp -p info
}
if [ ! -f "/var/state/icwmp" ]; then
if [ ! -f "/var/state/cwmp" ]; then
exit 0;
fi
zone_name=$(uci -c /var/state -q get icwmp.acs.zonename)
zone_name=$(uci -c /var/state -q get cwmp.acs.zonename)
port=$(uci -q get cwmp.cpe.port)
ipaddr=$(uci -c /var/state -q get icwmp.acs.ip)
ip6addr=$(uci -c /var/state -q get icwmp.acs.ip6)
ipaddr=$(uci -c /var/state -q get cwmp.acs.ip)
ip6addr=$(uci -c /var/state -q get cwmp.acs.ip6)
incoming_rule=$(uci -q get cwmp.cpe.incoming_rule|tr 'A-Z' 'a-z')
if [ -z "${zone_name}" ]; then
@@ -20,13 +20,13 @@ if [ -z "${zone_name}" ]; then
exit 0
elif [ "$zone_name" = "icwmp" ]; then
iptables -nL zone_icwmp_input 2> /dev/null
if [ "$?" != 0 ]; then
if [ $? != 0 ]; then
iptables -w 1 -N zone_icwmp_input
iptables -w 1 -t filter -A INPUT -j zone_icwmp_input
iptables -w 1 -I zone_icwmp_input -p tcp --dport "${port}" -j REJECT
iptables -w 1 -I zone_icwmp_input -p tcp --dport $port -j REJECT
else
iptables -w 1 -F zone_icwmp_input
iptables -w 1 -I zone_icwmp_input -p tcp --dport "${port}" -j REJECT
iptables -w 1 -I zone_icwmp_input -p tcp --dport $port -j REJECT
fi
else
iptables -w 1 -F zone_icwmp_input 2> /dev/null
@@ -64,17 +64,17 @@ else
fi
fi
echo "${cmd}"|grep -q "\-\-dport \|\-s "
echo ${cmd}|grep -q "\-\-dport \|\-s "
if [ "$?" -eq 0 ]; then
cmd="${cmd} -j ACCEPT -m comment --comment=Open_ACS_port"
${cmd}
fi
echo "${cmd6}"|grep -q "\-\-dport \|\-s "
echo ${cmd6}|grep -q "\-\-dport \|\-s "
if [ "$?" -eq 0 ]; then
cmd6="${cmd6} -j ACCEPT -m comment --comment=Open_ACS_port"
${cmd6}
fi
uci -c /var/state -q set icwmp.cpe.firewall_restart="init"
uci -c /var/state -q commit icwmp
uci -c /var/state -q set cwmp.cpe.firewall_restart="init"
uci -c /var/state -q commit cwmp

View File

@@ -14,19 +14,16 @@ handle_icwmp_update() {
return 0
fi
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
if [ "$ret" = "true" ]; then
# read status from var/state/icwmp
status=$(uci -q -c /var/state get icwmp.sess_status.current_status)
if [ "$status" != "running" ]; then
log "Trigger out of bound inform, since last inform status was failure"
ubus -t 10 call tr069 inform >/dev/null 2>&1
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.status')"
if [ "$status" != "running" ]; then
log "Trigger out of bound inform, since last inform status was failure"
ubus -t 10 call tr069 inform >/dev/null 2>&1
# Handle timeout or tr069 object not found
if [ "$?" -eq 7 ] || [ "$?" -eq 4 ]; then
log "Restarting icwmp tr069 object"
/etc/init.d/icwmpd restart
fi
else
log "Restarting icwmp tr069 object"
/etc/init.d/icwmpd restart
fi
}
handle_icwmp_update "$@"
handle_icwmp_update $@

View File

@@ -23,22 +23,22 @@ regenerate_ssl_link()
[ ! -d "${cert_dir}" ] && return 0;
### Generate all ssl link for pem certicates ###
all_file=$(ls "${cert_dir}"/*.pem 2>/dev/null)
all_file=$(ls $cert_dir/*.pem 2>/dev/null)
if [ -n "${all_file}" ]; then
for cfile in $all_file; do
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
[ -f "${cert_dir}"/"${rehash}".0 ] || \
ln -s "${cfile}" "${cert_dir}"/"${rehash}".0
rehash="$(openssl x509 -hash -noout -in $cfile)"
[ -f ${cert_dir}/${rehash}.0 ] || \
ln -s $cfile $cert_dir/${rehash}.0
done
fi
### Generate all ssl link for crt certicates ###
all_file=$(ls "${cert_dir}"/*.crt 2>/dev/null)
all_file=$(ls $cert_dir/*.crt 2>/dev/null)
if [ -n "${all_file}" ]; then
for cfile in $all_file; do
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
[ -f "${cert_dir}"/"${rehash}".0 ] || \
ln -s "${cfile}" "${cert_dir}"/"${rehash}".0
rehash="$(openssl x509 -hash -noout -in $cfile)"
[ -f ${cert_dir}/${rehash}.0 ] || \
ln -s $cfile $cert_dir/${rehash}.0
done
fi
}
@@ -47,8 +47,8 @@ enable_dhcp_option43() {
local wan="${1}"
### Ask for DHCP Option 43 only if CWMP is enabled ###
local reqopts="$(uci -q get network."${wan}".reqopts)"
local proto="$(uci -q get network."${wan}".proto)"
local reqopts="$(uci -q get network.$wan.reqopts)"
local proto="$(uci -q get network.$wan.proto)"
local newreqopts=""
local option43_present=0
@@ -65,7 +65,7 @@ enable_dhcp_option43() {
newreqopts="$reqopts 43"
if [ "${proto}" = "dhcp" ]; then
uci -q set network."${wan}".reqopts="$newreqopts"
uci -q set network.$wan.reqopts="$newreqopts"
uci commit network
ubus call network reload
fi
@@ -122,12 +122,12 @@ configure_send_op125() {
serial_len=$(echo -n "${serial}" | wc -m)
class_len=$(echo -n "${class}" | wc -m)
if [ "${oui_len}" -eq 0 ] || [ "${serial_len}" -eq 0 ]; then
if [ ${oui_len} -eq 0 ] || [ ${serial_len} -eq 0 ]; then
return 0
fi
opt125_len=$((oui_len + serial_len + class_len))
if [ "${class_len}" -gt 0 ]; then
if [ ${class_len} -gt 0 ]; then
opt125_len=$((opt125_len + 6))
else
opt125_len=$((opt125_len + 4))
@@ -159,7 +159,7 @@ configure_send_op125() {
opt125="${opt125}:05:${hex_serial_len}${hex_serial}"
fi
if [ "${class_len}" -gt 0 ]; then
if [ ${class_len} -gt 0 ]; then
hex_class=$(convert_to_hex "${class}")
if [ -z "${hex_class}" ]; then
return 0
@@ -176,9 +176,9 @@ configure_send_op125() {
if [ "${uci}" = "network" ]; then
new_send_opt="$sendopt $opt125"
uci -q set network."${intf}".sendopts="$new_send_opt"
uci -q set network.$intf.sendopts="$new_send_opt"
else
uci -q add_list dhcp."${intf}".dhcp_option="$opt125"
uci -q add_list dhcp.$intf.dhcp_option="$opt125"
fi
}
@@ -187,9 +187,9 @@ enable_dnsmasq_option125() {
local send125_present=0
local opt125="125,"
local proto="$(uci -q get dhcp."${lan}".dhcpv4)"
local proto="$(uci -q get dhcp.$lan.dhcpv4)"
if [ "${proto}" = "server" ]; then
opt_list="$(uci -q get dhcp."${lan}".dhcp_option)"
opt_list="$(uci -q get dhcp.$lan.dhcp_option)"
for sopt in $opt_list; do
if [[ "$sopt" == "$opt125"* ]]; then
@@ -205,27 +205,11 @@ enable_dnsmasq_option125() {
fi
}
set_vendor_id() {
local wan="${1}"
local proto="$(uci -q get network."${wan}".proto)"
if [ "${proto}" = "dhcp" ]; then
vendorid="$(uci -q get network."${wan}".vendorid)"
if [ -z "${vendorid}" ]; then
uci -q set network."${wan}".vendorid="dslforum.org"
ubus call uci commit '{"config":"network"}'
elif [[ $vendorid != *"dslforum.org"* ]]; then
uci -q set network."${wan}".vendorid="${vendorid},dslforum.org"
ubus call uci commit '{"config":"network"}'
fi
fi
}
enable_dhcp_option125() {
local wan="${1}"
local reqopts="$(uci -q get network."${wan}".reqopts)"
local sendopts="$(uci -q get network."${wan}".sendopts)"
local proto="$(uci -q get network."${wan}".proto)"
local reqopts="$(uci -q get network.$wan.reqopts)"
local sendopts="$(uci -q get network.$wan.sendopts)"
local proto="$(uci -q get network.$wan.proto)"
local newreqopts=""
local newsendopts=""
local req125_present=0
@@ -290,6 +274,7 @@ copy_cwmp_etc_files_to_varstate() {
if [ -f /etc/icwmpd/dm_enabled_notify.xml ]; then
cp -f /etc/icwmpd/dm_enabled_notify /var/run/icwmpd/ 2>/dev/null
fi
touch /var/run/icwmpd/cwmp
}
copy_cwmp_varstate_files_to_etc() {
@@ -320,6 +305,7 @@ validate_acs_section()
'compression:or("GZIP","Deflate","Disabled")' \
'retry_min_wait_interval:range(1, 65535)' \
'retry_interval_multiplier:range(1000, 65535)' \
'ipv6_enable:bool' \
'ssl_capath:string'
}
@@ -375,23 +361,40 @@ validate_defaults() {
return 0;
}
set_vendor_id() {
local wan="${1}"
local proto="$(uci -q get network.$wan.proto)"
if [ "${proto}" == "dhcp" ]; then
vendorid="$(uci -q get network.$wan.vendorid)"
if [ -z "${vendorid}" ]; then
uci -q set network.$wan.vendorid="dslforum.org"
ubus call uci commit '{"config":"network"}'
elif [[ $vendorid != *"dslforum.org"* ]]; then
uci -q set network.$wan.vendorid="${vendorid},dslforum.org"
ubus call uci commit '{"config":"network"}'
fi
fi
}
boot() {
local enable_cwmp="0"
local dhcp_discovery="0"
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
local wan_interface=""
config_get wan_interface cpe default_wan_interface "wan"
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
config_get dhcp_discovery acs dhcp_discovery "0"
if [ "${dhcp_discovery}" = "enable" ] || [ "${dhcp_discovery}" = "1" ]; then
config_get wan_interface cpe default_wan_interface "wan"
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
# Set dhcp option 43 if not already configured
enable_dhcp_option43 "${wan_interface}"
# Set dhcp option 60
@@ -411,10 +414,9 @@ boot() {
regenerate_ssl_link "${ssl_capath}"
fi
# Copy backup data so that if it restart latter on, it gets the info
# Copy backup data so that if it restart latter on it gets the info
copy_cwmp_etc_files_to_varstate
mkdir -p /var/run/icwmpd/
touch /var/run/icwmpd/cwmp
touch /etc/icwmpd/cwmp_notifications
start
}
@@ -467,14 +469,7 @@ reload_service() {
return 0
fi
tr069_status="$(ubus -t 1 call tr069 status)"
ret="$?"
if [ "$ret" = "7" ]; then
# ubus timed out may be due to uloop is busy in some task so returning
return 0
fi
status="$(echo "${tr069_status}" | jsonfilter -qe '@.cwmp.status')"
status="$(ubus -t 1 call tr069 status |jsonfilter -qe '@.cwmp.status')"
ret="$?"
if [ "$status" = "up" ]; then
ubus -t 1 call tr069 command '{"command":"reload"}'

View File

@@ -1,2 +1,2 @@
/var/run/icwmpd/icwmpd_backup_session.xml
/etc/icwmpd/cwmp
/etc/icwmpd/cwmp_notifications

View File

@@ -1,6 +1,6 @@
if (PACKAGE_ieee1905)
menu "Configuration"
menu "Configurations"
config IEEE1905_EXTENSION_ALLOWED
bool "Allow plugins to extend 1905 CMDUs and/or TLVs"
@@ -10,18 +10,5 @@ config IEEE1905_PLATFORM_HAS_WIFI
bool "Platform has WiFi"
default y if PACKAGE_libwifi
config IEEE1905_CMDU_SA_IS_ALMAC
bool "Send CMDUs with SA set to 1905 AL-macaddress instead of interface macaddress"
default n
config IEEE1905_WIFI_EASYMESH
bool "Include WiFi-Alliance's Easymesh updates"
default y
config IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
bool "Fragment large CMDU frame at TLV boundary instead of octet boundary"
default y
endmenu
endif

View File

@@ -0,0 +1,14 @@
if (PACKAGE_map-plugin)
menu "Configurations"
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
bool "Sync configuration between dynamic controllers in the network"
default n
config MULTIAP_FUZZ_1905_CMDUS
bool "Include support to fuzz 1905 CMDUs for testing purpose"
default n
endmenu
endif

View File

@@ -1,17 +1,17 @@
#
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
# Copyright (C) 2021-2022 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.1.11
PKG_VERSION:=4.10.41
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=90b8f44ca78b4711d5c86234fb0fc621ebd97fd9
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
PKG_SOURCE_VERSION:=5c36293244d40c6a71f451db4acd8fa5656cdfbb
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -35,21 +35,31 @@ define Package/ieee1905/config
endef
define Package/libieee1905
$(call Package/ieee1905/Default)
TITLE:=libieee1905.so (library for CMDU and TLV handling)
$(call Package/ieee1905/Default,$(1))
TITLE+= (library for CMDU and TLV handling)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json
endef
define Package/ieee1905
$(call Package/ieee1905/Default)
TITLE:=ieee1905d (daemon implementing 1905.1 and provides cli)
$(call Package/ieee1905/Default,$(1))
TITLE+= ieee1905d (daemon implementing 1905.1 and provides cli)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ubus +libpthread \
+libieee1905 +IEEE1905_PLATFORM_HAS_WIFI:libwifi
endef
include $(wildcard plugins/*.mk)
define Package/map-plugin
$(call Package/ieee1905/Default,$(1))
TITLE:=Multi-AP (Easymesh) plugin
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/map-plugin/config
source "$(SOURCE)/Config.map-plugin.in"
endef
define Package/ieee1905/description
This package provides IEEE Std 1905.1 stack.
@@ -59,15 +69,6 @@ define Package/libieee1905/description
This package provides library functions for IEEE Std 1905.1 stack.
endef
plugins := \
$(if $(CONFIG_PACKAGE_map-plugin),map) \
$(if $(CONFIG_PACKAGE_snoop-plugin),snoop) \
$(if $(CONFIG_PACKAGE_topology-plugin),topology)
ppkg:=$(patsubst plugins/%.mk,%-plugin,$(wildcard plugins/*.mk))
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
@@ -77,20 +78,10 @@ ifeq ($(CONFIG_IEEE1905_PLATFORM_HAS_WIFI),y)
TARGET_CFLAGS += -DHAS_WIFI
endif
ifeq ($(CONFIG_IEEE1905_CMDU_SA_IS_ALMAC),y)
TARGET_CFLAGS += -DCMDU_SA_IS_ALMAC
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
endif
ifeq ($(CONFIG_IEEE1905_WIFI_EASYMESH),y)
TARGET_CFLAGS += -DWIFI_EASYMESH
endif
ifeq ($(CONFIG_IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY),y)
TARGET_CFLAGS += -DIEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
endif
MAKE_FLAGS += \
extmod_subdirs="$(patsubst %,extensions/%,$(plugins))"
MAKE_PATH:=src
@@ -109,6 +100,25 @@ define Package/libieee1905/install
$(CP) $(PKG_BUILD_DIR)/src/libmidgen.so $(1)/usr/lib/
endef
define Package/map-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
endef
define Build/InstallDev/map-plugin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map2.h $(1)/usr/include/map2.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map_module.h $(1)/usr/include/map_module.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/cntlrsync.h $(1)/usr/include/cntlrsync.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
endef
define Build/InstallDev/libieee1905
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
@@ -126,7 +136,7 @@ endef
define Build/InstallDev
$(call Build/InstallDev/libieee1905,$(1),$(2))
$(foreach p,$(ppkg),$(call Build/InstallDev/$(p),$(1),$(2)))
$(call Build/InstallDev/map-plugin,$(1),$(2))
endef
ifeq ($(LOCAL_DEV),1)
@@ -137,4 +147,4 @@ endif
$(eval $(call BuildPackage,ieee1905))
$(eval $(call BuildPackage,libieee1905))
$(eval $(foreach p,$(ppkg),$(call BuildPackage,$(p))))
$(eval $(call BuildPackage,map-plugin))

View File

@@ -2,7 +2,7 @@ config ieee1905 'ieee1905'
option enabled '1'
option extension '1'
list extmodule 'map'
option registrar '2 5 6'
option registrar '2 5'
# option macaddress '0a:1b:2c:3d:4e:50'
config al-iface
@@ -24,9 +24,3 @@ config ap
option encryption 'sae-mixed'
option key '1234567890'
config ap
option band '6'
option ssid 'IOWRT-6GHz'
option encryption 'sae-mixed'
option key '1234567890'

View File

@@ -42,7 +42,7 @@ validate_ap_section() {
local section="$1"
uci_validate_section ieee1905 $section "${1}" \
'band:or("2", "5", "60", "6")' \
'band:or("2", "5", "60")' \
'ssid:string' \
'encryption:or("psk2", "sae-mixed", "sae",
"psk", "psk-mixed", "none", string)' \
@@ -83,10 +83,8 @@ start_service() {
validate_ieee1905_config || return 1;
procd_open_instance
procd_set_param command "/usr/sbin/ieee1905d" "-o" "/tmp/ieee1905.log" "-f"
procd_set_param command "/usr/sbin/ieee1905d"
procd_set_param respawn
procd_set_param limits core="unlimited"
# procd_set_param env IEEE1905_LOG_CMDU=1
# procd_set_param stdout 1
# procd_set_param stderr 1
procd_close_instance

View File

@@ -0,0 +1,17 @@
#!/bin/sh
. /lib/functions.sh
config_load ieee1905
list_to_ifname() {
local section=$1
config_get ifname $section ifname # get list as space separated values
uci del ieee1905.${section}.ifname # delete entry
uci set ieee1905.${section}.ifname="$ifname" # writeback entry as option
}
config_foreach list_to_ifname al-iface

View File

@@ -1,18 +0,0 @@
#!/bin/sh
. /lib/functions.sh
config_load ieee1905
ifname_to_list() {
local section=$1
config_get ifname $section ifname # get list or option as space separated values
ifname=${ifname//,/\ } # convert csv with space separation
uci del ieee1905.${section}.ifname # delete entry
for i in ${ifname}; do
uci add_list ieee1905.${section}.ifname="$i" # writeback entry as list
done
}
config_foreach ifname_to_list al-iface

View File

@@ -1,51 +0,0 @@
define Package/map-plugin
$(call Package/ieee1905/Default)
TITLE:=Multi-AP plugin supporting WiFi-Alliance Easymesh standard
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/map-plugin/config
if (PACKAGE_map-plugin)
menu "Configuration"
config MULTIAP_EASYMESH_VERSION
int "Easymesh version"
default 2
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
bool "Sync configuration between dynamic controllers in the network"
default n
config MULTIAP_FUZZ_1905_CMDUS
bool "Include support to fuzz 1905 CMDUs for testing purpose"
default n
endmenu
endif
endef
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_MULTIAP_EASYMESH_VERSION)
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
endif
define Build/InstallDev/map-plugin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/easymesh.h $(1)/usr/include/easymesh.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map_module.h $(1)/usr/include/map_module.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/cntlrsync.h $(1)/usr/include/cntlrsync.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
endef
define Package/map-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
endef

View File

@@ -1,12 +0,0 @@
define Package/snoop-plugin
$(call Package/ieee1905/Default)
TITLE:=Show all received 1905 CMDUs over UBUS
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/snoop-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/snoop/snoop.so $(1)/usr/lib/ieee1905/snoop.so
endef

View File

@@ -1,12 +0,0 @@
define Package/topology-plugin
$(call Package/ieee1905/Default)
TITLE:=Build full network topology of the 1905 nodes only
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/topology-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/topology/topology.so $(1)/usr/lib/ieee1905/topology.so
endef

View File

@@ -18,7 +18,12 @@ start_service() {
procd_close_instance
}
stop() {
service_stop imonitor
}
reload_service() {
stop
start
}

View File

@@ -18,21 +18,8 @@ CONFIG_TARGET_ROOTFS_TARGZ=y
# /etc/banner and /etc/device_info #
CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_MANUFACTURER="IOPSYS"
CONFIG_VERSION_MANUFACTURER="iopsysWrt"
CONFIG_VERSION_MANUFACTURER_URL="https://iopsys.eu/"
CONFIG_VERSION_DIST="IOWRT"
# OpenWrt is given by CONFIG_VERSION_NUMBER which we do not want to override.
# disabling CONFIG_VERSION_FILENAMES will hide the OpenWrt version from the image filename
# CONFIG_VERSION_FILENAMES is not set
# CONFIG_VERSION_CODE is set to the IOWRT version instead by the genconfig-script and
# CONFIG_VERSION_CODE_FILENAMES will put it into the image filename.
CONFIG_VERSION_CODE_FILENAMES=y
CONFIG_VERSION_HOME_URL="https://iopsys.eu"
CONFIG_VERSION_BUG_URL="https://iopsys.eu"
CONFIG_VERSION_SUPPORT_URL="https://iopsys.eu"
# /lib/preinit #
CONFIG_PREINITOPT=y
@@ -56,37 +43,33 @@ CONFIG_LOCALMIRROR="https://download.iopsys.eu/iopsys/mirror/"
# EasySoC HAL #
CONFIG_PACKAGE_inbd=y
CONFIG_PACKAGE_qosmngr=y
CONFIG_PACKAGE_libwifiutils=y
CONFIG_PACKAGE_libwifi=y
CONFIG_PACKAGE_peripheral_manager=y
CONFIG_PACKAGE_port-management=y
CONFIG_PACKAGE_wifimngr=y
# Multi-AP #
CONFIG_PACKAGE_ieee1905=y
CONFIG_PACKAGE_map-agent=m
CONFIG_PACKAGE_map-controller=m
CONFIG_PACKAGE_map-topology=y
CONFIG_PACKAGE_decollector=y
CONFIG_IEEE1905_CMDU_SA_IS_ALMAC=y
CONFIG_PACKAGE_wfadatad-collector=y
# Network #
CONFIG_PACKAGE_netmode=y
CONFIG_PACKAGE_owsd=m
CONFIG_PACKAGE_urlfilter=y
# System #
CONFIG_PACKAGE_imonitor=m
CONFIG_PACKAGE_questd=y
CONFIG_PACKAGE_rulengd=y
CONFIG_PACKAGE_usermngr=y
# TR-x69 #
CONFIG_PACKAGE_libbbfdm=y
CONFIG_PACKAGE_bbfdmd=y
CONFIG_PACKAGE_icwmp=y
CONFIG_PACKAGE_uspd-mbedtls=y
CONFIG_PACKAGE_icwmp-mbedtls=y
CONFIG_PACKAGE_obuspa=y
CONFIG_PACKAGE_bulkdata=y
CONFIG_PACKAGE_periodicstats=y
CONFIG_PACKAGE_stunc=m
CONFIG_PACKAGE_stunc-mbedtls=m
CONFIG_PACKAGE_swmodd=m
CONFIG_PACKAGE_twamp=m
CONFIG_PACKAGE_udpecho-client=m
@@ -110,8 +93,6 @@ CONFIG_PACKAGE_comgt=y
CONFIG_PACKAGE_comgt-directip=y
CONFIG_PACKAGE_comgt-ncm=y
CONFIG_PACKAGE_ds-lite=y
CONFIG_PACKAGE_firewall=y
# CONFIG_PACKAGE_firewall4 is not set
CONFIG_PACKAGE_gre=y
CONFIG_PACKAGE_map=y
CONFIG_PACKAGE_ntfs-3g=y
@@ -134,8 +115,7 @@ CONFIG_PACKAGE_xl2tpd=y
CONFIG_PACKAGE_atftp=m
CONFIG_PACKAGE_atftpd=m
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_dnsmasq=y
CONFIG_PACKAGE_ssdpd=y
CONFIG_PACKAGE_miniupnpd=y
CONFIG_PACKAGE_mosquitto-client-ssl=y
CONFIG_PACKAGE_mosquitto-ssl=y
CONFIG_PACKAGE_nginx=y
@@ -157,8 +137,7 @@ CONFIG_PACKAGE_ip-bridge=y
CONFIG_PACKAGE_ip-full=y
CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_ipset=y
CONFIG_PACKAGE_ip6tables-zz-legacy=y
CONFIG_PACKAGE_iptables-zz-legacy=y
CONFIG_PACKAGE_iptables=y
CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
CONFIG_PACKAGE_iptables-mod-filter=y
CONFIG_PACKAGE_iptables-mod-ipopt=y
@@ -183,7 +162,6 @@ CONFIG_PACKAGE_lscpu=y
CONFIG_PACKAGE_nand-utils=y
CONFIG_PACKAGE_openssl-util=y
CONFIG_OPENSSL_WITH_COMPRESSION=y
CONFIG_PACKAGE_procd-ujail=m
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-rpcsys=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y

View File

@@ -1,72 +1,58 @@
#!/bin/bash
#! /bin/bash
function feeds_update {
heads=1
developer=0
override=1
while getopts "inh" opt; do
case $opt in
i)
heads=0
;;
n)
override=0
;;
h|\?)
echo "Usage: ./iop feeds_update [-i] [-n] [-h]"
echo
echo "OPTIONS:"
echo " -i - Only update index. Do not change HEAD in feeds."
echo " -n - Do not replace core packages with iopsys versions."
echo " -h - Display this help message and exit."
exit 1
;;
esac
done
git remote -v | grep -qE '(git@|ssh://)' && developer=1
developer=0
override=1
start=$(date -u +'%s');
while getopts "n" opt; do
case $opt in
n)
override=0
;;
esac
done
cp .config .genconfig_config_bak
if [ $heads == 1 ]; then
if [ $developer == 1 ]; then
./scripts/feeds update -g
else
./scripts/feeds update
fi
fi
./scripts/feeds update -ai || exit 1
git remote -v | grep -qE '(git@|ssh://)' && developer=1
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p openwrt_core -a || exit 1
fi
cp .config .genconfig_config_bak
(
echo '# DO NOT EDIT. Autogenerated file by ./iop feeds_update'
echo 'FEED_DEVICES_DIRS:='
find feeds -type f -name .is-feed-devices-dir -printf 'FEED_DEVICES_DIRS+=$(TOPDIR)/%h'
) > target/linux/feed-devices/feed-devices-list.mk || exit 1
#if -d argument is passed, clone feeds with ssh instead of http
if [ $developer == 1 ]; then
./scripts/feeds update -g
else
./scripts/feeds update
fi
./scripts/feeds update -ai
# targets need to be installed explicitly
for target in $(ls ./feeds/targets); do
./scripts/feeds install -f -p targets $target || exit 1
done
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p openwrt_core -a
fi
# install all packages
./scripts/feeds install -a || exit 1
# targets need to be installed explicitly
for target in $(ls ./feeds/targets)
do
rm -f target/linux/$target
./scripts/feeds install -p targets $target
done
# remove broken symlinks ( for packages that are no longer in the feed )
find -L package/feeds -maxdepth 2 -type l -delete || exit 1
# install all packages
./scripts/feeds install -a
cp .genconfig_config_bak .config
make defconfig || exit 1
# remove broken symlinks ( for packages that are no longer in the feed )
find -L package/feeds -maxdepth 2 -type l -delete
# record when we last run this script
touch tmp/.iop_bootstrap || exit 1
cp .genconfig_config_bak .config
make defconfig
# always return true
exit 0
# record when we last run this script
touch tmp/.iop_bootstrap
# always return true
exit 0
}
register_command "feeds_update" "Update feeds to point to commit hashes from feeds.conf"

View File

@@ -13,13 +13,11 @@ function genconfig {
export DEVELOPER=0
target="bogus"
target_config_path=""
brcmbca_feed="target/linux/feeds/brcmbca"
airoha_feed="target/linux/feeds/airoha"
x86_feed="target/linux/feeds/x86"
armvirt_feed="target/linux/feeds/armvirt"
mediatek_feed="target/linux/feeds/mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
qualcomm_ipq53xx_feed="target/linux/feeds/ipq53xx"
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
ramips="target/linux/iopsys-ramips"
econet="target/linux/iopsys-econet"
x86="target/linux/iopsys-x86"
armvirt="target/linux/iopsys-armvirt"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
@@ -42,13 +40,19 @@ function genconfig {
}
function verify_config {
IFS=$'\n'
org=$(<.genconfig.config)
unset IFS
local num
local conf_opt
local conf_org
local conf_new
while read -r line
#echo "lines to check $tot_lines"
num=0
for line in $org
do
conf_opt=$(echo $line | grep "^[ #]*CONFIG_" | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
conf_opt=$(echo $line | grep CONFIG_ | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
if [ -n "${conf_opt}" ]
then
conf_org=$(find_last ${conf_opt} .genconfig.config)
@@ -69,7 +73,8 @@ function genconfig {
#echo -e "wanted [$conf_org] got [$conf_new]"
fi
fi
done < .genconfig.config
num=$((num+1))
done
}
# Takes a board name and returns the target name in global var $target
@@ -78,8 +83,8 @@ function genconfig {
[ -n "$profile" ] || return
if [ -n "$TARGET" -a -d "./target/linux/feeds/$TARGET" ]; then
local targetpath="./target/linux/feeds/$TARGET"
if [ -n "$TARGET" -a -d "./target/linux/$TARGET" ]; then
local targetpath="./target/linux/$TARGET"
local profiles=
local pfound=0
@@ -102,84 +107,63 @@ function genconfig {
return
fi
[ -e $brcmbca_feed/genconfig ] &&
brcmbca=$(cd $brcmbca_feed; ./genconfig)
[ -e $airoha_feed/genconfig ] &&
airoha=$(cd $airoha_feed; ./genconfig)
[ -e $x86_feed/genconfig ] &&
x86=$(cd $x86_feed; ./genconfig)
[ -e $armvirt_feed/genconfig ] &&
armvirt=$(cd $armvirt_feed; ./genconfig)
[ -e $mediatek_feed/genconfig ] &&
mediatek=$(cd $mediatek_feed; ./genconfig)
[ -e $qualcomm_ipq95xx_feed/genconfig ] &&
ipq95xx=$(cd $qualcomm_ipq95xx_feed; ./genconfig)
[ -e $qualcomm_ipq53xx_feed/genconfig ] &&
ipq53xx=$(cd $qualcomm_ipq53xx_feed; ./genconfig)
[ -e $brcm63xx_arm/genconfig ] &&
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
[ -e $ramips/genconfig ] &&
iopsys_ramips=$(cd $ramips; ./genconfig)
[ -e $econet/genconfig ] &&
iopsys_econet=$(cd $econet; ./genconfig)
[ -e $x86/genconfig ] &&
iopsys_x86=$(cd $x86; ./genconfig)
[ -e $armvirt/genconfig ] &&
iopsys_armvirt=$(cd $armvirt; ./genconfig)
if [ "$profile" == "LIST" ]; then
for list in brcmbca airoha x86 armvirt mediatek ipq95xx ipq53xx; do
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_econet iopsys_x86 iopsys_armvirt; do
echo "$list based boards:"
a=$(echo "${!list}" | sort)
for b in $a; do
for b in ${!list}; do
echo -e "\t$b"
done
done
return
fi
for p in $airoha; do
for p in $iopsys_brcm63xx_arm; do
if [ $p == $profile ]; then
target="airoha"
target_config_path="$airoha_feed/config"
target="iopsys_brcm63xx_arm"
target_config_path="$brcm63xx_arm/config"
return
fi
done
for p in $x86; do
for p in $iopsys_ramips; do
if [ $p == $profile ]; then
target="x86"
target_config_path="$x86_feed/config"
target="iopsys_ramips"
target_config_path="$ramips/config"
return
fi
done
for p in $armvirt; do
for p in $iopsys_econet; do
if [ $p == $profile ]; then
target="armvirt"
target_config_path="$armvirt_feed/config"
target="iopsys_econet"
target_config_path="$econet/config"
return
fi
done
for p in $mediatek; do
for p in $iopsys_x86; do
if [ $p == $profile ]; then
target="mediatek"
target_config_path="$mediatek_feed/config"
target="iopsys_x86"
target_config_path="$x86/config"
return
fi
done
for p in $ipq95xx; do
for p in $iopsys_armvirt; do
if [ $p == $profile ]; then
target="ipq95xx"
target_config_path="$qualcomm_ipq95xx_feed/config"
return
fi
done
for p in $ipq53xx; do
if [ $p == $profile ]; then
target="ipq53xx"
target_config_path="$qualcomm_ipq53xx_feed/config"
return
fi
done
for p in $brcmbca; do
if [ $p == $profile ]; then
target="brcmbca"
target_config_path="$brcmbca_feed/config"
target="iopsys_armvirt"
target_config_path="$armvirt/config"
return
fi
done
@@ -303,24 +287,6 @@ function genconfig {
fi
}
get_subtarget_for_device() {
readonly target="$1"
readonly device="$2"
readonly targetinfo_file="tmp/info/.targetinfo-feeds_$target"
readonly target_profile_line="Target-Profile: DEVICE_$device"
# We want to know after which Target: $target/$subtarget line
# our $target_profile_line appears
# This is a crude way to "parse" the file using shell 🤯
# 1. grep for both lines with line number output
# 2. grep again to determine the device profile line that we looked for
# but output one context line before as well to determine corresponding subtarget line
# 4. Use head and sed to extract the subtarget
grep "^Target: $target/\|^$target_profile_line" "$targetinfo_file" \
| grep -E -B1 "^$target_profile_line" \
| head -n1 \
| sed -E "s|^Target: $target/||"
}
create_and_copy_files()
{
local BOARDTYPE=$1
@@ -362,31 +328,21 @@ function genconfig {
cat $target_config_path/$BOARDTYPE/config >> .config
echo "" >> .config
fi
# hack to support custom-devices until we have deprecated this genconfig-script...
if [ -f "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" ]; then
cat "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" >> .config
echo "" >> .config
fi
# Special handling for targets which use TARGET_DEVICES
case "$target" in
airoha | mediatek | brcmbca | ipq95xx | ipq53xx)
# This assumes the device name to be unique within one target,
# which is a fair assumption to make.
local subtarget="$(get_subtarget_for_device "${target/_/-}" "$BOARDTYPE")"
if [ -z "$subtarget" ]; then
echo "Error determining subtarget for $target / ${BOARDTYPE}"
return 1
fi
# Special handling for targets which use TARGET_DEVICES
if [ "$target" = "iopsys_ramips" ]; then
subtarget="mt7621"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
;;
*)
elif [ "$target" = "iopsys_econet" ]; then
subtarget="en7562"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
else
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
;;
esac
fi
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
@@ -415,15 +371,12 @@ function genconfig {
fi
# Set target version
local git_version
if ! git_version="$(git describe --always --dirty --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
echo "ERROR: Failed getting version via git describe, exiting." >&2
return 1
fi
local version="${git_version,,}${CUSTOMERS:+-${CUSTOMERS// /}}"
local version_lower="${version,,}"
echo "CONFIG_TARGET_VERSION=\"${version_lower}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${version_lower}\"" >> .config
local GIT_TAG=$(git describe --abbrev=0 --tags)
local GIT_REV=$(git rev-parse --short HEAD)
local GIT_VER="$GIT_TAG"
git describe --contains $GIT_REV >/dev/null 2>&1 || GIT_VER="${GIT_TAG}_${GIT_REV}"
echo "CONFIG_TARGET_VERSION=\"${GIT_VER}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${GIT_VER}\"" >> .config
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
# Enable Package source tree override if selected
@@ -470,7 +423,7 @@ function genconfig {
if [ ! -e tmp/.iop_bootstrap ]; then
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
echo "Run: iop feeds_update"
exit 1
exit 0
fi
if [ $# -eq 0 ]; then
@@ -507,7 +460,7 @@ function genconfig {
CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}"
setup_dirs
create_and_copy_files "$@" || exit 1
create_and_copy_files "$@"
fi
}

View File

@@ -12,13 +12,11 @@ function genconfig_min {
export DEVELOPER=0
target="bogus"
target_config_path=""
brcmbca_feed="target/linux/feeds/brcmbca"
airoha_feed="target/linux/feeds/airoha"
x86_feed="target/linux/feeds/x86"
armvirt_feed="target/linux/feeds/armvirt"
mediatek_feed="target/linux/feeds/mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
qualcomm_ipq53xx_feed="target/linux/feeds/ipq53xx"
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
ramips="target/linux/iopsys-ramips"
econet="target/linux/iopsys-econet"
x86="target/linux/iopsys-x86"
armvirt="target/linux/iopsys-armvirt"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
@@ -41,13 +39,19 @@ function genconfig_min {
}
function verify_config {
IFS=$'\n'
org=$(<.genconfig.config)
unset IFS
local num
local conf_opt
local conf_org
local conf_new
while read -r line
#echo "lines to check $tot_lines"
num=0
for line in $org
do
conf_opt=$(echo $line | grep "^[ #]*CONFIG_" | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
conf_opt=$(echo $line | grep CONFIG_ | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
if [ -n "${conf_opt}" ]
then
conf_org=$(find_last ${conf_opt} .genconfig.config)
@@ -68,7 +72,8 @@ function genconfig_min {
#echo -e "wanted [$conf_org] got [$conf_new]"
fi
fi
done < .genconfig.config
num=$((num+1))
done
}
# Takes a board name and returns the target name in global var $target
@@ -77,8 +82,8 @@ function genconfig_min {
[ -n "$profile" ] || return
if [ -n "$TARGET" -a -d "./target/linux/feeds/$TARGET" ]; then
local targetpath="./target/linux/feeds/$TARGET"
if [ -n "$TARGET" -a -d "./target/linux/$TARGET" ]; then
local targetpath="./target/linux/$TARGET"
local profiles=
local pfound=0
@@ -101,84 +106,63 @@ function genconfig_min {
return
fi
[ -e $brcmbca_feed/genconfig ] &&
brcmbca=$(cd $brcmbca_feed; ./genconfig)
[ -e $airoha_feed/genconfig ] &&
airoha=$(cd $airoha_feed; ./genconfig)
[ -e $x86_feed/genconfig ] &&
x86=$(cd $x86_feed; ./genconfig)
[ -e $armvirt_feed/genconfig ] &&
armvirt=$(cd $armvirt_feed; ./genconfig)
[ -e $mediatek_feed/genconfig ] &&
mediatek=$(cd $mediatek_feed; ./genconfig)
[ -e $qualcomm_ipq95xx_feed/genconfig ] &&
ipq95xx=$(cd $qualcomm_ipq95xx_feed; ./genconfig)
[ -e $qualcomm_ipq53xx_feed/genconfig ] &&
ipq53xx=$(cd $qualcomm_ipq53xx_feed; ./genconfig)
[ -e $brcm63xx_arm/genconfig ] &&
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
[ -e $ramips/genconfig ] &&
iopsys_ramips=$(cd $ramips; ./genconfig)
[ -e $econet/genconfig ] &&
iopsys_econet=$(cd $econet; ./genconfig)
[ -e $x86/genconfig ] &&
iopsys_x86=$(cd $x86; ./genconfig)
[ -e $armvirt/genconfig ] &&
iopsys_armvirt=$(cd $armvirt; ./genconfig)
if [ "$profile" == "LIST" ]; then
for list in brcmbca airoha x86 armvirt mediatek ipq95xx ipq53xx; do
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_econet iopsys_x86 iopsys_armvirt; do
echo "$list based boards:"
a=$(echo "${!list}" | sort)
for b in $a; do
for b in ${!list}; do
echo -e "\t$b"
done
done
return
fi
for p in $airoha; do
for p in $iopsys_brcm63xx_arm; do
if [ $p == $profile ]; then
target="airoha"
target_config_path="$airoha_feed/config"
target="iopsys_brcm63xx_arm"
target_config_path="$brcm63xx_arm/config"
return
fi
done
for p in $x86; do
for p in $iopsys_ramips; do
if [ $p == $profile ]; then
target="x86"
target_config_path="$x86_feed/config"
target="iopsys_ramips"
target_config_path="$ramips/config"
return
fi
done
for p in $armvirt; do
for p in $iopsys_econet; do
if [ $p == $profile ]; then
target="armvirt"
target_config_path="$armvirt_feed/config"
target="iopsys_econet"
target_config_path="$econet/config"
return
fi
done
for p in $mediatek; do
for p in $iopsys_x86; do
if [ $p == $profile ]; then
target="mediatek"
target_config_path="$mediatek_feed/config"
target="iopsys_x86"
target_config_path="$x86/config"
return
fi
done
for p in $ipq95xx; do
for p in $iopsys_armvirt; do
if [ $p == $profile ]; then
target="ipq95xx"
target_config_path="$qualcomm_ipq95xx_feed/config"
return
fi
done
for p in $ipq53xx; do
if [ $p == $profile ]; then
target="ipq53xx"
target_config_path="$qualcomm_ipq53xx_feed/config"
return
fi
done
for p in $brcmbca; do
if [ $p == $profile ]; then
target="brcmbca"
target_config_path="$brcmbca_feed/config"
target="iopsys_armvirt"
target_config_path="$armvirt/config"
return
fi
done
@@ -277,24 +261,6 @@ function genconfig_min {
fi
}
get_subtarget_for_device() {
readonly target="$1"
readonly device="$2"
readonly targetinfo_file="tmp/info/.targetinfo-feeds_$target"
readonly target_profile_line="Target-Profile: DEVICE_$device"
# We want to know after which Target: $target/$subtarget line
# our $target_profile_line appears
# This is a crude way to "parse" the file using shell 🤯
# 1. grep for both lines with line number output
# 2. grep again to determine the device profile line that we looked for
# but output one context line before as well to determine corresponding subtarget line
# 4. Use head and sed to extract the subtarget
grep "^Target: $target/\|^$target_profile_line" "$targetinfo_file" \
| grep -E -B1 "^$target_profile_line" \
| head -n1 \
| sed -E "s|^Target: $target/||"
}
create_and_copy_files()
{
local BOARDTYPE=$1
@@ -336,31 +302,21 @@ function genconfig_min {
cat $target_config_path/$BOARDTYPE/config >> .config
echo "" >> .config
fi
# hack to support custom-devices until we have deprecated this genconfig-script...
if [ -f "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" ]; then
cat "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" >> .config
echo "" >> .config
fi
# Special handling for targets which use TARGET_DEVICES
case "$target" in
airoha | mediatek | brcmbca | ipq95xx | ipq53xx)
# This assumes the device name to be unique within one target,
# which is a fair assumption to make.
local subtarget="$(get_subtarget_for_device "${target/_/-}" "$BOARDTYPE")"
if [ -z "$subtarget" ]; then
echo "Error determining subtarget for $target / ${BOARDTYPE}"
return 1
fi
if [ "$target" = "iopsys_ramips" ]; then
subtarget="mt7621"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
;;
*)
elif [ "$target" = "iopsys_econet" ]; then
subtarget="en7562"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
else
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
;;
esac
fi
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
@@ -389,15 +345,12 @@ function genconfig_min {
fi
# Set target version
local git_version
if ! git_version="$(git describe --always --dirty --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
echo "ERROR: Failed getting version via git describe, exiting." >&2
return 1
fi
local version="${git_version,,}${CUSTOMERS:+-${CUSTOMERS// /}}"
local version_lower="${version,,}"
echo "CONFIG_TARGET_VERSION=\"${version_lower}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${version_lower}\"" >> .config
local GIT_TAG=$(git describe --abbrev=0 --tags)
local GIT_REV=$(git rev-parse --short HEAD)
local GIT_VER="$GIT_TAG"
git describe --contains $GIT_REV >/dev/null 2>&1 || GIT_VER="${GIT_TAG}_${GIT_REV}"
echo "CONFIG_TARGET_VERSION=\"${GIT_VER}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${GIT_VER}\"" >> .config
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
# Enable Package source tree override if selected
@@ -438,7 +391,7 @@ function genconfig_min {
if [ ! -e tmp/.iop_bootstrap ]; then
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
echo "Run: iop feeds_update"
exit 1
exit 0
fi
if [ $# -eq 0 ]; then

View File

@@ -48,10 +48,7 @@ function ssh_install_key {
local keys="$(get_ssh_public_keys)"
echo "Adding the following keys to $DROPBEAR_AUTHORIZED_KEYS_FILE on $host:"
echo "$keys"
ssh \
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
root@$host \
"echo '$keys' >> '$DROPBEAR_AUTHORIZED_KEYS_FILE'" && echo ok
ssh root@$host "echo '$keys' >> '$DROPBEAR_AUTHORIZED_KEYS_FILE'" && echo ok
}
register_command "ssh_install_key" "Install the users public ssh key on host running dropbear"

View File

@@ -1,283 +1,344 @@
# this is a developer helper script to install firmware on a remote host with SSH
function upd_usage {
echo "usage: $0 ssh_upgrade [-t <host>] [-f <file>] [opts] "
echo ""
echo " Default host is 192.168.1.1"
echo " Default firmware file is the latest one (last.{itb,pkgtb})"
echo " Default is to not keep configuration"
echo "opts:"
echo ""
echo " -i Interactive use, allows to select firmware file"
echo " -n Do not do the final reboot of the target board"
echo " -c Keep configuration"
echo " -x Force install even if firmware is not for this board"
echo " -b Force install of bootloader regardless of version installed"
echo "usage: $0 iopupgrade -t <host> -f <file> [opts] "
echo ""
echo " Default host is 192.168.1.1"
echo " Default firmware file is the newest one found"
echo " Default is to not keep configuration"
echo "opts:"
echo ""
echo " -i Interactive use, Allows to select firmware file"
echo " -n Do not do the final reboot of the target board"
echo " -c Keep configuration"
echo " -x Force install even if firmware is not for this board"
echo " -b Force install of bootloader regardless of version installed"
echo " -s Use sysupgade. old upgrade method, needed for old releases that do not have iopu"
}
function set_config_string {
eval $(grep $1 .config)
eval `grep $1 .config`
}
function upd_ask_ok {
echo "Will continue with the following settings:"
echo "-----------------------------------------"
printf "%20s: %s\n" "Firmware file" "$upd_fw_base"
printf "%20s: %s\n" "Host IP" "$upd_host"
printf "%20s: " "Reboot"
if [ "$upd_noreboot" == "0" ]; then printf "Yes\n"; else printf "No\n"; fi
printf "%20s: " "Keep config"
if [ "$upd_keepconf" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
printf "%20s: " "Force bootloader"
if [ "$upd_forceboot" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
printf "%20s: " "Force image upgrade"
if [ "$upd_forceimage" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
echo "-----------------------------------------"
echo "Will Continue with the following settings"
echo "-----------------------------------------"
printf "%20s: %s\n" "Firmare file" "$upd_fw_base"
printf "%20s: %s\n" "Host ip" "$upd_host"
printf "%20s: " "Reboot"; if [ "$upd_noreboot" == "0" ] ;then printf "Yes\n" ;else printf "No\n";fi
printf "%20s: " "Keep config"; if [ "$upd_keepconf" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
printf "%20s: " "Force bootloader"; if [ "$upd_forceboot" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
printf "%20s: " "Force image upgrade"; if [ "$upd_forceimage" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
printf "%20s: " "Use sysupgrade"; if [ "$upd_sysupgrade" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
echo "-----------------------------------------"
echo -n "Continue? [Y/n/q]:"
read answer
if [ "$upd_sysupgrade" == "0" ]
then
if [ "$upd_keepconf" == "1" ] ;then echo "keeping config is just a fantasy it's not yet implemented, try sysupgrade";fi
fi
case $answer in
n | N)
return 1
;;
q | Q)
exit 1
;;
y | Y | *)
return 0
;;
esac
echo -n "Continue? [Y/n/q]:"
read answer
case $answer in
n|N)
return 1;;
q|Q)
exit 1;;
y|Y|*)
return 0;;
esac
}
function upd_select_file {
dialog --keep-tite --title "To select a file, use TAB/ARROW to highlight then press SPACEBAR -> RETURN" \
--fselect "${upd_fw:-bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/}" \
$((lines - 10)) $((cols - 5)) \
2>$tempfile
new_file=$(cat $tempfile)
if [ -n "$new_file" ]; then
upd_fw="$new_file"
upd_fw_base=$(basename $upd_fw)
fi
dialog --keep-tite --title "To select file use TAB/ARROW to hilight then press SPACEBAR -> RETURN" \
--fselect "bin/targets/$CONFIG_TARGET_BOARD/generic/" \
$((lines -10)) $((cols -5)) \
2> $tempfile
new_file=$(cat $tempfile)
if [ -n "$new_file" ]
then
upd_fw="$new_file"
upd_fw_base=$(basename $upd_fw);
fi
}
function upd_select_target {
dialog --keep-tite --title "Input the hostname/IP of the target board" \
--inputbox "Name/IP" \
$((lines - 10)) $((cols - 5)) \
"$upd_host" \
2>$tempfile
new_file=$(cat $tempfile)
if [ -n "$new_file" ]; then
upd_host="$new_file"
fi
dialog --keep-tite --title "Input the name/ip number of target board" \
--inputbox "Name/IP" \
$((lines -10)) $((cols -5)) \
"$upd_host" \
2> $tempfile
new_file=$(cat $tempfile)
if [ -n "$new_file" ]
then
upd_host="$new_file"
fi
}
function upd_select_reboot {
dialog --keep-tite --radiolist "Should the board reboot after download finished" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Reboot" "Restart board after done" $(if [ "$upd_noreboot" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
"No reboot" "Continue running old system" $(if [ "$upd_noreboot" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
2>$tempfile
res=$(cat $tempfile)
case $res in
function upd_select_reboot {
dialog --keep-tite --radiolist "Should the board reboot after download finished" \
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
"Reboot" "Restart board after done" `if [ "$upd_noreboot" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
"No reboot" "Continue running old system" `if [ "$upd_noreboot" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
2> $tempfile
res=$(cat $tempfile)
case $res in
"No reboot")
upd_noreboot=1
;;
upd_noreboot=1
;;
"Reboot")
upd_noreboot=0
;;
esac
upd_noreboot=0
;;
esac
}
function upd_select_config {
dialog --keep-tite --radiolist "Should the configuration be kept" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Keep" "Keep the config from old system" $(if [ "$upd_keepconf" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
"Default" "Use default config for new system" $(if [ "$upd_keepconf" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
2>$tempfile
dialog --keep-tite --radiolist "Should the configuration be keept" \
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
"Keep" "Keep the config from old system" `if [ "$upd_keepconf" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
"Default" "Use default config for new system" `if [ "$upd_keepconf" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
2> $tempfile
res=$(cat $tempfile)
case $res in
res=$(cat $tempfile)
case $res in
"Keep")
upd_keepconf=1
;;
upd_keepconf=1
;;
"Default")
upd_keepconf=0
;;
esac
upd_keepconf=0
;;
esac
}
function upd_select_forceboot {
dialog --keep-tite --radiolist "Should the boot loader be updated regardless of the version installed" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Force" "Always update boot loader" $(if [ "$upd_forceboot" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
"Version check" "Only upgrade if version is newer" $(if [ "$upd_forceboot" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
2>$tempfile
dialog --keep-tite --radiolist "Should the boot loader be updated reagardless of version installed" \
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
"Force" "Alwasy update boot loader" `if [ "$upd_forceboot" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
"Version check" "Only upgrade if version is newer" `if [ "$upd_forceboot" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
2> $tempfile
res=$(cat $tempfile)
case $res in
res=$(cat $tempfile)
case $res in
"Force")
upd_forceboot=1
;;
upd_forceboot=1
;;
"Version check")
upd_forceboot=0
;;
esac
upd_forceboot=0
;;
esac
}
function upd_select_forceimage {
dialog --keep-tite --radiolist "Should the image be stored in flash even if sanity checks would reject it" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Force" "Disable sanity check and force use of image (dangerous)" $(if [ "$upd_forceimage" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
"Only compatible" "Normal checks apply" $(if [ "$upd_forceimage" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
2>$tempfile
dialog --keep-tite --radiolist "Should the image be stored in flash even if sanity checks would reject it" \
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
"Force" "Dissable sanity check and force use of image (dangerous)" `if [ "$upd_forceimage" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
"Only compatible" "Normal checks apply" `if [ "$upd_forceimage" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
2> $tempfile
res=$(cat $tempfile)
case $res in
res=$(cat $tempfile)
case $res in
"Force")
upd_forceimage=1
;;
upd_forceimage=1
;;
"Only compatible")
upd_forceimage=0
;;
esac
upd_forceimage=0
;;
esac
}
function upd_select_sysupgrade {
dialog --keep-tite --radiolist "Use the old way to upgrade a board" \
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
"iopu" "Use the iop upgrade methode" `if [ "$upd_sysupgrade" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
"sysupgrade" "Use the old sysupgrade methode" `if [ "$upd_sysupgrade" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
2> $tempfile
res=$(cat $tempfile)
case $res in
"iopu")
upd_sysupgrade=0
;;
"sysupgrade")
upd_sysupgrade=1
;;
esac
}
function upd_select {
dialog --keep-tite --ok-label "Select" --cancel-label "Done" --menu "Select item to change" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Firmware file" "$upd_fw_base" \
"Host IP" "$upd_host" \
"Reboot" $(if [ "$upd_noreboot" == "0" ]; then printf "Yes\n"; else printf "No\n"; fi) \
"Keep config" $(if [ "$upd_keepconf" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
"Force bootloader" $(if [ "$upd_forceboot" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
"Force image upgrade" $(if [ "$upd_forceimage" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
2>$tempfile
case $(cat $tempfile) in
"Firmware file")
upd_select_file
;;
"Host IP")
upd_select_target
;;
dialog --keep-tite --ok-label "Select" --cancel-label "Done" --menu "Select Item to change" \
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
"Firmare file" "$upd_fw_base"\
"Host ip" "$upd_host" \
"Reboot" `if [ "$upd_noreboot" == "0" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
"Keep config" `if [ "$upd_keepconf" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
"Force bootloader" `if [ "$upd_forceboot" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
"Force image upgrade" `if [ "$upd_forceimage" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
"sysupgrade" `if [ "$upd_sysupgrade" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
2> $tempfile
case $(cat $tempfile) in
"Firmare file")
upd_select_file
;;
"Host ip")
upd_select_target
;;
"Reboot")
upd_select_reboot
;;
upd_select_reboot
;;
"Keep config")
upd_select_config
;;
upd_select_config
;;
"Force bootloader")
upd_select_forceboot
;;
upd_select_forceboot
;;
"Force image upgrade")
upd_select_forceimage
;;
upd_select_forceimage
;;
"sysupgrade")
upd_select_sysupgrade
;;
*)
return
;;
esac
upd_select
return
;;
esac
upd_select
}
function upd_select_start {
lines=$(tput lines)
cols=$(tput cols)
tempfile="$(mktemp)"
trap "rm -f $tempfile" 0 1 2 5 15
upd_select
lines=$(tput lines)
cols=$(tput cols)
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
trap "rm -f $tempfile" 0 1 2 5 15
upd_select
}
function ssh_upgrade {
upd_noreboot=0
upd_forceboot=0
upd_keepconf=0
upd_forceimage=0
upd_fw_base=""
upd_fw=""
upd_host="192.168.1.1"
do_dialog=0
upd_noreboot=0
upd_forceboot=0
upd_keepconf=0
upd_forceimage=0
upd_fw_base=""
upd_fw=""
upd_host="192.168.1.1"
upd_sysupgrade=1
do_dialog=0
while getopts "f:hnxt:icb" opt; do
case $opt in
n)
upd_noreboot=1
;;
x)
upd_forceimage=1
;;
b)
upd_forceboot=1
;;
c)
upd_keepconf=1
;;
v)
verbose=$OPTARG
;;
f)
upd_fw=$OPTARG
;;
t)
upd_host=$OPTARG
;;
i)
do_dialog=1
;;
h)
upd_usage
exit 1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
if [ -z "$upd_fw" ]; then
set_config_string CONFIG_TARGET_BOARD
set_config_string CONFIG_TARGET_SUBTARGET
upd_fw="$(realpath -q --canonicalize-existing --relative-to=. "bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/"last.{pkgtb,itb})"
if [ -z "$upd_fw" ] && [ $do_dialog -eq 0 ]; then
echo "Could not find image. Check that last.{itb,pkgtb} exists or specify an image using -f <image> or -i (interactive)." >&2
return 1
fi
fi
upd_fw_base="$(basename "$upd_fw")"
[ $do_dialog -eq 1 ] && upd_select_start
if ! upd_ask_ok; then
upd_select_start
if ! upd_ask_ok; then
exit 1
fi
fi
if [ ! -f $upd_fw ]; then
echo "Firmware file $firmware does not exist."
while getopts "f:hnxt:iscb" opt; do
case $opt in
n)
upd_noreboot=1
;;
x)
upd_forceimage=1
;;
b)
upd_forceboot=1
;;
c)
upd_keepconf=1
;;
v)
verbose=$OPTARG
;;
f)
upd_fw=$OPTARG
;;
t)
upd_host=$OPTARG
;;
i)
do_dialog=1
;;
s)
upd_sysupgrade=1
;;
h)
upd_usage
exit 1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
if [ -n "$upd_fw" ]
then
upd_fw_base=$(basename $upd_fw);
else
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
extra_args=""
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args --no-reboot"
[ $upd_forceimage -eq 1 ] && extra_args="$extra_args --force"
[ $upd_keepconf -eq 0 ] && extra_args="$extra_args -n"
[ $upd_forceboot -eq 1 ] && extra_args="$extra_args --force-loader-upgrade"
for upd_fw_base in $firmwares
do
#echo "firmware $upd_fw"
break
done
upd_fw="bin/targets/$CONFIG_TARGET_BOARD/generic/$upd_fw_base"
fi
pv "$upd_fw" |
ssh \
-o ConnectTimeout=60 \
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
root@"$upd_host" \
sh -c "cat > '/tmp/$upd_fw_base' && (set -x && sysupgrade -v $extra_args /tmp/$upd_fw_base)" ||
echo "Sysupgrade failed" >&2 && return 1
[ $do_dialog -eq 1 ] && upd_select_start
if ! upd_ask_ok
then
upd_select_start
if ! upd_ask_ok
then
exit 1
fi
fi
if [ ! -f $upd_fw ]
then
echo "firmware file $firmware do not exist"
exit 1
fi
if [ $upd_sysupgrade -eq 0 ]
then
extra_args=""
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args -n"
[ $upd_forceimage -eq 1 ] && extra_args="$extra_args -x"
[ $upd_forceboot -eq 1 ] && extra_args="$extra_args -b"
file_size_kb=`du -k "$upd_fw" | cut -f1`
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 $extra_args /tmp/$upd_fw_base" &&
echo "sysupgrade done!"
fi
}
register_command "ssh_upgrade" "-t <host> -f <file> [opts] Install firmware on remote host with SSH"
register_command "ssh_upgrade" "-h <host> -f <file> [opts] Install firmware on remote host with SSH"

View File

@@ -449,7 +449,7 @@ insert_feed_hash_in_feeds_config()
local feed=$1
local TO=$(cd feeds/${feed}; git rev-parse HEAD)
sed -i feeds.conf -e "/ ${feed} / s/\(.*\)[;^].*/\1^${TO}/"
sed -i feeds.conf -e "/ ${feed}/ s/\(.*\)[;^].*/\1^${TO}/"
git add feeds.conf
}

View File

@@ -32,3 +32,8 @@ start_service() {
procd_set_param respawn
procd_close_instance
}
#stop() {
# service_stop /sbin/iwatchdog
#}

View File

@@ -1,94 +0,0 @@
#
# Copyright (C) 2020-2023 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libdsl
PKG_VERSION:=7.2.99
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f9f3fcd0f4140540db5bd41059bcca7ded083024
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libdsl.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
endif
define Package/libdsl
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= xDSL library (libdsl)
endef
define Package/libdsl/description
Library provides xDSL/GFAST HAL APIs
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)/xdsl.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/xtm.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/common.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/libdsl.so* $(1)/usr/lib/
endef
define Build/InstallDev
$(call Build/InstallDev/libdsl,$(1),$(2))
endef
ifeq ($(CONFIG_LIBDSL_TEST),y)
define Build/Compile/libdsl
$(MAKE) -C "$(PKG_BUILD_DIR)/test" $(MAKE_FLAGS)
endef
endif
define Package/libdsl/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/libdsl.so* $(1)/usr/lib/
ifeq ($(CONFIG_LIBDSL_TEST),y)
$(CP) $(PKG_BUILD_DIR)/test/libdsl_test $(1)/usr/bin/
endif
endef
$(eval $(call BuildPackage,libdsl))

View File

@@ -1,68 +0,0 @@
#
# Copyright (C) 2020-2023 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libeasy
PKG_VERSION:=7.2.100
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=32db1b79bd88eba85a3e7518dbbbd1e29f4b06d9
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libeasy.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall"
define Package/libeasy
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= Common helper library (libeasy)
DEPENDS+=+libnl +libnl-route +libopenssl
endef
define Package/libeasy/description
Library provides common utility functions
endef
define Build/InstallDev/libeasy
$(INSTALL_DIR) $(1)/usr/include/easy
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/easy.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/event.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/utils.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/if_utils.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/debug.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/hlist.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/libeasy*.so* $(1)/usr/lib/
endef
define Build/InstallDev
$(call Build/InstallDev/libeasy,$(1),$(2))
endef
define Package/libeasy/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libeasy*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libeasy))

View File

@@ -1,105 +0,0 @@
#
# Copyright (C) 2020-2023 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libethernet
PKG_VERSION:=7.2.104
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d777636ca43302a95e571ab030ec44ef50905570
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libethernet.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TARGET_CFLAGS +=-DIOPSYS_ECONET
else ifeq ($(CONFIG_TARGET_mediatek),y)
TARGET_PLATFORM=MEDIATEK
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
else
$(info Unexpected CONFIG_TARGET, use default LINUX)
TARGET_PLATFORM=LINUX
TARGET_CFLAGS +=-DIOPSYS_LINUX
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)" \
PLATFORM="$(TARGET_PLATFORM)" \
subdirs="$(subdirs)"
define Package/libethernet
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= Ethernet library (libethernet)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_airoha:ecnt_api +TARGET_brcmbca:bcmkernel
endef
define Package/libethernet/description
Library provides ethernet HAL APIs
endef
define Package/libethernet/config
config LIBETHERNET_DEBUG
depends on PACKAGE_libethernet
bool "Enable ethernet debugging"
default n
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./libethernet/* $(PKG_BUILD_DIR)/
endef
endif
define Build/InstallDev/libethernet
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/ethernet.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libethernet.so $(1)/usr/lib/
endef
define Build/InstallDev
$(call Build/InstallDev/libethernet,$(1),$(2))
endef
define Package/libethernet/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libethernet.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libethernet))

View File

@@ -1,52 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# 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:=0.3
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libpicoevent.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f446f186102539cceedaa15a95a33547ac3c1fd7
PKG_NAME:=libpicoevent-bcm
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/libpicoevent-bcm
CATEGORY:=Libraries
TITLE:=Libpicoevent-bcm
URL:=
DEPENDS:= +TARGET_brcmbca:bcmkernel
include $(TOPDIR)/feeds/broadcom/bcmkernel/bcm-toolchain.mk
TARGET_CFLAGS := -Os -pipe -mfpu=vfpv3-d16 -mfloat-abi=softfp -DCONFIG_TARGET_brcmbca -g3 -fno-caller-saves -fno-plt -Wno-error=unused-but-set-variable -Wno-error=unused-result \
-mfloat-abi=soft -fmacro-prefix-map=$(BUILD_DIR)libpicoevent-bcm-0.3=libpicoevent-bcm-0.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 \
-Wl,-z,now -Wl,-z,relro -Wl,--build-i
endef
define Package/libpicoevent-bcm/description
Minimal event library
endef
define Package/libpicoevent-bcm/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/broadcom
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx
$(CP) $(PKG_BUILD_DIR)/libpicoevent.h $(STAGING_DIR)/usr/include/bcm963xx
mkdir -p $(1)/usr/lib/broadcom
$(CP) $(PKG_BUILD_DIR)/libpicoevent.so $(STAGING_DIR)/usr/lib/broadcom
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libpicoevent.so $(1)/usr/lib/broadcom
endef
$(eval $(call BuildPackage,libpicoevent-bcm))

View File

@@ -1,103 +0,0 @@
#
# Copyright (C) 2020-2023 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libqos
PKG_VERSION:=7.2.101
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=93ca0a66d6f82bca208bbe52b75ed582b20aa094
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libqos.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TARGET_CFLAGS +=-DIOPSYS_ECONET
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
TARGET_PLATFORM=IPQ95XX
TARGET_CFLAGS +=-DIPQ95XX
else ifeq ($(CONFIG_TARGET_mediatek),y)
TARGET_PLATFORM=LINUX
TARGET_CFLAGS +=-DIOPSYS_LINUX
else
$(info Unexpected CONFIG_TARGET, use default LINUX)
TARGET_PLATFORM=LINUX
TARGET_CFLAGS +=-DIOPSYS_LINUX
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)" \
PLATFORM="$(TARGET_PLATFORM)" \
subdirs="$(subdirs)"
define Package/libqos
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= QoS library (libqos)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_brcmbca:bcmkernel
endef
define Package/libqos/config
config LIBQOS_DEBUG
depends on PACKAGE_libqos
bool "Enable qos debugging"
default n
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./libqos/* $(PKG_BUILD_DIR)/
endef
endif
define Build/InstallDev/libqos
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/include/qos.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libqos.so $(1)/usr/lib/
endef
define Build/InstallDev
$(call Build/InstallDev/libqos,$(1),$(2))
endef
define Package/libqos/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libqos*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libqos))

View File

@@ -1,57 +0,0 @@
#
# Copyright (C) 2022 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:=libvoice-airoha
PKG_RELEASE:=1
PKG_VERSION:=1.0.3
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=3043d53818166ce02644d53f99b5830d228f78dd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
# 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
LIBVOICE_PKG_BUILD_DIR := $(PKG_BUILD_DIR)
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += -Wall -Werror
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=IOPSYS libvoice for Airoha platform
URL:=
DEPENDS:=
endef
define Package/$(PKG_NAME)/description
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,59 +0,0 @@
{
"ulaw": {
"name": "G.711MuLaw",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 64
},
"alaw": {
"name": "G.711ALaw",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 64
},
"g726": {
"name": "G.726",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 16
},
"g723": {
"name": "G.723.1",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 30,
"ptime_increment": 30,
"bitrate": 5.3
},
"g729": {
"name": "G.729",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 8
},
"ilbc": {
"name": "iLBC",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 30,
"bitrate": 15.2
},
"gsm": {
"name": "GSM-AMR",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 20,
"bitrate": 12.2
}
}

View File

@@ -1,59 +0,0 @@
#
# Copyright (C) 2022 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:=libvoice-broadcom
PKG_RELEASE:=1
PKG_VERSION:=1.0.0
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=dc227982c48ee6d722f3fe18dc9db71495ce9758
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
# 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
LIBVOICE_PKG_BUILD_DIR := $(PKG_BUILD_DIR)
export CONFIG_BCM_CHIP_ID
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += -Wall -Werror
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=IOPSYS libvoice for Broadcom
URL:=
DEPENDS:=
endef
define Package/$(PKG_NAME)/description
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,59 +0,0 @@
{
"ulaw": {
"name": "G.711MuLaw",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 64
},
"alaw": {
"name": "G.711ALaw",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 64
},
"g726": {
"name": "G.726",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 16
},
"g723": {
"name": "G.723.1",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 30,
"ptime_increment": 30,
"bitrate": 5.3
},
"g729": {
"name": "G.729",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 8
},
"ilbc": {
"name": "iLBC",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 30,
"bitrate": 15.2
},
"gsm": {
"name": "GSM-AMR",
"ptime_min": 10,
"ptime_max": 30,
"ptime_default": 20,
"ptime_increment": 20,
"bitrate": 12.2
}
}

View File

@@ -1,57 +0,0 @@
#
# Copyright (C) 2022 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:=libvoice-d2
PKG_RELEASE:=1
PKG_VERSION:=1.0.4
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=f2134d372b3f5e5810e18f34d64d5486d17fca64
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
# 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
include $(INCLUDE_DIR)/package.mk
export D2_VTSP_PLATFORM := $(shell echo $(CONFIG_D2_VTSP_PLATFORM))
TARGET_CFLAGS += -Wall -Werror
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=IOPSYS libvoice for D2 which is software DSP
URL:=
DEPENDS:=+d2-voice
endef
define Package/$(PKG_NAME)/description
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,42 +0,0 @@
{
"ulaw": {
"name": "G.711MuLaw",
"ptime_min": 10,
"ptime_max": 40,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 64
},
"alaw": {
"name": "G.711ALaw",
"ptime_min": 10,
"ptime_max": 40,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 64
},
"g729a": {
"name": "G.729a",
"ptime_min": 10,
"ptime_max": 40,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 64
},
"g729": {
"name": "G.729",
"ptime_min": 10,
"ptime_max": 40,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 8
},
"g722": {
"name": "G.722",
"ptime_min": 10,
"ptime_max": 40,
"ptime_default": 20,
"ptime_increment": 10,
"bitrate": 56
}
}

View File

@@ -1,162 +0,0 @@
#
# Copyright (C) 2020-2023 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.2.104
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a246bf9fd92a1a8c107ffff3eb3428a4174a67df
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
TARGET_WIFI_TYPE=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)
TARGET_PLATFORM=TEST
TARGET_WIFI_TYPE=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_WIFI_TYPE=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TARGET_WIFI_TYPE=MEDIATEK MAC80211
TARGET_CFLAGS +=-DIOPSYS_ECONET
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
TARGET_PLATFORM=IPQ95XX
TARGET_WIFI_TYPE=QUALCOMM MAC80211
TARGET_CFLAGS +=-DIPQ95XX
else ifeq ($(CONFIG_TARGET_mediatek),y)
TARGET_PLATFORM=LINUX
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIOPSYS_LINUX
else
$(info Unexpected CONFIG_TARGET, use default MAC80211)
TARGET_PLATFORM=MAC80211
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIOPSYS_MAC80211
endif
ifneq ($(CONFIG_PACKAGE_libwifi),)
TARGET_CFLAGS +=-DHAS_WIFI
endif
ifeq ($(CONFIG_LIBWIFI_USE_CTRL_IFACE),y)
TARGET_CFLAGS +=-DLIBWIFI_USE_CTRL_IFACE
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)" \
PLATFORM="$(TARGET_PLATFORM)" \
WIFI_TYPE="$(TARGET_WIFI_TYPE)" \
subdirs="$(subdirs)"
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/libwifi/ $(PKG_BUILD_DIR)/
endef
endif
define Package/libwifi-common
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libwifi
SUBMENU:=IOPSYS HAL libs
DEPENDS:=+libopenssl
MENU:=1
endef
define Package/libwifi/description
Library provides WiFi HAL APIs and WiFi common utility functions
endef
define Package/libwifiutils
$(call Package/libwifi-common)
TITLE:= WiFi utility library (libwifiutils.so)
DEPENDS+=+libnl +libnl-route +libeasy
endef
define Build/InstallDev/libwifiutils
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/wifidefs.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/wifiutils.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifiutils/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifi
$(call Package/libwifi-common)
TITLE:= WiFi library (libwifi)
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcmkernel
endef
define Package/libwifi/config
if PACKAGE_libwifi
config LIBWIFI_DEBUG
depends on PACKAGE_libwifi
bool "Enable debugging in libwifi"
default n
config LIBWIFI_USE_CTRL_IFACE
bool "Create UNIX sockets to interface with hostapd/wpa_supplicant"
default n
endif
endef
define Build/InstallDev/libwifi
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/wifiops.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/wifi.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi-7*.so* $(1)/usr/lib/
endef
define Build/InstallDev
$(call Build/InstallDev/libwifiutils,$(1),$(2))
ifneq ($(CONFIG_PACKAGE_libwifi),)
$(call Build/InstallDev/libwifi,$(1),$(2))
endif
endef
define Package/libwifi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi-7*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libwifiutils))
$(eval $(call BuildPackage,libwifi))

View File

@@ -20,6 +20,10 @@ start_service() {
fi
}
stop() {
service_stop /sbin/loop-detector
}
service_triggers()
{
procd_add_reload_trigger loop_detection
@@ -29,3 +33,4 @@ reload_service() {
stop
start
}

View File

@@ -13,9 +13,6 @@ config AGENT_ISLAND_PREVENTION
config AGENT_EASYMESH_R2_CERT
bool "Compile for WFA test bed"
config AGENT_EASYMESH_VERSION
int "Support Easymesh version"
default 2
config AGENT_EASYMESH_VENDOR_EXT
bool "Enable extra features through Easymesh vendor extension"
@@ -33,17 +30,5 @@ config AGENT_EASYMESH_VENDOR_EXT_OUI
enabled through AGENT_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
through which such features would be exposed.
config AGENT_UNAUTHORIZED_STA_IN_ASSOCLIST
bool "Create STA entry before authorization is completed"
config AGENT_CHANSWITCH_SKIP_DFS_UNAVAILABLE
bool "Skip DFS unavailable channels when channel switch"
config AGENT_LOCAL_ACS_SERVICE
bool "Enable loacal ACS daemon usage"
config AGENT_STRICT_OPER_CHANNEL_REPORT
bool "Report operation channel strictly, skip some unsolicited reports"
endmenu
endif

View File

@@ -1,14 +1,14 @@
#
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=4.3.3.2
PKG_VERSION:=2.10.4.6
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=6b1347b33333f3ef9884de0745aa862a0a1dabc8
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_SOURCE_VERSION:=e1978e7b7be0b1f3f4e2b9539d1edfd1898b8083
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
@@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-agent
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-agent
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -28,7 +28,7 @@ define Package/map-agent
CATEGORY:=Utilities
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
+map-plugin +ip-bridge +@BUSYBOX_CONFIG_PATCH +@BUSYBOX_CONFIG_DIFF
+map-plugin +ip-bridge
endef
@@ -56,11 +56,8 @@ endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-Wno-error=deprecated-declarations \
-D_GNU_SOURCE
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_AGENT_EASYMESH_VERSION)
ifeq ($(CONFIG_AGENT_SYNC_DYNAMIC_CNTLR_CONFIG),y)
TARGET_CFLAGS += -DAGENT_SYNC_DYNAMIC_CNTLR_CONFIG
endif
@@ -78,21 +75,6 @@ TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_AGENT_EASYMESH_VENDOR_EX
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
endif
ifeq ($(CONFIG_AGENT_UNAUTHORIZED_STA_IN_ASSOCLIST),y)
TARGET_CFLAGS += -DUNAUTHORIZED_STA_IN_ASSOCLIST
endif
ifeq ($(CONFIG_AGENT_CHANSWITCH_SKIP_DFS_UNAVAILABLE),y)
TARGET_CFLAGS += -DCHANSWITCH_SKIP_DFS_UNAVAILABLE
endif
ifeq ($(CONFIG_AGENT_LOCAL_ACS_SERVICE),y)
TARGET_CFLAGS += -DLOCAL_ACS_SERVICE
endif
ifeq ($(CONFIG_AGENT_STRICT_OPER_CHANNEL_REPORT),y)
TARGET_CFLAGS += -DSTRICT_OPER_CHANNEL_REPORT
endif
MAKE_PATH:=src
@@ -101,8 +83,6 @@ define Package/map-agent/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/lib/wifi
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/script/* $(1)/lib/wifi/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapagent $(1)/usr/sbin/
endef

View File

@@ -6,8 +6,9 @@ config agent 'agent'
option netdev 'wlan'
option island_prevention '0'
option eth_onboards_wifi_bhs '0'
option ap_follow_sta_dfs '0'
option guest_isolation '0'
# option controller_macaddr '0a:1b:2c:3d:4e:50'
option scan_on_boot_only '0'
config dynamic_backhaul
option missing_bh_timer '60'

View File

@@ -3,7 +3,7 @@
. /lib/network/utils.sh
conn_ports_file="/tmp/map.connected.ports"
map_bh_file="/var/run/multiap/multiap.backhaul"
map_bh_file="/tmp/multiap.backhaul"
al_bridge="$(uci -q get mapagent.agent.al_bridge)"
[ "${al_bridge:0:3}" = "br-" ] || exit 0
al_brnet="${al_bridge:3}"

View File

@@ -10,9 +10,8 @@ IS_CFG_VALID=1
MAP_DEV="map_dev"
MAP_IF="map"
start_dynbhd_service() {
rm -f /var/run/multiap/multiap.backhaul
rm -f /tmp/multiap.backhaul
procd_open_instance
procd_set_param command "/usr/sbin/dynbhd"
procd_set_param respawn
@@ -25,7 +24,7 @@ validate_agent_section() {
uci_validate_section mapagent agent "agent" \
'enabled:bool:true' \
'debug:range(0,16)' \
'profile:range(1,4):2' \
'profile:range(1,2):2' \
'brcm_setup:bool:false' \
'controller_macaddr:macaddr' \
'al_bridge:string' \
@@ -34,8 +33,7 @@ validate_agent_section() {
'resend_num:uinteger:0' \
'dyn_cntlr_sync:bool:true' \
'island_prevention:bool:false' \
'eth_onboards_wifi_bhs:bool:false' \
'scan_on_boot_only:bool:false'
'eth_onboards_wifi_bhs:bool:false'
[ "$?" -ne 0 ] && {
@@ -70,7 +68,7 @@ validate_ap_section() {
uci_validate_section mapagent $section "${1}" \
'ifname:string' \
'device:string' \
'band:or("2", "5", "6")' \
'band:or("2", "5")' \
'enabled:bool:true' \
'onboarded:bool:false' \
'ssid:string' \
@@ -92,7 +90,7 @@ validate_radio_section() {
uci_validate_section mapagent $section "${1}" \
'device:string' \
'band:or("2", "5", "6")' \
'band:or("2", "5")' \
'configured:bool:false' \
'onboarded:bool:false' \
'dedicated_backhaul:bool:false' \
@@ -173,11 +171,6 @@ validate_agent_config() {
return 0
}
create_dir() {
mkdir -p /var/run/multiap
mkdir -p /etc/multiap
}
start_service() {
[ -f /usr/sbin/dynbhd ] && start_dynbhd_service
@@ -193,7 +186,6 @@ start_service() {
[ "$enabled" -eq 0 ] && return 1
procd_open_instance
create_dir
procd_set_param command "/usr/sbin/mapagent" "-d"
procd_set_param respawn
# procd_set_param stdout 1

976
map-agent/files/lib/wifi/multiap Executable file
View File

@@ -0,0 +1,976 @@
#!/bin/sh
# functions
# wireless_teardown - tear down ifaces based on mapagent config
# setup_network - prepare /etc/config/network if necessary
# setup_wireless - prepare /etc/config/wireless based on mapagent config
# write_credentials - write bBSS credentials to fBSS
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
. /lib/wifi/traffic_separation
MAPFILE="/tmp/multiap.backhaul"
diff=0
onbrd_bssid=0
onbrd_band=0
usage() {
cat <<EOF
Usage: $0 [wireless_teardown|setup_network|setup_wireless|write_credentials]
Platform specific Multi-AP script to prepare network and wifi subsystem based on
mapagent configuration.
wireless_teardown - tear down ifaces in /etc/config/wireless
setup_network - prepare /etc/config/network
setup_wireless - prepare /etc/config/wireless
write_credentials - write bBSS credentials to fBSS
EOF
exit 1
}
type_to_multi_ap () {
type="$1"
if [ "$type" = "backhaul" ]; then
echo "1"
return
elif [ "$type" = "fronthaul" ]; then
echo "2"
return
elif [ "$type" = "combined" ]; then
echo "3"
return
fi
echo "0"
}
get_type_by_section() {
section="$1"
config_get type $section type "0"
echo "$(type_to_multi_ap $type)"
}
sync_credentials() {
bands=""
json_init
mapagent_process_fh() {
local section=$1
local dev=$2
multi_ap=$(get_type_by_section $section)
[ "$multi_ap" == "0" ] && return
config_get device $section device
[ "$dev" != "$device" ] && return
config_get band $section band
config_get ssid $section ssid
config_get encryption $section encryption
config_get key $section key
section=$(uci add ieee1905 ap)
[ "$section" == "" ] && return
uci -q set ieee1905.${section}.band=$band
uci -q set ieee1905.${section}.ssid="$ssid"
uci -q set ieee1905.${section}.encryption=$encryption
uci -q set ieee1905.${section}.key="$key"
json_select "$band" > /dev/null
if [ "$?" = "0" ]; then
json_get_keys keys
for key in ${keys};
do
json_get_var val "$key"
uci -q set ieee1905.${section}.$key="$val"
done
json_select ..
fi
}
mapagent_process_radio() {
local section=$1
config_get device $section device
config_get band $section band
config_get dedicated_backhaul $section dedicated_backhaul 0
[ "$dedicated_backhaul" != "0" ] && return
for b in $bands; do
if [ "$b" == "$band" ]; then
return
fi
done
config_foreach mapagent_process_fh ap $device
bands="$bands $band"
}
ieee1905_del_ap() {
append_value() {
local section=$1
local key=$2
shift
shift
while [ "$key" != "" ]; do
val=$(uci -q get ieee1905.$section.$key)
[ "$val" = "" ] && {
key=$1
shift
continue
}
json_add_string "$key" ${val}
key=$1
shift
done
}
local section=$1
local band
config_get band $section band
json_select "$band" > /dev/null
rc=$?
[ "$rc" != "0" ] && json_add_object "$band"
append_value $section "manufacturer" "model_name" "device_name" "model_number" "serial_number" "device_type" "os_version"
if [ "$rc" != "0" ]; then
json_close_object
else
json_select ..
fi
uci -q delete ieee1905.${section}
}
config_load ieee1905
config_foreach ieee1905_del_ap ap
config_load mapagent
config_foreach mapagent_process_radio radio
uci commit ieee1905
json_cleanup
}
write_credentials() {
config_load mapagent
mapagent_apply_wireless() {
write_wireless() {
local section=$1
local map_ifname=$2
local bk_ssid="$3"
local bk_key="$4"
config_get ifname $section ifname
#echo found device=$device map=$multi_ap ifname=$ifname mapifname=$map_ifname
[ "$ifname" != "$map_ifname" ] && return
#echo applying bk_ssid = "$bk_ssid" bk_key = "$bk_key"
uci -q set wireless.${section}.multi_ap_backhaul_ssid="$bk_ssid"
uci -q set wireless.${section}.multi_ap_backhaul_key="$bk_key"
}
config_load wireless
config_foreach write_wireless wifi-iface "$1" "$2" "$3"
}
mapagent_find_fbss() {
local section=$1
local dev=$2
local bk_ssid="$3"
local bk_key="$4"
multi_ap=$(get_type_by_section $section)
[ "$multi_ap" == "0" ] && return
config_get device $section device
#echo found dev=$dev device=$device map=$multi_ap
[ "$device" != "$dev" ] && return
[ "$multi_ap" != "2" ] && return
config_get ifname $section ifname
#echo applying bk_ssid = "$bk_ssid" bk_key = "$bk_key"
# subshell in hopes to maintain mapagent config loaded
(mapagent_apply_wireless $ifname "$bk_ssid" "$bk_key")
}
mapagent_find_bbss() {
local section=$1
local dev=$2
multi_ap=$(get_type_by_section $section)
[ "$multi_ap" == "0" ] && return
config_get device $section device
config_get enabled $section enabled "1"
#echo found dev=$dev device=$device map=$multi_ap
[ "$enabled" == "0" ] && return
[ "$device" != "$dev" ] && return
[ "$multi_ap" != "1" ] && return
config_get ssid $1 ssid
config_get key $1 key
#echo found ssid="$ssid" key="$key"
config_foreach mapagent_find_fbss ap $dev "$ssid" "$key"
}
mapagent_process_radio() {
local section=$1
config_get device $section device
#echo found dev=$dev
config_foreach mapagent_find_bbss ap $device
}
config_foreach mapagent_process_radio radio
uci commit wireless
}
set_network() {
local ifname=$1
local num=$2
local bssid=$3
wpa_cli -i $ifname set_n $num bssid $bssid
}
bsta_steer() {
local ifname=$1
local bssid=$2
rc=$(wpa_cli -i $ifname set_n 0 bssid $bssid)
[ "$rc" == "FAIL" ] && {
echo "1"
return;
}
rc=$(wpa_cli -i $ifname roam $bssid)
[ "$rc" == "FAIL" ] && {
echo "1"
return;
}
}
write_bsta_config() {
local ifname=$1
#echo diff = $diff > /dev/console
config_load mapagent
mapagent_apply_wl_bsta() {
apply_config() {
local section=$1
local bsta=$2
local bssid=$3
config_get ifname $section ifname
[ "$bsta" == "$ifname" ] || return
#echo setting diff = $diff > /dev/console
old_bssid="$(uci -q get wireless.${section}.bssid)"
[ "$old_bssid" == "$bssid" ] && break
uci -q set wireless.${section}.bssid=$bssid
wpa_cli -i "$bsta" set_n 0 bssid $bssid
wpa_cli -i "$bsta" save_config
echo 1
}
config_load wireless
config_foreach apply_config wifi-iface $1 $2
uci commit wireless
}
mapagent_process_bk() {
local section=$1
local bsta=$2
config_get ifname $section ifname
#echo bsta = $bsta > /dev/console
[ "$bsta" == "$ifname" ] || return
#echo found ifname=$ifname > /dev/console
config_get bssid $section bssid
config_get band $section band
ret=$(mapagent_apply_wl_bsta $ifname $bssid)
[ "$ret" == "1" ] && {
diff=1
onbrd_bssid=$bssid
onbrd_band=$band
}
}
mapagent_apply_bssid_same_band() {
apply_config() {
local section=$1
local bsta=$2
config_get ifname $section ifname
[ "$bsta" == "$ifname" ] || return
uci -q set wireless.${section}.bssid=$bssid
}
config_get band $1 band
config_get onboarded $1 onboarded "0"
[ "$onbrd_band" != "$band" -o "$onboarded" = "1" ] && return
config_get ifname $1 ifname
config_load wireless
config_foreach apply_config wifi-iface $ifname $onbrd_bssid
uci commit wireless
}
config_foreach mapagent_process_bk bsta $ifname
#echo result diff = $diff > /dev/console
[ "$diff" == "1" ] && {
(config_foreach mapagent_apply_bssid_same_band bsta)
#ubus call uci commit '{"config":"wireless"}'
#echo reloading wireless > /dev/console
}
}
teardown_iface() {
config_load mapagent
local iface=$1
mapagent_teardown_wireless() {
write_wireless() {
local section=$1
local map_ifname=$2
config_get ifname $section ifname
[ "$ifname" != "$map_ifname" ] && return
uci -q set wireless.${section}.disabled="1"
uci -q set wireless.${section}.ssid="DISABLED-SSID"
uci -q set wireless.${section}.key="DISABLED-KEY"
uci -q delete wireless.${section}.multi_ap_backhaul_ssid
uci -q delete wireless.${section}.multi_ap_backhaul_key
}
config_load wireless
config_foreach write_wireless wifi-iface $1
}
mapagent_teardown_bss() {
local section=$1
local iface=$2
multi_ap=$(get_type_by_section $section)
[ "$multi_ap" == "0" ] && return
config_get ifname $section ifname
[ "$iface" != "$ifname" ] && return
config_get ifname $section ifname
uci -q set mapagent.${section}.enabled="0"
uci -q set mapagent.${section}.ssid="DISABLED-SSID"
uci -q set mapagent.${section}.key="DISABLED-KEY"
#uci -q del mapagent.${section}.vid
# subshell in hopes to maintain mapagent config loaded
(mapagent_teardown_wireless $ifname)
}
config_foreach mapagent_teardown_bss ap $iface
uci commit wireless
uci commit mapagent
}
bsta_to_wireless() {
config_load mapagent
mapagent_find_lowest_prio_onboarded() {
mapagent_process_bk() {
config_get priority $1 priority "2"
config_get onboarded $1 onboarded "0"
[ "$onboarded" = "0" ] && return
if [ -z "$sec" -o "$prio" = "-1" -o "$priority" -lt "$prio" ]; then
sec=$1
prio=$priority
fi
}
local sec=""
local prio="-1"
config_foreach mapagent_process_bk bsta
echo $sec
}
mapagent_enable_best() {
#echo 1=$1 best=$best > /dev/console
if [ "$1" = "$best" ]; then
uci -q set mapagent.$1.enabled='1'
else
uci -q set mapagent.$1.enabled='0'
fi
}
mapagent_bsta_to_wireless() {
mapagent_apply_wl_bsta() {
apply_config() {
local section=$1
local bsta=$2
local ssid="$3"
local key="$4"
local encryption=$5
local enabled=$6
local bssid=$7
local disabled="0"
config_get ifname $section ifname
[ -z "$enabled" -o "$enabled" = "0" ] && disabled="1"
[ "$bsta" == "$ifname" ] || return
uci -q set wireless.${section}.ssid="$ssid"
uci -q set wireless.${section}.key="$key"
uci -q set wireless.${section}.encryption=$encryption
uci -q set wireless.${section}.bssid="$bssid"
uci -q set wireless.${section}.default_disabled='0'
[ "$disabled" != "1" ] && return
wpa_cli -i "$bsta" disconnect > /dev/null 2>&1
wpa_cli -i "$bsta" disable_network 0 > /dev/null 2>&1
wpa_cli -i "$bsta" save_config > /dev/null 2>&1
echo 1
}
config_load wireless
config_foreach apply_config wifi-iface $@
uci commit wireless
}
mapagent_find_other_creds() {
#echo "trying to find other creds for $2" > /dev/console
local other_section="$2"
config_get band $1 band
config_get onboarded $1 onboarded "0"
[ "$4" != "$band" -o "$onboarded" = "0" ] && return
config_get ssid $1 ssid
config_get key $1 key
config_get encryption $1 encryption
config_get enabled $1 enabled "0"
config_get bssid $1 bssid
uci -q set mapagent.${other_section}.ssid="$ssid"
uci -q set mapagent.${other_section}.key="$key"
uci -q set mapagent.${other_section}.encryption=$encryption
uci -q set mapagent.${other_section}.bssid="$bssid"
uci commit mapagent
(mapagent_apply_wl_bsta "$3" "$ssid" "$key" $encryption "$5" "$bssid")
}
config_get band $1 band
config_get ifname $1 ifname
config_get onboarded $1 onboarded "0"
config_get enabled $1 enabled "0"
if [ "$onboarded" = "0" ]; then
config_foreach mapagent_find_other_creds bsta $1 $ifname $band $enabled
else
config_get ssid $1 ssid
config_get key $1 key
config_get encryption $1 encryption
config_get bssid $1 bssid
(mapagent_apply_wl_bsta $ifname "$ssid" "$key" $encryption $enabled "$bssid")
fi
}
# best=$(mapagent_find_lowest_prio_onboarded)
#
# [ -z "$best" ] && return
#
# band=$1
# sec=""
# prio=""
#
# config_foreach mapagent_enable_best bsta $best
# uci commit mapagent
config_load mapagent
diff=$(config_foreach mapagent_bsta_to_wireless bsta)
# [ "$diff" != "" ] && {
ubus call uci commit '{"config":"wireless"}'
# }
}
sync_mapcontroller_from_wireless() {
ubus -t 5 wait_for wifi
[ "$?" != "0" ] && return
[ ! -f "/etc/config/wireless" ] && return
status=$(ubus -S call wifi status)
device_to_band() {
local ifname=$1
json_load "$status"
json_select "radios"
json_get_keys keys
for key in $keys; do
json_select $key
json_get_var name name
if [ "$name" != "$ifname" ]; then
json_select ..
continue
fi
json_get_var band band
if [ "$band" == "5GHz" ]; then
echo "5"
elif [ "$band" == "2.4GHz" ]; then
echo "2"
fi
break
done
json_cleanup
}
wireless_process_iface() {
local section=$1
local type="ap"
local enabled="1"
config_get multi_ap $section multi_ap 0
[ "$multi_ap" != "1" ] && [ "$multi_ap" != "2" ] && return
config_get mode $section mode "ap"
[ "$mode" != "ap" ] && return
config_get device $section device
band=$(device_to_band $device)
[ "$band" == "" ] && return
config_get ssid $section ssid
config_get key $section key
config_get encryption $section encryption
config_get start_disabled $section start_disabled "0"
config_get network $section network
cntlr_section=$(uci add mapcontroller ${type})
uci -q set mapcontroller.${cntlr_section}.ssid="$ssid"
uci -q set mapcontroller.${cntlr_section}.key="$key"
uci -q set mapcontroller.${cntlr_section}.encryption="$encryption"
uci -q set mapcontroller.${cntlr_section}.band="$band"
uci -q set mapcontroller.${cntlr_section}.vid="1"
uci -q set mapcontroller.${cntlr_section}.network="$network"
[ "$multi_ap" == "1" ] && map_type="backhaul" || map_type="fronthaul"
uci -q set mapcontroller.${cntlr_section}.type="$map_type"
[ "$start_disabled" == "1" ] && enabled="0"
uci -q set mapcontroller.${cntlr_section}.enabled="$enabled"
}
mapcontroller_teardown() {
local section=$1
uci delete mapcontroller.$1
}
config_load mapcontroller
config_foreach mapcontroller_teardown ap
config_load wireless
config_foreach wireless_process_iface wifi-iface
uci commit mapcontroller
}
bsta_scan_on_enabled() {
local onboarded_bands=""
mapagent_onboarded_bands() {
config_get band $1 band
config_get onboarded $1 onboarded "0"
[ "$onboarded" = "0" ] && return
onboarded_bands="$onboarded_bands $band"
}
mapagent_enable_bk() {
config_get ifname $1 ifname
config_get band $1 band
config_get enabled $1 enabled
[ "$enabled" = "0" ] && return
for onboarded_band in $onboarded_bands
do
[ "$onboarded_band" != "$band" ] && continue
logger -t multiap "bsta_scan_on_enabled $ifname $band"
wpa_cli -i "$ifname" enable_network 0 > /dev/null 2>&1
wpa_cli -i "$ifname" reconnect > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
done
}
config_load mapagent
config_foreach mapagent_onboarded_bands bsta
config_foreach mapagent_enable_bk bsta
}
bsta_enable_all() {
mapagent_enable_bk() {
config_get ifname $1 ifname
uci -q set mapagent.$1.enabled="1"
}
config_load mapagent
config_foreach mapagent_enable_bk bsta
uci commit mapagent
bsta_scan_on_enabled
}
# arg = one interface to clear
# no arg = clear all interfaces
bsta_clear_bssid() {
local iface=$1
mapagent_remove_bssid() {
local iface=$2
config_get ifname $1 ifname
[ -n "$iface" -a "$iface" != "$ifname" ] && return
uci -q set mapagent.$1.enabled="1"
uci -q del mapagent.$1.bssid
}
wireless_remove_bssid() {
local iface=$2
config_get mode $1 mode
config_get ifname $1 ifname
[ "$mode" != "sta" ] && return
[ -n "$iface" -a "$iface" != "$ifname" ] && return
uci -q del wireless.$1.bssid
wpa_cli -i "$ifname" bssid 0 00:00:00:00:00:00 > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
}
config_load mapagent
config_foreach mapagent_remove_bssid bsta $iface
uci commit mapagent
config_load wireless
config_foreach wireless_remove_bssid wifi-iface $iface
uci commit wireless
}
# arg1 = ifname arg2 = bssid
bsta_blacklist_bssid_set() {
local ifname="$1"
shift
local bssid="$@"
wpa_cli -i "$ifname" set_network 0 bssid_ignore "$bssid" > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
}
bsta_blacklist_bssid_clear() {
mapagent_blacklist_by_band() {
config_get ifname $1 ifname
wpa_cli -i "$ifname" set_network 0 bssid_ignore "" > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
}
config_load mapagent
config_foreach mapagent_blacklist_by_band bsta
}
bsta_disable_lower_priority() {
config_load mapagent
mapagent_get_priority() {
config_get ifname $1 ifname
[ "$ifname" != "$2" ] && return
config_get priority $1 priority "2"
echo "$priority"
}
mapagent_disable_lower_bk() {
mapagent_apply_wl_bsta() {
apply_config() {
local section="$1"
local bsta="$2"
local enabled="$3"
config_get ifname $section ifname
[ "$bsta" == "$ifname" ] || return
[ "$enabled" != "0" ] && return
wpa_cli -i "$ifname" disconnect > /dev/null 2>&1
wpa_cli -i "$ifname" disable_network 0 > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
}
local ifname="$1"
local enabled="$2"
[ "$enabled" != "0" ] && return
config_load wireless
config_foreach apply_config wifi-iface $ifname $enabled
}
local enabled="1"
config_get ifname $1 ifname
config_get priority $1 priority
[ "$ifname" != "$2" -a "$priority" -gt "$3" ] && enabled="0"
# enable passed ifname explicitly
# don't explicitly enable other higher prio interfaces
[ "$ifname" != "$2" -a "$enabled" = "1" ] && return
uci -q set mapagent.$1.enabled="$enabled"
(mapagent_apply_wl_bsta $ifname $enabled) > /dev/null
}
local bsta=$1
prio=$(config_foreach mapagent_get_priority bsta $bsta)
#echo bsta $bsta has prio $prio > /dev/console
config_foreach mapagent_disable_lower_bk bsta $bsta $prio
uci commit mapagent
# ubus call uci commit '{"config":"wireless"}'
}
bsta_use_link() {
config_load mapagent
mapagent_disable_bk() {
local bsta="$2"
config_get ifname $1 ifname
config_get enabled $1 enabled
[ "$bsta" = "$ifname" ] && return
wpa_cli -i "$ifname" disconnect > /dev/null 2>&1
wpa_cli -i "$ifname" disable_network 0 > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
}
local bsta=$1
config_foreach mapagent_disable_bk bsta $bsta
noht=$(iw $bsta info | grep "no HT")
[ -n "$noht" ] && {
logger -t multiap "no HT hit, issue reassoc $bsta"
wpa_cli -i $bsta reassoc
}
}
bsta_swap_to_link() {
bsta_disable_lower_priority $1
bsta_use_link $1
wpa_cli -i "$1" enable_network 0 > /dev/null
wpa_cli -i "$1" reconnect > /dev/null
wpa_cli -i "$1" save_config > /dev/null
}
set_uplink_backhaul_info() {
local ul_1905id=$1
local ul_mac=$2
(
flock -x 200
json_load "$(cat $MAPFILE)"
json_add_string "backhaul_device_id" "$ul_1905id"
json_add_string "backhaul_macddr" "$ul_mac"
json_dump > "$MAPFILE"
json_cleanup
) 200>/var/lock/map.backhaul.lock
}
update_isolate_ebtables() {
parse_fh() {
local brcm_setup="$(uci -q get mapagent.agent.brcm_setup)"
local guest_isolate="$(uci -q get mapagent.agent.guest_isolation)"
local pvid="$(uci -q get mapagent.@policy[0].pvid)"
local section=$1
local prefix="TODO"
local action="del"
config_get vid $section vid
config_get band $section band
config_get ifname $section ifname
[ $vid -gt 4094 -o $vid -lt 1 ] && vid=$pvid
[ "$guest_isolate" = "1" -a "$vid" != "$pvid" ] && action="add"
if [ "$brcm_setup" = "1" ]; then
prefix="wds"
else
#todo
break;
fi
ts_sub "isolate" "$action" "$pvid" "$vid" "$band" "$ifname" "$prefix"
}
config_load mapagent
config_foreach parse_fh ap
}
set_uplink() {
local type=$1
local ifname=$2
local hwaddr
hwaddr="$(ifconfig $ifname | grep -i hwaddr | awk '{print $5}' | awk '{print tolower($0)}')"
json_init
json_add_string "type" "$type"
json_add_string "ifname" "$ifname"
json_add_string "macaddr" "$hwaddr"
(
flock -x 200
json_dump > "$MAPFILE"
) 200>/var/lock/map.backhaul.lock
json_cleanup
update_isolate_ebtables
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
ubus call map.agent toggle_fh '{"enable":true, "prevent_island":true, "ifname":"all"}'
fi
}
unset_uplink() {
local type=${1:-wifi}
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
ubus call map.agent toggle_fh '{"enable":false, "prevent_island":true, "ifname":"all"}'
fi
(
flock -x 200
json_load "$(cat $MAPFILE)"
json_get_var bk_type type
json_cleanup
[ "$type" = "$bk_type" ] && rm -f "$MAPFILE" > /dev/null 2>&1
) 200>/var/lock/map.backhaul.lock
}
func=$1
shift
case "$func" in
wireless_teardown) wireless_teardown;;
setup_network) setup_network;;
setup_wireless) setup_wireless;;
write_credentials) write_credentials;;
sync_credentials) sync_credentials;;
bsta_steer) bsta_steer $@;;
set_network) set_network $@;;
write_bsta_config) write_bsta_config $@;;
teardown_iface) teardown_iface $@;;
bsta_to_wireless) bsta_to_wireless $@;;
sync_mapcontroller_from_wireless) sync_mapcontroller_from_wireless $@;;
ts) ts_sub $@;;
bsta_enable_all) bsta_enable_all $@;;
bsta_clear_bssid) bsta_clear_bssid $@;;
bsta_blacklist_bssid_set) bsta_blacklist_bssid_set $@;;
bsta_blacklist_bssid_clear) bsta_blacklist_bssid_clear $@;;
bsta_disable_lower_priority) bsta_disable_lower_priority $@;;
bsta_scan_on_enabled) bsta_scan_on_enabled $@;;
bsta_use_link) bsta_use_link $@;;
bsta_swap_to_link) bsta_swap_to_link $@;;
set_uplink) set_uplink $@;;
set_uplink_backhaul_info) set_uplink_backhaul_info $@;;
unset_uplink) unset_uplink $@;;
--help|help) usage;;
*) usage; exit 1;;
esac

View File

@@ -0,0 +1,590 @@
#!/bin/sh
. /lib/functions.sh
AL_BRIDGE=${AL_BRIDGE-"br-lan"}
PRIMARY_VID=${PRIMARY_VID-1}
MAP_BH_FILE="/tmp/multiap.backhaul"
### Traffic Separation ###
ts_dbg() {
logger -t traffic_separation $@
}
ts_sub() {
ts_usage() {
cat <<EOF
Usage: $0 [create|reload]
Traffic Separation related functions.
create vid - create vlan configuration with vlan_id
reload - reload network with new configuration
EOF
exit 1
}
_dhcp_cleanup() {
vid=$1
[ -n "$(uci -q get dhcp.guest${vid})" ] && {
uci -q delete dhcp.guest${vid}
uci commit dhcp
/etc/init.d/dnsmasq reload
}
}
_firewall_cleanup() {
vid=$1
guest_teardown() {
local section=$1
local config=$2
local val=$3
local option=$4
config_get name "$section" "$option"
[ "$val" != "$name" ] && continue
uci delete ${config}.${section}
uci commit ${config}
}
[ -n "$(uci -q get firewall.guest${vid}_dns)" ] && {
uci -q delete firewall.guest${vid}_dns
uci commit firewall
}
[ -n "$(uci -q get firewall.guest${vid}_dhcp)" ] && {
uci -q delete firewall.guest${vid}_dhcp
uci commit firewall
}
[ -n "$(uci -q get firewall.guest${vid}_ping)" ] && {
uci -q delete firewall.guest${vid}_ping
uci commit firewall
}
config_load firewall
config_foreach guest_teardown forwarding "firewall" guest${vid} "src" #delete firewall section with name = guest${vid}
config_load firewall
config_foreach guest_teardown zone "firewall" guest${vid} "name" #delete firewall section with name = guest${vid}
}
_network_cleanup() {
vid=$1
[ -n "$(uci -q get network.vlan${vid})" ] && {
uci -q delete network.vlan${vid}
uci commit network
}
[ -n "$(uci -q get network.guest${vid})" ] && {
uci -q delete network.guest${vid}
uci commit network
}
[ -n "$(uci -q get network.guest${vid}_8021q)" ] && {
uci -q delete network.guest${vid}_8021q
uci commit network
}
}
_guest_cleanup() {
vid=$1
_dhcp_cleanup $vid
_firewall_cleanup $vid
_network_cleanup $vid
}
net_get_albridge_ip() {
local section=$1
config_get device "$section" device
[ "${AL_BRIDGE}" = "$device" -o "${AL_BRIDGE}.${PRIMARY_VID}" = "$device" ] && {
ipaddr="$(uci -q get network.${section}.ipaddr)"
netmask="$(uci -q get network.${section}.netmask)"
break;
}
}
map_get_ports() {
local br_dev="${AL_BRIDGE/-/_}"
local all_ports=$(uci -q get network.${br_dev}.ports)
echo "$all_ports"
}
ts_create() {
_dhcp_setup() {
local name=$1
[ -n "$(uci -q get dhcp.${name})" ] && return
uci -q set dhcp.${name}=dhcp
uci -q set dhcp.${name}.interface="${name}"
uci -q set dhcp.${name}.start="100"
uci -q set dhcp.${name}.limit="150"
uci -q set dhcp.${name}.leasetime="1h"
uci -q set dhcp.${name}.dhcpv4="server"
uci -q set dhcp.${name}.dhcpv6="server"
uci -q set dhcp.${name}.ra="server"
uci -q set dhcp.${name}.ra_slaac="1"
uci -q add_list dhcp.${name}.ra_flags="managed-config"
uci -q add_list dhcp.${name}.ra_flags="other-config"
uci -q commit dhcp
}
_firewall_setup() {
local name=$1
local network=$1
local vid=$2
local exists=0
local diff=0
local subnet=$(($vid % 256))
local ipaddr="192.168.${subnet}.1"
config_foreach net_get_albridge_ip interface $PRIMARY_VID
# replace third octet of the ip with $subnet
ipaddr=$(echo $ipaddr | sed "s/\(\([0-9]\{1,3\}\.\)\{2\}\)[0-9]\{1,3\}/\1${subnet}/")
config_load firewall
_process_zone() {
local section=$1
local new_name=$2
local val=$3
local name
config_get name $section $val
[ "$name" == "$new_name" ] && exists=1
}
config_foreach _process_zone zone $name "name"
[ "$exists" == "0" ] && {
uci -q add firewall zone
uci -q set firewall.@zone[-1].name="$name"
uci -q add_list firewall.@zone[-1].network="$network"
uci -q set firewall.@zone[-1].input='DROP'
uci -q set firewall.@zone[-1].output='ACCEPT'
uci -q set firewall.@zone[-1].forward='DROP'
diff=1
}
exists=0
config_foreach _process_zone forwarding $name "src"
[ "$exists" == "0" ] && {
uci -q add firewall forwarding
uci -q set firewall.@forwarding[-1].src="$name"
uci -q set firewall.@forwarding[-1].dest="wan"
diff=1
}
[ -z "$(uci -q get firewall.${name}_dns)" ] && {
uci set firewall.${name}_dns=rule
uci set firewall.${name}_dns.name="Allow-DNS-${name}"
uci set firewall.${name}_dns.src="${name}"
uci set firewall.${name}_dns.dest_port="53"
uci set firewall.${name}_dns.proto="tcp udp"
uci set firewall.${name}_dns.target="ACCEPT"
diff=1
}
[ -z "$(uci -q get firewall.${name}_dhcp)" ] && {
uci set firewall.${name}_dhcp=rule
uci set firewall.${name}_dhcp.name="Allow-DHCP-${name}"
uci set firewall.${name}_dhcp.src="${name}"
uci set firewall.${name}_dhcp.src_port="68"
uci set firewall.${name}_dhcp.dest_port="67"
uci set firewall.${name}_dhcp.proto="udp"
uci set firewall.${name}_dhcp.family="ipv4"
uci set firewall.${name}_dhcp.target="ACCEPT"
diff=1
}
[ -z "$(uci -q get firewall.${name}_ping)" ] && {
uci set firewall.${name}_ping=rule
uci set firewall.${name}_ping.name="Allow-Ping-${name}"
uci set firewall.${name}_ping.src="${name}"
uci set firewall.${name}_ping.dest_ip="${ipaddr}"
uci set firewall.${name}_ping.proto="icmp"
uci set firewall.${name}_ping.icmp_type="echo-request"
uci set firewall.${name}_ping.family="ipv4"
uci set firewall.${name}_ping.target="ACCEPT"
diff=1
}
[ $diff -eq 1 ] && uci -q commit firewall
}
_net_setup() {
net_check_for_vlan() {
local section=$1
local vid=$2
config_get vlan "$section" vlan
[ "$vid" = "$vlan" ] && {
echo "1"
break
}
}
net_check_for_network() {
local section=$1
local vid=$2
config_get device "$section" device
[ "${AL_BRIDGE}.$vid" = "$device" ] && {
echo "1"
break
}
}
local vid=$1
diff=""
config_load network
local name="vlan${vid}"
local br_dev="${AL_BRIDGE/-/_}"
local tag=":t"
local self_flags="untagged"
local map_ports="$(map_get_ports)"
# add bridge-vlan section for $vid if doesnt exist
exists=$(config_foreach net_check_for_vlan bridge-vlan $vid)
[ -z "$exists" ] && {
uci -q set network.${name}="bridge-vlan"
uci -q set network.${name}.name="${name}"
uci -q set network.${name}.device="$AL_BRIDGE"
uci -q set network.${name}.vlan="$vid"
}
# guest vids are trunked
[ "${vid}" = "${PRIMARY_VID}" ] && {
# self_flags="untagged pvid"
uci -q set network.${name}.flags="untagged pvid"
tag=":*"
}
uci -q set network.${name}.local='1'
uci -q delete network.${name}.ports
# support tagging for all map_port
for port in $map_ports ; do
uci -q get network.${name}.ports | grep -q "${port}" && {
uci -q del_list network.${name}.ports="${port}"
}
uci -q add_list network.${name}.ports="${port}${tag}"
done
# non-map ports add PVID egress untagged
[ "${vid}" = "${PRIMARY_VID}" ] && {
for port in $(uci -q get network.${br_dev}.ports) ; do
uci -q get network.${name}.ports | grep -q "${port}" && continue
uci -q add_list network.${name}.ports="${port}"
done
}
uci -q commit network
diff="1"
# add interface sections for subinterface if doesnt exist
exists=$(config_foreach net_check_for_network interface $vid)
[ -z "$exists" -a "$PRIMARY_VID" != "$vid" -a -x "/usr/sbin/mapcontroller" ] && {
local name="guest${vid}"
local br_dev="${AL_BRIDGE/-/_}"
local tag=":t"
local self_flags="untagged"
local subnet=$(($vid % 256))
netmask="255.255.255.0"
ipaddr="192.168.1.1"
config_load network
config_foreach net_get_albridge_ip interface $PRIMARY_VID
# replace third octet of the ip with $subnet
ipaddr=$(echo $ipaddr | sed "s/\(\([0-9]\{1,3\}\.\)\{2\}\)[0-9]\{1,3\}/\1${subnet}/")
uci -q set network.${name}="interface"
uci -q set network.${name}.device="${AL_BRIDGE}.$vid"
uci -q set network.${name}.ipaddr="$ipaddr"
uci -q set network.${name}.netmask="$netmask"
uci -q set network.${name}.proto="static"
uci -q commit network
diff="1"
}
[ -z "$(uci -q get network.guest${vid}_8021q)" -a $PRIMARY_VID != $vid ] && {
uci -q set network.guest${vid}_8021q="device"
uci -q set network.guest${vid}_8021q.ifname="${AL_BRIDGE}"
uci -q set network.guest${vid}_8021q.name="${AL_BRIDGE}.$vid"
uci -q set network.guest${vid}_8021q.type="8021q"
uci -q set network.guest${vid}_8021q.vid="$vid"
uci -q set network.guest${vid}_8021q.native="1"
}
}
vid=$1
[ -n "$vid" ] || {
cat <<EOF
VID required to configure.
EOF
exit 1
}
logger -t vlan "setup ts vid $vid"
_net_setup ${vid}
[ -x "/usr/sbin/mapcontroller" -a "$PRIMARY_VID" != "$vid" ] && {
_dhcp_setup guest${vid}
_firewall_setup guest${vid} $vid
}
# Disable pktfwd here and flush FlowCache rules
echo 0 > /proc/pktfwd_dhd/enable
echo 0 > /proc/pktfwd_wl/enable
fcctl flush
}
ts_reload() {
# TODO check it again
local dhcp_reload=$1
restart=""
bridge_verify_vid_mapping() {
local section=$1
check_port_vid() {
local port="$1"
local vlan="$2"
added=$(bridge vlan show dev $port | grep -w "$vlan")
if [ "$added" = "" ]; then
restart="1"
break
fi
}
config_get vlan "$section" vlan "0"
[ "$vlan" = "0" ] && continue
config_list_foreach "$section" "ports" check_port_vid "$vlan"
[ "$restart" = "1" ] && break
}
config_load network
config_foreach bridge_verify_vid_mapping bridge-vlan
[ -n "dhcp_reload" ] && /etc/init.d/dnsmasq reload
if [ "$restart" = "1" ]; then
ts_dbg "trigger network restart"
/etc/init.d/network restart
else
ubus call uci commit '{"config":"network"}'
fi
/etc/init.d/firewall reload
#for sink in $(ubus list network.interface.sink*) ; do
# local sink_vlan=${sink/network.interface./}_vlan
#done
}
# maintain VIDs passed as args in network config, remove rest
ts_keep() {
local al_bridge=$(uci -q get mapagent.agent.al_bridge)
restart=""
[ "$al_bridge" = "" ] && al_bridge="br-lan"
bridge_vlan_teardown() {
local section=$1
shift
local bridge=$1
shift
local keep="$@"
config_get device "$section" device
[ "$bridge" != "$device" ] && continue
config_get vlan "$section" vlan
for i in $@; do
if [ "$i" -eq "$vlan" ] ; then
return
fi
done
restart="1"
_guest_cleanup $vlan
}
config_load network
config_foreach bridge_vlan_teardown bridge-vlan $al_bridge $@
if [ "$restart" = "1" ]; then
uci commit network
ts_dbg "trigger network restart"
/etc/init.d/network restart
fi
}
ts_cleanup() {
guest_teardown() {
local section=$1
local config=$2
local val=$3
local option=$4
config_get name "$section" "$option"
[ "$val" != "$name" ] && continue
uci delete ${config}.${section}
uci commit ${config}
restart="1"
}
local vid=$1
restart=""
_guest_cleanup $vid
# enable pktfwd again and flush FlowCache rules
echo 1 > /proc/pktfwd_dhd/enable
echo 1 > /proc/pktfwd_wl/enable
echo 0 > /proc/pktfwd_dhd/enable
echo 0 > /proc/pktfwd_wl/enable
echo 1 > /proc/pktfwd_dhd/enable
echo 1 > /proc/pktfwd_wl/enable
fcctl flush
}
ts_isolate_wds() {
local action=$1 # add/del
local ifname=$2 # guest fbss name
local wds=$3 # 4addr interface name or prefix+
local br_dev="${AL_BRIDGE/-/_}"
local map_ports="$(map_get_ports)"
local all_ports=$(uci -q get network.${br_dev}.ports)
[ -z "$wds" -o -z "$ifname" ] && return
ebtables -D FORWARD -i $ifname -o $wds -j DROP > /dev/null 2>&1
ebtables -D FORWARD -i $wds -o $ifname -j DROP > /dev/null 2>&1
ebtables -D FORWARD -i $wds -o $wds -p 802_1Q --vlan-id ! $PRIMARY_VID -j DROP > /dev/null 2>&1
# must not drop traffic to upstream
json_load "$(cat $MAP_BH_FILE)"
json_get_var bk_ifname ifname
json_cleanup
# isolate eth map ports
for port in $all_ports ; do
ebtables -D FORWARD -i $wds -o $port -j DROP > /dev/null 2>&1
ebtables -D FORWARD -i $port -o $wds -j DROP > /dev/null 2>&1
done
[ "$action" != "add" ] && return
for port in $map_ports ; do
[ "$port" = "$bk_ifname" ] && continue
ebtables -A FORWARD -i $wds -o $port -j DROP > /dev/null 2>&1
ebtables -A FORWARD -i $port -o $wds -j DROP > /dev/null 2>&1
done
ebtables -A FORWARD -i $ifname -o $wds -j DROP > /dev/null 2>&1
ebtables -A FORWARD -i $wds -o $ifname -j DROP > /dev/null 2>&1
ebtables -A FORWARD -i $wds -o $wds -p 802_1Q --vlan-id ! $PRIMARY_VID -j DROP > /dev/null 2>&1
}
ts_isolate_ap() {
ts_isolate_radio() {
local section=$1
local action=$2
local band=$3
local vid=$4
local ifname=$5
config_get apband "$section" band
[ "$band" = "$apband" ] && continue
config_get apvid "$section" vid
[ "$vid" != "$apvid" ] && continue
config_get apifname "$section" ifname
[ "$ifname" = "$apifname" ] && continue # this should never happen
ebtables -D FORWARD -i $ifname -o $apifname -j DROP > /dev/null 2>&1
[ "$action" != "add" ] && continue
ebtables -A FORWARD -i $ifname -o $apifname -j DROP > /dev/null 2>&1
}
local action=$1
shift
local pvid=$1 # pvid
shift
local vid=$1 # vid
shift
local band=$1 # band
shift
local ifname=$1 # guest fbss name
shift
local br_dev="${AL_BRIDGE/-/_}"
local map_ports="$(map_get_ports)"
local all_ports=$(uci -q get network.${br_dev}.ports)
[ -z "$pvid" -o -z "$ifname" ] && return
config_load mapagent
config_foreach ts_isolate_radio ap $action $band $vid $ifname
# must not drop traffic to upstream
json_load "$(cat $MAP_BH_FILE)"
json_get_var bk_ifname ifname
json_cleanup
# isolate eth map ports
for port in $all_ports ; do
ebtables -D FORWARD -i $ifname -o $port -j DROP > /dev/null 2>&1
ebtables -D FORWARD -i $port -o $ifname -j DROP > /dev/null 2>&1
done
[ "$action" != "add" ] && return
for port in $map_ports ; do
[ "$port" = "$bk_ifname" ] && continue
ebtables -A FORWARD -i $ifname -o $port -j DROP > /dev/null 2>&1
ebtables -A FORWARD -i $port -o $ifname -j DROP > /dev/null 2>&1
done
}
local func=$1
shift
case "$func" in
create) ts_dbg "create $@"; ts_create $@;;
keep) ts_dbg "keep $@"; ts_keep $@;;
reload) ts_dbg "reload $@"; ts_reload $@;;
cleanup) ts_dbg "cleanup $@"; ts_cleanup $@;;
isolate_ap) ts_dbg "isolate_ap $@"; ts_isolate_ap $@;;
isolate_wds) ts_dbg "isolate_wds $@"; ts_isolate_wds $@;;
--help|help) ts_usage;;
*) ts_usage; exit 1;;
esac
}

View File

@@ -14,10 +14,6 @@ config CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
string
default "\\\\x11\\\\x22\\\\x33"
config CONTROLLER_EASYMESH_VERSION
int "Support Easymesh version"
default 2
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
default CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT

View File

@@ -1,19 +1,18 @@
#
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=4.3.0.6
PKG_VERSION:=2.8.0.29
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=cadbccc7654a40f16f96f2c48e584b998c03620e
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_SOURCE_VERSION:=975ec3e88e0e134e29abdb85ec3bd798f13cc3bb
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-controller
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-controller
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -27,7 +26,7 @@ define Package/map-controller
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi Multi-AP Controller (EasyMesh R2)
DEPENDS:=+libuci +libubox +ubus +libeasy +libwifiutils +libieee1905 +ieee1905 +map-plugin
DEPENDS:=+libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 +map-plugin
endef
define Package/map-controller/description
@@ -39,15 +38,12 @@ define Package/map-controller/config
endef
TARGET_CFLAGS += \
-Wno-error=deprecated-declarations \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
MAKE_PATH:=src
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_CONTROLLER_EASYMESH_VERSION)
ifeq ($(CONFIG_CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG),y)
TARGET_CFLAGS += -DCONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
endif

View File

@@ -2,22 +2,15 @@ config controller 'controller'
option enabled '1'
option registrar '2 5'
option debug '0'
option bcn_metrics_max_num '10'
option initial_channel_scan '0'
option primary_vid '0'
option primary_pcp '0'
option allow_bgdfs '0'
option channel_plan '0'
config sta_steering
option steer_module 'rcpi'
option enabled '1'
option enable_sta_steer '0'
option enable_bsta_steer '0'
option use_bcn_metrics '0'
option use_usta_metrics '0'
option bandsteer '0'
option diffsnr '8'
option primary_vid '1'
option primary_pcp '0'
option enable_ts '0'
option allow_bgdfs '0'
option channel_plan '0'
config ap
option band '2'
@@ -68,8 +61,8 @@ config ap
# option report_sta_assocfails_rate '0'
# option report_metric_periodic '0'
# option report_scan '0'
# list steer_exclude 'e0:d4:e8:79:c4:ee'
# list steer_exclude_btm 'e0:d4:e8:79:c4:11'
# option steer_exclude '0'
# option steer_exclude_btm '0'
# option steer_disallow '0'
# option coordinated_cac '0'
# option traffic_separation '0'
@@ -115,8 +108,8 @@ config ap
# option report_sta_assocfails_rate '0'
# option report_metric_periodic '0'
# option report_scan '0'
# list steer_exclude 'e0:d4:e8:79:c4:ee'
# list steer_exclude_btm 'e0:d4:e8:79:c4:11'
# option steer_exclude '0'
# option steer_exclude_btm '0'
# option steer_disallow '0'
# option coordinated_cac '0'
# option traffic_separation '0'

View File

@@ -19,42 +19,21 @@ validate_controller_section() {
'enabled:bool:true' \
'registrar:string' \
'debug:range(0,16)' \
'bcn_metrics_max_num:range(1,256)' \
'initial_channel_scan:bool:true' \
'resend_num:uinteger:0' \
'allow_bgdfs:range(0,2629744)' \
'channel_plan:range(0,2629744)' \
'enable_ts:bool:false'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of controller section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_sta_steering_section() {
local section="$1"
uci_validate_section mapcontroller $section "${1}" \
'steer_module:string' \
'enabled:bool:true' \
'enable_sta_steer:bool:false' \
'enable_bsta_steer:bool:false' \
'use_bcn_metrics:bool:false' \
'use_usta_metrics:bool:false' \
'bandsteer:bool:false' \
'diffsnr:range(0,100)' \
'allow_bgdfs:range(0,2629744)' \
'channel_plan:range(0,2629744)' \
'enable_ts:bool:false' \
'rcpi_threshold_2g:range(0,220)' \
'rcpi_threshold_5g:range(0,220)' \
'rcpi_threshold_6g:range(0,220)' \
'report_rcpi_threshold_2g:range(0,220)' \
'report_rcpi_threshold_5g:range(0,220)' \
'report_rcpi_threshold_6g:range(0,220)'
'report_rcpi_threshold_5g:range(0,220)'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of sta_steering section failed"
logger -s -t "mapcontroller" "Validation of controller section failed"
IS_CFG_VALID=0
return 1
}
@@ -65,11 +44,12 @@ validate_ap_section() {
local section="$1"
uci_validate_section mapcontroller $section "${1}" \
'band:or("2", "5", "6")' \
'band:or("2", "5")' \
'ssid:string' \
'encryption:or("sae", "sae+aes", "psk2",
"psk2+aes", "sae-mixed", "sae-mixed+aes",
"none", "psk-mixed", "psk-mixed+aes",
"wpa", "wpa+aes", "wpa2", "wpa2+aes",
"psk", "psk+aes")' \
'key:string' \
'vid:range(1,65535):1' \
@@ -120,7 +100,7 @@ validate_radio_section() {
uci_validate_section mapcontroller $section "${1}" \
'agent_id:macaddr' \
'macaddr:macaddr' \
'band:or("2", "5", "6")' \
'band:or("2", "5")' \
'steer_policy:range(0,2)' \
'util_threshold:range(0,255)' \
'rcpi_threshold:range(0,255)' \
@@ -143,7 +123,6 @@ validate_controller_config() {
IS_CFG_VALID=1
validate_controller_section &&
config_foreach validate_sta_steering_section sta_steering &&
config_foreach validate_ap_section ap &&
config_foreach validate_node_section node &&
config_foreach validate_radio_section radio
@@ -198,7 +177,7 @@ reload_service() {
return
fi
pidof "/usr/sbin/mapcontroller" > /dev/null
pidof "mapcontroller" > /dev/null
if [[ $? -ne 0 ]] ; then
start
return

View File

@@ -18,5 +18,9 @@ config TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI
enabled through TOPOLOGYD_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
through which such features would be exposed.
config TOPOLOGYD_ACTIVE_CONN_LIBCONNTRACK
bool "Support active connection fetch using netlink"
default n
endmenu
endif

View File

@@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=map-topology
PKG_VERSION:=2.5.1.21
PKG_VERSION:=2.5.0.19
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_VERSION:=693b79873af0017bd53ec001af7f3997565420e8
PKG_SOURCE_VERSION:=369df96b1abab0be5019e164cf63f00f7153730c
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-topology.git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -36,7 +36,6 @@ define Package/map-topology/config
endef
TARGET_CFLAGS += \
-Wno-error=deprecated-declarations \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-I$(STAGING_DIR)/usr/include/libnetfilter_conntrack \
@@ -48,6 +47,10 @@ endef
MAKE_PATH:=src
ifeq ($(CONFIG_TOPOLOGYD_ACTIVE_CONN_LIBCONNTRACK),y)
TARGET_CFLAGS += -DACTIVE_CONN_LIBCONNTRACK
endif
ifeq ($(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT),y)
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI)\\\"
endif

View File

@@ -2,4 +2,4 @@
config global 'global'
option ageing_timer '1440'
option reboot_persistent '0'
list ifname 'br-lan'
option ifname 'br-lan'

Some files were not shown because too many files have changed in this diff Show More