Compare commits

...

652 Commits

Author SHA1 Message Date
nevadita.chatterjee
f0d9a40f59 decollector: 6.0.0.10 2024-06-05 12:50:39 +05:30
Vivek Kumar Dutta
4ef5f5427d obuspa: Fix segfault with invalid UDS 2024-06-05 12:34:18 +05:30
Vivek Kumar Dutta
7ac03aa9d0 swmodd: fix compilation 2024-06-05 10:03:40 +05:30
Janusz Dziedzic
07c69b34ea libwifi: 7.4.71 2024-06-04 17:47:02 +00:00
Vivek Kumar Dutta
d2c3cda897 swmodd: config option to select swmodd-cgroups 2024-06-04 22:32:48 +05:30
Vivek Kumar Dutta
8456cf37e3 dhcpmngr: 1.0.2 2024-06-04 22:20:55 +05:30
Vivek Kumar Dutta
2f1d7d5f6c timemngr: 1.0.20 2024-06-04 22:10:02 +05:30
Vivek Kumar Dutta
6e87362a85 icwmp: 9.7.16 2024-06-04 19:21:49 +05:30
Amin Ben Romdhane
36de4ee5a2 bbfdm: bbf.config with C code 2024-06-04 19:05:29 +05:30
Vivek Kumar Dutta
63b6ff0f27 bbfdm: 1.8.27
- Optimized micro-service registrations
- Removed instance saving for ProcessStatus
2024-06-04 17:42:43 +05:30
Vivek Kumar Dutta
78e9f55363 xmppc: align with dm_data structure 2024-06-04 16:58:26 +05:30
Vivek Kumar Dutta
9845ba6d83 usermngr: align with bbfdm api 2024-06-04 16:53:16 +05:30
Vivek Kumar Dutta
d0c1e957f9 wifidmd: 1.0.3 2024-06-04 16:42:38 +05:30
Vivek Kumar Dutta
8c4a5584b9 ddnsmngr: use dm_data structure for multi-instance objects 2024-06-04 16:15:47 +05:30
Vivek Kumar Dutta
0100fa1c93 hostmngr: align with bbfdm api 2024-06-04 15:43:46 +05:30
Jakob Olsson
38118de339 map-agent: introduce config option that passes PERSIST_CONTROLLER CLFLAG 2024-06-04 11:57:25 +02:00
Jakob Olsson
95b9097a3e map-agent: 6.1.1.2 2024-06-04 11:57:25 +02:00
Jakob Olsson
8765ea2733 map-controller: 6.1.1.2 2024-06-04 11:57:25 +02:00
Jakob Olsson
b3f019ed98 map-agent: map_genconfig: don't modify mapcontroller enabled unconditionally 2024-06-04 11:57:25 +02:00
Vivek Kumar Dutta
bd92591b7b fluentbit: 1.0.0 2024-06-04 14:31:27 +05:30
Janusz Dziedzic
e6178dfa65 libwifi: 7.4.70 2024-06-04 05:19:44 +00:00
Arne Jonsson
2412a29226 treewide: change name of package dependency from bcmkernel to bcm963xx-bsp 2024-06-03 15:58:49 +02:00
Filip Matusiak
c80b487052 map-agent: 6.1.1.1 2024-06-03 15:48:34 +02:00
Anjan Chanda
4ca4047418 wifimngr: 17.2.7 2024-06-03 14:27:39 +02:00
Anjan Chanda
c30151607a libwifi: 7.4.69 2024-06-03 14:26:54 +02:00
Anjan Chanda
6df48c0f7f wifimngr: 17.2.5 2024-05-31 14:06:12 +02:00
Jakob Olsson
d67c459153 map-controller: 6.1.1.1 2024-05-30 16:05:35 +02:00
Amin Ben Romdhane
47f5aade80 wifidmd: 1.0.2 2024-05-30 15:38:42 +02:00
Suvendhu Hansa
e06e1db9b0 obuspa: Added config options for vendor extensions 2024-05-30 12:24:44 +00:00
Vivek Kumar Dutta
6bfc426e63 userinterface: 1.1.3 2024-05-30 17:26:39 +05:30
Markus Gothe
04be1d3efd qosmngr: Add option to match on ICMP/ICMPv6 type. 2024-05-30 11:53:41 +00:00
Vivek Kumar Dutta
4b57a9dcd5 tr143: added license file 2024-05-30 17:06:15 +05:30
Vivek Kumar Dutta
0a065403d5 tr471: added license file 2024-05-30 16:46:24 +05:30
Vivek Kumar Dutta
0b598ddfb1 wifidmd: Updated license 2024-05-30 16:02:11 +05:30
Suvendhu Hansa
b5ef7c7278 obuspa: send WakeUp event on ifup 2024-05-30 10:02:16 +00:00
Vivek Kumar Dutta
8ed348342c obuspa: Use WakeUp! event with interface updates 2024-05-30 15:30:29 +05:30
Suvendhu Hansa
aeb966b798 obuspa: Fix dhcp opt125 for controller discovery 2024-05-30 09:47:42 +00:00
Vivek Kumar Dutta
0d9ca4aa94 tr104: align with datamodel reference API 2024-05-30 15:13:43 +05:30
Marina Maslova
3529860fd2 qosmngr: Dynamically allocate uplink bandwidth on Airoha.
In order for the QoS engine to know how much bandwidth
the uplink has got we need to set this with 'qosrule'
every time the uplink changes. Otherwise SP scheduling
will fail.

This fix takes into account when ae_wan is used by ethernet,
fiber and when PON is used as the uplink.
2024-05-30 08:26:38 +00:00
Amin Ben Romdhane
a03ee39fd7 bbfdm: 1.8.26 2024-05-30 09:51:58 +02:00
Amin Ben Romdhane
dca448d139 wifidmd: WiFi Data Model Package 2024-05-30 09:44:01 +02:00
Janusz Dziedzic
8947c5b8c7 wifimngr: 17.2.4 2024-05-29 15:32:57 +00:00
Janusz Dziedzic
572570b0f1 libwifi: 7.4.68 2024-05-29 15:31:47 +00:00
Jakob Olsson
95d200bf3d map-controller: config: remove per-mld encryption 2024-05-29 13:34:34 +02:00
Jakob Olsson
3f58dd2dd2 map-agent: 6.1.1.0 2024-05-29 13:34:14 +02:00
Jakob Olsson
c60672a710 Revert "map-controller: config: add compat APs"
This reverts commit 6fb7284483.
2024-05-29 13:33:06 +02:00
Jakob Olsson
16b6469277 map-controller: 6.1.1.0 2024-05-29 13:33:06 +02:00
Vivek Kumar Dutta
cf18df1a94 icwmp: retries in deviceID get 2024-05-29 16:59:39 +05:30
Janusz Dziedzic
ce6766ba9f wifimngr: 17.2.3 2024-05-28 14:55:25 +00:00
Janusz Dziedzic
0f517dd0e7 libwifi: 7.4.67 2024-05-28 14:54:23 +00:00
Vivek Kumar Dutta
d3be3f9c4f bbfdm: move IEEE1905 DM to ieee1905 2024-05-28 15:20:22 +05:30
Suvendhu Hansa
efd1537a07 ieee1905: Added TR181 IEEE1905 datamodel micro-service 2024-05-28 09:23:51 +00:00
Amin Ben Romdhane
33c9290916 bbfdm: 1.8.24 2024-05-27 18:08:46 +02:00
Amin Ben Romdhane
853c6a8452 udpecho: run udpecho as micro-service 2024-05-27 15:31:27 +00:00
Vivek Kumar Dutta
5526fdb02c obuspa: reduce value change timer to 15s 2024-05-27 18:57:36 +05:30
Vivek Kumar Dutta
df05c3a3d6 ssdpd: added libbbfdm-api dependency 2024-05-24 19:55:54 +05:30
Vivek Kumar Dutta
40d414f791 swmodd: align with datamodel reference api 2024-05-24 18:33:21 +05:30
Vivek Kumar Dutta
0cf8492eab usbmngr: 1.0.1 2024-05-24 18:28:37 +05:30
Vivek Kumar Dutta
4619bf1722 mcastmngr: 1.2.3 2024-05-24 18:27:19 +05:30
Vivek Kumar Dutta
6c52598bfb hostmngr: align with datamodel reference api 2024-05-24 18:24:53 +05:30
Vivek Kumar Dutta
69330c5799 qosmngr: 1.0.11 2024-05-24 18:23:11 +05:30
Vivek Kumar Dutta
67781c7f18 tr143: updated default values for traceroute 2024-05-24 18:19:45 +05:30
Vivek Kumar Dutta
482ddb50e8 icwmp: 9.7.14 2024-05-24 18:16:39 +05:30
Vivek Kumar Dutta
6b937f3248 sshmngr: 1.0.2 2024-05-24 18:12:50 +05:30
Vivek Kumar Dutta
04ddc46cd5 timemngr: align with bbfdm reference api 2024-05-24 18:10:06 +05:30
Vivek Kumar Dutta
51ce00eebe periodicstats: 1.5.11 2024-05-24 18:03:27 +05:30
Vivek Kumar Dutta
611c1414dc icwmp: fault tolerance for gpn/gpv 2024-05-24 18:00:53 +05:30
Vivek Kumar Dutta
5ad1bea18b ddnsmngr: Align with bbfdm reference api 2024-05-24 17:54:59 +05:30
Vivek Kumar Dutta
57339f81be firewallmngr: Align with datamodel reference API 2024-05-24 17:53:05 +05:30
Vivek Kumar Dutta
82762ede0d dnsmngr: Align with datamodel reference API 2024-05-24 17:50:56 +05:30
Vivek Kumar Dutta
4e324f3d18 dhcpmngr: align with datamodel reference api 2024-05-24 17:48:52 +05:30
Vivek Kumar Dutta
8ab10fb3a1 bbfdm: move UPnP datamodel to ssdpd 2024-05-24 17:40:41 +05:30
Suvendhu Hansa
f9a9543726 ssdpd: added Device.UPnP. datamodel 2024-05-24 11:36:17 +00:00
Jakob Olsson
62223cebfd map-controller: 6.1.0.1 2024-05-24 10:37:23 +02:00
Jakob Olsson
6104c14cfd map-agent: 6.1.0.1 2024-05-24 10:36:52 +02:00
Jakob Olsson
6fb7284483 map-controller: config: add compat APs 2024-05-24 10:18:46 +02:00
Anjan Chanda
7c373c2edb decollector: 6.0.0.9 2024-05-24 10:15:49 +02:00
Vivek Kumar Dutta
82390070c1 bbfdm: moved SelfTestDiagnostisc to self-diagnostics 2024-05-24 13:07:38 +05:30
Suvendhu Hansa
c5bfa7332a self-diagnostics: Added datamodel plugin 2024-05-24 12:23:14 +05:30
Vivek Kumar Dutta
e0e9dffee8 bbfdm: moved PacketCaptureDiagnostics 2024-05-24 11:40:31 +05:30
Suvendhu Hansa
b5cfd5410e packet-capture-diagnostics: 1.0.0 2024-05-24 10:56:47 +05:30
Jakob Olsson
7b0e49753e map-controller: config: handle mld and non-mld ap in same section 2024-05-23 16:36:57 +02:00
Jakob Olsson
6a04e6e29a map-controller: 6.1.0.0 2024-05-23 16:35:58 +02:00
Jakob Olsson
9b2ca1bf90 map-agent: 6.1.0.0 2024-05-23 16:35:04 +02:00
Vivek Kumar Dutta
2f2089e114 userinterface: 1.1.2 2024-05-23 18:18:29 +05:30
Vivek Kumar Dutta
b78a542d28 obuspa: move admin and user role to sulu 2024-05-23 12:38:21 +00:00
Vivek Kumar Dutta
08ce89a394 sulu: Use static roles and UserInterface 2024-05-23 12:38:21 +00:00
Janusz Dziedzic
e4416db22b map-agent: 6.0.1.0 2024-05-23 10:38:18 +00:00
Janusz Dziedzic
b5e195499a map-agent: disable island prevention for QCA/MLD
Disable it before real fix.
This allow execute wifi command to recover.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2024-05-23 10:36:26 +00:00
Anjan Chanda
eb1d8deeff decollector: 6.0.0.8 2024-05-23 10:08:06 +02:00
Vivek Kumar Dutta
cb37cc60b9 userinterface: Support AllowedRole 2024-05-23 12:53:55 +05:30
Suvendhu Hansa
83277d8a0c usermngr: added static roles 2024-05-23 11:44:31 +05:30
Rahul Thakur
e28f1a653c qosmngr: fix qos reload
* applicable only for linux target
* fix reload to setup qos properly and not overwrite queue on
  reload
* fixed l2 classification broken in reload
2024-05-23 03:37:23 +00:00
Jakob Olsson
c23c0248e1 ieee1905: add dep to libwifiutils 2024-05-22 17:32:48 +02:00
Jakob Olsson
82c064d4d9 ieee1905: 8.4.1 2024-05-22 17:21:17 +02:00
Amin Ben Romdhane
5dc2d1ea7b bbfdm: 1.8.20 2024-05-22 17:10:07 +02:00
Janusz Dziedzic
f072dc5ba3 wifimngr: 17.2.2 2024-05-22 08:50:06 +00:00
Janusz Dziedzic
370af9b5fa libwifi: 7.4.66 2024-05-22 08:50:06 +00:00
Strhuan Blomquist
aff71647aa Update Makefile 2024-05-22 08:33:58 +00:00
Marina Maslova
b6ffbdae70 libqos: 7.2.107 2024-05-21 18:55:24 +04:00
Anjan Chanda
214c588bc1 csmngr: 1.0.2 2024-05-21 13:49:56 +02:00
Rahul Thakur
da91ccda1c ebtables-extensions, qosmngr: fix dependencies
* fix dependencies for the ebtables-extensions and qosmngr packages
* ebtables-extensions should not have dependency on ebtables-legacy
* qosmngr should have dependency on ebtables-legacy for non-brcm targets
* for brcm targets, ebtables from brcm sdk is used
2024-05-21 11:29:54 +00:00
Vivek Kumar Dutta
1d64b9e958 swmodd: Support to define additional eu capabilities 2024-05-21 14:09:25 +05:30
Rahul Thakur
bbe507c740 update package ebtables-extensions
* a23a70f Merge branch 'fix_compilation' into 'devel'
* 824ba7a fix compilation for broadcom target
2024-05-20 16:35:25 +00:00
Amin Ben Romdhane
c36da1cf8e bbfdm: 1.8.19 2024-05-20 14:47:26 +02:00
Amin Ben Romdhane
54172e7065 dnsmngr: 1.0.5 2024-05-20 10:54:58 +02:00
Amin Ben Romdhane
5a145b69f8 tr471: Fix typo 2024-05-18 23:05:32 +02:00
Amin Ben Romdhane
20d861bd21 tr143: Fix typo 2024-05-18 23:05:01 +02:00
Amin Ben Romdhane
dc2ba58371 bbfdm: 1.8.18 2024-05-18 22:49:28 +02:00
Amin Ben Romdhane
e800a445ae tr471: 1.0.0 2024-05-18 22:06:29 +02:00
Amin Ben Romdhane
eadfc0feb3 tr143: 1.0.0 2024-05-18 22:03:49 +02:00
Vivek Kumar Dutta
bf5a6f6c3b bbfdm: bbfdm.mk option to override ubus object name 2024-05-18 21:47:18 +02:00
Vivek Kumar Dutta
4862dec4d9 obuspa: static tr181 role definitions 2024-05-17 19:34:35 +05:30
Vivek Kumar Dutta
56960ef0c0 usermngr: define static tr181 roles 2024-05-17 19:33:26 +05:30
Anjan Chanda
3d5c8467c2 decollector: 6.0.0.7 2024-05-17 15:28:07 +02:00
Rahul Thakur
3fb8a697a0 ebtables-extension: setup repo 2024-05-17 15:09:21 +05:30
Rahul Thakur
c165587b54 ipt-trigger: setup package repo 2024-05-17 12:31:16 +05:30
Janusz Dziedzic
e661570fbd map-agent: 6.0.0.9 2024-05-16 14:29:09 +00:00
Anjan Chanda
28ff0a01df libwifi: 7.4.65 2024-05-16 14:55:01 +02:00
Markus Gothe
86075ea908 Initial addition of ebtables-extensions package. 2024-05-16 11:47:35 +00:00
Amin Ben Romdhane
9ed638eb6b bridgemngr: 1.0.2 2024-05-16 11:50:32 +02:00
Amin Ben Romdhane
4054f8d273 bbfdm: 1.8.17 2024-05-16 11:49:37 +02:00
Jakob Olsson
d44a9e2634 map-agent: 6.0.0.8 2024-05-16 09:58:02 +02:00
Jakob Olsson
e0cdb4020d map-controller: 6.0.0.7 2024-05-16 09:57:24 +02:00
Rahul Thakur
74dadc162f qosmngr: fix lan queue priority for linux target
The lan queue were getting setup in wrong order for SP scheduling,
this commit fixes the order.
2024-05-16 11:39:54 +05:30
Amin Ben Romdhane
e53c25807f bbfdm: 1.8.16 2024-05-15 17:05:33 +02:00
Yalu Zhang
ca64bded7c Update packages voicemngr, libvoice-broadcom and libvoice-d2
Support dynamic DTMF payload type.
2024-05-15 16:41:27 +02:00
Markus Gothe
0709b46a63 mcastmngr: Airoha multicast snooping needs to be toggled to work.
We need to flush the mdb entries when configuring multicast
snooping on Airoha.

This commit fixes a bug where blocking multicast snooping doesn't
work.
2024-05-15 12:02:37 +00:00
Marek Puzyniak
e3be97f48e decollector: 6.0.0.2 2024-05-15 10:35:41 +00:00
Marek Puzyniak
82f0db990f libwifi: 7.4.64 2024-05-15 09:50:42 +00:00
Rahul Thakur
b2d17c0704 Update package urlfilter
* ebf8afb Allow setting URL in Blacklist/Whitelist URL
2024-05-15 09:19:21 +00:00
Vivek Kumar Dutta
47fd6bd077 obuspa: Integrate v8.0.1 2024-05-15 11:22:36 +05:30
Amin Ben Romdhane
8837dc7a6c bridgemngr: 1.0.1 2024-05-14 17:57:02 +02:00
Amin Ben Romdhane
e35f05d037 bbfdm: 1.8.15 2024-05-14 17:20:09 +02:00
Jakob Olsson
5b3d595030 map-controller: 6.0.0.6 2024-05-14 17:00:30 +02:00
Jakob Olsson
dfa9e7357e map-agent: 6.0.0.7 2024-05-14 16:44:57 +02:00
Amin Ben Romdhane
1a63ffbe5a bridgemngr: Bridge datamodel package 2024-05-14 13:22:47 +00:00
Filip Matusiak
5238b0776a map-controller: 6.0.0.5 2024-05-14 09:35:42 +02:00
Vivek Kumar Dutta
28cfda6b96 Revert "obuspa: Integrate v8.0.1"
This reverts commit eeae93881d.
2024-05-14 11:43:08 +05:30
Vivek Kumar Dutta
eeae93881d obuspa: Integrate v8.0.1 2024-05-14 05:27:01 +00:00
Jakob Olsson
5ef2db2754 map-agent: 6.0.0.6 2024-05-13 17:19:56 +02:00
Vivek Kumar Dutta
d3a1612294 obuspa: fixes for downgrade 2024-05-13 10:17:40 +00:00
Mohd Husaam Mehdi
ee619a99a6 firewallmngr: add package Makefile
* add Makefile that adds Device.Firewall. and Device.NAT. tr181
  data model objects as a micro service
* add CONFIG_FIREWALLMNGR_PORT_TRIGGER option, which, when enabled
  includes support for Device.NAT.PortTrigger. object and selects
  appropriate kmod dependencies, and is enabled by default
* copy port-trigger scripts to firewallmngr, as it might be
  archived in future
2024-05-13 14:15:44 +05:30
Rahul Thakur
31c4944988 Update package sshmngr
* cleanup repo
2024-05-10 14:49:50 +05:30
Rahul Thakur
94aeedd9b0 Update package dhcpmngr
* cf8ef8c dhcpmngr: add dhcp related definitions from bbfdm
2024-05-10 14:45:51 +05:30
Vivek Kumar Dutta
3fbe2bd73b bbfdm: move USB dm to usbmngr 2024-05-10 14:05:59 +05:30
Vivek Kumar Dutta
ff6f46dbd2 usbmngr: USB datamodel package 2024-05-10 12:58:20 +05:30
Vivek Kumar Dutta
dc312da663 periodicstats: Added missing reqruired parameters 2024-05-09 10:33:06 +05:30
Vivek Kumar Dutta
c0b8538dfe bbfdm: move legacy time dm to timemngr 2024-05-09 09:04:43 +05:30
Vivek Kumar Dutta
9935c43076 timemngr: config option for legacy time datamodel 2024-05-09 09:00:44 +05:30
Amin Ben Romdhane
0b5b7d4984 bbfdm: 1.8.12 2024-05-08 15:19:32 +02:00
Anjan Chanda
23387f0fcc csmngr: 1.0.1 2024-05-08 14:38:31 +02:00
Anjan Chanda
afe7a13e3c Revert "csmngr: 1.0.1"
This reverts commit 5eb7f17b84.
2024-05-08 14:36:37 +02:00
Anjan Chanda
5eb7f17b84 csmngr: 1.0.1 2024-05-08 14:35:04 +02:00
Mohd Husaam Mehdi
9b7b0184c8 dhcpmngr: add dhcpmngr package to iopsys feed
* add Makefile
* move udhcpc.user.d script used for remaining dhcp lease time to
  this package
2024-05-08 12:33:41 +00:00
Mohd Husaam Mehdi
3f64f35b50 bbfdm: remove script used for providing remaining dhcp leasetime
* remove shell script that used to save dhcp lease start time and
  lease duration so that remaining lease time could be calculated
  (reverts bce42023b1)
2024-05-08 12:31:26 +00:00
Jakob Olsson
58e0b0556a map-agent: 6.0.0.5 2024-05-08 14:15:43 +02:00
Jakob Olsson
0f69d96b8f map-controller: add config option to enable probe requests on ubus 2024-05-08 14:15:43 +02:00
Jakob Olsson
3cc7151326 map-controller: 6.0.0.4 2024-05-08 14:15:43 +02:00
Vivek Kumar Dutta
4191852fcb obuspa: Update log level 2024-05-08 15:18:13 +05:30
Vivek Kumar Dutta
e049486b44 tr104: 1.0.27 2024-05-08 09:13:54 +05:30
Janusz Dziedzic
5fc945c32e libwifi: 7.4.63 2024-05-07 08:47:50 +00:00
Janusz Dziedzic
a021f7984e map-agent: allow to disable mlo
just set fw_setenve disable_mlo 1
2024-05-07 05:10:19 +00:00
Markus Gothe
9a3fbe874e hostmngr: Don't try to resolve IP-adresses in firewall.
Using iptables --list without -n takes a long time
on some configurations during boot up which is a problem.

This commit resolves this by not trying resolve hostnames
as it is not necessary for the functionality.

It also splits up the check in two: one for IPv4 and one
for IPv6 to make the logic more robust and fail-safe.
2024-05-06 15:14:18 +00:00
Vivek Kumar Dutta
b1b86e7093 bbfdm: updated PossibleChannels 2024-05-06 16:51:00 +05:30
Anjan Chanda
5ea3018b02 csmngr: 1.0.0 2024-05-05 16:33:45 +02:00
Roman Azarenko
3f336a21f4 iopsys-analytics: updates to icwmp configuration and core-watcher 2024-05-03 15:46:42 +02:00
Jakob Olsson
ac28911137 map-agent: 6.0.0.4 2024-05-03 13:11:44 +02:00
Jakob Olsson
c04d6e5414 map-controller: config: add 2.4ghz to the default mld 2024-05-03 12:02:16 +02:00
Niall McGee
0745ab63cf swmodd: Get lxc-container state from lxc-info 2024-05-02 13:19:43 +00:00
Mohd Husaam Mehdi
bce42023b1 bbfdm: add udhcpc.user.d script to store dhcp lease start time
DCHP lease start time is needed to calculate remaining lease time
which is needed for Device.DHCPv4.Client.{i}.LeaseTimeRemaining.

Earlier this was being provided via interface.status, but that was
leading to unnecessary hotplug events for interface data update so
it had to be removed from there.

Add the logic in udhcpc.user.d script separate from netifd as
there does not seem to be a need in netifd for this information.
2024-05-01 23:27:16 +05:30
Anjan Chanda
b852055460 wifimngr: 17.2.1 2024-04-30 13:01:05 +02:00
Tomas Bucek
f1acd2b4b1 Fix all_interfaces option in qosmngr 2024-04-29 10:17:27 +00:00
Jakob Olsson
77c62b3059 map-controller: 6.0.0.3 2024-04-26 11:52:34 +02:00
Amin Ben Romdhane
206305fa40 bbfdm: 1.8.9 2024-04-26 00:00:10 +02:00
Anjan Chanda
9a7f798933 decollector: 6.0.0.1 2024-04-25 19:11:01 +02:00
Anjan Chanda
3cabbb6919 wifimngr: 17.2.0 2024-04-25 15:55:11 +02:00
Anjan Chanda
ab0645fe4c libwifi: 7.4.62 2024-04-25 15:54:32 +02:00
Vivek Kumar Dutta
60adf6e369 self-diagnostics: Updated bbfdm microservices 2024-04-25 17:55:01 +05:30
Wenpeng Song
5ca12a752e voicemngr 1.1.12, libvoice-d2 1.1.10, libvoice-broadcom 1.0.12
- voicemngr: Support dtmf relay mode synchronization   
 - libvoice: Support DTMF relay mode configuration
2024-04-25 12:14:40 +00:00
Vivek Kumar Dutta
5fe6420620 icwmp: 9.7.12 2024-04-25 17:19:42 +05:30
Jakob Olsson
fd5ae2b847 map-agent: 6.0.0.3 2024-04-25 13:17:59 +02:00
Jakob Olsson
d1f3854b99 Map-controller: 6.0.0.2 2024-04-25 12:15:45 +02:00
Jakob Olsson
f444ba6651 map-agent: 6.0.0.2 2024-04-25 12:01:56 +02:00
Erik Karlsson
2214fd99e8 mcastmngr: handle multiple upstream interface sections
Do not overwrite mcast configuration if there are multiple interface
sections referring to the same upstream device such as wan/wan6
2024-04-25 10:53:43 +02:00
Markus Gothe
35c5d54a76 urlfilter: Add SKIPLOG target for HTTPS over IPv6.
Add same logic as on HTTPS over IPv4.
The traffic needs to go to the SKIPLOG target to avoid
acceleration breaking things.
2024-04-25 06:51:31 +00:00
Vivek Kumar Dutta
4fd6d70b71 bbfdm: 1.8.8 2024-04-25 11:31:18 +05:30
Markus Gothe
f67d771ea4 ebtables: Use --concurrent to avoid race conditions.
On GenXOS we've for some time used this to avoid running
into issues with reloading scripts at the same time.

Adding the same functionality to feeds/iopsys.
2024-04-25 05:48:52 +00:00
Vivek Kumar Dutta
0fc5cc4442 periodicstats: optimize dm api usages 2024-04-25 08:38:43 +05:30
Vivek Kumar Dutta
9b1d5753eb icwmp: error logs for gpn rpc 2024-04-25 08:15:54 +05:30
Andreas Gnau
34d5a178ae voicemngr: Don't error for non-existing bcm-toolchain.mk
When compiling for other platforms than Broadcom, the broadcom feed with
its packages does not exist, so ignore the error if the file does not
exist.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-04-24 17:05:42 +02:00
Andreas Gnau
6cfb68796e voicemngr: Move bcm-toolchain.mk include
Move bcm-toolchain.mk to further to the top so that the appending to
TARGET_CFLAGS with -Wall -Werror in this file is done properly and not
overridden.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-04-24 17:05:42 +02:00
Andreas Gnau
dcdf4e82e5 voicmngr: Do not set flags for BCM explicitly
Do not set CFLAGS and others explicitly for BCM, the ones set by
bcm-toolchain.mk since feeds/broadcom commit 3191be5482a8 (bcmkernel:
toolchain: Set more flags and tools, 2024-04-17) are sufficient.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-04-24 17:05:42 +02:00
Andreas Gnau
9f3e2ae06d voicemngr: Do not disable CheckDependencies
CheckDependencies failed because DT_RUNPATH had not been set. Since
commit 084691a29a (voicemngr: Do not manually specify BCM lib paths,
2024-03-25) we do set a proper RUNPATH, so we can re-enable dependency
checking.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-04-24 17:05:42 +02:00
Andreas Gnau
0793dccefa libpicoevent-bcm: Do not set custom TARGET_CFLAGS
This is no longer necessary since feeds/broadcom commit 3191be5482a8
(bcmkernel: toolchain: Set more flags and tools, 2024-04-17).

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-04-24 17:05:42 +02:00
Amin Ben Romdhane
5d7350279b bbfdm: 1.8.7 2024-04-24 16:11:20 +02:00
Vivek Kumar Dutta
44d242d4aa tr104: 1.0.26 2024-04-24 19:32:49 +05:30
Jakob Olsson
bae25db654 mapcontroller: config: update default ssid of MLD link interface 2024-04-24 15:43:56 +02:00
Jakob Olsson
a66aacb48d map-controller: 6.0.0.1 2024-04-24 15:06:04 +02:00
Mohd Husaam Mehdi
b7d861466a sshmngr: deprecate sshmngr uci
* sshmngr uci is deprecated and so are the library functions
  related to managing that uci, sshmngr will directly interact
  with the backend uci now
* a compile time flag is introduced which tells sshmngr code
  whether dropbear backend is being used or not
2024-04-24 17:43:34 +05:30
Jakob Olsson
f17c3d4763 map-controller: config: create additional interfaces that are placed in mld 2024-04-24 12:38:34 +02:00
Vivek Kumar Dutta
3ed8832a85 obuspa: use bbf.config for service restart 2024-04-24 16:02:09 +05:30
Vivek Kumar Dutta
11f8d68cc3 icwmp: use bbf.config for service restart 2024-04-24 16:00:30 +05:30
Vivek Kumar Dutta
52551d7357 bbfdm: 1.8.6 2024-04-24 15:57:28 +05:30
Suvendhu Hansa
9d777db805 periodicstats: Support CalculationMode 2024-04-24 09:39:17 +00:00
Janusz Dziedzic
1f3c68ad79 map-agent: 6.0.0.1 2024-04-24 08:54:56 +00:00
Amin Ben Romdhane
34be7d88b0 bbfdm: 1.8.5 2024-04-23 19:17:18 +02:00
Amin Ben Romdhane
62dc2e55d5 mcastmngr: 1.2.2 2024-04-23 17:35:35 +02:00
Amin Ben Romdhane
492579a5d1 bbfdm: 1.8.4 2024-04-23 17:16:34 +02:00
Jakob Olsson
025ce42f56 multi-ap: bump EASYMESH_VERSION to 6 2024-04-23 14:45:16 +02:00
Jakob Olsson
6fef055c62 map-controller: config: configure mld by default 2024-04-23 14:45:16 +02:00
Jakob Olsson
eae6b6b8eb map-agent: map_genconfig: set mlo and mlo_capable in wireless for qca 2024-04-23 14:45:16 +02:00
Vivek Kumar Dutta
23d4e3cf18 icwmp: support to use ca-bundle 2024-04-23 17:50:26 +05:30
Vivek Kumar Dutta
41bcbe55b9 obuspa: enabled debug logs 2024-04-23 17:47:02 +05:30
Vivek Kumar Dutta
63e9af8cc2 obuspa: removed ca-certificates dependency 2024-04-23 17:45:18 +05:30
Vivek Kumar Dutta
40ef251948 Revert "obuspa: option to use system ca-bundle"
This reverts commit 8a759a67e4.
2024-04-23 17:42:23 +05:30
Janusz Dziedzic
ad7d90c070 wifimngr: 17.1.2 2024-04-23 11:30:01 +00:00
Janusz Dziedzic
3b165d9e2f libeasy: 7.4.5 2024-04-23 11:29:02 +00:00
Janusz Dziedzic
190e3cb3a0 libwifi: 7.4.60 2024-04-23 10:39:16 +00:00
Vivek Kumar Dutta
8a759a67e4 obuspa: option to use system ca-bundle 2024-04-23 09:09:22 +05:30
Piotr Kubik
d6edbf4e57 iop: Remove legacy update_package
Replaced by 'set-feed-rev'
2024-04-22 17:06:29 +00:00
Piotr Kubik
c8ab92f6dc iop: Remove legacy commands and files
refs #14205
2024-04-22 17:06:29 +00:00
Jakob Olsson
6e2209f6e0 map-controller: 6.0.0.0 2024-04-22 17:38:02 +02:00
Jakob Olsson
fadc9ffcf4 map-agent: 6.0.0.0 2024-04-22 17:38:02 +02:00
Jakob Olsson
10b627f68c ieee1905: 8.4.0 2024-04-22 17:35:16 +02:00
Janusz Dziedzic
34e29aaf84 wifimngr: 17.1.1 2024-04-22 12:38:05 +00:00
Vivek Kumar Dutta
016dbef779 rulengd: enabled extended regex for pattern matching 2024-04-22 16:56:08 +05:30
Mohd Husaam Mehdi
d95dae7282 sshmngr: remove json_object_get call for memory leak fix 2024-04-22 07:22:02 +00:00
Mohd Husaam Mehdi
b274be6adc dnsmngr: remove json_object_get call to fix memory leak 2024-04-22 12:48:03 +05:30
Vivek Kumar Dutta
975008a951 bbfdm: move UserInterface datamodel 2024-04-20 13:25:53 +05:30
Vivek Kumar Dutta
893c292150 userinterface: nginx backend for http access 2024-04-20 13:03:43 +05:30
Amin Ben Romdhane
3857f5d3ee bbfdm: 1.8.2 2024-04-19 15:51:59 +02:00
Janusz Dziedzic
e09277cdc2 map-agent: 4.6.0.4 2024-04-19 12:02:25 +00:00
Yalu Zhang
37c24c0625 libvoicd-d2-1.1.9: Support remote_loss_rate in RTP statistics 2024-04-19 10:44:46 +02:00
Markus Gothe
354d7e8c22 qosmngr: Fix filtering on TOS field for non-Broadcom platforms. 2024-04-18 19:59:57 +02:00
Yalu Zhang
2409d8f4e0 dectmngr-3.6.6: set DECT reset GPIO pin from dectmngr instead of in init script
The reason is that sysfs for GPIO pins have been deprecated on the newer versions
of Linux kernel.
2024-04-18 13:47:51 +02:00
Mohd Husaam Mehdi
df0e96d9ac sshmngr: avoid losing some backend changes on sshmngr restart
if backend uci is changed then restarting sshmngr can lead to
those changes being lost, try to preserve some of the changes

the following behaviour has been tested:

* if an extra option is set in backend UCI which is not set in
  sshmngr UCI for the same section, it will stay as it is
* manually added section in backend is not over-written
* sshmngr managed sections are properly added/modified/deleted
* option BbfSection is introduced which can be set to 0 to prevent
  sshmngr from modifying a backend section

the above works except for first boot (then sshmngr will override
backend UCI)
2024-04-18 16:35:50 +05:30
Mohd Husaam Mehdi
fae8008269 qosmngr: use bbf_get_reference_param api call
adm_entry_get_reference_param does not seem to work in micro
service mode so use bbf_get_reference_param instead
2024-04-17 15:22:02 +05:30
Vivek Kumar Dutta
a6a3599455 bbfdm: remove tools dependency from build dir 2024-04-17 12:20:44 +05:30
Amin Ben Romdhane
86983e9c9c ponmngr: Fix datamodel json plugin 2024-04-17 04:00:04 +00:00
Vivek Kumar Dutta
b2c5d21322 ponmngr: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
161c89060e udpecho: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
d14dbe80c9 twamp: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
c7a08a2f04 obuspa: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
b104b1997a usermngr: user bbf micro-service as datamodel handler 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
06ac5624ab urlfilter: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
7572e4eb1e tr104: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
eb34cb7cb2 timemngr: fix migration script 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
6fc3ff4750 swmodd: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
cbed9517bc port-trigger: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
2ca9158f15 periodicstats: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
5b77f36ae4 mcastmngr: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
289d805bdc hostmngr: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
ed159425a5 dnsmngr: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
f701de6e47 qosmngr: align with bbfdm 2024-04-17 03:58:46 +00:00
Vivek Kumar Dutta
8f159de428 sshmngr: align with bbfdm microservice install APIs 2024-04-17 03:58:46 +00:00
Anjan Chanda
54aa763d01 ieee1905: 8.3.19 2024-04-16 19:15:57 +02:00
Filip Matusiak
df39cf1e4f map-controller: 4.7.0.4 2024-04-16 13:48:42 +00:00
Vivek Kumar Dutta
3a74eb3d86 ethmngr: align with bbfdm plugin install API 2024-04-16 09:46:58 +00:00
Suvendhu Hansa
46603ce0f2 xmppc: 2.2.7 2024-04-16 08:56:06 +00:00
Vivek Kumar Dutta
3c6f3ab3bf bbfdm: generate error if plugin missing 2024-04-16 11:47:30 +05:30
Vivek Kumar Dutta
02761cabac dslmngr: 1.2.4 2024-04-16 11:33:18 +05:30
Vivek Kumar Dutta
72ff019c46 bbfdm: fix the plugin path in uci-default script 2024-04-16 11:20:18 +05:30
Janusz Dziedzic
f2256e36a1 libwifi: 7.4.59 2024-04-15 18:02:17 +00:00
Wenpeng Song
0772483396 libvoice-d2-1.1.7:
Update UK call progress tones according to SIN350
2024-04-15 14:58:29 +00:00
Yalu Zhang
4956969ef5 libvoice-d2-1.1.7: Reduce source jitter in receiving RTP/RTCP packets 2024-04-15 16:09:59 +02:00
Vivek Kumar Dutta
ed6901fe74 stunc: Align with bbfdm 2024-04-15 19:22:02 +05:30
Vivek Kumar Dutta
f981f1ea39 xmppc: align with bbfdm 2024-04-15 19:22:02 +05:30
Vivek Kumar Dutta
04bc5acf53 icwmp: Align with bbfdm 2024-04-15 19:22:02 +05:30
Vivek Kumar Dutta
35c49cb4b7 ddnsmngr: 1.0.4 2024-04-15 19:22:02 +05:30
Vivek Kumar Dutta
bcd4ad4c24 bulkdata: added datamodel validation 2024-04-15 19:22:02 +05:30
Vivek Kumar Dutta
c3f99c0914 bbfdm: 1.8.0
- New set of APIs to handle plugin installation
- Auto-generate datamodel micro-service plugin to minimize errors
- Added compaction of json datamodel plugin
- Added validation of json plugin while installing
- datamodel service name used in process name and in logging
2024-04-15 19:22:02 +05:30
Vivek Kumar Dutta
67a85ccf49 tr104: 1.0.24 2024-04-15 12:31:02 +05:30
Vivek Kumar Dutta
7df3657de8 periodicstats: Fix reload handler 2024-04-15 12:00:33 +05:30
Vivek Kumar Dutta
0d4b589f86 bbfdm: 1.7.29
- Moved IGMP and MLD vendor extensions to mcastmngr
- Moved Time vendor extensions to timemngr
2024-04-15 11:53:57 +05:30
Vivek Kumar Dutta
fb608ea6ff icwmp: Fix linker for ManageableDevice 2024-04-15 11:50:19 +05:30
Suvendhu Hansa
3b05ec8666 timemngr: added vendor extensions from bbfdm 2024-04-15 11:45:09 +05:30
Anjan Chanda
9463798787 decollector: 4.4.0.5 2024-04-12 16:49:05 +02:00
Janusz Dziedzic
92f1e90079 libwifi: 7.4.58 2024-04-12 11:04:10 +00:00
Wenpeng Song
8b60cb2457 libvoice-broadcom-1.0.11:
- Avoid race conditions between DTMF and FLASH simulation on DECT handsets   
 - Support Poland by adding VRG_COUNTRY_POLAND
2024-04-12 09:04:48 +00:00
Anjan Chanda
0527428f6c ieee1905: 8.3.15 2024-04-11 16:08:50 +02:00
Jakob Olsson
508ff7d041 libwifi: 7.4.57 2024-04-11 15:42:37 +02:00
Vivek Kumar Dutta
53cdb49ba8 obuspa: remove usages of netmode 2024-04-11 16:36:36 +05:30
Vivek Kumar Dutta
cdb76b1c18 obuspc: remove usages of netmode 2024-04-11 16:34:59 +05:30
Filip Matusiak
8ed6bd1bfc map-controller: 4.7.0.3 2024-04-10 14:38:15 +02:00
Jakob Olsson
028efc13c9 map-agent: config: enable island prevention 2024-04-10 14:11:57 +02:00
Anjan Chanda
115234d93b csmngr: 0.0.8 2024-04-10 09:29:25 +02:00
Anjan Chanda
34afbc348d wifimngr: 17.1.0 2024-04-10 09:25:40 +02:00
Anjan Chanda
8842b7e8b8 libwifi: 7.4.56 2024-04-10 09:24:29 +02:00
Mohd Husaam Mehdi
b10d8e0ec6 ponmngr: add Device.XPON. bbf object as a micro service
add Device.XPON. object as a bbf micro service instead of a plugin
as is done currently
2024-04-09 16:16:23 +05:30
Mohd Husaam Mehdi
1ec66d5732 mcastmngr: add IGMP and MLD vendor extensions as micro service
move IGMP and MLD vendor extensions from bbfdm to mcastmngr and
add them as a bbfdm micro service
2024-04-09 08:55:22 +00:00
Andreas Gnau
084691a29a voicemngr: Do not manually specify BCM lib paths
Do not explicitly specify BCM libary search paths. All binaries have a
correct RUNPATH set via feeds/broadcom/bcmkernel/bcm-toolchain.mk and
the Makefile has been updated to respect LDFLAGS. Setting LD_LIBARY_PATH
and specifiying custome library search paths is thus no longer
necessary.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-04-09 10:06:47 +02:00
Amin Ben Romdhane
d083dc041e ethmngr: 2.1.6 2024-04-09 09:39:36 +02:00
Amin Ben Romdhane
c0c30ca012 bbfdm: 1.7.28 2024-04-09 09:38:37 +02:00
Markus Gothe
65fbf9958d mcastmngr: Fix typo in Broadcom snooping. 2024-04-09 03:52:52 +00:00
Janusz Dziedzic
c0a6739981 sshmngr: set MaxAuthTries=10
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2024-04-09 03:50:46 +00:00
Yalu Zhang
81fdef1991 voicemngr-1.1.10: Fix a misleading log message 2024-04-08 16:13:00 +02:00
Janusz Dziedzic
dc0dbb29ff wifimngr: 17.0.17 2024-04-08 07:07:53 +00:00
Vivek Kumar Dutta
aa98c2fff5 bbfdm: move Device.QoS. to qosmngr 2024-04-06 12:53:39 +05:30
Vivek Kumar Dutta
5c935f03fe bbfdm: removed deprecated bbfdm_services.sh script
bbfdm_services.sh script had dependency on init script of package, which adds
the datamodel microserice.

This functionality now optimized and provided with 'bbfdm.mk' compile time
helper utility's 'BbfdmInstallMicroServiceInputFile' function.
2024-04-05 18:15:06 +05:30
Mohd Mehdi
b44e25c8ee sshmngr: remove bbfdm_add_service call from init script 2024-04-05 12:44:47 +00:00
Mohd Husaam Mehdi
822f5624b1 qosmngr: remove bbfdm_add_service call from init script 2024-04-05 17:22:25 +05:30
Vivek Kumar Dutta
60f2fdd7cb sulu: 3.1.59 2024-04-05 15:18:06 +05:30
Mohd Husaam Mehdi
6518f92be7 qosmngr: move Device.QoS. from bbfdm to qosmngr
qos.c and qos.h are now added as a bbfdm micro service
2024-04-05 12:47:08 +05:30
Jakob Olsson
f674d32c4e map-controller: 4.7.0.2 2024-04-04 12:57:41 +02:00
Vivek Kumar Dutta
e81c9f80cd bbfdm: Update OperatingChannelBandwidth for 320MHz 2024-04-04 11:50:53 +05:30
Vivek Kumar Dutta
e1fffddf85 obuspa: workaround to skip unreachable mqtt broker 2024-04-04 05:56:57 +00:00
Jakob Olsson
1ddc202fd0 ieee1905: 8.3.12 2024-04-03 18:04:44 +02:00
Janusz Dziedzic
9ed4bea12e libwifi: 7.4.54 2024-04-03 13:35:19 +00:00
Rahul Thakur
cebc62066b sshmngr: fix makefile
update install section to install files to correct paths
2024-04-03 11:30:25 +00:00
Jakob Olsson
ebba65c729 ieee1905: 8.3.11 2024-04-03 12:33:47 +02:00
Jakob Olsson
0373547a79 libwifi: 7.4.53 2024-04-03 11:33:01 +02:00
Jakob Olsson
1076ca4bd8 libwifi: 7.4.52 2024-04-03 11:16:15 +02:00
Vivek Kumar Dutta
fda5aed59c bbfdm: move Device.SSH. to sshmngr 2024-04-02 17:43:33 +05:30
Rahul Thakur
1393125ceb sshmngr: configurable backend
Make the backend daemon configurable, please note, still need
to disable dropbear as default in config and choose the backend
based on config in sshmngr
2024-04-02 16:30:49 +05:30
Mohd Husaam Mehdi
8557dbc1a7 sshmngr: add Device.SSH. support as a microservice 2024-04-01 23:16:57 +05:30
Jakob Olsson
c4ca2ec55c map-controller: 4.7.0.1 2024-03-28 12:52:26 +01:00
Jakob Olsson
3090636827 map-agent: 4.6.0.3 2024-03-28 12:50:17 +01:00
Jakob Olsson
804e2c1568 map-agent: 4.6.0.2 2024-03-27 14:04:50 +01:00
Jakob Olsson
1a2b31e159 wifimngr: 17.0.16 2024-03-27 14:04:44 +01:00
Jakob Olsson
37e930f183 libwifi: 7.4.51 2024-03-27 14:04:36 +01:00
Anjan Chanda
c2560af1e9 decollector: 4.4.0.1 2024-03-27 14:01:24 +01:00
Sukru Senli
1d24d5c4f7 ethmngr: add ruleng ethport recipe and generate deprecated ubus event 2024-03-26 14:09:18 +00:00
Jakob Olsson
ce5e7a3f61 map-agent: config: set enabled '1' as default 2024-03-26 14:08:53 +01:00
Sukru Senli
a1a7bd02f5 map-agent: map_genconfig: set full as default multiap_mode 2024-03-26 09:27:07 +00:00
Rahul Thakur
1068ffa0eb Update package libethernet
* cc72f5a libethernet: fix log spam
2024-03-26 12:52:06 +05:30
Vivek Kumar Dutta
628887b426 bbfdm: refresh instances with events 2024-03-26 11:06:28 +05:30
Erik Karlsson
ec7ba74900 testnet: avoid potential race condition
Instead of running a second instance of testnet once and in parallel
with the background task on interface up/down, the background task is
woken up. The avoids the potential for a race where under certain
circumstances a ubus event for internet up or down may never be sent.

Also remove unused include and add missing quotation.
2024-03-25 15:18:16 +00:00
Vivek Kumar Dutta
e383d1d145 sulu: 3.1.58 2024-03-25 20:22:03 +05:30
Amin Ben Romdhane
abe813b656 bbfdm: 1.7.22 2024-03-25 14:18:29 +01:00
Amin Ben Romdhane
d690cf904c bulkdata: Fix init.d permission issue 2024-03-25 14:15:42 +01:00
Jakob Olsson
fe82de8bd5 map-agent: 4.6.0.1 2024-03-25 11:37:43 +01:00
Amin Ben Romdhane
7a943dc49a bbfdm: 1.7.21 2024-03-22 13:32:36 +01:00
Arne Jonsson
bc2278e89b libqos: add support for Broadcom SDK bcm_5.04L.04p3 2024-03-22 12:08:47 +00:00
Jakob Olsson
2996f2313c libeasy: 7.4.4 2024-03-22 11:57:02 +01:00
Jakob Olsson
d95c7288e9 map-controller: 4.7.0.0 2024-03-22 11:35:03 +01:00
Jakob Olsson
43f7c0d23e map-agent: 4.6.0.0 2024-03-22 11:34:33 +01:00
Jakob Olsson
616273eb43 libdpp: 2.1.0 2024-03-22 11:20:16 +01:00
Jakob Olsson
aeca902517 wifimngr: 17.0.15 2024-03-22 11:19:05 +01:00
Jakob Olsson
652cd1c78a libwifi: 7.4.50 2024-03-22 11:18:25 +01:00
Anjan Chanda
7ab19c15d9 ieee1905d: 8.3.10 2024-03-22 10:45:13 +01:00
Vivek Kumar Dutta
35226f843c usermngr: use bbf.secure to store/retrive password 2024-03-21 19:56:38 +05:30
Amin Ben Romdhane
b8b02aabd3 bbfdm: Added bbf.secure to encode/decode values
Added a ubus method `bbf.secure` which allows encoding/decoding of values using sha512 hash or with a RSA private/public key pair
2024-03-21 13:50:22 +00:00
Vivek Kumar Dutta
6784f696af sulu: 3.1.57 2024-03-21 18:30:47 +05:30
Vivek Kumar Dutta
350b9ce7c8 dnsmngr: align with bbfdm 2024-03-21 18:14:52 +05:30
Vivek Kumar Dutta
5cbe7033c8 icwmp: Suppport Cancelled DiagnosticsState 2024-03-21 18:12:18 +05:30
Vivek Kumar Dutta
c15b4aa0c3 bbfdm: 1.7.19
- JSON Plugin: use ubus blocking API to run operate command
- Fix the refresh instances order
- Support Canceled DiagnosticsState
2024-03-21 18:03:00 +05:30
Filip Matusiak
e7ff39bfc8 self-diagnostics: add radio status and iw dev 2024-03-21 10:02:20 +00:00
Arne Jonsson
196ea82509 voicemngr: add ssl and crypto lib needed by new Broadcom version 2024-03-21 10:31:42 +01:00
Yalu Zhang
be38a9cdca libvoice-d2-1.1.6: Support K-break signal 2024-03-20 18:00:44 +01:00
Vivek Kumar Dutta
aa4424b97f sulu: 3.1.56 2024-03-20 19:59:30 +05:30
Vivek Kumar Dutta
a1b4b34b39 bbfdm: option to add respawn and core for microservice 2024-03-20 19:42:47 +05:30
Vivek Kumar Dutta
b0ea1a6a53 sulu: 3.1.55 2024-03-20 10:03:20 +05:30
Rahul Thakur
ad9742abb4 update package ethmngr
* 53d31f7 ethmngr: remove event
2024-03-20 09:54:44 +05:30
Rahul Thakur
53c8950947 ethmngr: add ruleng recipe for ethport hotplug event
hotplug event generated now from ruleng recipe based on the
network.device event
2024-03-20 01:05:43 +00:00
Amin Ben Romdhane
edd89d2aaf bbfdm: 1.7.17 2024-03-19 14:20:42 +01:00
Roman Azarenko
718860f30e iopsys-analytics: fix compatibility with iputils-ping 2024-03-19 13:12:25 +01:00
Rahul Thakur
025533f734 qosmngr: handle single lan port devices
update logic to read board ports to also handle devices with
single lan port
2024-03-19 16:34:23 +05:30
Amin Ben Romdhane
8644a80d80 bbfdm: 1.7.16 2024-03-18 16:33:42 +01:00
Vivek Kumar Dutta
e8c51b6977 obuspa: Fix operate response within session 2024-03-18 15:43:41 +05:30
Anjan Chanda
51305266e8 wifimngr: 17.0.14 2024-03-18 10:17:23 +01:00
Anjan Chanda
832c0753ce libwifi: 7.4.49 2024-03-18 10:16:46 +01:00
Vivek Kumar Dutta
453fc865ee bbfdm: support steer related dataelement operates
Added support for below operate commands
- SetSTASteeringState()
- SteerWiFiBackhaul()
- BTMRequest()
2024-03-17 11:31:29 +05:30
Janusz Dziedzic
dead9fca70 map-agent: remove apsta set 2024-03-15 18:13:33 +00:00
Anjan Chanda
7f048bbf57 decollector: 4.2.1.4 2024-03-15 14:24:56 +01:00
Yalu Zhang
6ae1e846ee voicemngr-1.1.9: Support K-break
libvoice-broadcom-1.0.10: Support K-break
Fix voicemngr crash if no extension exists in asterisk config
2024-03-15 14:10:22 +01:00
Vivek Kumar Dutta
4286dec1a1 bbfdm: Support external dm reference in json plugin 2024-03-15 18:05:59 +05:30
Vivek Kumar Dutta
6d3399ccb8 bbfdm: move Ethernet and MacVlan to ethmngr 2024-03-15 14:34:12 +05:30
Amit Kumar
a3b547ab80 ethmngr: added Ethernet as BBF Microservice
Added bbfdm microservice for datamodel Device.Ethernet.
 bbf_plugin for vendor extension MACVLAN
 multi dm object handling for microservice
 replaced dmmap_dup with dm_data structure
 Updated commit id in Makefile
 increased minor version
2024-03-15 10:40:33 +05:30
Vivek Kumar Dutta
f80b0b3eac sulu: OpenVPN widget 2024-03-14 20:42:34 +05:30
Rahul Thakur
09b8975174 mcastmgr: remove outdated comment 2024-03-14 18:35:51 +05:30
Sukru Senli
9cdba3b3e0 testnet: remove unused include 2024-03-14 13:42:55 +01:00
Sukru Senli
e6eba50913 map-agent: remove unused include 2024-03-14 13:41:57 +01:00
Sukru Senli
7e6a3f4a1f map-agent: map-dynamic-backhaul: replace deprecated get_network_of function usage 2024-03-14 13:39:31 +01:00
Janusz Dziedzic
faff3b9337 libwifi: 7.4.44 2024-03-14 12:27:05 +00:00
Vivek Kumar Dutta
11e613ce05 obuspa: align with bbfdm services 2024-03-14 15:30:50 +05:30
Amin Ben Romdhane
04413be781 bbfdm: 1.7.12 2024-03-13 23:44:20 +01:00
Amit Kumar
fa95755642 port-trigger: added bbfdm microservice handling
Added input json file
2024-03-13 14:45:13 +00:00
Rahul Thakur
72f6521710 netmode: disable firewall for l2 netmode
since the intent for l2 netmode is to accept all traffic, hence,
disable firewall on top of zone lan's input/output/forward being
ACCEPT/ACCEPT/ACCEPT

Please note: when firewall is disabled, it esentially set's input
to ACCEPT, it does not stop or disable fw3.
2024-03-13 11:53:54 +00:00
Vivek Kumar Dutta
2a9012763e ipt-trigger: fix compilation 2024-03-13 10:30:28 +00:00
Vivek Kumar Dutta
c06016bc5b dslmngr: align with bbfdm microservices 2024-03-13 06:48:44 +00:00
Suvendhu Hansa
b946c2842a swmodd: aligned with bbfdm micro-service 2024-03-13 06:16:27 +00:00
Erik Karlsson
356c6c76d2 hostmngr: avoid creating /scripts directory in the root 2024-03-13 05:50:46 +00:00
Vivek Kumar Dutta
27f466ae8d hostmngr: Align with bbfdm microservice 2024-03-13 10:22:38 +05:30
Vivek Kumar Dutta
3f0f5ba019 icwmp: align with datamodel microservice 2024-03-12 14:31:19 +00:00
Vivek Kumar Dutta
1e4c3cec94 timemngr: align with datamodel microservice 2024-03-12 14:31:19 +00:00
Vivek Kumar Dutta
e21a57e76c dnsmngr: align with datamodel microservice 2024-03-12 14:31:19 +00:00
Vivek Kumar Dutta
7abe44c412 bulkdata: align with microservice deployment 2024-03-12 14:31:19 +00:00
Vivek Kumar Dutta
c24a0ccd66 tr104: align with datamodel microservice 2024-03-12 14:31:19 +00:00
Vivek Kumar Dutta
9926d0fa80 ddnsmngr: align with datamodel microservice 2024-03-12 14:31:19 +00:00
Vivek Kumar Dutta
b598e31ca3 periodicstats: align with datamodel microservice 2024-03-12 14:31:19 +00:00
Vivek Kumar Dutta
0faae8cfad urlfilter: align with microservice deployment 2024-03-12 14:31:19 +00:00
Vivek Kumar Dutta
4535954699 bbfdm: utility functions and micro-service handler 2024-03-12 14:31:19 +00:00
Amit Kumar
e9d0a81e8e dslmngr: Added dsl,fst,atm,ptm bbf microservice
DSL, ATM,FAST and PTM added as mlti object bbf microservice handling
 updated commit ID in Makefile
 incremented minor version
2024-03-12 09:18:17 +00:00
Markus Gothe
d6333aa476 xpon: Add support to configure ONU version.
Some customer has their own requirments
for the ONU version string.

The following commit adds support
for configuring this value via UCI.

For Broadcom we will need to add additional
support in the SDK.
2024-03-12 09:02:47 +00:00
Markus Gothe
5b702e1991 tree-wide: use OpenWrt way to define LAN/WAN ports 2024-03-12 08:31:17 +00:00
Jakob Olsson
cb2ce4a8a3 map-agent: 4.5.2.3 2024-03-11 17:47:56 +01:00
Jakob Olsson
82ab0e5367 map-controller: 4.6.1.0 2024-03-11 17:47:56 +01:00
Jakob Olsson
d8506b4239 ieee1905: 8.3.9 2024-03-11 17:47:56 +01:00
Andreas Gnau
5ded1fc682 iop: update_package: Recommend set-feed-rev as replacement
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-03-11 17:26:44 +01:00
Amin Ben Romdhane
8f4010d0cf bbfdm: 1.7.11 2024-03-11 16:22:40 +01:00
Vivek Kumar Dutta
2319f033f7 dnsmngr: align with bbfdm microservice 2024-03-11 19:47:55 +05:30
Vivek Kumar Dutta
9bf0b5ff70 icwmp: align with bbfdm microservice 2024-03-11 18:53:09 +05:30
Vivek Kumar Dutta
c414fc6259 urlfilter: align with bbfdm microservice 2024-03-11 18:41:56 +05:30
Vivek Kumar Dutta
43d3d72620 bulkdata: align with json_plugin_version 2 2024-03-11 17:01:59 +05:30
Vivek Kumar Dutta
800597ae2b tr104: Align with bbfdm microservice 2024-03-11 16:47:08 +05:30
Vivek Kumar Dutta
291bef2007 timemngr: Align with bbfdm microservice 2024-03-11 16:47:08 +05:30
Vivek Kumar Dutta
39f1bbe436 periodicstats: Align with bbfdm micro_service 2024-03-11 16:47:08 +05:30
Vivek Kumar Dutta
43b5e66431 ddnsmngr: Align with bbfdm micro_service 2024-03-11 16:47:08 +05:30
Vivek Kumar Dutta
d21c3f33b6 bulkdata: Align with bbfdm micro_service 2024-03-11 16:47:08 +05:30
Vivek Kumar Dutta
a58b047723 bbfdm: Added micro_service uci 2024-03-11 16:47:08 +05:30
Jakob Olsson
9ef7c35ee0 map-agent: config: remove deprecated netdev option from default config 2024-03-11 11:00:50 +01:00
Mohd Husaam Mehdi
3d4708bd68 timemngr: update init script to announce ntp service over DNS-SD 2024-03-11 09:22:36 +00:00
Amit Kumar
7536b725b4 ipt-trigger: package for kernel module to support port trigger 2024-03-11 08:45:23 +00:00
Vivek Kumar Dutta
8101ef0c5a obuspa: admin ACL for OpenVPN 2024-03-11 07:00:47 +00:00
Vivek Kumar Dutta
80d027ba12 stunc: Align with cwmp update 2024-03-11 06:44:17 +00:00
Vivek Kumar Dutta
fb0310b8f6 xmppc: Align with cwmp update 2024-03-11 06:44:17 +00:00
Vivek Kumar Dutta
8482cb4ddc icwmp: run datamodel with micro-service 2024-03-11 06:44:17 +00:00
Mohd Husaam Mehdi
1700c3fa19 dnsmngr: add Makefile and files for dnsmngr package 2024-03-11 06:22:10 +00:00
Suvendhu Hansa
63fd69ad75 urlfilter: add datamodel with micro-service 2024-03-11 06:18:34 +00:00
Vivek Kumar Dutta
548be0303f bbfdm: 1.7.9
- Start refresh timer after transaction commit
- Moved DNS dm to dnsmngr
- bbfdm: Use object name in ubus for microservices
2024-03-11 11:02:19 +05:30
George Yang
8b39953242 mcastmngr: Set the "igmp" as the default protocol for mcast proxy/snooping config
For example, in the current LUCI iptv page, option "proto" is not provided, and IGMP is assumed.
2024-03-11 05:10:34 +00:00
Vivek Kumar Dutta
6d0de809ec bbfdm: Support dmmap,liker and list in Json plugins v2 2024-03-08 10:29:06 +05:30
Vivek Kumar Dutta
8c2a353096 ddnsmngr: 1.0.1 2024-03-07 16:25:18 +05:30
Rahul Thakur
a5d275147d urlfilter: update source url 2024-03-07 16:20:28 +05:30
Jakob Olsson
12b6711a73 map-agent: 4.5.2.2 2024-03-07 11:24:09 +01:00
Janusz Dziedzic
b0fd3e8295 libwifi: 7.4.43 2024-03-07 09:40:21 +00:00
Rahul Thakur
80a7f348ad ethmngr: fix pause stats appearing twice in ubus output 2024-03-07 10:21:28 +05:30
Amin Ben Romdhane
a56049b5db bbfdm: 1.7.7 2024-03-06 17:00:11 +01:00
Marek Puzyniak
53e6168c8c map-controller: 4.6.0.6 2024-03-06 14:38:20 +00:00
Marek Puzyniak
b17e5140ce map-agent: 4.5.2.1 2024-03-06 14:34:58 +00:00
Marek Puzyniak
95d1a7cc30 ieee1905: 8.3.8 2024-03-06 13:38:39 +00:00
Markus Gothe
b8b2dcb6fe ponmngr: Refactor code.
Cleanup code and make sure we can use whitespace
in passwords.
2024-03-06 12:20:27 +00:00
Markus Gothe
504d124486 ponmngr: Fix LOID password on Airoha.
The LOID password can never have worked on
Airoha since the syntax is wrong.
2024-03-06 12:20:27 +00:00
Markus Gothe
380daf4a00 ponmngr: Add support for 10G PON on Airoha. 2024-03-06 11:34:13 +00:00
Rahul Thakur
248fadbf9d ethmngr: add pause frame support
* e96775c Add pause packets for rmon statistics
* f11bdbe ethmngr: Add support for representing pause frames over UBUS.
2024-03-06 16:54:14 +05:30
Jakob Olsson
78a272d633 map-agent: 4.5.2.0 2024-03-06 12:02:30 +01:00
Amin Ben Romdhane
9174ce4b47 icwmp: 9.7.0 2024-03-06 10:34:34 +01:00
Amin Ben Romdhane
ec4dd70279 stunc: 1.4.1 2024-03-06 10:33:34 +01:00
Rahul Thakur
97093db976 libethernet: add pause frame support
df0181a Add rudimentary support for pause frames.
797a2b1 Add pause packets counters and get it for airoha
99d02dc linux: pause frame stats increment
2024-03-06 08:49:52 +00:00
Vivek Kumar Dutta
2aba8381a8 bbfdm: Use generic struct dm_data for multi-instance objects 2024-03-06 10:22:44 +05:30
Vivek Kumar Dutta
5ce0a2213c bbfdm: 1.7.5
- microservice: Add support to register multiple objects
- DataElements: Skip adding non-existing radio/node from dump2 to mapcontroller
2024-03-06 09:51:47 +05:30
Vivek Kumar Dutta
d3599d5ed3 usp-js: Use usp-1.2 encoding for qjs 2024-03-06 09:47:00 +05:30
Jakob Olsson
98939b4868 map-agent: 4.5.1.16 2024-03-05 17:17:46 +01:00
Yalu Zhang
89df7486bd Update package libvoice-d2
Modify the initial fixed jitter buffer to 100ms for reducing delay
2024-03-05 15:35:30 +01:00
Janusz Dziedzic
e9b42e1008 wifimngr: 16.2.11 2024-03-01 08:56:32 +00:00
Janusz Dziedzic
72578c94e5 libwifi: 7.4.42 2024-03-01 06:51:36 +00:00
Rahul Thakur
2f20ec448d hostmngr: update implementation
following cases/bugs are handled in this change:
1. Ignore schedule if access_policy is deny
2. For access policy allow, with schedule, deny for time outside
   the defined schedule.
3. Default value for days
4. Handle scenario when start time is not defined by initializing
   the start time to 00:00
5. Handle scenario when duration is not defined
2024-03-01 06:32:49 +00:00
Vivek Kumar Dutta
ddfab6f729 obuspa: 7.0.5.16 2024-03-01 11:23:44 +05:30
Vivek Kumar Dutta
5ea154d45d bbfdm: Update default encryption to sae-mixed in SetSSID 2024-03-01 10:10:59 +05:30
Janusz Dziedzic
1beb50b0f3 wifimngr: 16.2.10 2024-02-29 19:36:49 +00:00
Janusz Dziedzic
1539bd4698 libwifi: 7.4.41 2024-02-29 19:35:23 +00:00
Vivek Kumar Dutta
10895fcdfd bbfdm: Set sae as default encryption for new SetSSID additions 2024-02-29 19:54:22 +05:30
Janusz Dziedzic
5f36059857 wifimngr: 16.2.9 2024-02-29 14:12:20 +00:00
Janusz Dziedzic
b04ae36466 libwifi: 7.4.40 2024-02-29 14:11:10 +00:00
Janusz Dziedzic
1d433ee82a libwifi: 7.4.39 2024-02-29 11:54:57 +00:00
Amin Ben Romdhane
2ec27f40be icwmp: keep certs for non system ssl_capath
- store certificate paths in keep.d only if ssl_capath not configured as system default certificate path(/etc/ssl/certs)
2024-02-28 13:37:10 +00:00
Janusz Dziedzic
d99b63f6cf libwifi: 7.4.38 2024-02-27 20:00:40 +00:00
Jakob Olsson
37a064dc55 map-agent: 4.5.1.15 2024-02-27 18:01:08 +01:00
Jakob Olsson
f8375dd9e0 map-agent: map-dynamic-backhaul: use brctl delif to remove bsta from bridge
Map-agent now uses libeasy rather than netifd
2024-02-27 17:59:40 +01:00
Yalu Zhang
38c523375b Update package libvoice-d2
Correct the configuration of echo cancellation
2024-02-27 11:49:30 +01:00
Anjan Chanda
8bdc8a0bb7 libwifi: 7.4.37 2024-02-23 12:32:28 +01:00
Anjan Chanda
ecaf8ab2e9 csmngr: 0.0.5 2024-02-23 12:24:59 +01:00
Jakob Olsson
dbeaf1111d map-agent: 4.5.1.14 2024-02-23 12:20:56 +01:00
Amin Ben Romdhane
cb8f4d060b bbfdm: 1.7.2 2024-02-23 12:17:04 +01:00
Jakob Olsson
013b26e692 map-agent: 4.5.1.13 2024-02-23 12:02:14 +01:00
suvendhu
1db3d69571 ddnsmngr: 1.0.0 2024-02-23 14:18:47 +05:30
Janusz Dziedzic
272493dc31 map-agent: 4.5.1.12 2024-02-22 20:54:08 +00:00
Jakob Olsson
75215e4909 map-agent: 4.5.1.11 2024-02-22 16:54:00 +01:00
Vivek Kumar Dutta
d3b21a3ae7 bbfdm: Support for json_plugin_version 2 2024-02-22 19:10:11 +05:30
Vivek Kumar Dutta
9e9b46f4a2 icwmp: Use system certs if ssl_capath not defined 2024-02-22 18:41:48 +05:30
Vivek Kumar Dutta
b73f43e200 obuspa: Fix session state value 2024-02-22 18:23:38 +05:30
Amin Ben Romdhane
911f9a28b5 bbfdm: 1.7.0 2024-02-21 17:33:41 +01:00
Jakob Olsson
f76e77585c map-agent: 4.5.1.10 2024-02-21 17:05:17 +01:00
Jakob Olsson
1ba45eb368 map-agent: 4.5.1.9 2024-02-21 16:01:57 +01:00
Jakob Olsson
adfcc9a55c map-agent: config: don't set chan_ch_relay_mcast by default 2024-02-21 12:40:07 +01:00
Mohd Husaam Mehdi
d3247ed266 mcastmngr: do not hard code snooping_mode to 1 for proxy sections 2024-02-21 14:09:54 +05:30
Anjan Chanda
3cc1dc5bb7 csmngr: 0.0.4 2024-02-20 15:56:14 +01:00
Amin Ben Romdhane
214901dfe6 bbfdm: 1.6.9 2024-02-20 15:05:29 +01:00
Wenpeng Song
ed6b6e169d voicemngr: 1.1.8
Add hookflash uci config option
2024-02-20 13:24:47 +00:00
Wenpeng Song
295e8c2d9e libvoice-d2: 1.1.4
Set minimum and maximum hook flash timers if configured
2024-02-20 13:23:05 +00:00
Janusz Dziedzic
ea4b3432c0 wifimngr: 16.2.8 2024-02-20 10:15:29 +00:00
Janusz Dziedzic
c2ebd96aab libwifi: 7.4.30 2024-02-20 10:13:53 +00:00
Jakob Olsson
d80d488656 map-controller: 4.6.0.5 2024-02-20 11:03:01 +01:00
Amin Ben Romdhane
7e26836e48 bbfdm: 1.6.8 2024-02-19 16:37:38 +01:00
Vivek Kumar Dutta
64e5753381 tr104: 1.0.21 2024-02-19 19:23:08 +05:30
Vivek Kumar Dutta
78642492bf sulu: 3.1.53 2024-02-19 19:21:44 +05:30
Vivek Kumar Dutta
388fb57b7a obuspa: Use system default certs as CA 2024-02-19 17:39:03 +05:30
Vivek Kumar Dutta
fdde24d9e9 obuspa: Fix fault with transaction retry 2024-02-19 17:35:18 +05:30
Vivek Kumar Dutta
70a24dfa69 swmodd: 2.5.5 2024-02-19 15:54:00 +05:30
Vivek Kumar Dutta
403af75f87 sulu: 3.1.52 2024-02-18 11:49:41 +05:30
Wenpeng Song
40444a3fe9 voicemngr: 1.1.7
Do not close the connection if DECT accepts the second call for call waiting
2024-02-16 11:04:34 +00:00
Wenpeng Song
559215189a dectmngr: 3.6.5
* 192e74db: Simulate flash hook when answering the second calls for call waiting  

* dd5288df: Fix a crash on incoming calls sometimes  

* f970cd28: Fix UART communication issue in RDK  

* 804678ba: Make UCI configuration path configurable
2024-02-16 11:01:59 +00:00
Jakob Olsson
57ac13c87e map-controller: 4.6.0.4 2024-02-15 16:36:44 +01:00
Vivek Kumar Dutta
018939d301 bbfdm: 1.6.7 2024-02-15 15:15:27 +05:30
Vivek Kumar Dutta
e1cf78ef2b swmodd: 2.5.4 2024-02-15 14:54:40 +05:30
Vivek Kumar Dutta
b5eb3a0433 icwmp: Use fw_upgrade_keep_settings option for 6 Stored images 2024-02-15 12:33:10 +05:30
Vivek Kumar Dutta
dd8b1c3635 sulu: 3.1.51 2024-02-15 12:27:14 +05:30
Vivek Kumar Dutta
c53a7a0368 sulu: 3.1.50 2024-02-14 19:25:23 +05:30
Vivek Kumar Dutta
3feaa262be tr104: Use bbfdm microservice as default handler 2024-02-14 18:18:00 +05:30
Vivek Kumar Dutta
7496af52d7 usp-js: 1.2.4 2024-02-14 17:33:28 +05:30
Jakob Olsson
293f1f7d47 map-agent: 4.5.1.8 2024-02-13 15:31:25 +01:00
Sukru Senli
3f3533134c iop: deselect unusued atftp package 2024-02-13 15:03:49 +01:00
Janusz Dziedzic
b505d6af02 libwifi: 7.4.29 2024-02-13 10:32:20 +00:00
Jakob Olsson
3aac39c4f7 decollector: 4.2.1.3 2024-02-13 10:48:44 +01:00
Amin Ben Romdhane
b1417f539d bbfdm: 1.6.6 2024-02-12 14:32:57 +01:00
Jakob Olsson
5f234ade12 map-agent: 4.5.1.7 2024-02-12 10:48:55 +01:00
Vivek Kumar Dutta
1564d8b8c4 tr104: add/del support for CallControl.CallingFeatures.Set. 2024-02-12 12:04:25 +05:30
Vivek Kumar Dutta
e64aba2c2c tr104: 1.0.18 2024-02-09 21:39:48 +05:30
Jakob Olsson
7129467410 map-controller: config: set uniform backhaul SSIDs 2024-02-09 16:08:48 +01:00
Vivek Kumar Dutta
504cc025a2 tr104: Align with bbfdm 2024-02-09 20:02:29 +05:30
Anjan Chanda
6906fada68 csmngr: 0.0.2 2024-02-09 15:13:20 +01:00
Anjan Chanda
649e2a7a76 ieee1905: 8.3.7 2024-02-09 15:13:01 +01:00
Vivek Kumar Dutta
24c455cdc6 userinterface: 1.0.0
Move userinterface from bbfdm to userinterface
2024-02-08 19:09:07 +05:30
Vivek Kumar Dutta
69806152aa icwmp: 9.6.5 2024-02-08 10:58:05 +05:30
Jakob Olsson
1a22bc45c1 hostmngr: 1.2.2 2024-02-07 18:00:03 +01:00
Jakob Olsson
02a87fb94c map-agent: 4.5.1.6 2024-02-07 16:08:43 +01:00
Yalu Zhang
55ba31c7d3 Update packages voicemngr and libvoice-airoha
Support syslog levels and make it configurable.
2024-02-07 14:47:06 +01:00
Grzegorz Sluja
da34a6f7c1 voicemngr: 1.1.5
Documentation update for removal of averageRoundTripDelay
2024-02-07 08:12:53 +01:00
Vivek Kumar Dutta
6a4b29d6f6 bbfdm: 1.6.5 2024-02-07 12:37:28 +05:30
Rohit Topno
dd55c60bd6 mcastmngr: fixed uci syntax error in init script
Problem description:
Multiple device section name fetched due
to wild card grep command.

Fix: modified grep command which gets exact device
section name based on device name.
2024-02-06 16:10:01 +00:00
Janusz Dziedzic
f735ec7d3e wifimngr: 16.2.7 2024-02-06 14:25:09 +00:00
Janusz Dziedzic
3e15668da5 libwifi: 7.4.28 2024-02-06 14:25:09 +00:00
Erik Karlsson
75117cba49 testnet: start from init script and add missing dependency 2024-02-06 11:45:45 +00:00
Grzegorz Sluja
0a1bf10fc3 tr104: 1.0.16
- Add support for Source and Destination avgRoundTripDelay
- Fix deleteObject handler
- Some improvement in rpc_handler_init() and rpc_handler_uninit()
2024-02-06 12:05:48 +01:00
Grzegorz Sluja
6865aa2ff7 voicemngr: 1.1.4
Remove the avg_round_trip_delay rtp_stat
2024-02-06 11:58:31 +01:00
Grzegorz Sluja
46292ef117 libvoice-airoha: 1.0.11
- Do not use 'latency' DSP parameter for averageRoundTripDelay
- Fixed missing header for PRIu64
2024-02-06 11:56:34 +01:00
Grzegorz Sluja
af74715a84 libvoice-d2: 1.1.3
Do not use 'latency' DSP parameter for averageRoundTripDelay
2024-02-06 11:54:08 +01:00
Grzegorz Sluja
ad6a3fcf99 libvoice-broadcom: 1.0.9
Do not use 'latency' DSP parameter for averageRoundTripDelay
2024-02-06 11:51:23 +01:00
Vivek Kumar Dutta
bed61fea08 bbfdm: Support for OpenVPN vendor extension 2024-02-06 14:47:20 +05:30
Vivek Kumar Dutta
0a34d99b6e bbfdm: 1.6.3
- 0826d708 wifi: Get possible channels from channels method
- 379f4920 Support Overwriting/Disabling/Extending core datamodel using JSON Plugins
- b1be9745 bbfdm-api: Enhance replace_str API to utilize provided buffer
- a49aa1f8 Fix IPLayerCapacityMetrics parameter default values
- 8617886e bbf.diag: use JSON API instead of relying on hardcoded strings
2024-02-06 13:03:27 +05:30
Vivek Kumar Dutta
6dbfa5897c obuspa: Fix probable crash and bulk event handling 2024-02-06 12:40:06 +05:30
Vivek Kumar Dutta
9eee63b031 sulu: 3.1.49 2024-02-06 11:48:10 +05:30
Anjan Chanda
21106d98d0 csmngr: 0.0.1 2024-02-02 13:42:45 +01:00
Vivek Kumar Dutta
8727a7a809 icwmp: 9.6.4 2024-02-02 17:58:48 +05:30
Jakob Olsson
99612516b6 ieee1905: 8.3.6 2024-02-01 15:44:51 +01:00
Jakob Olsson
198f30b1ae hostmngr: 1.2.1 2024-02-01 15:44:44 +01:00
Vivek Kumar Dutta
fbc8a916ac icwmp: Fix inform parameters 2024-02-01 16:18:52 +05:30
Vivek Kumar Dutta
4f295d01af bbfdm: Fix GPN issues with datamodel microservices 2024-02-01 16:14:45 +05:30
Piotr Kubik
e8554bcd03 iop: genconfig_wrap: Deprecate --clean option
* deprecate -c /--clean option
	Clean for gen_config.py does something else than original
* few script improvements
2024-01-31 09:56:48 +01:00
Andreas Gnau
749e095b04 Revert "iop: genconfig_wrap: Depricate --clean option"
This reverts commit 6b93fd6e27.
2024-01-30 17:19:31 +01:00
Amin Ben Romdhane
45f47de514 bbfdm: 1.6.1 2024-01-30 11:49:17 +01:00
Sukru Senli
174ba8951a netmode: remove example invalid config 2024-01-30 11:23:24 +01:00
Sukru Senli
d59793c752 testnet: move it to its own package, out of netmode 2024-01-30 11:02:04 +01:00
Piotr Kubik
6b93fd6e27 iop: genconfig_wrap: Depricate --clean option
* depricate -c /--clean option
	Clean for gen_config.py does something else than original
* few script improvements
2024-01-30 10:30:54 +01:00
Rahul Thakur
35b45c4045 qosmngr: fix qcm default config different from other targets
In the default qos config on qcm, the burst size is 1500 while on
other targets its 0, this is incorrect since iowrt uci defaults
should be consistent across targets; fixed with this commit.
2024-01-30 05:43:18 +00:00
Janusz Dziedzic
cc61f8ab1f libwifi: 7.4.27 2024-01-29 17:11:09 +00:00
Sukru Senli
19a224d375 netmode: move l2mode from eval profile to here 2024-01-29 13:43:16 +01:00
Jakob Olsson
82e5b81fda hostmngr: 1.2.0 2024-01-26 11:56:00 +01:00
Janusz Dziedzic
ba493b07e7 map-agent: 4.5.1.5 2024-01-26 10:28:30 +00:00
Janusz Dziedzic
8521b7133d wifimngr: 16.2.6 2024-01-26 09:55:29 +00:00
Janusz Dziedzic
153409f3b5 libwifi: 7.4.26 2024-01-26 09:53:50 +00:00
Jakob Olsson
0a41cfeeac map-agent: 4.5.1.4 2024-01-25 15:24:38 +01:00
Jakob Olsson
47b90c4939 hostmngr: 1.1.6 2024-01-25 15:23:11 +01:00
Amin Ben Romdhane
4385b647c1 bbfdm: 1.6.0 2024-01-25 13:26:53 +01:00
nevadita.chatterjee
322c381ed4 map-controller: 4.6.0.3 2024-01-25 17:43:19 +05:30
Andreas Gnau
88d5b5ac57 Revert "iop: genconfig_wrap: Work around config-generation issue"
This reverts commit 39edba2ab3.
2024-01-25 11:28:42 +01:00
Andreas Gnau
52835de6c9 iopsys-analytics: Add hostname generation
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-01-24 17:14:50 +00:00
Andreas Gnau
39edba2ab3 iop: genconfig_wrap: Work around config-generation issue
Work around config generation issue on fresh clone by running genconfig
twice. This is a temporary "fix" until the cause is found for a broken
config being generated in some specific situations.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-01-24 18:09:22 +01:00
Andreas Gnau
bac9790dab iop: update_package: Disable command
The update_package command no longer works with the new genconfig
design. For now, replace it with a message until its replacement has
been merged.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-01-24 13:49:54 +00:00
Vivek Kumar Dutta
eba395c22f sulu: 3.1.48 2024-01-24 18:42:41 +05:30
Vivek Kumar Dutta
9f59d9ce20 icwmp: 9.6.2 2024-01-24 16:48:42 +05:30
Piotr Kubik
6110a9f8b7 scripts: Move feeds_update, genconfig commands to '-legacy' suffix
Move old 'feeds_update, genconfig, genconfig_min' commands to
the ones with '-legacy' suffix for backwards-compatibility

refs #13080
2024-01-24 12:07:19 +01:00
Piotr Kubik
111dc5950b scripts: genconfig: Add wrapper for gen_config.py
Wrapper for compatibility with ./iop genconfig <board> <profile>
 - convert params to lowercase and call gen_config.py
 - parse options: -c, --clean; -b,--boards;

refs #12352
2024-01-24 12:07:19 +01:00
Amin Ben Romdhane
f1f96516d0 bbfdm: 1.5.9 2024-01-24 12:01:21 +01:00
Jakob Olsson
0ed837ffda ieee1905: prefix plugins with ieee1905- 2024-01-24 08:48:03 +00:00
Vivek Kumar Dutta
98bd33aa29 obuspa: Added support for Sessions 2024-01-24 13:01:30 +05:30
Vivek Kumar Dutta
56af888ded sulu: 3.1.47 2024-01-24 10:35:04 +05:30
Vivek Kumar Dutta
9fa2e983ad bbfdm: Fix compilation issue 2024-01-24 10:30:14 +05:30
Amin Ben Romdhane
c3e17f0df8 bbfdm: 1.5.7 2024-01-23 21:55:33 +01:00
Jakob Olsson
ddbd9a5b70 map-controller: 4.6.0.2 2024-01-23 16:02:15 +01:00
Jakob Olsson
2f6c5433ce map-agent: 4.5.1.3 2024-01-23 16:02:15 +01:00
Jakob Olsson
4bd1e59c20 wifimngr: 16.2.5 2024-01-23 15:20:38 +01:00
Jakob Olsson
598f3cbf8b libwifi: 7.4.25 2024-01-23 15:20:03 +01:00
Vivek Kumar Dutta
4c7899dc1e sulu: 3.1.46 2024-01-23 17:15:47 +05:30
Vivek Kumar Dutta
97f5d60d7c obuspa: Updated admin acl for SelfTestDiagnostics 2024-01-23 17:15:26 +05:30
suvendhu
16aeb4e6fe obuspa: Option to set max controllers 2024-01-23 14:12:44 +05:30
Andreas Gnau
45d3cce3e6 iopsys-analytics: Add new package
Add IOPSYS-internal package for CI/CD analytics.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-01-22 16:43:11 +00:00
Amin Ben Romdhane
8e5f474c1f bbfdm: 1.5.6 2024-01-22 15:42:11 +01:00
Rahul Thakur
aa1adcad3c qosmngr: fix lan traffic limited to 1G always
Problem description:
Two problems seen,
1. The queues on a port are by default setup to handle maximum rate
   of 1G
2. The default qos uci config for ipq and brcm platforms is different

Fix:
1. Update queue setup to not impose rate limit, by setting the maximum
   rate as the maximum rate supported by the port.
2. Update uci default script to generate same config for both platforms
2024-01-22 09:53:09 +00:00
Janusz Dziedzic
570cd68d15 libwifi: 7.4.24 2024-01-22 09:38:51 +00:00
Janusz Dziedzic
e3947e44bd map-controller: 4.6.0.1 2024-01-20 18:38:53 +00:00
Amin Ben Romdhane
9a1a93c25e bbfdm: 1.5.5 2024-01-19 17:06:42 +01:00
Jakob Olsson
c9ea556273 capiagent: 2.1.1 2024-01-19 16:08:01 +01:00
Jakob Olsson
aee2c22afe hostmngr: 1.1.5 2024-01-19 15:25:04 +01:00
Jakob Olsson
f6bf0f3a96 hostmngr: add libwifiutils deps 2024-01-19 15:14:12 +01:00
Jakob Olsson
3fc9f450f9 capiagent: add libwifiutils deps 2024-01-19 15:13:31 +01:00
Jakob Olsson
c26327306b map-controller: 4.6.0.0 2024-01-19 13:14:38 +01:00
Jakob Olsson
5c10cfcb99 map-agent: 4.5.1.2 2024-01-19 12:13:06 +01:00
Janusz Dziedzic
67f114cf29 ethmngr: add libeasy dependency 2024-01-19 09:49:50 +00:00
Anjan Chanda
2658e12c52 libwifi: 7.4.23 2024-01-19 10:34:59 +01:00
Vivek Kumar Dutta
0a454a0967 tr104: 1.0.15
- AddObject support for VoiceService.{i}.SIP.Client.{i}.Network.
2024-01-19 10:41:37 +05:30
Janusz Dziedzic
9800d4a335 decollector: 4.2.1.2 2024-01-18 13:46:48 +00:00
Janusz Dziedzic
e3d00ebb68 map-controller: 4.5.0.5 2024-01-18 13:46:41 +00:00
Janusz Dziedzic
c9fefe95aa map-agent: 4.5.1.1 2024-01-18 11:29:44 +00:00
Janusz Dziedzic
fdb22bff37 ieee1905: 8.3.5 2024-01-18 11:28:34 +00:00
Janusz Dziedzic
3eba14e0a6 wifimngr: 16.2.4 2024-01-18 11:27:19 +00:00
Janusz Dziedzic
f2b5016920 libeasy: 7.4.3 2024-01-18 11:23:52 +00:00
Janusz Dziedzic
3eedd0dd23 libeasy: allow to build locally 2024-01-18 11:21:37 +00:00
Wenpeng Song
555babf34c voicemngr: 1.1.3
Add support for single or multiple call mode
2024-01-18 09:29:50 +00:00
Rahul Thakur
ec165a9042 inbd: remove package
Package removed from feed since it has been deprecated.
2024-01-16 17:36:57 +05:30
Rahul Thakur
d4b2d251d6 iop: deprecate inbd
The package inbd is deprecated with the logic for generation of
hotplug events for dsl and ethernet ports having been moved to
dslmngr and ethmngr respectively.
2024-01-16 16:14:05 +05:30
Rahul Thakur
78aecb52ca dslmngr: add support for hotplug event
Changes done:
1. Add support for hotplug event generation
2. Fix pipeline and static code analysis error/warnings
3. Rectify package source URL.
2024-01-16 16:09:36 +05:30
Rahul Thakur
8eb17ec066 ethmngr: add support for generation hotplug event
Changes:
1. Add support for generating hotplug event
2. Update makefile to have prepare section for local development.
3. Update URL to point to updated location for ethmngr
2024-01-16 16:06:48 +05:30
Arne Jonsson
01c1899208 iopsys: fix issues related to updated genconfig 2024-01-15 14:52:38 +00:00
Arne Jonsson
bec7eeaa33 iopsys: fix issue in feeds_update.sh in order to handle multiple custom feeds 2024-01-15 14:52:38 +00:00
Vivek Kumar Dutta
dc49178002 tr104: Support CallControl.NumberingPlan.{i}.TerminationDigit 2024-01-15 12:55:51 +05:30
Janusz Dziedzic
ddf59c0756 libwifi: 7.4.18 2024-01-13 17:18:08 +00:00
Janusz Dziedzic
6dc1e0de1c wifimngr: 16.2.3 2024-01-13 10:43:29 +00:00
Janusz Dziedzic
4dd401a0cb libwifi: 7.4.17 2024-01-13 10:42:05 +00:00
Arne Jonsson
e60ef9d02e iopsys: update genconfig.sh to support new path to customer directories 2024-01-12 17:15:11 +01:00
Arne Jonsson
9f2a6f3265 iop: add TARGET definitions to genconfig.sh 2024-01-12 16:07:57 +00:00
Andreas Gnau
36db9285f6 libwifi: Enable LIBWIFI_USE_CTRL_IFACE by default
CONFIG_LIBWIFI_USE_CTRL_IFACE has been the enabled for nearly all
devices for quite some time. Enable it by default.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-01-12 14:48:04 +01:00
Jakob Olsson
559ea53e69 map-agent: 4.5.1.0 2024-01-12 12:40:39 +01:00
Jakob Olsson
f7ade9751e map-controller: 4.5.0.4 2024-01-12 12:40:08 +01:00
Janusz Dziedzic
963e1ecc6c map-agent: 4.5.0.12 2024-01-12 08:48:42 +00:00
Amin Ben Romdhane
35ca583dc1 usermngr: 1.2.12 2024-01-11 17:27:49 +01:00
Vivek Kumar Dutta
8b12debefe sulu: 3.1.45 2024-01-10 19:57:16 +05:30
Vivek Kumar Dutta
a0caa174d0 bulkdata: Added compliance to RFC4180 for CSV report 2024-01-10 19:40:35 +05:30
Suvendhu Hansa
8bd2d74316 obuspa: Add CSV report compliance to RFC4180 for bulkdata 2024-01-10 14:03:21 +00:00
Amin Ben Romdhane
e6015f5db2 bbfdm: 1.5.4 2024-01-10 13:40:26 +01:00
Amin Ben Romdhane
a227490dcb twamp: 1.4.3 2024-01-10 12:18:10 +01:00
Amin Ben Romdhane
c0c5cf032d usermngr: 1.2.11 2024-01-09 17:03:29 +01:00
Amin Ben Romdhane
25c09589f2 bulkdata: 2.1.4 2024-01-09 17:02:36 +01:00
Amin Ben Romdhane
22b273faf0 xmppc: 2.2.4 2024-01-09 17:01:28 +01:00
Amin Ben Romdhane
fd850636a5 obuspa: 7.0.5.8 2024-01-09 17:00:19 +01:00
Amin Ben Romdhane
2568cba699 bbfdm: 1.5.3 2024-01-09 16:59:10 +01:00
Sukru Senli
2968ad5dd8 iop: config: switch to using iputils arping and ping
instead of busybox arping and ping
2024-01-09 15:13:56 +01:00
Janusz Dziedzic
6311e0f8b0 map-controller: 4.5.0.3 2024-01-09 08:26:49 +00:00
Jakob Olsson
7449779f37 map-agent: 4.5.0.11 2024-01-08 16:17:12 +01:00
Vivek Kumar Dutta
459bc4f9ff sulu: 3.1.44 2024-01-08 10:40:45 +05:30
Amin Ben Romdhane
a574514a41 bbfdm: 1.5.2 2024-01-04 13:45:05 +01:00
Vivek Kumar Dutta
ceb70ecefb tr104: Fix defaults for SIP.Network.RegisterExpires and RegistrationPeriod 2024-01-04 18:01:42 +05:30
Vivek Kumar Dutta
bc0e021b3c rulengd: execute action when no match expression defined 2024-01-04 17:36:53 +05:30
Janusz Dziedzic
19d372a4ad wifimngr: 16.2.2 2024-01-02 15:51:00 +00:00
Vivek Kumar Dutta
8a08dd3916 bbfdm: Optimize the instance updater 2023-12-29 18:36:19 +05:30
Vivek Kumar Dutta
a672e1708f icwmp: Fix setting empty parameterkey 2023-12-29 10:15:48 +05:30
Vivek Kumar Dutta
4b4407c3f9 bbfdm: Removed wolfssl and mbedtls variant 2023-12-28 18:00:06 +05:30
Vivek Kumar Dutta
2d1c7428b6 stunc: Removed wolfssl and mbedtls variant 2023-12-28 17:43:11 +05:30
suvendhu
ad28f56744 icwmp: Removed wolfssl and mbedtls variant 2023-12-28 16:37:10 +05:30
Vivek Kumar Dutta
a8c1c6b25f icwmp: fix logging and acs_change detection 2023-12-27 20:55:28 +05:30
Rahul Thakur
4a89da8067 urlfilter: suppress unnecessary error on reload 2023-12-27 11:51:49 +00:00
Suvendhu Hansa
386649b0bb obuspa: Update admin/user datamodel permissions 2023-12-27 11:27:54 +00:00
Vivek Kumar Dutta
e050489073 icwmp: revert uci stuck workaround 2023-12-26 22:45:24 +05:30
suvendhu
94895ef110 icwmpd: Avoid process restart on ACS url change 2023-12-26 22:22:04 +05:30
Vivek Kumar Dutta
4c93c01d22 icwmp: fix cwmp stuck in init state 2023-12-26 17:07:04 +05:30
Vivek Kumar Dutta
9228b44a94 bbfdm: Top down config support DHCPv4 Server pool 2023-12-26 15:55:58 +05:30
Vivek Kumar Dutta
7ace7892b1 icwmp: fix upload rpc random failures 2023-12-26 13:00:30 +05:30
Vivek Kumar Dutta
f4dfdc46f1 sulu: use multi-part download for local firmware 2023-12-25 19:44:47 +05:30
Vivek Kumar Dutta
cc8b0f70d6 obuspa: support multi-part download 2023-12-25 19:18:32 +05:30
Vivek Kumar Dutta
d943a0e0d1 icwmp: 9.5.29 2023-12-20 12:33:35 +05:30
Vivek Kumar Dutta
c25c241008 icwmp: workaround for uci stuck in varstate 2023-12-19 20:38:07 +05:30
252 changed files with 9885 additions and 5175 deletions

View File

@@ -1,7 +1,4 @@
config BBF_VENDOR_EXTENSION
bool "Enable Vendor Extension"
default y
if PACKAGE_libbbfdm
config BBF_VENDOR_LIST
string "Vendor List"
default "iopsys"
@@ -10,14 +7,11 @@ config BBF_VENDOR_PREFIX
string "Vendor Prefix"
default "X_IOPSYS_EU_"
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 BBF_OBFUSCATION_KEY
string "Obfuscation key"
default "371d530c95a17d1ca223a29b7a6cdc97e1135c1e0959b51106cca91a0b148b5e42742d372a359760742803f2a44bd88fca67ccdcfaeed26d02ce3b6049cb1e04"
config BBF_MAX_OBJECT_INSTANCES
int "Maximum number of instances per object"
default 255
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.4.23
PKG_VERSION:=1.9.0
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=c10303fc51a1034cb87040e0eaf23c95d2b1c658
PKG_SOURCE_VERSION:=40d22bedaf26fac6c91d6c0ec456a0fc37872c8d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -21,55 +21,24 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include bbfdm.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
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl
ABI_VERSION:=1.0
endef
define Package/libbbfdm/default
define Package/libbbfdm
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
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +libopenssl
MENU:=1
endef
define Package/bbfdmd
@@ -77,32 +46,36 @@ define Package/bbfdmd
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
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +libbbfdm +jq +bbf_configmngr
endef
define Package/userinterface
define Package/bbf_configmngr
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
TITLE:= BBF Config Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
MENU:=1
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
define Package/bbf_configmngr/config
source "$(SOURCE)/bbf_configmngr.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, TR143 data models
Library contains the data model tree, It includes basic TR181 nodes.
endef
define Package/bbf_configmngr/description
Daemon for handling bbf reload services via ubus bbf.config
endef
ifeq ($(USE_LOCAL),1)
@@ -113,45 +86,12 @@ endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
-DBBF_WIFI_DATAELEMENTS=ON
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 ($(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
@@ -160,30 +100,38 @@ endif
define Package/libbbfdm-api/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/lib/
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.secure $(1)/usr/libexec/rpcd/bbf.secure
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/certificates
echo "$(CONFIG_BBF_OBFUSCATION_KEY)" > $(1)/etc/bbfdm/.secure_hash
endef
define Package/libbbfdm/default/install
define Package/libbbfdm/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/lib/
$(INSTALL_DIR) $(1)/usr/share/bbfdm/
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/usr/share/bbfdm/libbbfdm.so
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
$(INSTALL_BIN) ./files/etc/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/95-portmap-firewall
$(INSTALL_BIN) ./files/etc/uci-defaults/97-firewall-service $(1)/etc/uci-defaults/97-firewall-service
$(INSTALL_BIN) ./files/etc/uci-defaults/99-link-core-plugins $(1)/etc/uci-defaults/99-link-core-plugins
$(INSTALL_BIN) ./files/etc/uci-defaults/90-remove-nonexisting-microservices $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/91-fix-bbfdmd-enabled-option $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/firewall.portmap $(1)/etc/firewall.portmap
$(INSTALL_BIN) ./files/etc/firewall.service $(1)/etc/firewall.service
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
ifeq ($(findstring iopsys,$(CONFIG_BBF_VENDOR_LIST)),iopsys)
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/libbbfdm/dmtree/vendor/iopsys/libbbfdm_iopsys_ext.so $(1)
endif
$(INSTALL_DIR) $(1)/usr/share/bbfdm/scripts/
$(CP) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm/scripts/
endef
define Package/libbbfdm/default/prerm
define Package/libbbfdm/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
@@ -198,54 +146,33 @@ define Package/bbfdmd/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/ubus/bbfdmd $(1)/usr/sbin/
$(INSTALL_DATA) ./files/etc/bbfdm/input.json $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_BIN) ./files/etc/init.d/bbfdm.services $(1)/etc/init.d/
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_BIN) ./files/etc/bbfdm/bbfdm_services.sh $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
endef
define Package/userinterface/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults
define Package/bbf_configmngr/install
$(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
ifeq ($(CONFIG_BBF_CONFIGMNGR_C_BACKEND),y)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/bbf_configd $(1)/usr/sbin/
$(INSTALL_BIN) ./files/etc/init.d/bbf_configd $(1)/etc/init.d/bbf_configd
endif
ifeq ($(CONFIG_BBF_CONFIGMNGR_SCRIPT_BACKEND),y)
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.config $(1)/usr/libexec/rpcd/bbf.config
endif
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
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/*.h $(1)/usr/include/
endef
$(eval $(call BuildPackage,bbf_configmngr))
$(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))

38
bbfdm/README.md Normal file
View File

@@ -0,0 +1,38 @@
# BBFDM configuration options and utilities
bbfdm provides few compile time configuration options and compile time help utility called [bbfdm.mk](./bbfdm.mk), this document aimed to explain the available usages and best practices.
## Compilation options
| Configuration option | Description | Default Value |
| ----------------------- | ------------- | ----------- |
| CONFIG_BBF_VENDOR_LIST | List of vendor extension directories | iopsys |
| CONFIG_BBF_VENDOR_PREFIX | Prefix for Vendor extension datamodel objects/parameters | X_IOPSYS_EU_ |
| CONFIG_BBF_MAX_OBJECT_INSTANCES | Maximum number of instances per object | 255 |
| BBF_OBFUSCATION_KEY | Hash used to encode/decode in `bbf.secure` object | 371d530c95a17d1ca223a29b7a6cdc97e1135c1e0959b51106cca91a0b148b5e42742d372a359760742803f2a44bd88fca67ccdcfaeed26d02ce3b6049cb1e04 |
#### BBF_OBFUSCATION_KEY
`bbfdm` provides an ubus object called `bbf.secure` to allow encoding/decoding the values, `bbf.secure` currently support following methods internally to encode/decode
- Encode/Decode using a predefined SHA512 Hash key
- Encode/Decode using a private/public RSA key pair
The `BBF_OBFUSCATION_KEY` compile time configuration option used to defined the SHA512 HASH, if this option is undefined, then it usages a default value as mention in the above table.
User must override this parameter with their own hash value, to generate a hash user can run below command and copy the hash value to this option.
ex: User wants to use 'Sup3rS3cur3Passw0rd' as passkey, then can get the SHA512 sum with
```bash
$ echo -n "Sup3rS3cur3Passw0rd" | sha512sum
371d530c95a17d1ca223a29b7a6cdc97e1135c1e0959b51106cca91a0b148b5e42742d372a359760742803f2a44bd88fca67ccdcfaeed26d02ce3b6049cb1e04 -
```
> Note: Additionally, user can install RSA private key in '/etc/bbfdm/certificates/private_key.pem' path, if private key is present `bbf.secure` shall use rsa private certificate for encrypt/decrypt function. In case of key not present in the pre-defined path, hash will be used for the same.
## Helper utility (bbfdm.mk)
bbfdm provides a helper utility [bbfdm.mk](./bbfdm.mk) to install datamodel plugins in bbfdm core or in microservice directory.

19
bbfdm/bbf_configmngr.in Normal file
View File

@@ -0,0 +1,19 @@
if PACKAGE_bbf_configmngr
choice
prompt "Select backend daemon for bbf.config"
default BBF_CONFIGMNGR_C_BACKEND
help
Select which backend daemon should be used for ubus bbf.config
config BBF_CONFIGMNGR_SCRIPT_BACKEND
bool "Use shell script backend"
help
Enable this option to use shell script as the backend for bbf.config. This can be useful for quick and easy scripting of configuration tasks.
config BBF_CONFIGMNGR_C_BACKEND
bool "Use C code backend"
help
Enable this option to use a C code implementation as the backend for bbf.config. This option is generally preferred for performance-critical tasks and scenarios requiring more robust and efficient handling.
endchoice
endif

View File

@@ -2,8 +2,113 @@
# Copyright (C) 2023 IOPSYS
#
BBFDM_BASE_DM_PATH=/usr/share/bbfdm
BBFDM_INPUT_PATH=/etc/bbfdm/micro_services
BBFDM_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
#BBFDM_VERSION:=$(shell grep -oP '(?<=^PKG_VERSION:=).*' ${BBFDM_DIR}/Makefile)
#BBFDM_TOOLS:=$(BUILD_DIR)/bbfdm-$(BBFDM_VERSION)/tools
# Utility to install the plugin in bbfdm core path with priority.
# Its now possible to overwrite/remove core datamodel with plugin, so, if some
# datamodel objects/parameters are present in more than one plugin, order in
# which they loaded into memory becomes crucial, this Utility help to configure
# a priority order in which they gets loaded in memory.
#
# ARGS:
# $1 => Plugin artifact
# $2 => package install directory
# $3 => Priority of the installed plugin (Optional)
#
# Note:
# - Last loaded plugin gets the highest priority
#
# Example:
# BBFDM_INSTALL_CORE_PLUGIN ./files/etc/bbfdm/json/CWMPManagementServer.json $(1)
#
# Example to install plugin with priority:
# BBFDM_INSTALL_CORE_PLUGIN ./files/etc/bbfdm/json/CWMPManagementServer.json $(1) 01
#
BBFDM_INSTALL_CORE_PLUGIN:=$(BBFDM_DIR)/tools/bbfdm.sh -p
# Utility to install the micro-service datamodel
# Use Case:
# user wants to run a datamodel micro-service, it required to install the
# DotSO/JSON plugin into a bbf shared directory, this utility helps in
# installing the DotSO/JSON plugin in bbfdm shared directory, and auto-generate
# input file for the micro-service
#
# ARGS:
# $1 => DotSo or Json plugin with complete path
# $2 => package install directory
# $3 => service name
#
# Note:
# - There could be only one main plugin file, so its bind to PKG_NAME
# - Micro-service input.json will be auto generated with this call
# - Use -u (optional argument) to overwrite ubus object name
#
# Example:
# BBFDM_INSTALL_MS_DM $(PKG_BUILD_DIR)/libcwmp.so $(1) $(PKG_NAME)
#
BBFDM_INSTALL_MS_DM:=$(BBFDM_DIR)/tools/bbfdm.sh -m
# Utility to install a plugins in datamodel micro-service
#
# ARGS:
# $1 => DotSo or Json plugin with complete path
# $2 => package install directory
# $3 => service name
#
# Note:
# - Use the service_name/PKG_NAME of the service in which this has to run
#
# Example:
# BBFDM_INSTALL_MS_PLUGIN $(PKG_BUILD_DIR)/libxmpp.so $(1) icwmp
#
BBFDM_INSTALL_MS_PLUGIN:=$(BBFDM_DIR)/tools/bbfdm.sh -m -p
# Utility to install the helper scripts in default bbfdm script path
#
# Use Case:
# User want to install some script for running diagnostics
#
# ARGS:
# $1 => Script with complete path
# $2 => package install directory
#
# Note:
# - Use with -d option to install script in bbf.diag directory
#
# Example:
# BBFDM_INSTALL_SCRIPT $(PKG_BUILD_DIR)/download $(1)
# BBFDM_INSTALL_SCRIPT -d $(PKG_BUILD_DIR)/ipping $(1)
#
BBFDM_INSTALL_SCRIPT:=$(BBFDM_DIR)/tools/bbfdm.sh -s
# Deprecated functions errors
define BbfdmInstallPluginInMicroservice
$(warning # BbfdmInstallPluginInMicroservice function is deprecated, use BBFDM_INSTALL_MS_PLUGIN macro #)
$(INSTALL_DIR) $(1)
$(INSTALL_DATA) $(2) $(1)/
endef
define BbfdmInstallMicroServiceInputFile
$(warning # function BbfdmInstallMicroServiceInputFile deprecated, input file auto generated with BBFDM_INSTALL_MS_DM #)
$(INSTALL_DIR) $(1)/etc/bbfdm/micro_services
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/micro_services/$(PKG_NAME).json
endef
define BbfdmInstallPlugin
$(warning # function BbfdmInstallPlugin deprecated, use BBFDM_INSTALL_CORE_PLUGIN macro #)
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/plugins/
endef
define BbfdmInstallPluginWithPriority
$(warning # fucntion BbfdmInstallPluginWithPriority deprecated, use BBFDM_INSTALL_CORE_PLUGIN #)
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
$(INSTALL_DATA) $(3) $(1)/etc/bbfdm/plugins/$(2)_$(shell basename ${3})
endef

View File

@@ -1,47 +0,0 @@
#!/bin/sh
BBFDMD="/usr/sbin/bbfdmd"
bbfdm_add_service()
{
local name path
name="${1}"
path="${2}"
if [ -z "${name}" -o -z "$path" ]; then
return 0;
fi
ubus call service add "{'name':'bbfdm.services','instances':{'$name':{'command':['$BBFDMD','-m','$path']}}}"
}
bbfdm_stop_service()
{
local name
name="${1}"
if [ -z "${name}" ]; then
return 0;
fi
if ubus call service list '{"name":"bbfdm.services"}' |grep -q "bbfdm.$name"; then
ubus call service delete "{'name':'bbfdm.services','instance':'bbfdm.$name'}"
fi
}
usages()
{
echo "Usages $0: <OPTIONS>..."
echo
echo " -h show help"
echo " -k micro-service name to stop"
echo
}
while getopts "s:k:h" opts; do
case "$opts" in
h) usages; exit 0;;
k) bbfdm_stop_service "${OPTARG}";;
esac
done

View File

@@ -4,8 +4,8 @@
},
"input": {
"type": "DotSo",
"name": "/lib/libbbfdm.so",
"plugin_dir": "/etc/bbfdm/plugins"
"name": "/usr/share/bbfdm/libbbfdm.so",
"plugin_dir": "/usr/share/bbfdm/plugins"
},
"output": {
"type": "UBUS",

View File

@@ -1,8 +1,11 @@
config bbfdmd 'bbfdmd'
option enabled '1'
option enable '1'
option loglevel '1'
option refresh_time '10'
option refresh_time '120'
option transaction_timeout '30'
option subprocess_level '2'
config micro_services 'micro_services'
option enable '1'
option enable_core '0'
option enable_respawn '1'

View File

@@ -0,0 +1,15 @@
#!/bin/sh /etc/rc.common
START=64
STOP=10
USE_PROCD=1
PROG=/usr/sbin/bbf_configd
start_service()
{
procd_open_instance "bbf_configd"
procd_set_param command ${PROG}
procd_set_param respawn
procd_close_instance "bbf_configd"
}

View File

@@ -0,0 +1,106 @@
#!/bin/sh /etc/rc.common
START=40
STOP=8
USE_PROCD=1
PROG=/usr/sbin/bbfdmd
BBFDM_MICROSERVICE_DIR="/etc/bbfdm/micro_services"
. /usr/share/libubox/jshn.sh
log() {
echo "${@}"|logger -t bbfdmd.services -p info
}
validate_bbfdm_micro_service_section()
{
uci_validate_section bbfdm micro_services "micro_services" \
'enable:bool:true' \
'enable_core:bool:false' \
'enable_respawn:bool:true'
}
_add_microservice()
{
local name path
local enable enable_core enable_respawn
# Check enable from micro-service
path="${1}"
enable_respawn="${2}"
enable_core="${3}"
name="$(basename ${path})"
name="${name//.json}"
enable="$(jq -r '.daemon.enable//1' ${path})"
if [ "${enable}" -eq "0" ]; then
log "datamodel micro-service ${name} not enabled"
return 0
fi
procd_open_instance "${name}"
procd_set_param command ${PROG}
procd_append_param command -m "${name}"
if [ "${enable_core}" -eq "1" ]; then
procd_set_param limits core="unlimited"
procd_set_param stdout 1
procd_set_param stderr 1
fi
if [ "${enable_respawn}" -eq "1" ]; then
procd_set_param respawn "3600" "5" "5"
fi
procd_close_instance "${name}"
}
configure_bbfdm_micro_services()
{
local enable enable_core enable_respawn
config_load bbfdm
validate_bbfdm_micro_service_section || {
log "Validation of micro_service section failed"
return 1;
}
[ "${enable}" -eq "0" ] && return 0
if [ -d "${BBFDM_MICROSERVICE_DIR}" ]; then
FILES="$(ls -1 ${BBFDM_MICROSERVICE_DIR}/*.json)"
for file in $FILES;
do
[ -e "$file" ] || continue
_add_microservice $file "${enable_respawn}" "${enable_core}"
done
fi
}
_start_single_service()
{
local service file
service="${1}"
if [ -d "${BBFDM_MICROSERVICE_DIR}" ]; then
file="$(ls -1 ${BBFDM_MICROSERVICE_DIR}/${service}.json)"
[ -e "$file" ] || return
_add_microservice $file "0" "0"
fi
}
start_service()
{
if [ -n "${1}" ]; then
_start_single_service "${1}"
else
configure_bbfdm_micro_services
fi
}

View File

@@ -7,7 +7,9 @@ USE_PROCD=1
PROG=/usr/sbin/bbfdmd
BBFDM_JSON_INPUT="/etc/bbfdm/input.json"
BBFDM_TEMP_JSON="/tmp/bbfdm/input.json"
BBFDM_TEMP_DIR="/tmp/bbfdm"
. /usr/share/libubox/jshn.sh
log() {
echo "${@}"|logger -t bbfdmd.init -p info
@@ -16,7 +18,7 @@ log() {
validate_bbfdm_bbfdmd_section()
{
uci_validate_section bbfdm bbfdmd "bbfdmd" \
'enabled:bool:true' \
'enable:bool:true' \
'sock:string' \
'debug:bool:false' \
'loglevel:uinteger:1' \
@@ -27,20 +29,19 @@ validate_bbfdm_bbfdmd_section()
configure_bbfdmd()
{
local enabled debug sock update
local enable debug sock
local jlog jrefresh jtimeout jlevel
update=0
config_load bbfdm
validate_bbfdm_bbfdmd_section || {
log "Validation of bbfdmd section failed"
return 1;
}
[ "${enabled}" -eq 0 ] && return 0
[ "${enable}" -eq 0 ] && return 0
if [ -f "${BBFDM_JSON_INPUT}" ]; then
echo "$(jq --arg log ${loglevel} --arg tran ${transaction_timeout} --arg refresh ${refresh_time} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "refresh_time": $refresh, "transaction_timeout": $tran, "subprocess_level": $level}' ${BBFDM_JSON_INPUT})" > ${BBFDM_TEMP_JSON}
echo "$(jq --arg log ${loglevel} --arg tran ${transaction_timeout} --arg refresh ${refresh_time} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "refresh_time": $refresh, "transaction_timeout": $tran, "subprocess_level": $level}' ${BBFDM_JSON_INPUT})" > "${BBFDM_TEMP_DIR}/input.json"
fi
procd_set_param command ${PROG}
@@ -56,18 +57,12 @@ configure_bbfdmd()
start_service()
{
mkdir -p /tmp/bbfdm
mkdir -p ${BBFDM_TEMP_DIR}
procd_open_instance "bbfdm"
configure_bbfdmd
procd_set_param respawn
procd_close_instance "bbfdm"
ubus call service state '{"name":"bbfdm.services", "spawn":true}'
}
stop_service()
{
ubus call service state '{"name":"bbfdm.services", "spawn":false}'
}
service_triggers()

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

@@ -0,0 +1,18 @@
#!/bin/sh
. /lib/functions.sh
remove_nonexisting_microservice() {
local input_json
config_get input_json "$1" input_json ""
if [ -z "${input_json}" ]; then
uci_remove bbfdm "${1}"
fi
}
config_load bbfdm
config_foreach remove_nonexisting_microservice "micro_service"
exit 0

View File

@@ -0,0 +1,11 @@
#!/bin/sh
# rename bbfdmd enabled option to enable
val="$(uci -q get bbfdm.bbfdmd.enabled)"
if [ -n "${val}" ]; then
uci -q set bbfdm.bbfdmd.enabled=""
uci -q set bbfdm.bbfdmd.enable="${val}"
fi
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,16 +1,32 @@
#!/bin/sh
UNIFIED_PATH="/etc/bbfdm/plugins/"
UNIFIED_PATH="/usr/share/bbfdm/plugins/"
log() {
echo "$@" | logger -t bbfdm.uci-default -p info
}
# Link JSON plugins
for f in `ls -1 /etc/bbfdm/json/*.json`; do
echo "# BBFDM JSON plugin ${f} not aligned #"
log "# BBFDM JSON plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
# Link DotSo plugins
for f in `ls -1 /usr/lib/bbfdm/*.so`; do
echo "# BBFDM DotSO plugin ${f} not aligned #"
log "# BBFDM DotSO plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
# Link JSON plugins
for f in `ls -1 /etc/bbfdm/plugins/*.json`; do
log "# BBFDM JSON plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
# Link DotSo plugins
for f in `ls -1 /etc/bbfdm/plugins/*.so`; do
log "# BBFDM DotSO plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done

View File

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

169
bbfdm/tools/bbfdm.sh Executable file
View File

@@ -0,0 +1,169 @@
#!/bin/bash
BBFDM_BASE_DM_PATH="usr/share/bbfdm"
BBFDM_INPUT_PATH="etc/bbfdm/micro_services"
INPUT_TEMPLATE='{"daemon":{"enable":"1","service_name":"template","config":{"loglevel":"1"}}}'
OUT_NAME=""
MICRO_SERVICE=0
SCRIPT=0
DIAG=0
PLUGIN=0
DEST=""
TOOLS="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
SRC=""
while getopts ":mpsdu:" opt; do
case ${opt} in
m)
MICRO_SERVICE=1
;;
p)
PLUGIN=1
;;
s)
SCRIPT=1
;;
d)
DIAG=1
;;
u)
OUT_NAME="${OPTARG}"
;;
?)
echo "Invalid option: ${OPTARG}"
exit 1
;;
esac
done
shift $((OPTIND-1))
SRC="${1}"
shift
DEST="${1}"
shift
DATA="${1}"
install_bin() {
if ! install -m0755 ${1} ${2}; then
echo "Failed to install bin ${1} => ${2}"
exit 1
fi
}
install_dir() {
if ! install -d -m0755 ${1}; then
echo "Failed to create directory ${1}"
exit 1
fi
}
install_data() {
if ! install -m0644 ${1} ${2}; then
echo "Failed to install ${1} => ${2}"
exit 1
fi
}
# Installing datamodel
bbfdm_install_dm()
{
local src dest minfile
src="$1"
dest="$2"
minfile=""
if [ -z ${src} ] || [ -z "${dest}" ] || [ -z "${TOOLS}" ]; then
echo "Invalid input option for install dm $@"
exit 1
fi
if [ "${src##*.}" = "json" ]; then
echo "Compacting BBFDM JSON file"
minfile=$(mktemp)
jq -c 'del(..|.description?)' ${src} > ${minfile}
src=${minfile}
if dpkg -s python3-jsonschema >/dev/null 2>&1; then
echo "Verifying bbfdm Datamodel JSON file"
if ! ${TOOLS}/validate_plugins.py ${src}; then
echo "Validation of the plugin failed ${src}"
exit 1
fi
else
echo "## Install python3-jsonschema to verify datamodel plugins"
fi
fi
install_bin ${src} ${dest}
if [ -f "${minfile}" ]; then
rm ${minfile}
fi
}
bbfdm_generate_input()
{
local dest ser
dest_dir=${1}
ser=${2}
dest=${dest_dir}/${ser}.json
if [ -n "${OUT_NAME}" ]; then
echo ${INPUT_TEMPLATE} | jq --arg service "${ser}" --arg OUT "${OUT_NAME}" '.daemon |= (.service_name = $service |.output.name = $OUT)' > ${dest}
else
echo ${INPUT_TEMPLATE} | jq --arg service "${ser}" '.daemon.service_name = $service' > ${dest}
fi
chmod 466 ${dest}
}
if [ -z "$SRC" ] || [ -z "${DEST}" ] ; then
echo "# BBFDM Null value in src[${SRC}], dest[${DEST}]"
exit 1
fi
if [ "${SCRIPT}" -eq "1" ]; then
if [ "${DIAG}" -eq "1" ]; then
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/scripts/bbf_diag
install_bin ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/scripts/bbf_diag/
else
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/scripts
install_bin ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/scripts/
fi
exit 0
fi
if [ "${MICRO_SERVICE}" -eq "1" ]; then
if [ -z "${DATA}" ]; then
echo "# service_name[${DATA}] not provided"
exit 1
fi
if [ "${PLUGIN}" -ne "1" ]; then
extn="$(basename ${SRC})"
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}.${extn##*.}
# main micro-service datamodel plugin, create an input file as well
install_dir ${DEST}/${BBFDM_INPUT_PATH}
bbfdm_generate_input ${DEST}/${BBFDM_INPUT_PATH}/ ${DATA}
else
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}/$(basename ${SRC})
fi
else
if [ "${PLUGIN}" -eq "1" ]; then
priority="${DATA:-0}"
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/plugins
if [ "${priority}" -gt "0" ]; then
# install with priority if defined
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/plugins/${priority}_$(basename ${SRC})
else
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/plugins/$(basename ${SRC})
fi
fi
fi

330
bbfdm/tools/validate_plugins.py Executable file
View File

@@ -0,0 +1,330 @@
#!/usr/bin/python3
# Copyright (C) 2024 iopsys Software Solutions AB
# Author: Amin Ben Romdhane <amin.benromdhane@iopsys.eu>
import sys
import json
from jsonschema import validate
JSON_PLUGIN_VERSION = 0
obj_schema = {
"definitions": {
"type_t": {
"type": "string",
"enum": [
"object"
]
},
"map_type_t": {
"type": "string",
"enum": [
"uci",
"ubus"
]
},
"protocols_t": {
"type": "string",
"enum": [
"cwmp",
"usp"
]
}
},
"type" : "object",
"properties" : {
"type" : {"$ref": "#/definitions/type_t"},
"version" : {"type": "string"},
"protocols" : {"type" : "array", "items" : {"$ref": "#/definitions/protocols_t"}},
"uniqueKeys" : {"type" : "array"},
"access" : {"type" : "boolean"},
"array" : {"type" : "boolean"},
"mapping" : {"type" : "object", "properties" : {
"type" : {"$ref": "#/definitions/map_type_t"},
"uci" : {"type" : "object", "properties" : {
"file" : {"type": "string"},
"section" : {"type": "object", "properties" : {
"type" : {"type": "string"}
}
},
"dmmapfile" : {"type": "string"}
}
},
"ubus" : {"type" : "object", "properties" : {
"object" : {"type": "string"},
"method" : {"type": "string"},
"args" : {"type": "object"},
"key" : {"type": "string"}
}
}
}
}
},
"required": [
"type",
"protocols",
"array",
"access"
]
}
obj_schema_v1 = {
"definitions": {
"type_t": {
"type": "string",
"enum": [
"object"
]
},
"map_type_t": {
"type": "string",
"enum": [
"uci",
"ubus"
]
},
"protocols_t": {
"type": "string",
"enum": [
"cwmp",
"usp",
"none"
]
}
},
"type" : "object",
"properties" : {
"type" : {"$ref": "#/definitions/type_t"},
"version" : {"type": "string"},
"protocols" : {"type" : "array", "items" : {"$ref": "#/definitions/protocols_t"}},
"uniqueKeys" : {"type" : "array"},
"access" : {"type" : "boolean"},
"array" : {"type" : "boolean"},
"mapping" : {"type" : "array", "items" : {
"type" : "object", "properties" : {
"type" : {"$ref": "#/definitions/map_type_t"},
"uci" : {"type" : "object", "properties" : {
"file" : {"type": "string"},
"section" : {"type": "object", "properties" : {
"type" : {"type": "string"}
}
},
"dmmapfile" : {"type": "string"}
}
},
"ubus" : {"type" : "object", "properties" : {
"object" : {"type": "string"},
"method" : {"type": "string"},
"args" : {"type": "object"},
"key" : {"type": "string"}
}
}
}
}
}
},
"required": [
"type",
"protocols",
"array",
"access"
]
}
param_schema = {
"definitions": {
"type_t": {
"type": "string",
"enum": [
"string",
"unsignedInt",
"unsignedLong",
"int",
"long",
"boolean",
"dateTime",
"hexBinary",
"base64",
"decimal"
]
},
"map_type_t": {
"type": "string",
"enum": [
"uci",
"ubus",
"procfs",
"sysfs",
"json",
"uci_sec"
]
},
"protocols_t": {
"type": "string",
"enum": [
"cwmp",
"usp",
"none"
]
}
},
"type" : "object",
"properties" : {
"type" : {"$ref": "#/definitions/type_t"},
"protocols" : {"type" : "array", "items" : {"$ref": "#/definitions/protocols_t"}},
"read" : {"type" : "boolean"},
"write" : {"type" : "boolean"},
"mapping" : {"type" : "array", "items" : {"type": "object", "properties" : {
"type" : {"$ref": "#/definitions/map_type_t"},
"uci" : {"type" : "object", "properties" : {
"file" : {"type": "string"},
"section" : {"type": "object", "properties" : {
"type" : {"type": "string"},
"index" : {"type": "string"}
}
},
"option" : {"type": "object", "properties" : {
"name" : {"type": "string"} }
}
}
},
"ubus" : {"type" : "object", "properties" : {
"object" : {"type": "string"},
"method" : {"type": "string"},
"args" : {"type": "object"},
"key" : {"type": "string"}
}
},
"procfs" : {"type" : "object", "properties" : {
"file" : {"type": "string"}
}
},
"sysfs" : {"type" : "object", "properties" : {
"file" : {"type": "string"}
}
}
}
}
}
},
"required": [
"type",
"protocols",
"read",
"write"
]
}
event_schema = {
"definitions": {
"type_t": {
"type": "string",
"enum": [
"event"
]
},
"protocols_t": {
"type": "string",
"enum": [
"usp"
]
}
},
"type" : "object",
"properties" : {
"type" : {"$ref": "#/definitions/type_t"},
"version" : {"type": "string"},
"protocols" : {"type" : "array", "items" : {"$ref": "#/definitions/protocols_t"}}
},
"required": [
"type",
"protocols"
]
}
command_schema = {
"definitions": {
"type_t": {
"type": "string",
"enum": [
"command"
]
},
"protocols_t": {
"type": "string",
"enum": [
"usp"
]
}
},
"type" : "object",
"properties" : {
"type" : {"$ref": "#/definitions/type_t"},
"async" : {"type" : "boolean"},
"protocols" : {"type" : "array", "items" : {"$ref": "#/definitions/protocols_t"}},
"input" : {"type" : "object"},
"output" : {"type" : "object"}
},
"required": [
"type",
"async",
"protocols"
]
}
def print_validate_json_usage():
print("Usage: " + sys.argv[0] + " <dm json file>")
print("Examples:")
print(" - " + sys.argv[0] + " datamodel.json")
print(" ==> Validate the json file")
print("")
exit(1)
def parse_value( key , value ):
if key.endswith('.') and not key.startswith('Device.'):
print(key + " is not a valid path")
exit(1)
if key.endswith('.') and (JSON_PLUGIN_VERSION == 1 or JSON_PLUGIN_VERSION == 2):
__schema = obj_schema_v1
elif key.endswith('.'):
__schema = obj_schema
elif key.endswith('!'):
__schema = event_schema
elif key.endswith('()'):
__schema = command_schema
else:
__schema = param_schema
validate(instance = value, schema = __schema)
for k, v in value.items():
if k != "list" and k != "mapping" and k != "input" and k != "output" and isinstance(v, dict):
parse_value(k, v)
### main ###
if len(sys.argv) < 2:
print_validate_json_usage()
json_file = open(sys.argv[1], "r", encoding='utf-8')
try:
json_data = json.loads(json_file.read())
except ValueError:
print(sys.argv[1] + " file has a wrong JSON format!!!!!")
exit(1)
for __key, __value in json_data.items():
if __key == "json_plugin_version":
if not isinstance(__value, int) or __value not in [0, 1, 2]:
raise ValueError("Invalid value for json_plugin_version")
JSON_PLUGIN_VERSION = __value
continue
parse_value(__key , __value)
print("JSON File is Valid")

53
bridgemngr/Makefile Normal file
View File

@@ -0,0 +1,53 @@
#
# Copyright (C) 2020-2024 iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bridgemngr
PKG_VERSION:=1.0.2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr
PKG_SOURCE_VERSION:=9cddf87b527ef1614a8a39db67e6578ff1810031
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/bridgemngr
CATEGORY:=Utilities
TITLE:=Bridge Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
endef
define Package/bridgemngr/description
Package to add Device.Bridging. data model support.
endef
MAKE_PATH:=src
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
define Package/bridgemngr/install
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libbridgemngr.so $(1) $(PKG_NAME)
ifeq ($(findstring iopsys,$(CONFIG_BBF_VENDOR_LIST)),iopsys)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME)
endif
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) ~/git/bridgemngr/* $(PKG_BUILD_DIR)/
endef
endif
$(eval $(call BuildPackage,bridgemngr))

View File

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.1.3
PKG_VERSION:=2.1.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
PKG_SOURCE_VERSION:=f556410b51a2248f11358793f11ae54d3e53e85e
PKG_SOURCE_VERSION:=e472e90feec31d9f318ea8c732ab564002e25db1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -22,6 +22,7 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/$(PKG_NAME)
SECTION:=utils
@@ -43,10 +44,14 @@ endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/bulkdata
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.json $(1)/etc/bulkdata
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DATA) ./files/etc/config/bulkdata $(1)/etc/config/
$(INSTALL_BIN) ./files/etc/init.d/bulkdatad $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/uci-defaults/95-bulkdata-translation-options $(1)/etc/uci-defaults/
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -0,0 +1,960 @@
{
"json_plugin_version": 2,
"Device.BulkData.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"Enable": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"name": "bulkdata"
},
"option": {
"name": "enable"
}
}
}
]
},
"Status": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"Enabled",
"Disabled",
"Error"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"name": "bulkdata"
},
"option": {
"name": "enable"
}
}
}
]
},
"MinReportingInterval": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "0",
"datatype": "unsignedInt",
"unit": "seconds"
},
"Protocols": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "HTTP",
"list": {
"datatype": "string",
"enumerations": [
"Streaming",
"File",
"HTTP",
"MQTT"
]
}
},
"EncodingTypes": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "JSON,CSV",
"list": {
"datatype": "string",
"enumerations": [
"XML",
"XDR",
"CSV",
"JSON"
]
}
},
"ParameterWildCardSupported": {
"type": "boolean",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "1",
"datatype": "boolean"
},
"MaxNumberOfProfiles": {
"type": "int",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "-1",
"datatype": "int",
"range": [
{
"min": -1
}
]
},
"MaxNumberOfParameterReferences": {
"type": "int",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "-1",
"datatype": "int",
"range": [
{
"min": -1
}
]
},
"ProfileNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.BulkData.Profile.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile"
},
"dmmapfile": "dmmap_bulkdata"
}
}
],
"Enable": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "enable"
}
]
},
"Alias": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "Alias",
"range": [
{
"max": 64
}
],
"flags": [
"Unique"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "alias"
}
]
},
"Name": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 255
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "name"
}
]
},
"NumberOfRetainedFailedReports": {
"type": "int",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "int",
"range": [
{
"min": -1
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "nbre_of_retained_failed_reports"
}
]
},
"Protocol": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"Streaming",
"File",
"HTTP"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "protocol"
}
]
},
"EncodingType": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"XML",
"XDR",
"CSV",
"JSON"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "encoding_type"
}
]
},
"ReportingInterval": {
"type": "unsignedInt",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"range": [
{
"min": 1
}
],
"unit": "seconds",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "reporting_interval"
}
]
},
"TimeReference": {
"type": "dateTime",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "dateTime",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "time_reference"
}
]
},
"ParameterNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile_parameter"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.BulkData.Profile.{i}.Parameter.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile_parameter"
},
"dmmapfile": "dmmap_bulkdata"
}
}
],
"Name": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 64
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "name"
}
]
},
"Reference": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "reference"
}
]
}
},
"Device.BulkData.Profile.{i}.CSVEncoding.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"FieldSeparator": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_field_separator"
}
]
},
"RowSeparator": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_row_separator"
}
]
},
"EscapeCharacter": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_escape_character"
}
]
},
"ReportFormat": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"ParameterPerRow",
"ParameterPerColumn"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_report_format"
}
]
},
"RowTimestamp": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"Unix-Epoch",
"ISO-8601",
"None"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_row_time_stamp"
}
]
}
},
"Device.BulkData.Profile.{i}.JSONEncoding.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"ReportFormat": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"ObjectHierarchy",
"NameValuePair"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "json_encoding_report_format"
}
]
},
"ReportTimestamp": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"Unix-Epoch",
"ISO-8601",
"None"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "json_encoding_report_time_stamp"
}
]
}
},
"Device.BulkData.Profile.{i}.HTTP.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"URL": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "URL",
"range": [
{
"max": 2048
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_url"
}
]
},
"Username": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_username"
}
]
},
"Password": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
],
"flags": [
"Secure"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_password"
}
]
},
"CompressionsSupported": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "GZIP",
"list": {
"datatype": "string",
"enumerations": [
"GZIP",
"Compress",
"Deflate"
]
}
},
"Compression": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"GZIP",
"Compress",
"Deflate"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_compression"
}
]
},
"MethodsSupported": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "POST,PUT",
"list": {
"datatype": "string",
"enumerations": [
"POST",
"PUT"
]
}
},
"Method": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"POST",
"PUT"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_method"
}
]
},
"UseDateHeader": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_use_date_header"
}
]
},
"RetryEnable": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_retry_enable"
}
]
},
"RetryMinimumWaitInterval": {
"type": "unsignedInt",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"range": [
{
"min": 1,
"max": 65535
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_retry_minimum_wait_interval"
}
]
},
"RetryIntervalMultiplier": {
"type": "unsignedInt",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"range": [
{
"min": 1000,
"max": 65535
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_retry_interval_multiplier"
}
]
},
"RequestURIParameterNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile_http_request_uri_parameter"
},
"option": {
"name": "@Count"
}
}
}
]
},
"PersistAcrossReboot": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_persist_across_reboot"
}
]
},
"Device.BulkData.Profile.{i}.HTTP.RequestURIParameter.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile_http_request_uri_parameter"
},
"dmmapfile": "dmmap_bulkdata"
}
}
],
"Name": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 64
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "name"
}
]
},
"Reference": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "reference"
}
]
}
}
}
}
}
}

View File

@@ -1,15 +0,0 @@
{
"daemon": {
"input": {
"type": "JSON",
"name": "/etc/bulkdata/bulkdata.json"
},
"output": {
"type": "UBUS",
"name": "bbfdm.bulkdata",
"parent_dm": "Device.",
"object": "BulkData",
"root_obj": "bbfdm"
}
}
}

View File

@@ -3,11 +3,8 @@
START=60
STOP=10
. /etc/bbfdm/bbfdm_services.sh
USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
BULKDATA_JSON_INPUT="/etc/bulkdata/input.json"
start_service() {
local enable
@@ -21,8 +18,6 @@ start_service() {
procd_set_param respawn
procd_close_instance "bulkdata"
}
bbfdm_add_service "bbfdm.bulkdata" "${BULKDATA_JSON_INPUT}"
}
reload_service() {

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=capiagent
PKG_VERSION:=2.1.0
PKG_VERSION:=2.1.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3e671db8f567b19c109fc13b25bc571c4c73a962
PKG_SOURCE_VERSION:=136cab3a9f1eec0132db9fa3f7bb1c8748ce1449
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/capiagent.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -31,7 +31,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/capiagent
TITLE+= capiagent (daemon implementing Wi-Fi Alliance's CAPI commands)
DEPENDS= +libubox +libuci +libubus +libnl-genl +libeasy +libwifi \
+libjson-c +libblobmsg-json +ubus +libieee1905
+libjson-c +libblobmsg-json +ubus +libieee1905 +libwifiutils
endef
define Package/capiagent/description

64
csmngr/Makefile Normal file
View File

@@ -0,0 +1,64 @@
#
# Copyright (C) 2020-2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=csmngr
PKG_VERSION:=1.0.2
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5e50fe388fff29b08d895c1c580152cccfa290ad
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/csmngr.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_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_CONFIG_DEPENDS := \
CONFIG_PACKAGE_libwifiutils \
CONFIG_PACKAGE_libwifi
PKG_BUILD_DEPENDS := libwifi
include $(INCLUDE_DIR)/package.mk
MAKE_PATH:=src
define Package/csmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi channel selection manager
DEPENDS:=+libwifiutils +libwifi +libuci +libubox +ubus +libnl-genl
endef
define Package/csmngr/description
WiFi Auto Channel Selection manager.
endef
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/csmngr/ $(PKG_BUILD_DIR)/
endef
endif
define Package/csmngr/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/csmngr $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,csmngr))

21
csmngr/files/etc/init.d/csmngr Executable file
View File

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

16
ddnsmngr/Config.in Normal file
View File

@@ -0,0 +1,16 @@
if PACKAGE_ddnsmngr
choice
prompt "Select backend for dynamic DNS management"
default DDNSMNGR_BACKEND_DDNSSCRIPT
depends on PACKAGE_ddnsmngr
help
Select which package to use for dynamic DNS support
config DDNSMNGR_BACKEND_DDNSSCRIPT
bool "Use ddns_script"
config DDNSMNGR_BACKEND_INADYN
bool "Use inadyn"
endchoice
endif

77
ddnsmngr/Makefile Normal file
View File

@@ -0,0 +1,77 @@
#
# Copyright (C) 2024 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ddnsmngr
PKG_VERSION:=1.0.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ddnsmngr.git
PKG_SOURCE_VERSION:=e81bdbd983e7eb40fcb7337af3fba2f13115d3b7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_CONFIG_DEPENDS:=CONFIG_DDNSMNGR_BACKEND_DDNSSCRIPT CONFIG_DDNSMNGR_BACKEND_INADYN
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Dynamic DNS manager
DEPENDS:=+libbbfdm-api +DDNSMNGR_BACKEND_DDNSSCRIPT:ddns-scripts +DDNSMNGR_BACKEND_INADYN:inadyn
MENU:=1
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
MAKE_PATH:=src
define Package/$(PKG_NAME)/description
Manage dynamic DNS updation and provides Device.DynamicDNS. datamodel object based on TR181-2.16
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/ddnsmngr/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/ddnsmngr/ddns
$(INSTALL_DIR) $(1)/etc/ddnsmngr/servers
$(INSTALL_DIR) $(1)/usr/lib/ddnsmngr
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_DATA) ./files/etc/config/ddnsmngr $(1)/etc/config/ddnsmngr
$(INSTALL_BIN) ./files/etc/uci-defaults/01-ddns-config-migrate $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/init.d/ddnsmngr $(1)/etc/init.d/ddnsmngr
ifeq ($(CONFIG_DDNSMNGR_BACKEND_DDNSSCRIPT),y)
$(INSTALL_BIN) ./files/usr/lib/ddns_script/ddnsmngr_service.sh $(1)/usr/lib/ddnsmngr/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns-script/usr/lib/ddnsmngr/ddnsmngr_updater.sh $(1)/usr/lib/ddnsmngr/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/files/ddns-script/server/* $(1)/etc/ddnsmngr/servers
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns-script/usr/libexec/rpcd/ddnsmngr $(1)/usr/libexec/rpcd/ddnsmngr
endif
ifeq ($(CONFIG_DDNSMNGR_BACKEND_INADYN),y)
$(INSTALL_BIN) ./files/usr/lib/inadyn/ddnsmngr_service.sh $(1)/usr/lib/ddnsmngr/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/files/inadyn/server/* $(1)/etc/ddnsmngr/servers
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/inadyn/usr/libexec/rpcd/ddnsmngr $(1)/usr/libexec/rpcd/ddnsmngr
endif
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libddnsmngr.so $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -0,0 +1,23 @@
config ddnsmngr 'global'
option configfile '/var/run/ddnsmngr/ddnsmngr.json'
option ddns_dateformat '%F %R'
option ddns_rundir '/var/run/ddnsmngr'
option ddns_logdir '/var/log/ddnsmngr'
option ddns_loglines '250'
option upd_privateip '0'
option use_curl '1'
config server 'ddns_server_1'
option enabled '1'
option service 'dynu.com'
option name 'dynu.com'
config server 'ddns_server_2'
option enabled '1'
option service 'dyndns.org'
option name 'dyndns.org'
config server 'ddns_server_3'
option enabled '1'
option service 'zoneedit.com'
option name 'zoneedit.com'

View File

@@ -0,0 +1,26 @@
#!/bin/sh /etc/rc.common
START=80
STOP=10
USE_PROCD=1
. /usr/lib/ddnsmngr/ddnsmngr_service.sh
start_service() {
start_ddnsmngr_service
}
stop_service() {
stop_ddnsmngr_service
}
reload_service() {
stop
sleep 1
start
}
service_triggers() {
procd_add_reload_trigger ddnsmngr
add_ddnsmngr_triggers
}

View File

@@ -0,0 +1,170 @@
#!/bin/sh
. /lib/functions.sh
cl_id=1
srv_id=1
function get_ddns_config_option() {
local val
val="$(uci -q get ddns.${1}.${2})"
if [ -z "${val}" ] && [ -n "${3}" ]; then
val="${3}"
fi
echo "${val}"
}
function config_supported_service() {
if ! uci -q get ddnsmngr.global >/dev/null 2>&1; then
uci -q set ddnsmngr.global="ddnsmngr"
fi
servers=""
for i in $(find /etc/ddnsmngr/servers/ -name '*.json' | cut -d'/' -f 5 | sed "s/.json//")
do
if [ -z "${servers}" ]; then
servers="${i}"
else
servers="${servers},${i}"
fi
done
uci -q set ddnsmngr.global.supported_services="${servers}"
}
function migrate_service_section() {
client_sec=""
enabled="$(get_ddns_config_option ${1} enabled "0")"
service_name="$(get_ddns_config_option ${1} service_name)"
interface="$(get_ddns_config_option ${1} interface)"
ip_network="$(get_ddns_config_option ${1} ip_network)"
username="$(get_ddns_config_option ${1} username)"
password="$(get_ddns_config_option ${1} password)"
lookup_host="$(get_ddns_config_option ${1} lookup_host)"
use_ipv6="$(get_ddns_config_option ${1} use_ipv6 "0")"
force_ipversion="$(get_ddns_config_option ${1} force_ipversion "0")"
use_https="$(get_ddns_config_option ${1} use_https "0")"
force_dnstcp="$(get_ddns_config_option ${1} force_dnstcp "0")"
if [ -z "${service_name}" ]; then
uci -q delete ddns."${1}"
return 0
fi
# check server file is present in device
if [ ! -f "/etc/ddnsmngr/servers/${service_name}.json" ]; then
uci -q delete ddns."${1}"
return 0
fi
# Check if client section is already added for this service
clients=$(uci -q show ddnsmngr | grep "=client")
client_count=$(echo "${clients}" | wc -l)
tmp=0
while [ $tmp -lt $client_count ]
do
mngr_serv="$(uci -q get ddnsmngr.@client[$tmp].service_name)"
mngr_intf="$(uci -q get ddnsmngr.@client[$tmp].interface)"
mngr_netw="$(uci -q get ddnsmngr.@client[$tmp].ip_network)"
mngr_user="$(uci -q get ddnsmngr.@client[$tmp].username)"
mngr_ipv6="$(uci -q get ddnsmngr.@client[$tmp].use_ipv6)"
mngr_forceip="$(uci -q get ddnsmngr.@client[$tmp].force_ipversion)"
mngr_https="$(uci -q get ddnsmngr.@client[$tmp].use_https)"
mngr_dnstcp="$(uci -q get ddnsmngr.@client[$tmp].force_dnstcp)"
[ -z "${mngr_ipv6}" ] && mngr_ipv6="0"
[ -z "${mngr_forceip}" ] && mngr_forceip="0"
[ -z "${mngr_https}" ] && mngr_https="0"
[ -z "${mngr_dnstcp}" ] && mngr_dnstcp="0"
if [ "${mngr_serv}" == "${service_name}" ] && [ "${mngr_intf}" == "${interface}" ] && \
[ "${mngr_netw}" == "${ip_network}" ] && [ "${mngr_user}" == "${username}" ] && \
[ "${mngr_ipv6}" == "${use_ipv6}" ] && [ "${mngr_forceip}" == "${force_ipversion}" ] && \
[ "${mngr_https}" == "${use_https}" ] && [ "${mngr_dnstcp}" == "${force_dnstcp}" ]; then
break
fi
tmp=$(( tmp + 1 ))
done
if [ $tmp -ne $client_count ]; then
i=0
for client in $clients; do
if [ $i -eq $tmp ]; then
client_sec="$(echo $client | cut -d'=' -f 1 | cut -d'.' -f 2)"
break
fi
i=$(( i + 1 ))
done
if [ $enabled -eq 1 ]; then
uci -q set ddnsmngr."${client_sec}".enabled="1"
fi
else
client_sec=ddns_mig_client_"${cl_id}"
uci -q set ddnsmngr."${client_sec}"="client"
uci -q set ddnsmngr."${client_sec}".enabled="${enabled}"
uci -q set ddnsmngr."${client_sec}".service_name="${service_name}"
uci -q set ddnsmngr."${client_sec}".interface="${interface}"
uci -q set ddnsmngr."${client_sec}".ip_network="${ip_network}"
uci -q set ddnsmngr."${client_sec}".username="${username}"
uci -q set ddnsmngr."${client_sec}".password="${password}"
uci -q set ddnsmngr."${client_sec}".use_ipv6="${use_ipv6}"
uci -q set ddnsmngr."${client_sec}".force_ipversion="${force_ipversion}"
uci -q set ddnsmngr."${client_sec}".use_https="${use_https}"
uci -q set ddnsmngr."${client_sec}".force_dnstcp="${force_dnstcp}"
cl_id=$(( cl_id + 1 ))
# add server section if not added
servers=$(uci -q show ddnsmngr | grep "service=\'${service_name}\'")
if [ -z "${servers}" ]; then
server_sec=ddns_mig_server_"${srv_id}"
uci -q set ddnsmngr."${server_sec}"="server"
uci -q set ddnsmngr."${server_sec}".enabled="1"
uci -q set ddnsmngr."${server_sec}".service="${service_name}"
uci -q set ddnsmngr."${server_sec}".name="${service_name}"
srv_id=$(( srv_id + 1 ))
fi
fi
# if lookup_host is set then add host section
if [ -n "${lookup_host}" ] && [ -n "${client_sec}" ]; then
# check number of hosts present for this client
host_count=$(uci -q show ddnsmngr | grep "dm_parent=\'${client_sec}\'" | wc -l)
host_ix=$(( host_count + 1 ))
host_sec="${client_sec}"_host_"${host_ix}"
uci -q set ddnsmngr."${host_sec}"="host"
uci -q set ddnsmngr."${host_sec}".enabled="${enabled}"
uci -q set ddnsmngr."${host_sec}".lookup_host="${lookup_host}"
uci -q set ddnsmngr."${host_sec}".dm_parent="${client_sec}"
fi
uci -q delete ddns."${1}"
}
function migrate_ddns_config() {
if [ ! -f "/etc/config/ddnsmngr" ]; then
# Create ddnsmngr config file
touch /etc/config/ddnsmngr
fi
config_supported_service
config_load ddns
config_foreach migrate_service_section service
uci -q commit ddns
uci -q commit ddnsmngr
}
migrate_ddns_config

View File

@@ -0,0 +1,169 @@
#! /bin/sh
RUNDIR="/var/run/ddnsmngr"
LOGDIR="/var/log/ddnsmngr"
PROG="/usr/lib/ddnsmngr/ddnsmngr_updater.sh"
CONFIGFILE="/var/run/ddnsmngr/ddnsmngr.json"
CLIENT_INTFS=""
. /usr/share/libubox/jshn.sh
log() {
echo "$*"|logger -t ddnsmngr.init -p debug
}
validate_host_section() {
uci_validate_section ddnsmngr host "${1}" \
'enabled:bool:0' \
'lookup_host:string' \
'dm_parent:string'
}
validate_client_section() {
uci_validate_section ddnsmngr client "${1}" \
'enabled:bool:0' \
'service_name:string' \
'interface:string' \
'ip_network:string' \
'username:string' \
'password:string' \
'use_https:bool:0' \
'force_dnstcp:bool:0' \
'use_ipv6:bool:0' \
'force_ipversion:bool:0'
}
add_object() {
local enabled lookup_host dm_parent use_ipv6 force_ipversion proc_info_file
local service_name interface ip_network username password use_https force_dnstcp
validate_host_section "${1}" || {
log "Validation of host section failed"
return 0
}
if [ "${enabled}" -ne 1 ] || [ -z "${dm_parent}" ]; then
return 0
fi
validate_client_section "${dm_parent}" || {
log "Validation of client section failed"
return 0
}
if [ "${enabled}" -ne 1 ]; then
return 0
fi
service_name=$(uci -q get ddnsmngr.${dm_parent}.service_name)
if [ -z "${service_name}" ]; then
return 0
fi
service_section=$(uci -q show ddnsmngr | grep "service=\'${service_name}\'" | cut -d'.' -f 2 | head -1)
if [ -z "${service_section}" ]; then
return 0
fi
service_enabled=$(uci -q get ddnsmngr.${service_section}.enabled)
if [ "${service_enabled}" -ne 1 ]; then
return 0
fi
json_add_object
json_add_string "interface" "${interface}"
json_add_string "service_name" "${service_name}"
json_add_string "username" "${username}"
json_add_string "password" "${password}"
json_add_string "lookup_host" "${lookup_host}"
json_add_string "ip_network" "${ip_network}"
json_add_string "proc_info_file" "${1}"
json_add_string "use_ipv6" "${use_ipv6}"
json_add_string "force_ipversion" "${force_ipversion}"
json_add_string "use_https" "${use_https}"
json_add_string "force_dnstcp" "${force_dnstcp}"
json_close_object
if [ -z "${interface}" ]; then
if [ "${use_ipv6}" -eq 0 ]; then
interface="wan"
else
interface="wan6"
fi
fi
for intf in $CLIENT_INTFS; do
if [ "${intf}" == "${interface}" ]; then
return 0
fi
done
CLIENT_INTFS="${CLIENT_INTFS} ${interface}"
}
start_ddnsmngr_service() {
run_dir=$(uci -q get ddnsmngr.global.ddns_rundir)
log_dir=$(uci -q get ddnsmngr.global.ddns_logdir)
if [ -n "${run_dir}" ]; then
RUNDIR="${run_dir}"
fi
if [ -n "${log_dir}" ]; then
LOGDIR="${log_dir}"
fi
mkdir -p "${RUNDIR}"
mkdir -p "${LOGDIR}"
conf_file=$(uci -q get ddnsmngr.global.configfile)
if [ -n "${conf_file}" ]; then
CONFIGFILE="${conf_file}"
fi
touch "${CONFIGFILE}"
if [ ! -f "${CONFIGFILE}" ]; then
log "Can not create ${CONFIGFILE}, exit"
exit 0
fi
json_init
json_add_array "services"
config_load ddnsmngr
config_foreach add_object host
json_close_array
json_dump > "${CONFIGFILE}"
procd_open_instance ddnsmngr
procd_set_param command "$PROG"
procd_append_param command -c "${CONFIGFILE}"
procd_append_param command -- start
procd_close_instance
}
stop_ddnsmngr_service() {
conf_file=$(uci -q get ddnsmngr.global.configfile)
if [ -n "${conf_file}" ]; then
CONFIGFILE="${conf_file}"
fi
if [ ! -f "${CONFIGFILE}" ]; then
log "${CONFIGFILE} not found, can't stop services if running any"
fi
"$PROG" -c "${CONFIGFILE}" -- stop
return 0
}
add_ddnsmngr_triggers() {
procd_open_trigger
for intf in $CLIENT_INTFS; do
# No need to handle other ifevents like ifupdate etc
procd_add_interface_trigger "interface.*.up" $intf /etc/init.d/ddnsmngr restart
procd_add_interface_trigger "interface.*.down" $intf /etc/init.d/ddnsmngr restart
done
procd_close_trigger
}

View File

@@ -0,0 +1,311 @@
#!/bin/sh
PROG="/usr/sbin/inadyn"
CONFIGPATH="/tmp/inadyn_config"
PIDPATH="/etc/inadyn_pid"
CLIENT_INTFS=""
CONFIG_FILES=""
SERVER_PATH="/etc/ddnsmngr/servers"
FORMAT="custom [SECTION] {\n\tusername\t= [USER]\n\tpassword\t= [PWD]\n\tddns-server\t= [SERV]\n\tddns-path\t= [URI]\n\tssl\t\t= [SSL]\n\thostname\t= [NAME]\n\tcheckip-command\t= [CMD]\n\tddns-response\t= [RESPONSES]\n}"
. /usr/share/libubox/jshn.sh
log() {
echo "$*"|logger -t ddnsmngr.init -p debug
}
get_service_data() {
local provider="$1"
shift
local dir="$1"
shift
local ipv6="$1"
shift
local name data url answer script
[ $# -ne 2 ] && {
return 1
}
[ -f "${dir}/${provider}.json" ] || {
eval "$1=\"\""
eval "$2=\"\""
return 1
}
json_load_file "${dir}/${provider}.json"
json_get_var name "name"
if [ "$ipv6" -eq "1" ]; then
json_select "ipv6"
else
json_select "ipv4"
fi
json_get_var data "url"
json_get_var answer "answer"
json_select ".."
json_cleanup
response=""
if [ -n "${answer}" ]; then
answer=$(echo "${answer}" | sed 's/|/ /g')
for ans in $answer; do
if [ -z "${response}" ]; then
response="${ans}"
else
response="${response}, ${ans}"
fi
done
response="{ ${response} }"
fi
eval "$1=\"$data\""
eval "$2=\"$response\""
return 0
}
generate_inadyn_config() {
json_load "${1}"
json_get_var service_name service_name
json_get_var use_ipv6 use_ipv6
json_get_var interface interface
json_get_var username username
json_get_var password password
json_get_var host lookup_host
json_get_var conf_file config_file
json_get_var conf_dir config_dir
json_get_var server_address server_address
json_cleanup
if [ -z "${service_name}" ] || [ -z "${host}" ]; then
return 1
fi
if [ -z "${conf_file}" ]; then
return 1
fi
if [ -z "${conf_dir}" ]; then
return 1
fi
# First look into custom path to load the url otherwise default path
get_service_data "${service_name}" "${SERVER_PATH}" "${use_ipv6}" server_url server_answer
if [ -z "${server_url}" ]; then
return 1
fi
# Need to pick proto, server address and request uri separately from the url
# format http://[server_address]/[update_Request_uri]
proto=$(echo $server_url | cut -d':' -f 1)
serv=$(echo $server_url | cut -d'/' -f 3 | cut -d'@' -f 2)
uri=${server_url#*$serv}
if [ -z $proto ] || [ -z $serv ] || [ -z $uri ]; then
return 1
fi
path=$(echo "$uri" | sed 's/&/\\&/g')
update_uri=$(echo $path | sed -e "s#\[DOMAIN\]#%h#g" -e "s#\[PASSWORD\]#%p#g" \
-e "s#\[USERNAME\]#%u#g" -e "s#\[IP\]#%i#g")
if [ -z "${interface}" ]; then
if [ "${use_ipv6}" -eq 0 ]; then
interface="wan"
else
interface="wan6"
fi
fi
# now get the physical interface name
intf=$(ifstatus "${interface}" | jsonfilter -e '@.device')
if [ -z "${intf}" ]; then
return 1
fi
# command to get ip of the interface
if [ "${use_ipv6}" -eq 0 ]; then
get_ip="\"ifstatus ${interface} | jsonfilter -e '@[\\\\\"ipv4-address\\\\\"][0].address'\""
else
get_ip="\"ifstatus ${interface} | jsonfilter -e '@[\\\\\"ipv6-address\\\\\"][0].address'\""
fi
if [ "${proto}" = "http" ]; then
ssl="false"
else
ssl="true"
fi
inadyn_ver=$(inadyn -v)
user_agent="inadyn/${inadyn_ver}"
config_file="${conf_dir}/${conf_file}"
touch "${config_file}"
echo "iface = ${intf}" > "${config_file}"
echo "period = 600" >> "${config_file}"
echo "user-agent = ${user_agent}" >> "${config_file}"
if [ "${use_ipv6}" -eq 1 ]; then
echo "allow-ipv6 = true" >> "${config_file}"
fi
if [ -z "${password}" ]; then
FORMAT=$(echo "${FORMAT}" | sed 's/\\tpassword\\t= \[PWD\]\\n//g')
fi
if [ -z "${server_answer}" ]; then
FORMAT=$(echo "${FORMAT}" | sed 's/\\tddns-response\\t= \[RESPONSES\]\\n//g')
fi
config=$(echo $FORMAT | sed -e "s#\[SECTION\]#$conf_file#g" -e "s#\[PWD\]#$password#g" \
-e "s#\[USER\]#$username#g" -e "s#\[SERV\]#$serv#g" \
-e "s#\[URI\]#\"$update_uri\"#g" -e "s#\[SSL\]#$ssl#g" \
-e "s#\[NAME\]#$host#g" -e "s#\[CMD\]#$get_ip#g" \
-e "s#\[RESPONSES\]#$server_answer#g")
echo -e "\n\n${config}" >> "${config_file}"
return 0
}
validate_host_section() {
uci_validate_section ddnsmngr host "${1}" \
'enabled:bool:0' \
'lookup_host:string' \
'dm_parent:string'
}
validate_client_section() {
uci_validate_section ddnsmngr client "${1}" \
'enabled:bool:0' \
'service_name:string' \
'interface:string' \
'ip_network:string' \
'username:string' \
'password:string' \
'use_https:bool:0' \
'force_dnstcp:bool:0' \
'use_ipv6:bool:0' \
'force_ipversion:bool:0'
}
add_object() {
local enabled lookup_host dm_parent use_ipv6 force_ipversion
local service_name interface ip_network username password use_https force_dnstcp
validate_host_section "${1}" || {
log "Validation of host section failed"
return
}
if [ "${enabled}" -ne 1 ] || [ -z "${dm_parent}" ]; then
return
fi
validate_client_section "${dm_parent}" || {
log "Validation of client section failed"
return
}
if [ "${enabled}" -ne 1 ]; then
return
fi
service_name=$(uci -q get ddnsmngr.${dm_parent}.service_name)
if [ -z "${service_name}" ]; then
return
fi
service_section=$(uci show ddnsmngr | grep "service=\'${service_name}\'" | cut -d'.' -f 2 | head -1)
if [ -z "${service_section}" ]; then
return
fi
service_enabled=$(uci -q get ddnsmngr.${service_section}.enabled)
if [ "${service_enabled}" -ne 1 ]; then
return
fi
json_init
json_add_string "interface" "${interface}"
json_add_string "service_name" "${service_name}"
json_add_string "username" "${username}"
json_add_string "password" "${password}"
json_add_string "lookup_host" "${lookup_host}"
json_add_string "ip_network" "${ip_network}"
json_add_string "use_ipv6" "${use_ipv6}"
json_add_string "force_ipversion" "${force_ipversion}"
json_add_string "use_https" "${use_https}"
json_add_string "force_dnstcp" "${force_dnstcp}"
json_add_string "config_file" "${1}"
json_add_string "config_dir" "${CONFIGPATH}"
json_str=$(json_dump)
json_cleanup
generate_inadyn_config "${json_str}"
if [ "$?" -ne 0 ]; then
return
fi
CONFIG_FILES="${CONFIG_FILES} ${1}"
if [ -z "${interface}" ]; then
if [ "${use_ipv6}" -eq 0 ]; then
interface="wan"
else
interface="wan6"
fi
fi
for intf in $CLIENT_INTFS; do
if [ "${intf}" == "${interface}" ]; then
return
fi
done
CLIENT_INTFS="${CLIENT_INTFS} ${interface}"
}
start_ddnsmngr_service() {
rm -rf $CONFIGPATH
mkdir $CONFIGPATH
mkdir -p $PIDPATH
config_load ddnsmngr
config_foreach add_object host
i=1
for conf in $CONFIG_FILES; do
instance="ddnsmngr_${i}"
i=$(( i + 1 ))
procd_open_instance $instance
procd_set_param command "$PROG"
procd_append_param command -f "${CONFIGPATH}/${conf}"
procd_append_param command -l debug
procd_append_param command -P "${PIDPATH}/${conf}"
procd_append_param command -n -C
procd_close_instance
done
}
stop_ddnsmngr_service() {
rm -rf $CONFIGPATH
return 0
}
add_ddnsmngr_triggers() {
procd_open_trigger
for intf in $CLIENT_INTFS; do
# No need to handle other ifevents like ifupdate etc
procd_add_interface_trigger "interface.*.up" $intf /etc/init.d/ddnsmngr restart
done
procd_close_trigger
}

View File

@@ -2,6 +2,6 @@ menu "Configuration"
config DECOLLECTOR_EASYMESH_VERSION
int "Support Easymesh version"
default 4
default 6
endmenu

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=4.2.1.1
PKG_VERSION:=6.0.0.10
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ae836adb0779979686d0dad34b941f319ffed1b8
PKG_SOURCE_VERSION:=43abd0d735ff0e0961226ced376545c1d4736952
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -29,7 +29,7 @@ define Package/decollector
CATEGORY:=Utilities
TITLE:=WiFi DataElements Collector Proxy
DEPENDS:=+libuci +libubox +ubus +libpthread +libnl-genl \
+libeasy +libwifiutils +libieee1905 +map-plugin
+libeasy +libwifiutils +libieee1905 +ieee1905-map-plugin
endef
define Package/decollector/description

View File

@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.6.4
PKG_VERSION:=3.6.6
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d9cc11c81ce1ff625e4e789afa180b301c7fcf74
PKG_SOURCE_VERSION:=85c173d1fac535726b2e750be8c282b74fb7dbca
PKG_MIRROR_HASH:=skip
endif

View File

@@ -11,8 +11,6 @@ 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)"
# 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)
@@ -64,8 +62,6 @@ start_service() {
dcx81_uart_device=/dev/ttyH0
fi
[ -n "$DECT_GPIO" ] && echo 1 > /sys/class/gpio/gpio${DECT_GPIO}/value
rfpi=$(db -q get hw.board.dect_rfpi)
[ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi"
@@ -112,7 +108,6 @@ start_service() {
stop_service() {
has_dect || return 0
[ -n "$DECT_GPIO" ] && echo 0 > /sys/class/gpio/gpio${DECT_GPIO}/value
stop_and_wait_dectmngr
}
@@ -126,11 +121,6 @@ service_triggers() {
}
boot() {
[ -n "$DECT_GPIO" ] && {
echo ${DECT_GPIO} > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio${DECT_GPIO}/direction
}
[ ! -d $LOG_PATH ] && mkdir -p $LOG_PATH
[ ! -d $DB_PATH ] && mkdir -p $DB_PATH
start

50
dhcpmngr/Makefile Normal file
View File

@@ -0,0 +1,50 @@
#
# Copyright (C) 2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpmngr
PKG_VERSION:=1.0.2
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dhcpmngr.git
PKG_SOURCE_VERSION:=4c89a3f12686343e3cca23819255744ac06dfb22
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
MAKE_PATH:=src
define Package/dhcpmngr
SECTION:=net
CATEGORY:=Network
TITLE:=Package to add Device.DHCPv4 and v6 data model support.
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +dnsmasq
endef
define Package/dhcpmngr/description
Package to add Device.DHCPv4. and Device.DHCPv6. data model support.
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/dhcpmngr/* $(PKG_BUILD_DIR)/
endef
endif
define Package/dhcpmngr/install
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_lease_start_time.user $(1)/etc/udhcpc.user.d/udhcpc_lease_start_time.user
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libdhcpmngr.so $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,dhcpmngr))

View File

@@ -0,0 +1,14 @@
#!/bin/sh
leasestarttime="$(awk -F'.' '{print $1}' /proc/uptime 2> /dev/null)"
target_file=/tmp/dhcp_client_info
target_str="$INTERFACE $lease $leasestarttime"
# if this interface is present in file, then replace it
if grep -q "$INTERFACE" "$target_file" 2> /dev/null; then
# replace the whole line if pattern matches
sed -i "/${INTERFACE}/c\\${target_str}" "$target_file"
else
# interface info was not present, append it to the file
echo "$target_str" >> "$target_file"
fi

49
dnsmngr/Makefile Normal file
View File

@@ -0,0 +1,49 @@
#
# Copyright (C) 2022-2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmngr
PKG_VERSION:=1.0.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
PKG_SOURCE_VERSION:=03d8d79c1221adb92b5789c03e2489d26c6ae184
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
MAKE_PATH:=src
define Package/dnsmngr
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +dnsmasq +umdns
TITLE:=Package to add Device.DNS. datamodel support
endef
define Package/dnsmngr/description
Package to add Device.DNS. datamodel support.
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/dnsmngr/* $(PKG_BUILD_DIR)/
endef
endif
define Package/dnsmngr/install
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libdnsmngr.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_SCRIPT) -d $(PKG_BUILD_DIR)/scripts/nslookup $(1)
endef
$(eval $(call BuildPackage,dnsmngr))

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2018 iopsys Software Solutions AB
# Copyright (C) 2018-2024 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,14 +8,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.2.0
PKG_VERSION:=1.2.4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=43dec92b1c86be7859521da337e7bd1168848b26
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/dslmngr.git
PKG_SOURCE_VERSION:=d71bef278b8222dee1c278723f8264aa8faf5e40
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_MIRROR_HASH:=skip
endif
@@ -25,6 +26,7 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
@@ -38,7 +40,7 @@ define Package/dslmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=XDSL status and configration utility
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy +libbbfdm-api
endef
define Package/dslmngr/description
@@ -59,7 +61,7 @@ MAKE_FLAGS += \
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/dslmngr/ $(PKG_BUILD_DIR)/
rsync -r --exclude=.* ./dslmngr/ $(PKG_BUILD_DIR)/
endef
endif
@@ -68,12 +70,14 @@ define Build/Compile
endef
define Package/dslmngr/install
$(INSTALL_DIR) $(1)/etc/dsl
$(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/
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libbbfdsl.so $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,dslmngr))

View File

@@ -211,8 +211,8 @@ create_ptm_devices() {
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
ebtables --concurrent -t nat -D POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
ebtables --concurrent -t nat -A POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
}
xtm_remove_devices() {

View File

@@ -48,10 +48,10 @@ validate_rule_section()
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(ebtables -t broute -L BROUTING|grep -m 1 mark)
local rule=$(ebtables --concurrent -t broute -L BROUTING|grep -m 1 mark)
while [ -n "${rule}" ]; do
exec_log ebtables -t broute -D BROUTING ${rule}
rule=$(ebtables -t broute -L BROUTING|grep -m 1 mark)
exec_log ebtables --concurrent -t broute -D BROUTING ${rule}
rule=$(ebtables --concurrent -t broute -L BROUTING|grep -m 1 mark)
done
}
@@ -86,7 +86,7 @@ create_rule() {
cmd="-p ip $cmd"
cmd="-s ${mac} $cmd"
exec_log ebtables -t broute -A BROUTING ${cmd}
exec_log ebtables --concurrent -t broute -A BROUTING ${cmd}
}
manage_rule() {

View File

@@ -0,0 +1,80 @@
#
# Copyright (C) 2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ebtables-extensions
PKG_VERSION:=1.0.2
PKG_LICENSE:=GPL-2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a23a70f5518a42d663156a156c1e3356f695b5ad
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ebtables-extensions.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
include $(INCLUDE_DIR)/package.mk
define KernelPackage/vlantranslation
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables VLAN translation
FILES:=$(PKG_BUILD_DIR)/src/ebt_vlantranslation.ko
DEPENDS+=+kmod-ebtables
AUTOLOAD:=$(call AutoLoad,30,ebt_vlantranslation,1)
KCONFIG:=
endef
define KernelPackage/dscp2pbit
SUBMENU:=Other modules
TITLE:=Kernel module for DSCP-to-Pbit mapping
DEPENDS+=+kmod-ebtables
FILES:=$(PKG_BUILD_DIR)/src/ebt_dscp2pbit.ko
AUTOLOAD:=$(call AutoLoad,30,ebt_dscp2pbit,1)
KCONFIG:=
endef
define KernelPackage/vlantranslation/description
Kernel module to enable VLAN translation for ebtables
endef
define KernelPackage/dscp2pbit/description
Kernel module to enableDSCP-to-Pbit mapping for ebtables
endef
ifeq ($(CONFIG_TARGET_brcmbca),y)
include ../../broadcom/bcmkernel/bcm-kernel-toolchain.mk
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./src/* $(PKG_BUILD_DIR)/
$(CP) $(PKG_BUILD_DIR)/src/ebt_vlantranslation.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_dscp2pbit.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
endef
else
define Build/Prepare
$(Build/Prepare/Default)
$(CP) $(PKG_BUILD_DIR)/src/ebt_vlantranslation.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_dscp2pbit.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
endef
endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_vlantranslation.h $(1)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_dscp2pbit.h $(1)/include/uapi/linux/netfilter_bridge/
endef
KERNEL_MAKE_FLAGS += -I$(LINUX_DIR)/include
define Build/Compile
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)/src" modules
endef
$(eval $(call KernelPackage,vlantranslation))
$(eval $(call KernelPackage,dscp2pbit))

9
ethmngr/Config.in Normal file
View File

@@ -0,0 +1,9 @@
if (PACKAGE_ethmngr)
menu "Configurations"
config TR181_VENDOR_EXTENSIONS_MACVLAN
bool "Use TR181 vendor extension MACVLAN"
default y
endmenu
endif

View File

@@ -1,29 +1,33 @@
#
# Copyright (C) 2020 Iopsys
# Copyright (C) 2020-2024 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=2.1.1
PKG_VERSION:=2.1.7
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b81d06867d895245ef47004c6949f9d6dedd10ef
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
PKG_SOURCE_VERSION:=d029ce86fe99b7896f096f68eda3f6caa000ee5f
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@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:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/ethmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ethernet status and configration utility
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl +libeasy +libbbfdm-api
endef
define Package/ethmngr/description
@@ -32,10 +36,25 @@ define Package/ethmngr/description
It uses APIs from the libethernet.so library.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./ethmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
-D_GNU_SOURCE \
-DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
ifeq ($(CONFIG_TR181_VENDOR_EXTENSIONS_MACVLAN),y)
TARGET_CFLAGS += -DTR181_VENDOR_EXTENSIONS_MACVLAN
endif
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_ipq53xx)$(CONFIG_TARGET_mediatek),)
define Build/Compile
@@ -44,9 +63,15 @@ endif
define Package/ethmngr/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/etc/ethmngr
$(INSTALL_DIR) $(1)/etc/ethmngr/plugins
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_ipq53xx)$(CONFIG_TARGET_mediatek),)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
endif
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libbbfethernet.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_TR181_VENDOR_EXTENSIONS_MACVLAN),y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/libbbfethernetmacvlan.so $(1) $(PKG_NAME)
endif
endef

View File

@@ -0,0 +1,23 @@
#!/bin/sh
[ -n "$PORT" -a -n "$LINK" ] || exit 0
case "$PORT" in
# do not generate ethport ubus event
# for wifi, dsl and brige devices
wl*|wds*|atm*|ptm*|br-*)
exit 0
;;
esac
speed=0
duplex=full
if [ "$LINK" = "up" ]; then
devspeed="$(ubus -t 2 call network.device status "{\"name\":\"$PORT\"}" | jsonfilter -e @.speed)"
speed=${devspeed:0:-1}
duplex=${devspeed:0-1}
[ "$duplex" == "H" ] && duplex="half" || duplex="full"
fi
ubus send ethport "{\"ifname\":\"$PORT\",\"link\":\"$LINK\",\"speed\":\"$speed\",\"duplex\":\"$duplex\"}"

View File

@@ -0,0 +1,20 @@
{
"ethport_update": {
"if" : [
{
"event": "network.device"
}
],
"then" : [
{
"cli": "/sbin/hotplug-call ethernet",
"envs": {
"PORT": "&network.device->ifname",
"LINK": "&network.device->link"
},
"timeout": 1
}
]
}
}

View File

@@ -0,0 +1,2 @@
uci -q set ruleng.ethport=rule
uci -q set ruleng.ethport.recipe='/etc/ruleng/ethport.json'

12
firewallmngr/Config.in Normal file
View File

@@ -0,0 +1,12 @@
if PACKAGE_firewallmngr
menu "Configuration"
config FIREWALLMNGR_PORT_TRIGGER
bool "Include Device.NAT.PortTrigger"
default y
help
Set this option to include support for PortTrigger object.
endmenu
endif

68
firewallmngr/Makefile Normal file
View File

@@ -0,0 +1,68 @@
#
# Copyright (C) 2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=firewallmngr
PKG_VERSION:=1.0.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/firewallmngr.git
PKG_SOURCE_VERSION:=f5c3e2c93a8a992ab24291eb2c67adf77de7f896
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
MAKE_PATH:=src
define Package/firewallmngr
SECTION:=net
CATEGORY:=Network
TITLE:=Package to add Device.Firewall and Device.NAT. data model support.
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +firewall
DEPENDS+=+FIREWALLMNGR_PORT_TRIGGER:kmod-ipt-trigger +FIREWALLMNGR_PORT_TRIGGER:kmod-ip6t-trigger
DEPENDS+=+FIREWALLMNGR_PORT_TRIGGER:iptables-mod-nfqueue
endef
define Package/firewallmngr/description
Package to add Device.Firewall. and Device.NAT. data model support.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/firewallmngr/* $(PKG_BUILD_DIR)/
endef
endif
ifeq ($(CONFIG_FIREWALLMNGR_PORT_TRIGGER),y)
TARGET_CFLAGS += -DINCLUDE_PORT_TRIGGER
endif
define Package/firewallmngr/install
$(INSTALL_DIR) $(1)/etc/config
ifeq ($(CONFIG_FIREWALLMNGR_PORT_TRIGGER),y)
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/lib/port-trigger
$(INSTALL_BIN) ./files/port-trigger/etc/init.d/port-trigger $(1)/etc/init.d/
$(INSTALL_DATA) ./files/port-trigger/etc/config/port-trigger $(1)/etc/config/
$(INSTALL_DATA) ./files/port-trigger/lib/port-trigger/port_trigger.sh $(1)/lib/port-trigger/
endif
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libfirewallmngr.so $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,firewallmngr))

View File

@@ -0,0 +1 @@
#port trigger uci file

View File

@@ -0,0 +1,21 @@
#!/bin/sh /etc/rc.common
START=65
STOP=20
USE_PROCD=1
. /lib/port-trigger/port_trigger.sh
start_service() {
port_trigger_handling
}
service_triggers()
{
procd_add_reload_trigger firewall
procd_add_reload_trigger port-trigger
}
reload_service() {
start
}

View File

@@ -0,0 +1,157 @@
#!/bin/sh
. /lib/functions.sh
process_port_trigger() {
local rule_id="$1"
local is_enabled=""
local duration=""
local trigger_dport=""
local trigger_dport_end=""
local protocol=""
local interface=""
local open_dport=""
local open_dport_end=""
local open_protocol=""
local ptg_id=""
local IP_RULE=""
local IP6_RULE=""
local IP_RULE_FWD=""
get_port_trigger() {
local ptg_name
config_get ptg_name "$1" "name"
if [ "$ptg_name" == "$2" ]; then
ptg_id="$1"
return
fi
}
ptg_id=""
config_get name "$rule_id" "port_trigger"
config_foreach get_port_trigger "port_trigger" "$name"
[ -z "$ptg_id" ] && return
is_enabled=$(uci -q get port-trigger."$ptg_id".enable)
if [ -z "$is_enabled" ] || [ "$is_enabled" = "0" ]; then
return
fi
protocol=$(uci -q get port-trigger."$ptg_id".protocol)
[ -z "$protocol" ] && return
if [ "$protocol" = "UDP" ] || [ "$protocol" = "udp" ]; then
IP_RULE="$IP_RULE -p udp"
IP6_RULE="$IP6_RULE -p udp"
IP_RULE_FWD="$IP_RULE_FWD -p udp"
elif [ "$protocol" = "TCP" ] || [ "$protocol" = "tcp" ]; then
IP_RULE="$IP_RULE -p tcp"
IP6_RULE="$IP6_RULE -p tcp"
IP_RULE_FWD="$IP_RULE_FWD -p tcp"
else
return
fi
trigger_dport=$(uci -q get port-trigger."$ptg_id".port)
[ -z "$trigger_dport" ] && return
IP_RULE="$IP_RULE --dport $trigger_dport"
IP6_RULE="$IP6_RULE --dport $trigger_dport"
trigger_dport_end=$(uci -q get port-trigger."$ptg_id".end_port_range)
if [ -n "$trigger_dport_end" ]; then
IP_RULE="$IP_RULE:$trigger_dport"
IP6_RULE="$IP6_RULE:$trigger_dport"
fi
config_get open_protocol "$rule_id" "protocol"
if [ "$open_protocol" = "UDP" ] || [ "$open_protocol" = "udp" ]; then
IP_RULE="$IP_RULE -j TRIGGER --trigger-type out --trigger-proto udp"
IP6_RULE="$IP6_RULE -j TRIGGER --trigger-type out --trigger-proto udp"
elif [ "$open_protocol" = "TCP" ] || [ "$open_protocol" = "tcp" ]; then
IP_RULE="$IP_RULE -j TRIGGER --trigger-type out --trigger-proto tcp"
IP6_RULE="$IP6_RULE -j TRIGGER --trigger-type out --trigger-proto tcp"
else
return
fi
config_get open_dport "$rule_id" "port"
[ -z "$open_dport" ] && return
IP_RULE="$IP_RULE --trigger-match $open_dport"
IP6_RULE="$IP6_RULE --trigger-match $open_dport"
IP_RULE_FWD="$IP_RULE_FWD --dport $open_dport"
config_get open_dport_end "$rule_id" "end_port_range"
if [ -z "$open_dport_end" ]; then
IP_RULE="$IP_RULE --trigger-relate $open_dport"
IP6_RULE="$IP6_RULE --trigger-relate $open_dport"
else
IP_RULE="$IP_RULE-$open_dport_end --trigger-relate $open_dport-$open_dport_end"
IP6_RULE="$IP6_RULE-$open_dport_end --trigger-relate $open_dport-$open_dport_end"
IP_RULE_FWD="$IP_RULE_FWD:$open_dport_end"
fi
duration=$(uci -q get port-trigger."$ptg_id".auto_disable_duration)
if [ -n "$duration" ]; then
IP_RULE="$IP_RULE --trigger-timeout $duration"
IP6_RULE="$IP6_RULE --trigger-timeout $duration"
fi
interface=$(uci -q get port-trigger."$ptg_id".src)
[ -z "$interface" ] && return
device=$(uci -q get network.$interface.device)
IP_RULE_1="iptables -w -t nat -A prerouting_porttrigger -i $device $IP_RULE"
echo "$IP_RULE_1">>/tmp/port_trigger_iptables
IP_RULE_1="ip6tables -w -t nat -A prerouting_porttrigger -i $device $IP6_RULE"
echo "$IP_RULE_1">>/tmp/port_trigger_ip6tables
if [ -n "$duration" ]; then
echo "iptables -w -t filter -A forwarding_wan_porttrigger $IP_RULE_FWD -j TRIGGER --trigger-type in --trigger-timeout $duration">>/tmp/port_trigger_iptables
echo "ip6tables -w -t filter -A forwarding_wan_porttrigger $IP_RULE_FWD -j TRIGGER --trigger-type in --trigger-timeout $duration">>/tmp/port_trigger_ip6tables
echo "iptables -w -t nat -A prerouting_wan_porttrigger $IP_RULE_FWD -j TRIGGER --trigger-type dnat --trigger-timeout $duration">>/tmp/port_trigger_iptables
else
echo "iptables -w -t filter -A forwarding_wan_porttrigger $IP_RULE_FWD -j TRIGGER --trigger-type in">>/tmp/port_trigger_iptables
echo "ip6tables -w -t filter -A forwarding_wan_porttrigger $IP_RULE_FWD -j TRIGGER --trigger-type in">>/tmp/port_trigger_ip6tables
echo "iptables -w -t nat -A prerouting_wan_porttrigger $IP_RULE_FWD -j TRIGGER --trigger-type dnat">>/tmp/port_trigger_iptables
fi
}
port_trigger_handling() {
rm /tmp/port_trigger_iptables 2> /dev/null
rm /tmp/port_trigger_ip6tables 2> /dev/null
touch /tmp/port_trigger_iptables
touch /tmp/port_trigger_ip6tables
echo "iptables -w -t nat -F prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "iptables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "iptables -w -t nat -F prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "ip6tables -w -t nat -F prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
echo "ip6tables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
echo "iptables -w -t nat -N prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
ret=$?
[ $ret -eq 0 ] && echo "iptables -w -t nat -I PREROUTING -j prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "iptables -w -t filter -N forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
ret=$?
[ $ret -eq 0 ] && echo "iptables -w -t filter -I forwarding_wan_rule -j forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "iptables -w -t nat -N prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
ret=$?
[ $ret -eq 0 ] && echo "iptables -w -t nat -I prerouting_wan_rule -j prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "ip6tables -w -t nat -N prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
ret=$?
[ $ret -eq 0 ] && echo "ip6tables -w -t nat -I PREROUTING -j prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
echo "ip6tables -w -t filter -N forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
ret=$?
[ $ret -eq 0 ] && echo "ip6tables -w -t filter -I forwarding_wan_rule -j forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
# Load /etc/config/port-trigger UCI file
config_load port-trigger
config_foreach process_port_trigger rule
sh /tmp/port_trigger_iptables
sh /tmp/port_trigger_ip6tables
}

165
fluentbit/Makefile Normal file
View File

@@ -0,0 +1,165 @@
#
# Copright (C) 2018 The Internet Foundation In Sweden
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fluentbit
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
PKG_SOURCE_VERSION:=v3.0.5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/fluentbit
CATEGORY:=Utilities
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts
TITLE:=FluentBit
endef
define Package/fluentbit/description
Fluent Bit is a super fast, lightweight, and highly scalable logging and metrics processor and forwarder.
endef
# General options
TARGET_LDFLAGS+=-lfts -latomic
CMAKE_OPTIONS+= \
-DFLB_RELEASE=Yes \
-DFLB_SMALL=Yes \
-DEXCLUDE_FROM_ALL=true \
-DBUILD_SHAREDD_LIBS=Yes \
-DFLB_DEBUG=No \
-DFLB_ALL=No \
-DFLB_JEMALLOC=No \
-DFLB_EXAMPLES=No \
-DFLB_CHUNK_TRACE=No \
-DFLB_BACKTRACE=No \
-DFLB_WASM=No \
-DFLB_LUAJIT=No
# In plugins
CMAKE_OPTIONS += \
-DFLB_IN_SYSLOG=Yes \
-DFLB_IN_CPU=Yes \
-DFLB_IN_MEM=Yes \
-DFLB_IN_DISK=Yes \
-DFLB_IN_EXEC=Yes \
-DFLB_IN_HEAD=Yes \
-DFLB_IN_FORWARD=No \
-DFLB_IN_KMSG=No \
-DFLB_IN_PROC=No \
-DFLB_IN_RANDOM=No \
-DFLB_IN_SERIAL=No \
-DFLB_IN_MQTT=No \
-DFLB_IN_STDIN=No \
-DFLB_IN_SYSTEMD=No \
-DFLB_IN_TAIL=No \
-DFLB_IN_TCP=No \
-DFLB_IN_THERMAL=No \
-DFLB_IN_UDP=No \
-DFLB_IN_DOCKER=No \
-DFLB_IN_EXEC_WASI=No \
-DFLB_IN_EVENT_TYPE=No \
-DFLB_IN_FLUENTBIT_METRICS=No \
-DFLB_IN_KUBERNETES_EVENTS=No \
-DFLB_IN_KAFKA=No \
-DFLB_IN_LIB=No \
-DFLB_IN_SYSTEMD=No \
-DFLB_IN_DUMMY=No \
-DFLB_IN_NETIF=No \
-DFLB_IN_COLLECTD=No \
-DFLB_IN_PROMETHEUS_SCRAPE=No \
-DFLB_IN_STATSD=No \
-DFLB_IN_STORAGE_BACKLOG=No \
-DFLB_IN_PODMAN_METRICS=No \
-DFLB_IN_OPENTELEMETRY=No \
-DFLB_IN_ELASTICSEARCH=No \
-DFLB_IN_CALYPTIA_FLEET=No \
-DFLB_IN_SPLUNK=No
-DFLB_IN_HEALTH=No \
-DFLB_IN_WINLOG=No \
-DFLB_IN_WINEVTLOG=No
# Filter options
CMAKE_OPTIONS +=
-DFLB_FILTER_AWS=No \
-DFLB_FILTER_ECS=No \
-DFLB_FILTER_KUBERNETES=No \
-DFLB_FILTER_LUA=No \
-DFLB_FILTER_NEST=No \
-DFLB_FILTER_RECORD_MODIFIER=No \
-DFLB_FILTER_THROTTLE=No \
-DFLB_FILTER_TYPE_CONVERTER=No \
-DFLB_FILTER_WASM=No \
-DFLB_FILTER_TENSORFLOW=No \
-DFLB_FILTER_GEOIP2=No \
-DFLB_FILTER_NIGHTFALL=No
# out plugins
CMAKE_OPTIONS += \
-DFLB_OUT_EXIT=Yes \
-DFLB_OUT_FORWARD=Yes \
-DFLB_OUT_HTTP=Yes \
-DFLB_OUT_NATS=Yes \
-DFLB_OUT_TCP=Yes \
-DFLB_OUT_UDP=Yes \
-DFLB_OUT_FILE=Yes \
-DFLB_OUT_STDOUT=Yes \
-DFLB_OUT_SYSLOG=Yes \
-DFLB_OUT_NULL=Yes \
-DFLB_OUT_PLOT=No \
-DFLB_OUT_AZURE=No \
-DFLB_OUT_AZURE_BLOB=No \
-DFLB_OUT_AZURE_LOGS_INGESTION=No \
-DFLB_OUT_AZURE_KUSTO=No \
-DFLB_OUT_BIGQUERY=No \
-DFLB_OUT_CALYPTIA=No \
-DFLB_OUT_COUNTER=No \
-DFLB_OUT_DATADOG=No \
-DFLB_OUT_ES=No \
-DFLB_OUT_GELF=No \
-DFLB_OUT_INFLUXDB=No \
-DFLB_OUT_NRLOGS=No \
-DFLB_OUT_OPENSEARCH=No \
-DFLB_OUT_TD=No \
-DFLB_OUT_SKYWALKING=No \
-DFLB_OUT_SLACK=No \
-DFLB_OUT_SPLUNK=No \
-DFLB_OUT_STACKDRIVER=No \
-DFLB_OUT_LIB=No \
-DFLB_OUT_FLOWCOUNTER=No \
-DFLB_OUT_LOGDNA=No \
-DFLB_OUT_LOKI=No \
-DFLB_OUT_KAFKA=No \
-DFLB_OUT_KAFKA_REST=No \
-DFLB_OUT_CLOUDWATCH_LOGS=No \
-DFLB_OUT_KINESIS_FIREHOSE=No \
-DFLB_OUT_KINESIS_STREAMS=No \
-DFLB_OUT_OPENTELEMETRY=No \
-DFLB_OUT_PROMETHEUS_EXPORTER=No \
-DFLB_OUT_PROMETHEUS_REMOTE_WRITE=No \
-DFLB_OUT_S3=No \
-DFLB_OUT_VIVO_EXPORTER=No \
-DFLB_OUT_WEBSOCKET=No \
-DFLB_OUT_ORACLE_LOG_ANALYTICS=No \
-DFLB_OUT_CHRONICLE=No \
-DFLB_OUT_PGSQL=No
define Package/fluentbit/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/fluent-bit $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,fluentbit))

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_brcmbca):bcm963xx-bsp
PKG_LICENSE:=GPLv2
PKG_LICENSE_URL:=
endef

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.1.4
PKG_VERSION:=1.2.6
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=edb5bbe57c5bc83035e217c73071c9b3e878dc22
PKG_SOURCE_VERSION:=aa365710b227ba82b1c43f9cdf497261edb21852
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -22,7 +22,7 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/hostmngr
SECTION:=utils
@@ -31,7 +31,8 @@ define Package/hostmngr
DEPENDS= +libubox +libuci +libubus +ubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +libnfnetlink +libmnl \
+libnetfilter-conntrack \
+HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libbbfdm-api
+HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libbbfdm-api \
+libwifiutils
endef
@@ -57,14 +58,12 @@ endif
MAKE_PATH:=src
define Package/hostmngr/install
$(CP) ./files/* $(1)/
$(CP) ./files/etc $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/hostmngr/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1)/etc/hostmngr/
$(INSTALL_DATA) ./files/etc/hostmngr/input.json $(1)/etc/hostmngr/
$(INSTALL_DIR) $(1)/usr/share/hostmngr
$(INSTALL_DATA) ./files/scripts/hosts_acl.sh $(1)/usr/share/hostmngr/
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1) $(PKG_NAME)
endef
ifeq ($(LOCAL_DEV),1)

View File

@@ -1,16 +0,0 @@
{
"daemon": {
"input": {
"type": "DotSo",
"name": "/etc/hostmngr/libhostmngr.so"
},
"output": {
"type": "UBUS",
"name": "bbfdm.hosts",
"parent_dm": "Device.",
"object": "Hosts",
"root_obj": "bbfdm"
}
}
}

View File

@@ -3,12 +3,8 @@
START=65
STOP=20
. /etc/bbfdm/bbfdm_services.sh
USE_PROCD=1
HOSTS_JSON_INPUT="/etc/hostmngr/input.json"
start_service() {
procd_open_instance
procd_set_param command "/usr/sbin/hostmngr" "--config hosts" "-o" "/tmp/hostmngr.log" "-f"
@@ -18,7 +14,6 @@ start_service() {
# procd_set_param stderr 1
procd_close_instance
bbfdm_add_service "bbfdm.hosts" "${HOSTS_JSON_INPUT}"
sh /usr/share/hostmngr/hosts_acl.sh
}

View File

@@ -5,6 +5,9 @@
day=""
next_days=""
prev_days=""
schedule_added=""
ACCESS_RULE=""
IP_RULE=""
IP_RULE1=""
@@ -108,70 +111,77 @@ ip_rule_east_zone() {
fi
}
process_ac_schedule() {
local acs_id="$1"
local is_enabled
local access_control
local start_time=""
local mac=""
add_access_rule() {
local rule="$1"
echo "iptables -w -A hosts_forward ${rule}" >> $ACL_FILE
echo "ip6tables -w -A hosts_forward ${rule}" >> $ACL_FILE
}
handle_day_list() {
local value=$1
handle_day_list() {
local value=$1
val=$(echo $value | cut -c 1-3)
next_day_val=$(get_next_day $val)
prev_day_val=$(get_previous_day $val)
if [ -z $day ]; then
day="$val"
next_days="$next_day_val"
prev_days="$prev_day_val"
else
day="$day,$val"
next_days="$next_days,$next_day_val"
prev_days="$prev_days,$prev_day_val"
fi
}
val=$(echo $value | cut -c 1-3)
next_day_val=$(get_next_day $val)
prev_day_val=$(get_previous_day $val)
if [ -z $day ]; then
day="$val"
next_days="$next_day_val"
prev_days="$prev_day_val"
else
day="$day,$val"
next_days="$next_days,$next_day_val"
prev_days="$prev_days,$prev_day_val"
fi
}
config_list_foreach "$acs_id" "day" handle_day_list
config_get is_enabled "$acs_id" "enable" 1
config_get access_control "$acs_id" "dm_parent"
handle_schedule() {
local schd_section="$1"
local ac_section="$2"
local acs_id
local start_time
local duration
if [ "$is_enabled" == "0" ] || [ -z "$access_control" ]; then
return
IP_RULE="$ACCESS_RULE"
IP_RULE1=""
day=""
next_days=""
prev_days=""
config_get acs_id "$schd_section" "dm_parent"
if [ "$acs_id" != "$ac_section" ]; then
return # schedule not for this access control section
fi
IP_RULE=""
IP_RULE1=""
config_get is_enabled "$access_control" "enable" 1
local is_enabled
config_get is_enabled "$schd_section" "enable" 0
if [ "$is_enabled" == "0" ]; then
return
fi
mac=$(uci -q get hosts.$access_control.macaddr)
access_policy=$(uci -q get hosts.$access_control.access_policy)
local all_days="Monday Tuesday Wednesday Thursday Friday Saturday Sunday"
local day_config
config_get day_config "$schd_section" "day" "$all_days"
config_get start_time "$acs_id" "start_time"
config_get duration "$acs_id" "duration"
IFS=" "
for d in $day_config; do
handle_day_list $d
done
if [ -z "$mac" ] && [ -z "$start_time" ] && [ -z "$duration" ] && [ -z "$day" ] && [ -z "$access_policy" ]; then
return
fi
if [ -n "$mac" ]; then
IP_RULE="$IP_RULE -m mac --mac-source $mac"
fi
config_get start_time "$schd_section" "start_time" "00:00"
config_get duration "$schd_section" "duration"
zone=$(date +%z | cut -c 1)
local_start_time=$start_time
if [ -n "$duration" ]; then
hh=$(echo $local_start_time | awk -F: '{ print $1 }')
mm=$(echo $local_start_time | awk -F: '{ print $2 }')
hh_s=`expr $hh \* 3600`
mm_s=`expr $mm \* 60`
ss=$(( hh_s + mm_s ))
local_start_hh=$hh
hh=$(echo $local_start_time | awk -F: '{ print $1 }')
mm=$(echo $local_start_time | awk -F: '{ print $2 }')
hh_s=`expr $hh \* 3600`
mm_s=`expr $mm \* 60`
ss=$(( hh_s + mm_s ))
local_start_hh=$hh
if [ -n "$duration" ]; then
stop_ss=$(( ss + duration ))
hh=$(( stop_ss / 3600 ))
rem_ss=$(( stop_ss % 3600 ))
@@ -179,6 +189,10 @@ process_ac_schedule() {
ss=$(( rem_ss % 60 ))
local_stop_time="$hh:$mm:$ss"
local_stop_hh=$hh
else
# if duartion is not specified, then apply rule to end of the day
local_stop_time="23:59:59"
local_stop_hh="23"
fi
utc_start_time=$(date -u -d @$(date "+%s" -d "$local_start_time") +%H:%M)
@@ -191,43 +205,95 @@ process_ac_schedule() {
ip_rule_east_zone $utc_start_hh $utc_stop_hh $local_start_hh $local_stop_hh $utc_start_time $utc_stop_time
fi
if [ "$access_policy" == "Deny" ]; then
IP_RULE="$IP_RULE -j DROP"
if [ -n "$IP_RULE1" ]; then
IP_RULE1="$IP_RULE1 -j DROP"
fi
else
IP_RULE="$IP_RULE -j ACCEPT"
if [ -n "$IP_RULE1" ]; then
IP_RULE1="$IP_RULE1 -j ACCEPT"
fi
fi
iptables -w -A hosts_forward ${IP_RULE}
ip6tables -w -A hosts_forward ${IP_RULE}
IP_RULE="$IP_RULE -j ACCEPT"
if [ -n "$IP_RULE1" ]; then
iptables -w -A hosts_forward ${IP_RULE1}
ip6tables -w -A hosts_forward ${IP_RULE1}
IP_RULE1="$IP_RULE1 -j ACCEPT"
fi
day=""
next_days=""
prev_days=""
add_access_rule "$IP_RULE"
if [ -n "$IP_RULE1" ]; then
add_access_rule "$IP_RULE1"
fi
# for access rules to be effective for a schedule, need to add DROP rule
# to block the access outside the defined schedule
if [ "$schedule_added" == "0" ]; then
schedule_added="1"
fi
}
iptables -w -F hosts_forward
ip6tables -w -F hosts_forward
handle_access_control() {
local ac_section="$1"
local is_enabled
hosts_forward=$(iptables -t filter --list | grep hosts_forward)
if [ -z "$hosts_forward" ]; then
iptables -w -t filter -N hosts_forward
# default value of Hosts.AccessControl.{i}.Enable is false,
# so, if not defined in uci as 1, assume 0
config_get is_enabled "$ac_section" "enable" 0
if [ "$is_enabled" == "0" ]; then
return
fi
local mac_addr
config_get mac_addr "$ac_section" "macaddr"
if [ -z "$mac_addr" ]; then
return
else
ACCESS_RULE="-m mac --mac-source $mac_addr"
fi
local access_policy
config_get access_policy "$ac_section" "access_policy"
if [ -z "$access_policy" ]; then
return # since system default is allow so no need to do anything
fi
# As per Data Model, if access policy is deny, then schedule is to be ignored
# and no access is to be provided for the device
if [ "$access_policy" == "Deny" ]; then
ACCESS_RULE="$ACCESS_RULE -j DROP"
add_access_rule "$ACCESS_RULE"
return # no need to parse schedule
fi
schedule_added="0"
# check if schedule is defined for this access_control instance
# and if yes, create rule accordingly
config_foreach handle_schedule ac_schedule "$ac_section"
# for access rule to work, need to have default drop rule as last rule
if [ "$schedule_added" == "1" ]; then
IP_RULE="$ACCESS_RULE -j DROP"
add_access_rule "$IP_RULE"
fi
}
ACL_FILE="/tmp/hosts_access_control/access_control.rules"
rm -f $ACL_FILE
mkdir -p /tmp/hosts_access_control/
touch $ACL_FILE
echo "iptables -w -F hosts_forward" >> $ACL_FILE
echo "ip6tables -w -F hosts_forward" >> $ACL_FILE
hosts_ipv4_forward=$(iptables -t filter --list -n | grep hosts_forward)
if [ -z "$hosts_ipv4_forward" ]; then
echo "iptables -w -t filter -N hosts_forward" >> $ACL_FILE
ret=$?
[ $ret -eq 0 ] && iptables -w -t filter -I FORWARD -j hosts_forward
ip6tables -w -t filter -N hosts_forward
[ $ret -eq 0 ] && echo "iptables -w -t filter -I FORWARD -j hosts_forward" >> $ACL_FILE
fi
hosts_ipv6_forward=$(ip6tables -t filter --list -n | grep hosts_forward)
if [ -z "$hosts_ipv6_forward" ]; then
echo "ip6tables -w -t filter -N hosts_forward" >> $ACL_FILE
ret=$?
[ $ret -eq 0 ] && ip6tables -w -t filter -I FORWARD -j hosts_forward
[ $ret -eq 0 ] && echo "ip6tables -w -t filter -I FORWARD -j hosts_forward" >> $ACL_FILE
fi
# Load /etc/config/hosts UCI file
config_load hosts
config_foreach process_ac_schedule ac_schedule
config_foreach handle_access_control access_control
# apply the rules
sh $ACL_FILE

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.5.27
PKG_VERSION:=9.7.16
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=ce1f7e01f0f5e7cc3a5dfeb5378d488f3e2938a0
PKG_SOURCE_VERSION:=5d633f53df3af3e55011e0e29cd204e856529f3e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -26,68 +26,21 @@ include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include ../bbfdm/bbfdm.mk
define Package/icwmp/default
define Package/icwmp
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 +libuuid +libbbfdm-api +libopenssl
endef
define Package/icwmp
$(Package/icwmp/default)
VARIANT:=default
DEFAULT_VARIANT:=1
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
endef
define Package/icwmp-openssl
$(Package/icwmp/default)
TITLE += (openssl)
VARIANT:=openssl
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
CONFLICTS := icwmp icwmp-mbedtls icwmp-wolfssl
endef
define Package/icwmp-wolfssl
$(Package/icwmp/default)
TITLE += (wolfssl)
VARIANT:=wolfssl
DEPENDS += +PACKAGE_icwmp-wolfssl:libwolfssl
CONFLICTS := icwmp icwmp-mbedtls icwmp-openssl
endef
define Package/icwmp-mbedtls
$(Package/icwmp/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_icwmp-mbedtls:libmbedtls
VARIANT:=mbedtls
CONFLICTS := icwmp icwmp-wolfssl icwmp-openssl
endef
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 ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/icwmp/* $(PKG_BUILD_DIR)/
endef
endif
define Package/icwmp/default/install
define Package/icwmp/install
$(INSTALL_DIR) $(1)/etc/icwmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
@@ -103,18 +56,10 @@ define Package/icwmp/default/install
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/95-set-random-inform-time $(1)/etc/uci-defaults/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/CWMPManagementServer.json)
$(call BbfdmInstallPlugin,$(1),$(PKG_BUILD_DIR)/libcwmpdm.so)
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libcwmpdm.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1) $(PKG_NAME)
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

@@ -1,8 +1,7 @@
{
"json_plugin_version": 1,
"json_plugin_version": 2,
"Device.CWMPManagementServer.": {
"type": "object",
"version": "2.15",
"protocols": [
"usp"
],
@@ -11,7 +10,6 @@
"dependency": "file:/etc/config/cwmp",
"EnableCWMP": {
"type": "boolean",
"version": "2.15",
"read": true,
"write": true,
"protocols": [

View File

@@ -5,6 +5,7 @@ config acs 'acs'
option periodic_inform_interval '1800'
option periodic_inform_time '0001-01-01T00:00:00Z'
option dhcp_discovery 'enable'
#option ssl_capath "/etc/icwmpd/ca.pem"
# compression possible configs: GZIP, Deflate, Disabled
option compression 'Disabled'
#­ possible configs interval :[1:65535]

View File

@@ -9,38 +9,40 @@ PROG="/usr/sbin/icwmpd"
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
include /lib/network
log() {
echo "${@}"|logger -t cwmp.init -p info
}
regenerate_ssl_link()
{
local cert_dir all_file rehash
regenerate_ssl_link() {
local cert_dir
cert_dir="${1}"
[ ! -d "${cert_dir}" ] && return 0;
### Generate all ssl link for pem certicates ###
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
done
cert_dir="${1%/}"
if [ -f "${cert_dir}" ]; then
return 0
fi
### Generate all ssl link for crt certicates ###
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
# do not generate the c_rehash if its system default cert path
# ca-certificate package already generates c_rehash on compilation
[ ! -d "${cert_dir}" ] || [ "${cert_dir}" = "/etc/ssl/certs" ] && return 0
generate_links() {
local file_type="$1"
local files="${cert_dir}"/*."${file_type}"
for cfile in ${files}; do
if [ -f "${cfile}" ]; then
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
if [ ! -f "${cert_dir}/${rehash}.0" ]; then
log "Generating c_rehash for ${cfile}=>${rehash}.0"
ln -s "${cfile}" "${cert_dir}/${rehash}.0"
fi
fi
done
fi
}
generate_links "pem"
}
enable_dhcp_option43() {
@@ -436,13 +438,14 @@ validate_cpe_section()
'notification:bool' \
'exec_download:bool' \
'periodic_notify_enable:bool' \
'enable:bool' \
'enable:bool:1' \
'periodic_notify_interval:uinteger' \
'fw_upgrade_keep_settings:bool'
}
validate_defaults() {
local ssl_capath
local ssl_capath enable url dhcp_url
config_load cwmp
validate_acs_section || {
@@ -450,13 +453,17 @@ validate_defaults() {
return 1;
}
if [ -z "${url}" ] && [ -z "${dhcp_url}" ]; then
log "No ACS URL is configured"
return 1
fi
ssl_capath="${ssl_capath%/}"
# Put the cert pem file in keep list
if [ -d "${ssl_capath}" ]; then
if [ -d "${ssl_capath}" ] && [ "${ssl_capath}" != "/etc/ssl/certs" ]; then
if ! grep "*.pem\|*.crt" /lib/upgrade/keep.d/icwmp; then
echo "${ssl_capath}"'/*.pem' >> /lib/upgrade/keep.d/icwmp
echo "${ssl_capath}"'/*.crt' >> /lib/upgrade/keep.d/icwmp
echo "${ssl_capath}"'/*.0' >> /lib/upgrade/keep.d/icwmp
fi
fi
@@ -465,6 +472,11 @@ validate_defaults() {
return 1;
}
if [ "$enable" = "0" ]; then
log "CWMP service disabled"
return 1
fi
return 0;
}
@@ -512,36 +524,22 @@ boot() {
}
start_service() {
local enable_cwmp url dhcp_url
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
config_get url acs url ""
config_get dhcp_url acs dhcp_url ""
procd_open_instance icwmp
if [ "$enable_cwmp" = "0" ]; then
procd_close_instance
return 0
fi
validate_defaults || {
log "Validation of defaults failed"
procd_close_instance
return 1;
}
if [ -n "${url}" ] || [ -n "${dhcp_url}" ]; then
procd_set_param command "$PROG"
procd_append_param command -b
fi
procd_set_param command "$PROG"
procd_append_param command -b
procd_set_param respawn \
"${respawn_threshold:-5}" \
"${respawn_timeout:-10}" "${respawn_retry:-3}"
procd_set_param watch network.interface
procd_close_instance
}
@@ -553,22 +551,34 @@ stop_service()
reload_service() {
local ret
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
log "Reload service $ret"
ret="0"
if [ "$enable_cwmp" = "0" ]; then
validate_defaults || {
stop
start
return 0
fi
return 0;
}
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
if [ "$ret" != "true" ]; then
log "Reloading cwmp service ..."
stop
start
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 return
log "Skipping ubus reload due to ubus timeout"
return 0
fi
status="$(echo "${tr069_status}" | jsonfilter -qe '@.cwmp.status')"
if [ "$status" = "up" ]; then
ubus -t 1 call tr069 command '{"command":"reload"}'
fi
}

View File

@@ -0,0 +1,139 @@
#!/bin/sh
. /lib/functions.sh
CLASS=""
OUI=""
SERIAL=""
get_vivsoi() {
# opt125 environment variable has data in below format
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | enterprise-number1 |
# | |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | data-len1 | |
# +-+-+-+-+-+-+-+-+ option-data1 |
# / /
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -----
# | enterprise-number2 | ^
# | | |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
# | data-len2 | | optional
# +-+-+-+-+-+-+-+-+ option-data2 | |
# / / |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
# ~ ... ~ V
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -----
# Enterprise Id Len Sub Op SLen Data Sub Op SLen Data Sub Op SLen Data
# +-------------+-----+------+------+----+------+-----+----+-----+------+-----+----+
# | id | n | 1 | n1 | D1 | 2 | n2 | D2 | ... | 6 | n6 | D6 |
# +-------------+-----+------+------+----+------+-----+----+-----+------+-----+----+
local opt125="$1"
local len="$2"
local ent_id
#hex-string 2 character=1 Byte
# length in hex string will be twice of actual Byte length
[ "$len" -gt "8" ] || return
data="${opt125}"
rem_len="${len}"
while [ $rem_len -gt 0 ]; do
ent_id=${data:0:8}
ent_id=$(printf "%d\n" "0x$ent_id")
if [ $ent_id -ne 3561 ]; then
len_val=${data:8:2}
data_len=$(printf "%d\n" "0x$len_val")
# add 4 byte for ent_id and 1 byte for len
data_len=$(( data_len * 2 + 10 ))
# move ahead data to next enterprise id
data=${data:"${data_len}":"${rem_len}"}
rem_len=$(( rem_len - $data_len ))
continue
fi
# read the length of enterprise data
len_val=${data:8:2}
data_len=$(printf "%d\n" "0x$len_val")
# add 4 byte for ent_id and 1 byte for len
data_len=$(( data_len * 2 + 10 ))
opt_len=$(printf "%d\n" "0x$len_val")
[ $opt_len -eq 0 ] && return
# populate the option data of enterprise id
sub_data_len=$(( opt_len * 2))
# starting 10 means ahead of length field
sub_data=${data:10:"${sub_data_len}"}
# parsing of suboption of option 125
while [ $sub_data_len -gt 0 ]; do
# get the suboption id
sub_opt_id=${sub_data:0:2}
sub_opt_id=$(printf "%d\n" "0x$sub_opt_id")
# get the length of suboption
sub_opt_len=${sub_data:2:2}
sub_opt_len=$(printf "%d\n" "0x$sub_opt_len")
sub_opt_len=$(( sub_opt_len * 2 ))
# get the value of sub option starting 4 means starting after length
sub_opt_val=${sub_data:4:${sub_opt_len}}
# assign the value found in sub option
case "${sub_opt_id}" in
"4") OUI=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"5") SERIAL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"6") CLASS=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
esac
# add 2 bytes for sub_opt id and sub_opt len field
sub_opt_end=$(( sub_opt_len + 4 ))
# update the remaining sub option hex string length
sub_data_len=$((sub_data_len - sub_opt_end))
# fetch next sub option hex string
sub_data=${sub_data:${sub_opt_end}:${sub_data_len}}
done
# move ahead data to next enterprise id
data=${data:"${data_len}":"${rem_len}"}
rem_len=$(( rem_len - data_len ))
done
}
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
config_get wan_intf cpe default_wan_interface "wan"
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
if [ "${wan_intf}" == "${INTERFACE}" ]; then
if [ -n "$opt125" ]; then
len=$(printf "$opt125"|wc -c)
get_vivsoi "$opt125" "$len"
fi
mkdir -p /var/state
touch /var/state/icwmp
sec=$(uci -q -c /var/state get icwmp.gatewayinfo)
if [ -z "${sec}" ]; then
sec=$(uci -q -c /var/state add icwmp gatewayinfo)
uci -q -c /var/state rename icwmp."${sec}"="gatewayinfo"
fi
uci -q -c /var/state set icwmp.gatewayinfo.class="$CLASS"
uci -q -c /var/state set icwmp.gatewayinfo.oui="$OUI"
uci -q -c /var/state set icwmp.gatewayinfo.serial="$SERIAL"
uci -q -c /var/state commit icwmp
fi

View File

@@ -0,0 +1,141 @@
#!/bin/sh
. /lib/functions.sh
DHCP_ACS_URL=""
DHCP_PROV_CODE=""
MIN_WAIT_INVL=""
INVL_MULTIPLIER=""
log() {
echo "$@" |logger -t cwmp.update -p info
}
get_opt43() {
# Check if option value is in encapsulated form
local opt43="$1"
local len="$2"
[ "$len" -gt "2" ] || return
first_byte=${opt43:0:2}
first_byte=$(printf "%d\n" "0x$first_byte")
if [ $len -ge 4 ] && [ $first_byte -ge 1 ] && [ $first_byte -le 4 ]; then
# it is in encapsulated form
# opt43 encapsulated vendor-specific option has data in below format
# Code Len Data item Code Len Data item Code
# +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
# | T1 | n | d1 | d2 | ... | T2 | n | D1 | D2 | ... | ... |
# +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
#hex-string 2 character=1 Byte
# length in hex string will be twice of actual Byte length
data="${opt43}"
rem_len="${len}"
# parsing of suboption of option 43
while [ $rem_len -gt 0 ]; do
# get the suboption id
sub_opt_id=${data:0:2}
sub_opt_id=$(printf "%d\n" "0x$sub_opt_id")
# get the length of suboption
sub_opt_len=${data:2:2}
sub_opt_len=$(printf "%d\n" "0x$sub_opt_len")
sub_opt_len=$(( sub_opt_len * 2 ))
# get the value of sub option starting 4 means starting after length
sub_opt_val=${data:4:${sub_opt_len}}
# assign the value found in sub option
case "${sub_opt_id}" in
"1") DHCP_ACS_URL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"2") DHCP_PROV_CODE=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"3") MIN_WAIT_INVL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"4") INVL_MULTIPLIER=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
esac
# add 2 bytes for sub_opt id and sub_opt len field
sub_opt_end=$(( sub_opt_len + 4 ))
# fetch next sub option hex string
data=${data:${sub_opt_end}:${len}}
# update the remaining sub option hex string length
rem_len=$((rem_len - sub_opt_end))
done
else
DHCP_ACS_URL=$(echo -n $opt43 | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
fi
}
config_load cwmp
config_get wan_intf cpe default_wan_interface "wan"
config_get dhcp_discovery acs dhcp_discovery "0"
config_get dhcp_url acs dhcp_url ""
config_get min_wait_intvl acs dhcp_retry_min_wait_interval "0"
config_get intvl_multi acs dhcp_retry_interval_multiplier "0"
config_change=0
discovery_enable=0
if [ "$dhcp_discovery" = "1" ] || [ "$dhcp_discovery" = "true" ] || [ "$dhcp_discovery" = "enable" ]; then
discovery_enable=1
fi
if [ "$discovery_enable" = "0" ]; then
return 0
fi
if [ "${wan_intf}" == "${INTERFACE}" ]; then
if [ -n "$opt43" ]; then
len=$(printf "$opt43"|wc -c)
get_opt43 "$opt43" "$len"
fi
if [ -z "$DHCP_ACS_URL" ]; then
return 0
fi
sec=$(uci -q get cwmp.acs)
if [ -z "${sec}" ]; then
return 0
fi
if [ "${dhcp_url}" != "${DHCP_ACS_URL}" ]; then
uci -q set cwmp.acs.dhcp_url="$DHCP_ACS_URL"
config_change=1
fi
if [ -n "$MIN_WAIT_INVL" ] && [ "${MIN_WAIT_INVL}" != "${min_wait_intvl}" ]; then
uci -q set cwmp.acs.dhcp_retry_min_wait_interval="$MIN_WAIT_INVL"
config_change=1
fi
if [ -n "$INVL_MULTIPLIER" ] && [ "${INVL_MULTIPLIER}" != "${intvl_multi}" ]; then
uci -q set cwmp.acs.dhcp_retry_interval_multiplier="$INVL_MULTIPLIER"
config_change=1
fi
sec=$(uci -q get cwmp.cpe)
if [ -n "${sec}" ] && [ -n "$DHCP_PROV_CODE" ]; then
uci -q set cwmp.cpe.dhcp_provisioning_code="$DHCP_PROV_CODE"
config_change=1
fi
if [ $config_change -eq 0 ]; then
return 0
fi
# ACS url has been set, inform icwmpd to reload new configuration
sleep 10 # wait for some time to avoid interface fluctuation
ubus call uci commit '{"config":"cwmp"}'
fi

View File

@@ -1,16 +1,16 @@
#
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
# Copyright (C) 2020-2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.3.4
PKG_VERSION:=8.4.2
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=526690993c93720ee1707bba6b7a08e8c28f2dd9
PKG_SOURCE_VERSION:=4d60d4a9b55940fffa39b7799abf2a7962ae2113
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -22,6 +22,7 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/ieee1905/Default
@@ -38,7 +39,7 @@ define Package/libieee1905
$(call Package/ieee1905/Default)
TITLE:=libieee1905.so (library for CMDU and TLV handling)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json
+libjson-c +libblobmsg-json +libwifiutils
endef
define Package/ieee1905
@@ -46,7 +47,8 @@ define Package/ieee1905
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
+libieee1905 +IEEE1905_PLATFORM_HAS_WIFI:libwifi \
+libwifiutils +libbbfdm-api
endef
include $(wildcard plugins/*.mk)
@@ -60,12 +62,12 @@ define Package/libieee1905/description
endef
plugins := \
$(if $(CONFIG_PACKAGE_map-plugin),map) \
$(if $(CONFIG_PACKAGE_snoop-plugin),snoop) \
$(if $(CONFIG_PACKAGE_topology-plugin),topology)
$(if $(CONFIG_PACKAGE_ieee1905-map-plugin),map) \
$(if $(CONFIG_PACKAGE_ieee1905-snoop-plugin),snoop) \
$(if $(CONFIG_PACKAGE_ieee1905-topology-plugin),topology)
ppkg:=$(patsubst plugins/%.mk,%-plugin,$(wildcard plugins/*.mk))
ppkg:=$(patsubst plugins/%.mk,ieee1905-%-plugin,$(wildcard plugins/*.mk))
TARGET_CFLAGS += \
@@ -107,6 +109,7 @@ define Package/ieee1905/install
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ieee1905d $(1)/usr/sbin/
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/tr181/ieee1905dm.so $(1) $(PKG_NAME)
endef
define Package/libieee1905/install

View File

@@ -1,18 +1,18 @@
define Package/map-plugin
define Package/ieee1905-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)
define Package/ieee1905-map-plugin/config
if (PACKAGE_ieee1905-map-plugin)
menu "Configuration"
config MULTIAP_EASYMESH_VERSION
int "Easymesh version"
default 4
default 6
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
bool "Sync configuration between dynamic controllers in the network"
@@ -32,7 +32,7 @@ ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
endif
define Build/InstallDev/map-plugin
define Build/InstallDev/ieee1905-map-plugin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
@@ -43,7 +43,7 @@ define Build/InstallDev/map-plugin
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
endef
define Package/map-plugin/install
define Package/ieee1905-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

View File

@@ -1,11 +1,11 @@
define Package/snoop-plugin
define Package/ieee1905-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
define Package/ieee1905-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

View File

@@ -1,11 +1,11 @@
define Package/topology-plugin
define Package/ieee1905-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
define Package/ieee1905-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

View File

@@ -1,56 +0,0 @@
#
# Copyright (C) 2016 iopsys
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=inbd
PKG_VERSION:=1.2.3
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=d4e910a31039e0c0b7a539311eafcd716c36be77
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
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/inbd
CATEGORY:=Utilities
TITLE:=iopsys Netlink Bridge Daemon
URL:=
DEPENDS:=+libuci +libubus +libblobmsg-json +libnl-genl
endef
define Package/inbd/description
Application handling netlink messages from kernel and sending them out on ubus.
endef
define Package/inbd/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/inbd $(1)/usr/bin/
cp $(PKG_BUILD_DIR)/files/etc/init.d/inbd $(1)/etc/init.d/
endef
$(eval $(call BuildPackage,inbd))

View File

@@ -1,332 +0,0 @@
############
# Generic #
##########
# Build #
CONFIG_BUILD_LOG=y
CONFIG_CCACHE=y
CONFIG_DEBUG=y
CONFIG_DEVEL=y
# CONFIG_USE_SSTRIP is not set
CONFIG_USE_STRIP=y
# CONFIG_SIGNED_PACKAGES is not set
CONFIG_JSON_CYCLONEDX_SBOM=y
CONFIG_INCLUDE_CONFIG=y
# Image #
CONFIG_TARGET_CUSTOMER="IOPSYS"
CONFIG_TARGET_ROOTFS_TARGZ=y
# Although UBIFS and EXT4 images work on all non-secure-boot devices,
# squashfs is the only officially supported rootfs filesystem.
# A writable rootfs is useful for developping an debugging preinit code.
# CONFIG_TARGET_ROOTFS_UBIFS is not set
# CONFIG_TARGET_ROOTFS_EXT4FS is not set
# /etc/banner and /etc/device_info #
CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_MANUFACTURER="IOPSYS"
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
# CONFIG_TARGET_PREINIT_SUPPRESS_STDERR is not set
CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE=y
CONFIG_TARGET_PREINIT_TIMEOUT=1
# CONFIG_TARGET_PREINIT_SHOW_NETMSG is not set
# CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG is not set
CONFIG_TARGET_PREINIT_IFNAME=""
CONFIG_TARGET_PREINIT_IP=""
CONFIG_TARGET_PREINIT_NETMASK=""
CONFIG_TARGET_PREINIT_BROADCAST=""
# Mirror #
CONFIG_LOCALMIRROR="https://download.iopsys.eu/iopsys/mirror/"
##################
# IOWRT Add-ons #
################
# EasySoC HAL #
CONFIG_PACKAGE_inbd=y
CONFIG_PACKAGE_qosmngr=y
CONFIG_PACKAGE_libwifiutils=y
CONFIG_PACKAGE_wifimngr=y
# Multi-AP #
CONFIG_PACKAGE_ieee1905=y
CONFIG_IEEE1905_CMDU_SA_IS_ALMAC=y
CONFIG_PACKAGE_topology-plugin=y
CONFIG_PACKAGE_decollector=y
CONFIG_PACKAGE_map-agent=y
CONFIG_PACKAGE_map-controller=y
# Network #
CONFIG_PACKAGE_hostmngr=y
CONFIG_PACKAGE_netmode=y
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_obuspa=y
CONFIG_PACKAGE_bulkdata=y
CONFIG_PACKAGE_periodicstats=y
CONFIG_PACKAGE_stunc=y
CONFIG_PACKAGE_swmodd=y
CONFIG_PACKAGE_twamp=y
CONFIG_PACKAGE_udpecho-client=y
CONFIG_PACKAGE_udpecho-server=y
CONFIG_PACKAGE_userinterface=y
CONFIG_PACKAGE_xmppc=y
CONFIG_PACKAGE_timemngr=y
CONFIG_PACKAGE_self-diagnostics=y
# WebGUI #
CONFIG_PACKAGE_sulu=y
############
# Network #
##########
# Protocols #
CONFIG_PACKAGE_6in4=y
CONFIG_PACKAGE_6rd=y
CONFIG_PACKAGE_6to4=y
CONFIG_PACKAGE_chat=y
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
CONFIG_PACKAGE_ntpd=y
CONFIG_PACKAGE_odhcp6c=y
CONFIG_PACKAGE_odhcpd=y
CONFIG_PACKAGE_ppp-mod-pppoa=y
CONFIG_PACKAGE_ppp-mod-pppoe=y
CONFIG_PACKAGE_ppp-mod-pppol2tp=y
CONFIG_PACKAGE_ppp-mod-pptp=y
CONFIG_PACKAGE_ppp-multilink=y
# CONFIG_PACKAGE_ppp is not set
CONFIG_PACKAGE_relayd=y
CONFIG_PACKAGE_umbim=y
CONFIG_PACKAGE_uqmi=y
CONFIG_PACKAGE_wwan=y
CONFIG_PACKAGE_xl2tpd=y
# Services #
CONFIG_PACKAGE_atftp=y
CONFIG_PACKAGE_atftpd=y
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_dnsmasq=y
CONFIG_PACKAGE_ssdpd=y
CONFIG_PACKAGE_miniupnpd-iptables=y
CONFIG_PACKAGE_mosquitto-client-ssl=y
CONFIG_PACKAGE_mosquitto-ssl=y
CONFIG_PACKAGE_nginx=y
CONFIG_PACKAGE_openvpn-easy-rsa=y
CONFIG_PACKAGE_openvpn-openssl=y
CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y
# CONFIG_PACKAGE_qos-scripts is not set
CONFIG_PACKAGE_rdnssd=y
CONFIG_PACKAGE_vsftpd-tls=y
# Tools and Utilities #
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_libcurl=y
CONFIG_LIBCURL_CRYPTO_AUTH=y
# CONFIG_LIBCURL_MBEDTLS is not set
CONFIG_LIBCURL_OPENSSL=y
CONFIG_PACKAGE_ethtool=y
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-mod-conntrack-extra=y
CONFIG_PACKAGE_iptables-mod-extra=y
CONFIG_PACKAGE_iptables-mod-filter=y
CONFIG_PACKAGE_iptables-mod-ipmark=y
CONFIG_PACKAGE_iptables-mod-ipopt=y
CONFIG_PACKAGE_iptables-mod-nflog=y
CONFIG_PACKAGE_iptables-mod-nfqueue=y
CONFIG_PACKAGE_ndisc6=y
CONFIG_PACKAGE_rdisc6=y
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_socat=y
CONFIG_PACKAGE_tcpdump=y
CONFIG_PACKAGE_traceroute6=y
############
# System #
##########
CONFIG_PACKAGE_at=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_crun=y
CONFIG_PACKAGE_getopt=y
CONFIG_PACKAGE_gpiod-tools=y
# CONFIG_PACKAGE_iwatchdog is not set
CONFIG_PACKAGE_jq=y
CONFIG_PACKAGE_libcap-bin=y
CONFIG_PACKAGE_libustream-openssl=y
# CONFIG_PACKAGE_libustream-wolfssl is not set
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_quota=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-rpcsys=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_strace=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_uledd=y
# The urandom-seed package is very strange. It seeds urandom with urandom...
# Disable it. Most SoCs nowadays has HW random generators anyway.
# CONFIG_PACKAGE_urandom-seed is not set
# CONFIG_PACKAGE_urngd is not set
CONFIG_PACKAGE_usb-modeswitch=y
CONFIG_PACKAGE_uuidgen=y
CONFIG_PACKAGE_zoneinfo-core=y
CONFIG_PACKAGE_zoneinfo-europe=y
################
# LuCI WebGUI #
##############
# BEGIN: luci-nginx metapackage with some changes
# We do not want libiwinfo-lua on non-WiFi targets, but it is already
# depended on by other luci-packages, so no need to take it in explicitly
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-proto-ipv6=y
# CONFIG_LUCI_JSMIN is not set
# CONFIG_LUCI_CSSTIDY is not set
CONFIG_PACKAGE_luci-mod-dashboard=y
CONFIG_PACKAGE_luci-theme-openwrt-2020=y
CONFIG_PACKAGE_nginx-mod-luci=y
############
# BusyBox #
##########
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_CONFIG_ADDUSER=y
CONFIG_BUSYBOX_CONFIG_ARPING=y
CONFIG_BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT=y
CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y
CONFIG_BUSYBOX_CONFIG_CTTYHACK=y
CONFIG_BUSYBOX_CONFIG_DELUSER=y
CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q=y
CONFIG_BUSYBOX_CONFIG_FIRST_SYSTEM_ID=100
# CONFIG_BUSYBOX_CONFIG_HTTPD is not set
# CONFIG_BUSYBOX_CONFIG_INSMOD is not set
# CONFIG_BUSYBOX_CONFIG_MODINFO is not set
# CONFIG_BUSYBOX_CONFIG_MODPROBE is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST=y
CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MODUTILS_ALIAS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MODUTILS_SYMBOLS=y
CONFIG_BUSYBOX_CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
CONFIG_BUSYBOX_CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
# CONFIG_BUSYBOX_CONFIG_IP is not set
CONFIG_BUSYBOX_CONFIG_LAST_SYSTEM_ID=999
CONFIG_BUSYBOX_CONFIG_LOGIN=y
# CONFIG_BUSYBOX_CONFIG_LSMOD is not set
CONFIG_BUSYBOX_CONFIG_LSPCI=y
CONFIG_BUSYBOX_CONFIG_LSUSB=y
CONFIG_BUSYBOX_CONFIG_MICROCOM=y
# CONFIG_BUSYBOX_CONFIG_RMMOD is not set
CONFIG_BUSYBOX_CONFIG_STTY=y
CONFIG_BUSYBOX_CONFIG_TFTP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CGI=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_NOLOGIN is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_SECURETTY=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
# CONFIG_BUSYBOX_CONFIG_WGET is not set
# CONFIG_BUSYBOX_CONFIG_LOGIN_SCRIPTS is not set
# CONFIG_BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD is not set
# CONFIG_BUSYBOX_CONFIG_PAM is not set
# CONFIG_BUSYBOX_CONFIG_TFTP_DEBUG is not set
# CONFIG_BUSYBOX_CONFIG_NTPD is not set
CONFIG_BUSYBOX_CONFIG_MOUNTPOINT=y
CONFIG_BUSYBOX_CONFIG_RUN_PARTS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_RUN_PARTS_FANCY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_GZIP_LEVELS=y
CONFIG_BUSYBOX_CONFIG_GZIP_FAST=2
CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP=y
CONFIG_BUSYBOX_CONFIG_FLOAT_DURATION=y
CONFIG_BUSYBOX_CONFIG_USLEEP=y
CONFIG_BUSYBOX_CONFIG_REALPATH=y
CONFIG_BUSYBOX_CONFIG_TTY=y
CONFIG_BUSYBOX_CONFIG_BLOCKDEV=y
CONFIG_BUSYBOX_CONFIG_PARTPROBE=y
CONFIG_BUSYBOX_CONFIG_LFS=y
CONFIG_BUSYBOX_CONFIG_FDISK=y
CONFIG_BUSYBOX_CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_GPT_LABEL=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED=y
CONFIG_BUSYBOX_CONFIG_IONICE=y
CONFIG_BUSYBOX_CONFIG_RENICE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_BTRFS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_F2FS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_SQUASHFS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS=y
CONFIG_BUSYBOX_CONFIG_TIMEOUT=y
CONFIG_BUSYBOX_CONFIG_NOHUP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="sha512"

View File

@@ -33,9 +33,10 @@ _iop()
prev="${COMP_WORDS[COMP_CWORD-1]}"
iopcmds="bootstrap cfe_upgrade cfe_upgrade_latest extract_core \
feeds_update genconfig generate_tarballs install_key \
feeds_update genconfig \
generate_tarballs install_key \
scp_changes setup_host ssh_install_key status \
update_package update_feed_branches ssh_upgrade smoketest"
update_feed_branches ssh_upgrade smoketest"
if [ $COMP_CWORD -eq 1 ] ; then

View File

@@ -1,88 +1,9 @@
#!/bin/bash
function feeds_update {
heads=1
developer=0
override=1
force=1
function update_failure {
if [ $force == 1 ]; then
echo "WARNING: Failed to update feed(s). Forced update, proceeding anyway." >&2
else
echo "ERROR: Failed to update feed(s). Omit -F to proceed anyway." >&2
exit 1
fi
}
while getopts "inFh" opt; do
case $opt in
i)
heads=0
;;
n)
override=0
;;
F)
force=0
;;
h|\?)
echo "Usage: ./iop feeds_update [-i] [-n] [-F] [-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 " -F - Do not force update if there are inaccessible feeds."
echo " -h - Display this help message and exit."
exit 1
;;
esac
done
git remote -v | grep -qE '(git@|ssh://)' && developer=1
cp .config .genconfig_config_bak
if [ $heads == 1 ]; then
if [ $developer == 1 ]; then
./scripts/feeds update -g || update_failure
else
./scripts/feeds update || update_failure
fi
fi
./scripts/feeds update -ai || exit 1
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p openwrt_core -a || exit 1
./scripts/feeds install -f -p qualcomm -a || exit 1
fi
(
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
# targets need to be installed explicitly
for target in $(ls ./feeds/targets); do
./scripts/feeds install -f -p targets $target || exit 1
done
# install all packages
./scripts/feeds install -a || exit 1
# remove broken symlinks ( for packages that are no longer in the feed )
find -L package/feeds -maxdepth 2 -type l -delete || exit 1
cp .genconfig_config_bak .config
make defconfig || exit 1
# record when we last run this script
touch tmp/.iop_bootstrap || exit 1
# always return true
exit 0
}
register_command "feeds_update" "Update feeds to point to commit hashes from feeds.conf"
register_command "feeds_update" "Compatibility function only"

View File

@@ -1,517 +0,0 @@
#!/bin/bash
function genconfig {
export CLEAN=0
export DIRTY="--dirty"
export IMPORT=1
export SRCTREEOVERR=0
export FILEDIR="files/"
CURRENT_CONFIG_FILE=".current_config_file"
export CONFIGPATH="package/feeds/iopsys/iop"
CUSTPATH="customerconfigs"
export CUSTCONF="customerconfigs/customers"
export VERBOSE=0
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"
armsr_feed="target/linux/feeds/armsr"
mediatek_feed="target/linux/feeds/mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
qualcomm_ipq53xx_feed="target/linux/feeds/ipq53xx"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
Yellow='\033[0;33m' # Yellow
function find_last {
egrep "^[ #]*${1}[ =]" $2 | tail -n1
}
function is_new {
for opt in $conf_warned
do
if [ "$opt" == "$1" ]
then
return 1
fi
done
# option not found return true
return 0
}
function verify_config {
local conf_opt
local conf_org
local conf_new
while read -r line
do
conf_opt=$(echo $line | grep "^[ #]*CONFIG_" | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
if [ -n "${conf_opt}" ]
then
conf_org=$(find_last ${conf_opt} .genconfig.config)
conf_new=$(find_last ${conf_opt} .config)
if [ "$conf_org" != "$conf_new" ]
then
if is_new $conf_opt
then
echo -e "config option [${Red}$conf_opt${Color_Off}] is not set correctly in .config"
echo -e "got value [${Yellow}$conf_new${Color_Off}] but wanted [${Yellow}$conf_org${Color_Off}]"
echo "This is a real problem somebody needs to investigate"
echo ""
conf_warned="$conf_warned $conf_opt"
fi
else
true
# for debug to see all options
#echo -e "wanted [$conf_org] got [$conf_new]"
fi
fi
done < .genconfig.config
}
# Takes a board name and returns the target name in global var $target
set_target() {
local profile=$1
[ -n "$profile" ] || return
if [ -n "$TARGET" -a -d "./target/linux/feeds/$TARGET" ]; then
local targetpath="./target/linux/feeds/$TARGET"
local profiles=
local pfound=0
if [ -e "$targetpath/genconfig" ]; then
profiles=$(cd $targetpath; ./genconfig)
for p in $profiles; do
if [ $p == $profile ]; then
pfound=1
break
fi
done
fi
if [ $pfound -eq 1 ]; then
target="$(echo $TARGET | tr '-' '_')"
target_config_path="$targetpath/config"
fi
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 $armsr_feed/genconfig ] &&
armsr=$(cd $armsr_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)
if [ "$profile" == "LIST" ]; then
for list in brcmbca airoha x86 armsr mediatek ipq95xx ipq53xx; do
echo "$list based boards:"
a=$(echo "${!list}" | sort)
for b in $a; do
echo -e "\t$b"
done
done
return
fi
for p in $airoha; do
if [ $p == $profile ]; then
target="airoha"
target_config_path="$airoha_feed/config"
return
fi
done
for p in $x86; do
if [ $p == $profile ]; then
target="x86"
target_config_path="$x86_feed/config"
return
fi
done
for p in $armsr; do
if [ $p == $profile ]; then
target="armsr"
target_config_path="$armsr_feed/config"
return
fi
done
for p in $mediatek; do
if [ $p == $profile ]; then
target="mediatek"
target_config_path="$mediatek_feed/config"
return
fi
done
for p in $ipq95xx; 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"
return
fi
done
}
git remote -v | grep -qE '(git@|ssh://)' && {
DEVELOPER=1
}
v() {
[ "$VERBOSE" -ge 1 ] && echo "$@"
}
usage() {
echo
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer [customer2 ]...]"
echo
echo -e " -c|--clean\t\tRemove all files under ./files and import from config "
echo -e " -D|--no-dirty\t\tIgnore dirty tree"
echo -e " -v|--verbose\t\tVerbose"
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
echo -e " -t|--target\t\tExplicitly specify the linux target to build the board profile from"
echo -e " -s|--override\t\tEnable 'Package source tree override'"
echo -e " -S|--brcmsingle\tForce build of bcmkernel to use only one thread"
echo -e " -h|--help\t\tShow this message"
echo -e " -l|--list [customer]\tList all Customers or all boards for one customer"
echo -e " -a|--list-all\t\tList all Customers and their board types"
echo -e " -b|--boards\t\tList all board types"
echo
echo "Example ./iop genconfig eg400 OPERATORX"
echo "(if no customerconfig is chosen, iopsys config will be used)"
echo
exit 0
}
list_customers()
{
local ALL="$1"
local CUSTOMER="$2"
if [ "$CUSTOMER" -a -d "$CUSTCONF/$CUSTOMER" ]; then
local boards="$(ls -1 "$CUSTCONF/$CUSTOMER" | grep -v common)"
if [ "$boards" ]; then
echo "$CUSTOMER has following boards:"
for board in $boards; do
echo -e "\t$board"
done
else
echo "No boards found for $CUSTOMER"
fi
elif [ "$CUSTOMER" ]; then
echo "No customer called $CUSTOMER"
exit 1
elif [ -d $CUSTCONF ]; then
local customers="$(ls -1 $CUSTCONF)"
if [ "$customers" -a "$ALL" == 1 ]; then
for customer in $customers; do
echo $customer
local boards="$(ls -1 $CUSTCONF/$customer | grep -v common)"
if [ "$boards" ]; then
for board in $boards; do
echo -e "\t$board"
done
else
echo "has no boards"
fi
done
elif [ "$customers" ]; then
echo -e "$customers"
else
echo "no customers found"
fi
else
echo "No $CUSTCONF folder found"
fi
exit 0
}
generate_config()
{
DIFFFILE="$1"
MASTERFILE="$2"
while read p; do
v "$p"
sed -r -i "$p" $MASTERFILE
done < $DIFFFILE
}
setup_dirs()
{
git remote -v | grep -q http || {
CUSTBRANCH="$(git rev-parse --abbrev-ref HEAD)"
if git ls-remote $CUSTREPO -q 2>/dev/null; then
if [ ! -d "$CUSTPATH" ]; then
echo "Cloning $CUSTBRANCH branch of $CUSTREPO"
git clone -b "$CUSTBRANCH" "$CUSTREPO" "$CUSTPATH" 2>/dev/null || {
DEFBRANCH="$(git remote show $CUSTREPO | grep 'HEAD branch' | cut -d' ' -f5)"
echo "$CUSTBRANCH branch is not found, cloning $DEFBRANCH branch of $CUSTREPO"
git clone "$CUSTREPO" "$CUSTPATH"
}
elif [ $IMPORT -eq 1 ]; then
cd $CUSTPATH
echo "Checking out $CUSTBRANCH branch in $CUSTPATH"
git checkout "$CUSTBRANCH" 2>/dev/null || {
DEFBRANCH="$(git symbolic-ref refs/remotes/origin/HEAD | cut -d '/' -f4)"
echo "Checking out $CUSTBRANCH branch has failed, using $DEFBRANCH branch in $CUSTPATH"
}
v "git pull"
git pull
cd - >/dev/null #go back
fi
else
echo "You do not have access to $CUSTREPO"
fi
}
if [ ! -d "$FILEDIR" ]; then
mkdir -p $FILEDIR
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
v "rm -rf $FILEDIR*"
rm -rf $FILEDIR*
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
shift
local CUSTOMERS=$@
# Validate seleced board and customers
set_target $BOARDTYPE
if [ $target == "bogus" ]; then
echo "Hardware profile does not exist"
exit 1
elif [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ ! -d "$CUSTCONF/$CUSTOMER/" ]; then
echo "Customer profile for '$CUSTOMER' does not exist"
exit 1
elif [ ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
echo "'$BOARDTYPE' board profile does not exist for customer '$CUSTOMER'"
if [ -f "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
echo "Common profile configuration will be used"
else
exit 1
fi
fi
done
fi
# Generate base config
rm -f .config
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/config .config"
cp $CONFIGPATH/config .config
if [ -f $target_config_path/config ]; then
cat $target_config_path/config >> .config
echo "" >> .config
fi
if [ -f $target_config_path/$BOARDTYPE/config ]; then
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
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
;;
*)
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
;;
esac
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
# Add customerconfig diff if a customer is selected
if [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
fi
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
fi
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
echo "" >> .config
fi
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
echo "" >> .config
fi
done
fi
# 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
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
# Enable Package source tree override if selected
[ $SRCTREEOVERR -eq 1 ] && echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
# developer mode selected ?
echo "CONFIG_DEVEL=y" >>.config
if [ $DEVELOPER -eq 1 ]; then
# rewrite url to clone with ssh instead of http
echo "CONFIG_GITMIRROR_REWRITE=y" >>.config
else
echo "# CONFIG_GITMIRROR_REWRITE is not set" >>.config
fi
if [ -n "$BRCM_MAX_JOBS" ]
then
echo "CONFIG_BRCM_MAX_JOBS=\"1\"" >>.config
fi
# Force regeneration of kernel Makefile
# Needed to disable kmods for iopsys-brcm targets
touch package/kernel/linux/Makefile
# we need to signal to bradcom SDK that we have changed the board id
# currently boardparms.c and boardparms_voice.c is the only place that is depending on boardid name
# so just touch that file.
[ -d ./build_dir ] && find build_dir/ -name "boardparms*c" -print0 2>/dev/null | xargs -0 touch 2>/dev/null
# Store generated config
cp .config .genconfig.config
# Set default values based on selected parameters
v "$(make defconfig 2>&1)"
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
# Clean base-file package to force rebuild when changing profile
v "$(make package/base-files/clean 2>&1)"
verify_config
}
####### main #####
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
fi
if [ $# -eq 0 ]; then
echo Current profile:
cat $CURRENT_CONFIG_FILE
echo "Try ./iop genconfig -h' to get instructions if you want to change current config"
exit 0
else
while [ -n "$1" ]; do
case "$1" in
-c|--clean) export CLEAN=1;;
-D|--no-dirty) export DIRTY="";;
-n|--no-update) export IMPORT=0;;
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
-t|--target) export TARGET="$2"; shift;;
-p|--profile) export PROFILE="$2"; shift;;
-r|--repo) export CUSTREPO="$2"; shift;;
-s|--override) export SRCTREEOVERR=1;;
-S|--brcmsingel) export BRCM_MAX_JOBS=1;;
-h|--help) usage;;
-l|--list) list_customers 0 $2;;
-a|--list-all)list_customers 1;;
-b|--boards)set_target LIST;exit 0;;
-*)
echo "Invalid option: $1 "
echo "Try -h or --help for more information."
exit 1
;;
*) break;;
esac
shift;
done
CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}"
setup_dirs
create_and_copy_files "$@" || exit 1
fi
}
register_command "genconfig" "Generate configuration for board and customer"

View File

@@ -1,485 +0,0 @@
#!/bin/bash
function genconfig_min {
export CLEAN=0
export DIRTY="--dirty"
export SRCTREEOVERR=0
export FILEDIR="files/"
CURRENT_CONFIG_FILE=".current_config_file"
export CONFIGPATH="package/feeds/iopsys/iop"
CUSTPATH="customerconfigs"
export CUSTCONF="customerconfigs/customers"
export VERBOSE=0
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"
armsr_feed="target/linux/feeds/armsr"
mediatek_feed="target/linux/feeds/mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
qualcomm_ipq53xx_feed="target/linux/feeds/ipq53xx"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
Yellow='\033[0;33m' # Yellow
function find_last {
egrep "^[ #]*${1}[ =]" $2 | tail -n1
}
function is_new {
for opt in $conf_warned
do
if [ "$opt" == "$1" ]
then
return 1
fi
done
# option not found return true
return 0
}
function verify_config {
local conf_opt
local conf_org
local conf_new
while read -r line
do
conf_opt=$(echo $line | grep "^[ #]*CONFIG_" | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
if [ -n "${conf_opt}" ]
then
conf_org=$(find_last ${conf_opt} .genconfig.config)
conf_new=$(find_last ${conf_opt} .config)
if [ "$conf_org" != "$conf_new" ]
then
if is_new $conf_opt
then
echo -e "config option [${Red}$conf_opt${Color_Off}] is not set correctly in .config"
echo -e "got value [${Yellow}$conf_new${Color_Off}] but wanted [${Yellow}$conf_org${Color_Off}]"
echo "This is a real problem somebody needs to investigate"
echo ""
conf_warned="$conf_warned $conf_opt"
fi
else
true
# for debug to see all options
#echo -e "wanted [$conf_org] got [$conf_new]"
fi
fi
done < .genconfig.config
}
# Takes a board name and returns the target name in global var $target
set_target() {
local profile=$1
[ -n "$profile" ] || return
if [ -n "$TARGET" -a -d "./target/linux/feeds/$TARGET" ]; then
local targetpath="./target/linux/feeds/$TARGET"
local profiles=
local pfound=0
if [ -e "$targetpath/genconfig" ]; then
profiles=$(cd $targetpath; ./genconfig)
for p in $profiles; do
if [ $p == $profile ]; then
pfound=1
break
fi
done
fi
if [ $pfound -eq 1 ]; then
target="$(echo $TARGET | tr '-' '_')"
target_config_path="$targetpath/config"
fi
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 $armsr_feed/genconfig ] &&
armsr=$(cd $armsr_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)
if [ "$profile" == "LIST" ]; then
for list in brcmbca airoha x86 armsr mediatek ipq95xx ipq53xx; do
echo "$list based boards:"
a=$(echo "${!list}" | sort)
for b in $a; do
echo -e "\t$b"
done
done
return
fi
for p in $airoha; do
if [ $p == $profile ]; then
target="airoha"
target_config_path="$airoha_feed/config"
return
fi
done
for p in $x86; do
if [ $p == $profile ]; then
target="x86"
target_config_path="$x86_feed/config"
return
fi
done
for p in $armsr; do
if [ $p == $profile ]; then
target="armsr"
target_config_path="$armsr_feed/config"
return
fi
done
for p in $mediatek; do
if [ $p == $profile ]; then
target="mediatek"
target_config_path="$mediatek_feed/config"
return
fi
done
for p in $ipq95xx; 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"
return
fi
done
}
git remote -v | grep -qE '(git@|ssh://)' && {
DEVELOPER=1
}
v() {
[ "$VERBOSE" -ge 1 ] && echo "$@"
}
usage() {
echo
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer [customer2 ]...]"
echo
echo -e " -c|--clean\t\tRemove all files under ./files and import from config "
echo -e " -D|--no-dirty\t\tIgnore dirty tree"
echo -e " -v|--verbose\t\tVerbose"
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
echo -e " -t|--target\t\tExplicitly specify the linux target to build the board profile from"
echo -e " -s|--override\t\tEnable 'Package source tree override'"
echo -e " -S|--brcmsingle\tForce build of bcmkernel to use only one thread"
echo -e " -h|--help\t\tShow this message"
echo -e " -l|--list [customer]\tList all Customers or all boards for one customer"
echo -e " -a|--list-all\t\tList all Customers and their board types"
echo -e " -b|--boards\t\tList all board types"
echo
echo "Example ./iop genconfig eg400 OPERATORX"
echo "(if no customerconfig is chosen, iopsys config will be used)"
echo
exit 0
}
list_customers()
{
local ALL="$1"
local CUSTOMER="$2"
if [ "$CUSTOMER" -a -d "$CUSTCONF/$CUSTOMER" ]; then
local boards="$(ls -1 "$CUSTCONF/$CUSTOMER" | grep -v common )"
if [ "$boards" ]; then
echo "$CUSTOMER has following boards:"
for board in $boards; do
echo -e "\t$board"
done
else
echo "No boards found for $CUSTOMER"
fi
elif [ "$CUSTOMER" ]; then
echo "No customer called $CUSTOMER"
exit 1
elif [ -d $CUSTCONF ]; then
local customers="$(ls -1 $CUSTCONF)"
if [ "$customers" -a "$ALL" == 1 ]; then
for customer in $customers; do
echo $customer
local boards="$(ls -1 $CUSTCONF/$customer | grep -v common )"
if [ "$boards" ]; then
for board in $boards; do
echo -e "\t$board"
done
else
echo "has no boards"
fi
done
elif [ "$customers" ]; then
echo -e "$customers"
else
echo "no customers found"
fi
else
echo "No $CUSTCONF folder found"
fi
exit 0
}
generate_config()
{
DIFFFILE="$1"
MASTERFILE="$2"
while read p; do
v "$p"
sed -r -i "$p" $MASTERFILE
done < $DIFFFILE
}
setup_dirs()
{
if [ ! -d "$FILEDIR" ]; then
mkdir -p $FILEDIR
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
v "rm -rf $FILEDIR*"
rm -rf $FILEDIR*
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
shift
local CUSTOMERS=$@
# Validate seleced board and customers
set_target $BOARDTYPE
if [ $target == "bogus" ]; then
echo "Hardware profile does not exist"
exit 1
elif [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ ! -d "$CUSTCONF/$CUSTOMER/" ]; then
echo "Customer profile for '$CUSTOMER' does not exist"
exit 1
elif [ ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
echo "'$BOARDTYPE' board profile does not exist for customer '$CUSTOMER'"
if [ -f "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
echo "Common profile configuration will be used"
else
exit 1
fi
fi
done
fi
# Generate base config
rm -f .config
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/config .config"
cp $CONFIGPATH/config .config
if [ -f $target_config_path/config ]; then
cat $target_config_path/config >> .config
echo "" >> .config
fi
if [ -f $target_config_path/$BOARDTYPE/config ]; then
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
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
;;
*)
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
;;
esac
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
# Add customerconfig diff if a customer is selected
if [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
fi
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
fi
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
echo "" >> .config
fi
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
echo "" >> .config
fi
done
fi
# 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
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
# Enable Package source tree override if selected
[ $SRCTREEOVERR -eq 1 ] && echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
# developer mode selected ?
echo "CONFIG_DEVEL=y" >>.config
if [ -n "$BRCM_MAX_JOBS" ]
then
echo "CONFIG_BRCM_MAX_JOBS=\"1\"" >>.config
fi
# Force regeneration of kernel Makefile
# Needed to disable kmods for iopsys-brcm targets
touch package/kernel/linux/Makefile
# we need to signal to bradcom SDK that we have changed the board id
# currently boardparms.c and boardparms_voice.c is the only place that is depending on boardid name
# so just touch that file.
[ -d ./build_dir ] && find build_dir/ -name "boardparms*c" -print0 2>/dev/null | xargs -0 touch 2>/dev/null
# Store generated config
cp .config .genconfig.config
# Set default values based on selected parameters
v "$(make defconfig 2>&1)"
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
# Clean base-file package to force rebuild when changing profile
v "$(make package/base-files/clean 2>&1)"
verify_config
}
####### main #####
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
fi
if [ $# -eq 0 ]; then
echo Current profile:
cat $CURRENT_CONFIG_FILE
echo "Try ./iop genconfig -h' to get instructions if you want to change current config"
exit 0
else
while [ -n "$1" ]; do
case "$1" in
-c|--clean) export CLEAN=1;;
-D|--no-dirty) export DIRTY="";;
-n|--no-update) export IMPORT=0;;
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
-t|--target) export TARGET="$2"; shift;;
-p|--profile) export PROFILE="$2"; shift;;
-r|--repo) export CUSTREPO="$2"; shift;;
-s|--override) export SRCTREEOVERR=1;;
-S|--brcmsingel) export BRCM_MAX_JOBS=1;;
-h|--help) usage;;
-l|--list) list_customers 0 $2;;
-a|--list-all)list_customers 1;;
-b|--boards)set_target LIST;exit 0;;
-*)
echo "Invalid option: $1 "
echo "Try -h or --help for more information."
exit 1
;;
*) break;;
esac
shift;
done
CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}"
setup_dirs
create_and_copy_files "$@"
fi
}
register_command "genconfig_min" "Generate configuration for customer with manual board configuration"

29
iop/scripts/genconfig_wrap.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Function to convert parameters to lowercase
function to_lowercase {
local params=()
for param in "$@"; do
params+=("$(tr '[:upper:]' '[:lower:]' <<< "$param")")
done
echo "${params[@]}"
}
function genconfig {
target_script="./scripts/gen_config.py"
# First convert all to lowercase
args=$(to_lowercase "$@")
# Check if an option is provided
if [[ ${args[0]} == -* ]]; then
# Convert options for target script
if [[ ${args[0]} == "-b" || ${args[0]} == "--boards" ]]; then
args=("--list")
fi
fi
${target_script} ${args[@]}
}
register_command "genconfig" "Generate configuration for board and customer"

View File

@@ -1,646 +0,0 @@
#!/bin/bash
print_git_update()
{
echo "pkg -> ${PKG_NAME}"
echo " PKG_BUILD_DIR = ${PKG_BUILD_DIR}"
echo " PKG_DIR = ${PKG_DIR}"
echo " PKG_SOURCE = ${PKG_SOURCE}"
echo " PKG_NAME = ${PKG_NAME}"
echo " PKG_SOURCE_URL = ${PKG_SOURCE_URL}"
echo " PKG_SOURCE_PROTO= ${PKG_SOURCE_PROTO}"
echo " PKG_SOURCE_VERSION= ${PKG_SOURCE_VERSION}"
echo " PKG_SOURCE = ${PKG_SOURCE}"
echo " PKG_SOURCE_VERSION_FILE=${PKG_SOURCE_VERSION_FILE}"
}
is_git_same()
{
git_last=$(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)
#echo "$PKG_NAME $git_last = ${PKG_SOURCE_VERSION}"
if [ "$git_last" == "${PKG_SOURCE_VERSION}" ]
then
return 0
fi
return 1
}
update_this_pkg()
{
mk_hash=$(get_makefile_hash)
if [ "$mk_hash" != "${PKG_SOURCE_VERSION}" ]
then
echo "${PKG_NAME}:"
echo " build dir = ${PKG_BUILD_DIR}"
echo " feed makefile = ${mk_hash}"
echo " stale hash = ${PKG_SOURCE_VERSION}"
echo " build git = $(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)"
echo " Git hash in package makefile and the git hash recorded from last compile of"
echo " package is different. You probably want to recompile the package"
echo " to get an up to date version in ${PKG_BUILD_DIR}/.git_update"
echo ""
echo -n " Should we continue with the update anyway? [y/N]:"
read answer
echo ""
case $answer in
y|Y)
;;
n|N|*)
return 1;;
esac
fi
echo "${PKG_NAME}:"
echo " build dir = ${PKG_BUILD_DIR}"
echo " pkg dir = ${PKG_DIR}"
echo " feed makefile = ${PKG_SOURCE_VERSION}"
echo " build git = $(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)"
echo " package is at a different git commit in build compared to feed"
echo -n " Should we update the feed and top project to reflect the new version ? [y/N]:"
read answer
echo ""
case $answer in
y|Y)
return 0;;
*)
echo ""
return 1;;
esac
}
get_makefile_hash()
{
if [ -n "$PKG_SOURCE_VERSION_FILE" ]
then
name="$PKG_SOURCE_VERSION_FILE"
else
name=Makefile
fi
grep "PKG_SOURCE_VERSION:=" ${PKG_DIR}/${name} | sed -e "s/\(^PKG_SOURCE_VERSION:=\)\(.*\)/\2/"
}
insert_hash_in_feed_makefile()
{
if [ -n "$PKG_SOURCE_VERSION_FILE" ]
then
name="$PKG_SOURCE_VERSION_FILE"
else
name=Makefile
fi
git_last=$(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)
sed -i -e "s/\(^PKG_SOURCE_VERSION:=\).*/\1${git_last}/" ${PKG_DIR}/${name}
(cd ${PKG_DIR}; git add ${name})
}
insert_version_in_feed_makefile()
{
if [ -n "$PKG_SOURCE_VERSION_FILE" ]
then
name="$PKG_SOURCE_VERSION_FILE"
else
name=Makefile
fi
last_version=$(awk -F '=' '/PKG_VERSION:=/ {print $2}' ${PKG_DIR}/${name})
echo -n "please enter version: "
read -ei "$last_version" answer
if [ -z ${answer} ]; then
return
fi
sed -i -e "s/\(^PKG_VERSION:=\).*/\1${answer}/" ${PKG_DIR}/${name}
(cd ${PKG_DIR}; git add ${name})
}
# BUG: fix if only local branche name!
branch_uptodate()
{
# $1 git repo
# $2 if it exist dont abort do the pull
(cd $1
git remote update 2>&1 >/dev/null
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u})
BASE=$(git merge-base @ @{u})
if [ -z "$REMOTE" ]; then
BRANCH=$(basename $(git symbolic-ref -q HEAD))
echo "You need to setup a tracking branch for $BRANCH"
exit 99
fi
if [ $LOCAL = $REMOTE ]; then
return
elif [ $LOCAL = $BASE ]; then
if [ -n "$2" ]
then
echo "Doing automatic pull on [ $1 ]"
if git pull
then
return
else
echo "Something wrong with pull. aborting, repo at"
echo " [ $1 ]"
exit 99
fi
else
echo "Local repo behind remote:"
echo "do git pull at repo"
echo " [ $1 ]"
exit 99
fi
elif [ $REMOTE = $BASE ]; then
echo "Local repo ahead of remote. A push is needed"
echo "Repo is at: $1"
echo ""
echo -n "Should we try a push ? [Y/n]:"
read answer
echo ""
case $answer in
n|N|q|Q)
exit 99;;
*)
echo -e "${Yellow}"
if ! git push origin HEAD
then
echo -e "${Color_Off}"
exit 99
fi
echo -e "${Color_Off}Push done."
;;
esac
else
echo "Diverged. not sure what you did but there is no tracking branch. "
echo "repo at [ $1 ]. fix it so that there is a tracking branch remote."
echo "Often this is related to somebody having commited to the same branch"
echo "on the server so a simple push wont work, try a 'git rebase'."
exit 99
fi
)
}
on_a_branch()
{
local repo=$1
local type=$2
(
cd $repo
name=$(git symbolic-ref -q HEAD)
if [ -z "$name" ]
then
echo "git $type repo [ $repo ] is detached."
branches=($(git branch -r --contains $(git rev-parse HEAD)))
if [ 0 == ${#branches[@]} ]
then
echo "It needs to be on a branch but git could not find any associated branch"
echo ""
echo "you need to make sure that the commit is not on a detached branch"
echo "and that the branch exist in the remote repo also. it can not be a local name"
echo "as it is about to get pushed so it can be part of system release"
exit 99
fi
echo "It needs to be on a branch. Please select one or quit if it is not in list."
echo ""
i=0
for branch in ${branches[*]}
do
echo "$i: $branch"
i=$((i + 1))
done
echo ""
echo -n "Select what branch to checkout. Q/q or N/n to quit? "
read answer
case $answer in
q|Q|n|N)
echo "Aborting!"
exit 99;;
esac
echo -e "${Yellow}"
pwd
echo "git checkout ${branches[$answer]}"
if ! git checkout -t ${branches[$answer]}
then
local_branch=$(basename ${branches[$answer]})
if ! git checkout ${local_branch}
then
echo -e "${Color_Off}"
echo "update_git aborting! something was wrong changing to branch ${branches[$answer]}"
echo "go to [ $repo ] and fix it."
exit 99
fi
fi
echo -e "${Color_Off}"
fi
)
}
git_repos_uptodate()
{
on_a_branch ${PKG_BUILD_DIR} package
on_a_branch ${PKG_DIR} feed
on_a_branch ${PWD} top
branch_uptodate ${PKG_BUILD_DIR}
branch_uptodate ${PKG_DIR} do_pull
branch_uptodate ${PWD} do_pull
}
get_feed_name()
{
echo $1 |sed -e "s|.*feeds/\([^/]*\).*|\1|"
# rest=$(dirname $1)
# base=$(basename $1)
# prev=$base
# while [ -n "$rest" ]
# do
# if [ "$base" == "feeds" ]
# then
# echo "$prev"
# fi
# done
}
create_message()
{
FORMAT="commit %H%n\
Author: %aN <%aE>%n\
Date: %ai%n\
%n\
%w(80,4,4)%s%n
%b%n\
%w()Base directory -> ${repo_PATH}/"
local FROM=${PKG_SOURCE_VERSION}
local TO=$(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)
local commits=$(cd ${PKG_BUILD_DIR};git rev-list ${FROM}..${TO})
local feed=$(get_feed_name ${PKG_DIR})
echo "Update feed [ $feed ] package [ $PKG_NAME ]"
echo ""
echo "-------------------------------------------------------------------------------"
(cd ${PKG_BUILD_DIR}; git log --graph --oneline ${FROM}..${TO})
echo "-------------------------------------------------------------------------------"
for commit in $commits
do
(cd ${PKG_BUILD_DIR}; git show --stat --pretty=format:"$FORMAT" $commit)
echo "-------------------------------------------------------------------------------"
done
}
edit_file()
{
echo -en "${Red}"
echo "Here is the commit message we are going to use!"
echo "-------------------------------------------------------------------------------"
echo -en "${Color_Off}"
cat $1
echo -en "${Red}"
echo "-------------------------------------------------------------------------------"
echo -en "${Color_Off}"
echo -n "Do you want to edit the message [y/N]? "
read answer
case $answer in
y|Y)
$EDITOR $1;;
esac
}
commit_feed()
{
template=$(readlink -f $1)
edit_file $template
echo -e "${Yellow}"
(
cd ${PKG_DIR}
if git commit -F $template
then
if git push origin HEAD
then
echo -e "${Color_Off} Feed Updated!"
return
else
echo -e "${Color_Off}"
echo "something wrong push feed git ${PKG_DIR}"
exit 99
fi
else
echo -e "${Color_Off}"
echo "something wrong committing to feed git ${PKG_DIR}"
exit 99
fi
)
}
commit_feeds_config()
{
template=$(readlink -f $1)
edit_file $template
echo -e "${Yellow}"
if git commit -F $template
then
if git push origin HEAD
then
echo -e "${Color_Off}Feeds.conf updated!"
return
else
echo -e "${Color_Off}"
echo "something wrong push change to feeds.conf"
echo "try \"git remote update ; git stash ;git rebase; git push;git stash pop\""
exit 99
fi
else
echo -e "${Color_Off}"
echo "something wrong committing to feed git"
exit 99
fi
}
insert_hash_in_feeds_config()
{
local feed=$(get_feed_name ${PKG_DIR})
local TO=$(cd ${PKG_DIR}; git rev-parse HEAD)
sed -i feeds.conf -e "/ ${feed} / s/\(.*\)[;^].*/\1^${TO}/"
git add feeds.conf
}
check_packages()
{
echo -e "${Green}_______________________________________________________________________________${Color_Off}"
echo "Now checking if any changes have been done to the packages."
echo -e "${Green}_______________________________________________________________________________${Color_Off}"
# only scan in the build directory that is currently in use.
CPU=$(grep "CONFIG_CPU_TYPE=" .config| cut -f2 -d\")
LIBC=$(grep "CONFIG_LIBC=" .config| cut -f2 -d\")
# First scan all files in build dir for packages that have .git directories.
all_pkgs=$(find build_dir/*${CPU}*${LIBC}* -name ".git")
for pkg in `echo "$all_pkgs"`
do
pkg=$(dirname $pkg)
# check if the git in build is at same commit id as the feed makefile points out
if [ -e ${pkg}/.git_update ]
then
source ${pkg}/.git_update
fi
# print_git_update
if [ -n "${PKG_NAME}" ]
then
if ! is_git_same
then
if update_this_pkg
then
# print_git_update
git_repos_uptodate
insert_hash_in_feed_makefile
[ ${UPDATE} -eq 1 ] && insert_version_in_feed_makefile
create_message >tmp/msg
commit_feed tmp/msg
insert_hash_in_feeds_config
commit_feeds_config tmp/msg
fi
fi
fi
done
}
# now handle the target git. we have only one
feeds_hash()
{
grep -v "^#" feeds.conf | grep " $1 " | grep "\^" | sed -e "s/.*[;^]\(.*\)/\1/"
}
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}/"
git add feeds.conf
}
create_feed_message()
{
local feed=$1
local FROM=$2
local TO=$3
local FORMAT="commit %H%n\
Author: %aN <%aE>%n\
Date: %ai%n\
%n\
%w(80,4,4)%s%n
%b%n\
%w()Base directory -> feeds/$feed/"
local commits=$(cd feeds/$feed;git rev-list ${FROM}..${TO})
echo "Update feed [ $feed ]"
echo ""
echo "-------------------------------------------------------------------------------"
(cd feeds/$feed; git log --graph --oneline ${FROM}..${TO})
echo "-------------------------------------------------------------------------------"
for commit in $commits
do
(cd feeds/$feed; git show --stat --pretty=format:"$FORMAT" $commit)
echo "-------------------------------------------------------------------------------"
done
}
check_feeds()
{
echo -e "${Green}_______________________________________________________________________________${Color_Off}"
echo "Now checking if any changes have been done to the feeds."
echo -e "${Green}_______________________________________________________________________________${Color_Off}"
feeds="$1"
[ -n "$feeds" ] || feeds=$(grep -v "^#" feeds.conf| awk '{print $2}')
for feed in `echo $feeds`
do
feed_hash=$(feeds_hash $feed)
[ -n "$feed_hash" ] || continue
if [ -d feeds/$feed ]; then
in_git=$(cd feeds/$feed; git rev-parse HEAD)
if [ "$feed_hash" != "$in_git" ]
then
name=$(cd feeds/$feed;git symbolic-ref -q HEAD)
if [ -z "$name" ]
then
echo "Feed feeds/${feed} is at a git commit which is different from feeds.conf"
#echo "git id from feeds.conf [$feed_hash] git id from feeds/${feed} [$in_git]"
on_a_branch feeds/${feed} feed
#redo the test here and see if the feeds.conf and git is still different.
in_git=$(cd feeds/$feed; git rev-parse HEAD)
if [ "$feed_hash" = "$in_git" ]
then
continue
fi
fi
LOCAL=$(cd feeds/$feed;git rev-parse @)
REMOTE=$(cd feeds/$feed;git rev-parse @{u})
BASE=$(cd feeds/$feed;git merge-base @ @{u})
# if we are behind the remote automatically do a pull
if [ $LOCAL = $BASE ]; then
(cd feeds/$feed ; git pull 1>/dev/null)
#redo the test here and see if the feeds.conf and git is still different.
in_git=$(cd feeds/$feed; git rev-parse HEAD)
if [ "$feed_hash" = "$in_git" ]
then
continue
fi
fi
echo "Feed feeds/${feed} is at different commit than what is in feeds.conf"
#echo "git id from feeds.conf [$feed_hash] git id from feeds/${feed} [$in_git]"
echo -n "Should we update feeds.conf to reflect the new version ? [y/N]:"
read answer
case $answer in
n|N|'')
continue;;
esac
branch_uptodate feeds/${feed}
create_feed_message ${feed} $feed_hash $in_git >tmp/msg
insert_feed_hash_in_feeds_config ${feed}
commit_feeds_config tmp/msg
fi
fi
done
}
is_local_and_remote_same()
{
git remote update 2>/dev/null 1>/dev/null
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u})
if [ $LOCAL = $REMOTE ]
then
return
fi
local_name=$(git rev-parse --abbrev-ref @ )
remote_name=$(git rev-parse --abbrev-ref @{u} )
echo "Top repo local branch \"$local_name\" is not at same point as remote \"$remote_name\""
echo "This update script will update the feeds.conf file and for that to work it needs to"
echo "be up to date with the remote."
echo ""
echo "please run:"
echo " git pull"
echo " ./iop feeds_update"
echo ""
echo "do not forget the bootstrap. but do not run make it can delete your package in build"
exit 0
}
usage(){
echo -e "$0 [flags]"
echo -e "flags:"
echo -e " -f\tFeed to update"
echo -e " -h\tShow this help"
echo -e " -u\tUpdate package version\n"
}
# Exported interface
function update_package {
UPDATE=0
Color_Off='\033[0m' # Text Reset
# Regular Colors
Black='\033[0;30m' # Black
Red='\033[0;31m' # Red
Green='\033[0;32m' # Green
Yellow='\033[0;33m' # Yellow
Blue='\033[0;34m' # Blue
Purple='\033[0;35m' # Purple
Cyan='\033[0;36m' # Cyan
White='\033[0;37m' # White
while getopts "f:hu" opt; do
case $opt in
f)
feed=$OPTARG
;;
h)
usage
exit 1
;;
u)
UPDATE=1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
if [ -z "$EDITOR" ]
then
if [ -f /usr/bin/vi ]; then
EDITOR=vi
else
echo "env variable EDITOR needs to be set"
exit 1
fi
fi
# allow subshells to abort the whole program by exiting with "exit 99"
set -E
trap '[ "$?" -ne 99 ] || exit 99' ERR
is_local_and_remote_same
[ -n "$feed" ] || check_packages
check_feeds $feed
}
register_command "update_package" "Publish changes to packages and feeds"

50
iopsys-analytics/Makefile Normal file
View File

@@ -0,0 +1,50 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=iopsys-analytics
PKG_RELEASE:=$(COMMITCOUNT)
PKG_LICENSE:=PROPRIETARY
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=fb84c1019a8a0fbfb624d9df8eb3604806645510
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/iopsys-analytics.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=Analytics tweaks for IOPSYS CI/CD purposes
# setting core dump limit
DEPENDS+= \
+prlimit \
# monitoring
DEPENDS+= \
+collectd \
+collectd-mod-cpu \
+collectd-mod-exec \
+collectd-mod-load \
+collectd-mod-memory \
+collectd-mod-network \
+collectd-mod-processes \
+collectd-mod-write-http \
+@PACKAGE_COLLECTD_ENCRYPTED_NETWORK \
# remote syslog
DEPENDS+= \
+syslog-ng \
+@SYSLOGNG_LOGROTATE \
endef
define Package/$(PKG_NAME)/description
Analytics tweaks for IOPSYS internal CI/CD purposes
e.g. syslog, system health, coredumps...
endef
Build/Compile=
define Package/$(PKG_NAME)/install
$(CP) -r $(PKG_BUILD_DIR)/files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

78
ipt-trigger/Makefile Normal file
View File

@@ -0,0 +1,78 @@
#
# Copyright (C) 2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ipt-trigger
PKG_VERSION:=1.0.1
PKG_LICENSE:=GPL-2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8d4b4520a2935a5717a27f486a3fc78357b2a0cd
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ipt-trigger.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
include $(INCLUDE_DIR)/package.mk
define KernelPackage/ipt-trigger
SUBMENU:=Other modules
TITLE:=Kernel module for iptables port trigger
FILES:=$(PKG_BUILD_DIR)/src/ipv4/ipt_TRIGGER.ko
DEPENDS+=+kmod-nf-nat +xtables-legacy
AUTOLOAD:=$(call AutoLoad,30,ipt_TRIGGER,1)
KCONFIG:=
endef
define KernelPackage/ip6t-trigger
SUBMENU:=Other modules
TITLE:=Kernel module for ip6tables port trigger
DEPENDS+=+kmod-nf-nat +xtables-legacy
FILES:=$(PKG_BUILD_DIR)/src/ipv6/ip6t_TRIGGER.ko
AUTOLOAD:=$(call AutoLoad,30,ip6t_TRIGGER,1)
KCONFIG:=
endef
define KernelPackage/ipt-trigger/description
Kernel module to enable port trigger for iptables
endef
define KernelPackage/ip6t-trigger/description
Kernel module to enable port trigger for ip6tables
endef
ifeq ($(CONFIG_TARGET_brcmbca),y)
include ../../broadcom/bcmkernel/bcm-kernel-toolchain.mk
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./ipt-trigger/* $(PKG_BUILD_DIR)/
$(CP) ./ipt-trigger/include/ipt_TRIGGER.h $(LINUX_DIR)/include/linux/netfilter_ipv4/
endef
else
define Build/Prepare
$(Build/Prepare/Default)
$(CP) $(PKG_BUILD_DIR)/include/ipt_TRIGGER.h $(LINUX_DIR)/include/linux/netfilter_ipv4/
endef
endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/include/linux/netfilter_ipv4
$(CP) $(PKG_BUILD_DIR)/include/ipt_TRIGGER.h $(1)/include/linux/netfilter_ipv4/
endef
KERNEL_MAKE_FLAGS += -I$(LINUX_DIR)/include
define Build/Compile
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)/src/ipv4/" modules
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)/src/ipv6/" modules
endef
$(eval $(call KernelPackage,ipt-trigger))
$(eval $(call KernelPackage,ip6t-trigger))

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libdpp
PKG_VERSION:=2.0.0
PKG_VERSION:=2.1.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f22959b107a8bf443d04d6261d00074b5514dfe8
PKG_SOURCE_VERSION:=1f82436531d4bb094b0b74e99613e0dfc84eada3
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/libdpp.git
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libeasy
PKG_VERSION:=7.4.2
PKG_VERSION:=7.4.5
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=11eb263666556c419220e2a50c3a67422e79f884
PKG_SOURCE_VERSION:=67e6b91b8aca4c068a71f097f5f0576b47ec1d2e
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
@@ -28,6 +28,12 @@ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/libeasy/ $(PKG_BUILD_DIR)/
endef
endif
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall"
@@ -56,6 +62,7 @@ define Build/InstallDev/libeasy
$(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)/timestamp.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/libeasy*.so* $(1)/usr/lib/
endef

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libethernet
PKG_VERSION:=7.2.107
PKG_VERSION:=7.2.109
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9c0e9ecd62b79d4e89b4f013f04124870d237395
PKG_SOURCE_VERSION:=cc72f5ab0171cd0fc29bb48dafff6751ab2f0d9c
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
@@ -66,7 +66,7 @@ define Package/libethernet
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= Ethernet library (libethernet)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_airoha:ecnt_api +TARGET_brcmbca:bcmkernel
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_airoha:ecnt_api +TARGET_brcmbca:bcm963xx-bsp
endef
define Package/libethernet/description

View File

@@ -26,11 +26,8 @@ define Package/libpicoevent-bcm
CATEGORY:=Libraries
TITLE:=Libpicoevent-bcm
URL:=
DEPENDS:= +TARGET_brcmbca:bcmkernel
DEPENDS:= +TARGET_brcmbca:bcm963xx-bsp
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

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libqos
PKG_VERSION:=7.2.106
PKG_VERSION:=7.2.107
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=02dba6571fddd9b4c5b4b671270604b4c0faf9ae
PKG_SOURCE_VERSION:=de659f50c0ae1cd4ec64315b301c53595eaf39de
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
@@ -65,7 +65,7 @@ define Package/libqos
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= QoS library (libqos)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_brcmbca:bcmkernel
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_brcmbca:bcm963xx-bsp
endef
define Package/libqos/config

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-airoha
PKG_RELEASE:=1
PKG_VERSION:=1.0.10
PKG_VERSION:=1.0.12
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ 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:=e6ba6fca814f6c83a3d6ff4a5b7560fbc36d3101
PKG_SOURCE_VERSION:=68f0b4f3edecea9b8f05e72b6bbf3952d3946b7c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-broadcom
PKG_RELEASE:=1
PKG_VERSION:=1.0.8
PKG_VERSION:=1.0.13
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ 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:=e1de60c2c05935fb2f4adfc1f73feba0bb32ade6
PKG_SOURCE_VERSION:=f1509651217d027376b5b7fc3f64ca86662e9b2d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-d2
PKG_RELEASE:=1
PKG_VERSION:=1.1.2
PKG_VERSION:=1.1.11
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ 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:=e6d689334000bc57498d9a3f203a8933160e1ef4
PKG_SOURCE_VERSION:=95fb29a31f7665abbe87af4a74cf52b7e5f22a29
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.4.16
PKG_VERSION:=7.4.71
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=dfafd5f7ea387d6119a9eb692e435f98b16f75a3
PKG_SOURCE_VERSION:=5a048ebb4f591e704e59be9123f565c6fbbe2833
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
@@ -131,7 +131,7 @@ endef
define Package/libwifi
$(call Package/libwifi-common)
TITLE:= WiFi library (libwifi)
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcmkernel
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcm963xx-bsp
endef
define Package/libwifi/config
@@ -143,7 +143,7 @@ define Package/libwifi/config
config LIBWIFI_USE_CTRL_IFACE
bool "Create UNIX sockets to interface with hostapd/wpa_supplicant"
default n
default y
endif
endef

View File

@@ -15,7 +15,7 @@ config AGENT_EASYMESH_R2_CERT
config AGENT_EASYMESH_VERSION
int "Support Easymesh version"
default 4
default 6
config AGENT_EASYMESH_VENDOR_EXT
bool "Enable extra features through Easymesh vendor extension"
@@ -55,5 +55,12 @@ config AGENT_OPER_CHANNEL_CHANGE_RELAY_MCAST
config AGENT_USE_LIBDPP
bool "Depend on libdpp for DPP EasyConnect"
config AGENT_CHECK_PARTIAL_WIFI_RELOAD
bool "Option that allow SSID/PSK simple reload"
default y
config DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER
bool "Let dynbhd through AP-Autoconfiguration Search and DHCP Discovery determine the controller or agent role"
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=4.5.0.10
PKG_VERSION:=6.1.1.2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=a03ea6bee6856000496d858f3b4c8d161612472d
PKG_SOURCE_VERSION:=d0ff409ffe6bb03c97e14b34932f437f58f4e241
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
@@ -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 +AGENT_USE_LIBDPP:libdpp
+ieee1905-map-plugin +ip-bridge +AGENT_USE_LIBDPP:libdpp
endef
ifeq ($(CONFIG_AGENT_USE_LIBDPP),y)
@@ -40,7 +40,7 @@ define Package/dynbhd
CATEGORY:=Utilities
TITLE:=Dynamic Backhaul Daemon
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
+map-plugin +map-agent
+ieee1905-map-plugin +map-agent
endef
@@ -105,6 +105,14 @@ ifeq ($(CONFIG_AGENT_OPER_CHANNEL_CHANGE_RELAY_MCAST),y)
TARGET_CFLAGS += -DOPER_CHAN_CHANGE_RELAY_MCAST
endif
ifeq ($(CONFIG_AGENT_CHECK_PARTIAL_WIFI_RELOAD),y)
TARGET_CFLAGS += -DCHECK_PARTIAL_WIFI_RELOAD
endif
ifeq ($(CONFIG_DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER),y)
TARGET_CFLAGS += -DPERSIST_CONTROLLER
endif
MAKE_PATH:=src
define Package/map-agent/install

View File

@@ -1,14 +1,14 @@
config agent 'agent'
option enabled '0'
option enabled '1'
option debug '0'
option profile '3'
option al_bridge 'br-lan'
option netdev 'wlan'
option island_prevention '0'
option island_prevention '1'
option eth_onboards_wifi_bhs '1'
option scan_on_boot_only '0'
option chan_ch_relay_mcast '1'
option chan_ch_relay_mcast '0'
option guest_isolation '1'
option partial_wifi_reload '0'
list map_port 'all'
# option controller_macaddr '0a:1b:2c:3d:4e:50'

View File

@@ -1,17 +1,19 @@
#!/bin/sh
. /lib/network/utils.sh
conn_ports_file="/var/run/multiap/map.connected.ports"
map_bh_file="/var/run/multiap/multiap.backhaul"
# Exit if AL Bridge is not configured to be a bridge device
al_bridge="$(uci -q get mapagent.agent.al_bridge)"
[ "${al_bridge:0:3}" = "br-" ] || exit 0
al_brnet="${al_bridge:3}"
# Exit if the PORT is not member of the AL Bridge
[ "$(get_network_of $PORT)" = "$al_brnet" ] || exit 0
port_bridge_sec="$(uci show network | grep -w $PORT | grep '\.ports' | cut -d'.' -f2)"
port_bridge_name="$(uci -q get network.$port_bridge_sec.name)"
[ "$port_bridge_name" = "$al_bridge" ] || exit 0
# Exit if the device is not operating in extender/repeater mode
al_brnet="${al_bridge:3}"
[ "$(uci -q get network.${al_brnet}.proto)" == "dhcp" ] || exit 0
############## Dynamic Backhaul Daemon ##############
@@ -45,7 +47,7 @@ fi
########################################################
################ Dedicated ETH WAN Port ################
wanport="$(db -q get hw.board.ethernetWanPort)"
wanport="$(jsonfilter -i /etc/board.json -e @.network.wan.device)"
if [ -n "$wanport" ]; then
[ "$wanport" = "$PORT" ] || exit 0
########################################################
@@ -69,7 +71,7 @@ fi
remove_from_bridge() {
config_get ifname "$section" ifname
[ -n "$ifname" ] && ubus call network.interface.${al_brnet} remove_device '{"name":"$ifname"}'
[ -n "$ifname" ] && brctl delif ${al_bridge} ${ifname}
}
update_bstas() {

View File

@@ -5,8 +5,9 @@
generate_mapagent_config=0
generate_wireless_sta_config=0
network_mode="$(fw_printenv -n netmode)"
multiap_mode="$(fw_printenv -n multiap_mode)"
network_mode="$(fw_printenv -n netmode)" # default is layer3
multiap_mode="$(fw_printenv -n multiap_mode)" # default is full
disable_mlo="$(fw_printenv -n disable_mlo)"
is_airoha() {
[ -f /proc/device-tree/compatible ] || return
@@ -81,6 +82,16 @@ generate_multiap_config() {
ifname="wlan${devidx}"
ifname_bh="wlan${devidx}-1"
ap_follow_sta_dfs="1"
[ "$disable_mlo" == "1" ] || {
uci set wireless.$dev.mlo="1"
uci set wireless.$dev.mlo_capable="1"
uci commit wireless
# Disable for MLD/MLO
uci set mapagent.agent.island_prevention="0"
uci commit mapagent
}
else
ifprefix="wlan%-"
ifname="wlan$devidx"
@@ -159,12 +170,6 @@ map_genconf () {
if ! uci show wireless | grep -q "mode=.*sta"; then
generate_wireless_sta_config=1
if is_broadcom; then
for section in $(uci show wireless | grep wifi-device | cut -d'.' -f2 | cut -d'=' -f1); do
uci -q set wireless.$section.apsta="1"
done
fi
for section in $(uci show wireless | grep "mode=.*ap" | cut -d'.' -f2); do
uci delete wireless.$section
done
@@ -181,20 +186,26 @@ map_genconf () {
elif [ "$multiap_mode" == "auto" ]; then
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=0
elif [ "$multiap_mode" == "full" ]; then
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=1
elif [ "$multiap_mode" == "none" ]; then
uci set mapagent.agent.enabled="0"
else # default to full
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=1
fi
uci -q commit mapagent
fi
if [ "$multiap_mode" == "agent" -o "$multiap_mode" == "none" ]; then
uci set mapcontroller.controller.enabled="0"
else
uci set mapcontroller.controller.enabled="1"
if [ "$multiap_mode" == "agent" -o "$multiap_mode" == "none" ]; then
uci set mapcontroller.controller.enabled="0"
else
uci set mapcontroller.controller.enabled="1"
[ "$disable_mlo" == "1" ] && {
mapcontroller_disable_mld() {
uci set mapcontroller.$1.enabled='0'
}
config_load mapcontroller
config_foreach mapcontroller_disable_mld mld
}
fi
uci -q commit mapcontroller
fi
uci -q commit mapcontroller
}

View File

@@ -16,7 +16,7 @@ config CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
config CONTROLLER_EASYMESH_VERSION
int "Support Easymesh version"
default 4
default 6
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
hex "Vendor OUI in 0xAABBCC format"
@@ -29,6 +29,10 @@ config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
config CONTROLLER_USE_LIBDPP
bool "Depend on libdpp for DPP EasyConnect"
config CONTROLLER_PROPAGATE_PROBE_REQ
depends on CONTROLLER_EASYMESH_VENDOR_EXT
bool "Enable publishing probe requests vendor specific messages as UBUS events"
default y
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=4.5.0.2
PKG_VERSION:=6.1.1.2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=3c915f5f17ff339487a3b8533d384a23888b9c9a
PKG_SOURCE_VERSION:=480a5304591632729212408d77d220f707cb9d6b
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
LOCAL_DEV=0
@@ -27,7 +27,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 +libwifiutils +libieee1905 +ieee1905 +ieee1905-map-plugin \
+CONTROLLER_USE_LIBDPP:libdpp
endef
@@ -63,6 +63,10 @@ TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=$(CONFIG_CONTROLLER_EASYMESH_VENDOR_E
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
endif
ifeq ($(CONFIG_CONTROLLER_PROPAGATE_PROBE_REQ),y)
TARGET_CFLAGS += -DPROPAGATE_PROBE_REQ
endif
define Package/map-controller/install
$(INSTALL_DIR) $(1)/etc
$(CP) ./files/* $(1)/

View File

@@ -40,6 +40,7 @@ config ap
option key '$WIFI_FH_KEY'
option vid '1'
option type 'fronthaul'
option mld_id '1'
config ap
option band '5'
@@ -48,6 +49,7 @@ config ap
option key '$WIFI_FH_KEY'
option vid '1'
option type 'fronthaul'
option mld_id '1'
config ap
option band '6'
@@ -56,30 +58,48 @@ config ap
option key '$WIFI_FH_KEY'
option vid '1'
option type 'fronthaul'
option mld_id '1'
config ap
option band '2'
option ssid 'MAP-$BASEMAC_ADDR-BH-2.4GHz'
option ssid 'MAP-$BASEMAC_ADDR-BH'
option encryption 'sae'
option key '$WIFI_BH_KEY'
option type 'backhaul'
option vid '1'
option mld_id '2'
config ap
option band '5'
option ssid 'MAP-$BASEMAC_ADDR-BH-5GHz'
option ssid 'MAP-$BASEMAC_ADDR-BH'
option encryption 'sae'
option key '$WIFI_BH_KEY'
option type 'backhaul'
option vid '1'
option mld_id '2'
config ap
option band '6'
option ssid 'MAP-$BASEMAC_ADDR-BH-6GHz'
option ssid 'MAP-$BASEMAC_ADDR-BH'
option encryption 'sae'
option key '$WIFI_BH_KEY'
option type 'backhaul'
option vid '1'
option mld_id '2'
config mld
option id '1'
option ssid '$DEVICE_MANUFACTURER-$BASEMAC_ADDR'
option key '$WIFI_FH_KEY'
# option vid '1'
option type 'fronthaul'
config mld
option id '2'
option ssid 'MAP-$BASEMAC_ADDR-BH'
option key '$WIFI_BH_KEY'
# option vid '1'
option type 'backhaul'
# node and radio sections (per node) are auto
# generated per Multi-AP Agent in the network

View File

@@ -1,36 +1,48 @@
#
# Copyright (C) 2013-2020 iopsys
# Copyright (C) 2013-2024 iopsys
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mcastmngr
PKG_VERSION:=1.1.0
PKG_VERSION:=1.2.3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/mcastmngr.git
PKG_SOURCE_VERSION:=117acf7a29e3a343756aab9b0ae330022892c15b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
MAKE_PATH:=bbf_plugin
define Package/mcastmngr
CATEGORY:=Utilities
TITLE:=Multicast Proxy/Snooping Manager
DEPENDS:=+!TARGET_brcmbca:mcproxy
DEPENDS:=+!TARGET_brcmbca:mcproxy +libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
endef
define Package/mcastmngr/description
Configures IGMP and MLD snooping and proxy
endef
#define Build/Prepare
# $(CP) -rf ./mcastmngr/* $(PKG_BUILD_DIR)/
#endef
define Build/Compile
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/mcastmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
define Package/mcastmngr/install
$(CP) ./files/common/* $(1)/
@@ -39,6 +51,7 @@ ifneq ($(CONFIG_TARGET_brcmbca),)
else
$(CP) ./files/linux/* $(1)/
endif
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/bbf_plugin/libmcast_bbf.so $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,mcastmngr))

View File

@@ -11,7 +11,7 @@ CONFFILE=/var/mcpd.conf
PROG_EXE=/usr/sbin/mcpd
proxdevs=""
ethwan="$(db -q get hw.board.ethernetWanPort)"
ethwan="$(jsonfilter -i /etc/board.json -e @.network.wan.device)"
config_snooping_common_params() {
@@ -49,7 +49,7 @@ config_snooping_upstream_interface() {
*.*)
port="$(echo "$dev" | cut -d'.' -f 1)"
if [ $port == $ethwan ]; then
ifconfig $dev | grep RUNNING >/dev/null && $snooping_upstream_intf="$dev" && break
ifconfig $dev | grep RUNNING >/dev/null && snooping_upstream_intf="$dev" && break
fi
;;
esac

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