Compare commits

..

313 Commits

Author SHA1 Message Date
Amit Kumar
11b83611ba ponmnger: datamodel parameter name correction 2023-06-22 05:40:26 +00:00
Rahul Thakur
3a2674270b mcastmngr: implement snoop mode for linux targets 2023-06-22 04:38:35 +00:00
Vivek Kumar Dutta
a3d9850ae4 obuspa: 7.0.2.21 2023-06-21 21:08:45 +05:30
Sukru Senli
edb39ef5d8 ethmngr: update get_max_speed function for Broadcom 2023-06-21 16:02:30 +02:00
Vivek Kumar Dutta
e63d02dbb8 obuspa: 7.0.2.20 2023-06-21 18:00:34 +05:30
Vivek Kumar Dutta
81104955be ieee1905: 8.1.15 2023-06-20 19:08:09 +05:30
Yalu Zhang
8f30e41569 Update packages libvoice-broadcom and libvoice-airoha
Replace GSM-AMR with AMR
2023-06-20 15:29:05 +02:00
Amin Ben Romdhane
1d49d924fe bbfdm: 1.0.27 2023-06-19 17:30:50 +02:00
Amin Ben Romdhane
b24d674d6a bbfdm: 1.0.26 2023-06-19 16:13:50 +02:00
Suvendhu Hansa
5779233ec1 bbfdm: Fix port mapping rules precedence 2023-06-19 14:11:34 +00:00
Marek Puzyniak
8c768bb802 map-topology: 2.5.1.24 2023-06-19 11:46:59 +00:00
Anjan Chanda
bc51e940da ieee1905: 8.1.14 2023-06-19 13:21:07 +02:00
Vivek Kumar Dutta
1793cecba3 sulu: 2.2.6 2023-06-19 09:44:48 +05:30
Amin Ben Romdhane
17dcae26d4 bbfdm: 1.0.25 2023-06-16 09:47:27 +02:00
Jakob Olsson
1858923fec map-controller: 4.3.0.8 2023-06-15 15:28:10 +02:00
Jakob Olsson
2a392a4b98 map-agent: 4.3.3.6 2023-06-15 15:26:03 +02:00
Anjan Chanda
a6ce979c65 decollector: 4.0.2.3 2023-06-15 14:38:52 +02:00
Anjan Chanda
ed3659afe6 wifimngr: 16.0.8 2023-06-15 14:36:28 +02:00
Elena Vengerova
4abb86d20b libwifi: 7.2.106 2023-06-15 14:27:50 +02:00
Jakob Olsson
e762a9a87b map-topology: 2.5.1.23 2023-06-15 14:08:06 +02:00
Vivek Kumar Dutta
85fe1dbc92 bbfdm: 1.0.24 2023-06-15 17:37:29 +05:30
Amit Kumar
8489b6c3b6 map-topology: compilation flag for host wan stats
default enabled compilation flag defained for host was
statistics collection.
2023-06-15 16:16:04 +05:30
Grzegorz Sluja
d7e070db29 Update package dectmngr 3.5.11
Anonymous call to DECT should be displayed as "Withheld"
2023-06-15 12:43:25 +02:00
Rahul Thakur
8bca63207f libdsl: update makefile for broadcom target 2023-06-15 06:04:44 +00:00
Vivek Kumar Dutta
358e5721fe icwmp: 9.3.7 2023-06-14 14:29:53 +05:30
Jakob Olsson
807b7ed64d map-agent: 4.3.3.5 2023-06-14 10:12:11 +02:00
Amin Ben Romdhane
89bc51cace bbfdm: 1.0.23 2023-06-14 09:34:55 +02:00
Yalu Zhang
f3b90dfa4c libvoice-d2-1.0.5: Implementation of the API for changing codec on a connection 2023-06-13 16:16:49 +02:00
Yalu Zhang
79894a4580 Remove g729a from /lib/voice/codecs.json 2023-06-13 16:15:20 +02:00
Grzegorz Sluja
2a98ed289a Update package dectmngr
6ea57b3 Fix the bug that missed calls are not cleared after reading from the handset
2023-06-13 10:54:58 +02:00
Anatoly Mirin
e9f64893ac mcastmngr: fix mcast stats script
Fixed worng temp_igmp_file variable accessing, which caused the same
'temp_igmp_file' file to be used each time 'ubus call mcast stats'
was called instead of /tmp/igmp_stats_<PID> file.
Because of this, temp file was sometimes overwritten by the next call
before it had time to read and the IPTV_IGMP_4-12-1-24_2401.py test
ended with an error.

A waiting loop has also been added so that mcproxy has time to process
the signal and write the dump to a file.
2023-06-12 23:48:08 +03:00
Marek Puzyniak
caa0653bfe libwifi: 7.2.105 2023-06-12 06:55:07 +00:00
Marek Puzyniak
bcb5366e68 wifimngr: 16.0.7 2023-06-12 06:52:58 +00:00
Amin Ben Romdhane
b1158f5f60 bbfdm: 1.0.22 2023-06-09 17:09:22 +02:00
Vivek Kumar Dutta
a400700c49 obuspa: 7.0.2.19 2023-06-09 19:26:13 +05:30
Wenpeng Song
b571fd47c9 libvoice-airoha: Update codec only if the new codec is different from the current one 2023-06-09 09:45:35 +00:00
Jakob Olsson
8b952700ef map-controller: 4.3.0.7: create and use /etc/multiap 2023-06-08 16:45:08 +02:00
Vivek Kumar Dutta
23579fc961 obuspa: Fix crash on operate cmd failure 2023-06-08 19:38:20 +05:30
Jakob Olsson
76b388bb75 Revert "map-agent: add dependency on patch and diff"
This reverts commit 0d5aae21d7.
2023-06-08 13:27:32 +00:00
Jakob Olsson
0c7d3eaee4 map-agent: 4.3.3.4 2023-06-08 15:23:38 +02:00
Wenpeng Song
3986be824a libvoice-airoha: 1.0.4
Implementation of the API to set codec on a connection
2023-06-08 12:57:28 +00:00
Jakob Olsson
ba7b94d4e5 map-agent: 4.3.3.3 2023-06-08 14:21:00 +02:00
Amin Ben Romdhane
e1520fdd48 bbfdm: 1.0.21 2023-06-07 16:20:18 +02:00
Vivek Kumar Dutta
8d20d4ba45 obuspa: Added caching for refresh instances 2023-06-05 19:48:18 +05:30
Vivek Kumar Dutta
723c52bcf5 icwmp: Fix interface update handler
This change includes multiple fixes:
- Fix inform sent on interface.update with non-configured wan interface
- Fix Device.WiFi.NeighboringWiFiDiagnostic. for cwmp
2023-06-05 19:43:41 +05:30
suvendhu
6e3490b985 swmodd: uci-default scrip to migrate lxc-auto config
In release-6.5 lxc-auto used for autostart of lxc containers, this uci-default
migration script shall migrate the autostart info to the configured path.
2023-06-05 19:39:55 +05:30
Anatoly Mirin
81bfe4cc1b mcastmngr: pass max groups parameter to mcproxy
Setting '/proc/sys/net/ipv4/igmp_max_memberships' is not enough.
We must pass the max_groups parameter to the mcproxy to prevent MFC
entries from being added to mr_table and packet forwarding for extra
groups.

We also need to increase max_groups, since mcproxy always subscribe
two service groups - ALL-ROUTERS (224.0.0.2) and
ALL-IGMPv3-MC-ROUTERS (224.0.0.22).
2023-06-02 05:27:09 +00:00
arne.jonsson
653cd5bb97 iop: genconfig: display boards sorted 2023-06-01 15:34:22 +00:00
Andreas Gnau
910c8e61e2 iop: genconfig: Lower priority of BCM target
This is a hack to retain existing behaviour in case of ambiguities of
device names between differen targets. For now, let Broadcom have the
lowest priority.

genconfig script is to be replaced soon and the existing code makes
adding a proper check hard and we need some way to deal with the
ambiguity quickly.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-06-01 17:22:30 +02:00
Wenpeng Song
72a41b6d14 libvoice: fix an issue from the previous commit.
libvoice-d2, change default codec to G711A
2023-06-01 15:01:03 +02:00
Wenpeng Song
66303b874d voicemngr,libvoice-broadcom: Implement voice_connection_modify for updating codec
libvoice-airoha,libvoice-d2: Add a dummy API for setting codec on a connection TODO: the API needs to be implemented later.
2023-06-01 12:33:10 +02:00
Ratish
65d1d7932c Revert "mcastmngr: pass max groups parameter to mcproxy"
This reverts commit 9ce866a484.
2023-06-01 10:12:04 +00:00
suvendhu
cfad5f2223 icwmp:bbfdm: optimize runtime config handling 2023-06-01 14:58:25 +05:30
Amin Ben Romdhane
b47ff7b8c8 bbfdm: 1.0.19 2023-05-31 17:32:18 +02:00
Amin Ben Romdhane
e5704ad7f2 Revert "periodicstats: 1.4.2"
This reverts commit e5028b2980.
2023-05-31 16:04:10 +02:00
Vivek Kumar Dutta
729eeaba54 sulu: 2.2.5 2023-05-31 19:00:34 +05:30
Jakob Olsson
e5da615f25 map-controller: 4.3.0.6 2023-05-31 14:44:40 +02:00
Jakob Olsson
6c41215c19 map-agent: 4.3.3.2 2023-05-31 14:35:56 +02:00
Janusz Dziedzic
0b5d47b559 libwifi: 7.2.104 2023-05-31 12:23:07 +00:00
Janusz Dziedzic
7eba12fb54 libwifi: 7.2.103
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2023-05-31 10:04:43 +00:00
Ratish
c0495af6e1 mcastmngr: fixed mcproxy crash
Fixed mcproxy crash during bootup for non broadcom platforms
2023-05-31 13:30:36 +05:30
Jakob Olsson
d04f1930d1 iop: config: select ieee1905 option CMDU_SA_IS_ALMAC 2023-05-30 11:12:13 +02:00
Vivek Kumar Dutta
852eaf8fc9 bbfdm: 1.0.18 2023-05-30 11:36:52 +05:30
Anatoly Mirin
9ce866a484 mcastmngr: pass max groups parameter to mcproxy
Setting '/proc/sys/net/ipv4/igmp_max_memberships' is not enough.
We must pass the max_groups parameter to the mcproxy to prevent MFC
entries from being added to mr_table and packet forwarding for extra
groups.

We also need to increase max_groups, since mcproxy always subscribe
two service groups - ALL-ROUTERS (224.0.0.2) and
ALL-IGMPv3-MC-ROUTERS (224.0.0.22).
2023-05-29 22:50:49 +03:00
Vivek Kumar Dutta
517e3d9f11 sulu: 2.2.4 2023-05-29 18:29:49 +05:30
Vivek Kumar Dutta
8f09187cba Optimize service restart/reloads 2023-05-28 09:53:51 +05:30
Jakob Olsson
85c139d7b7 map-controller: drop validation support for wpa and wpa2 2023-05-26 14:50:49 +02:00
subramanianc
2c1aeae4e3 qos: Handle forwarding policy tos value 2023-05-26 14:23:08 +05:30
Vivek Kumar Dutta
9d098e087f sulu: 2.2.3 2023-05-26 09:16:31 +05:30
Erik Karlsson
afb2d7f798 iop: feeds_update: return 1 on failure and add -i to update index only
Handle failures correctly so that CI for example will terminate. Add
-i option to update index only and not heads.

Take two of this which allows silent failures when updating the
feeds. This is not good but it is necessary as a workaround for the
issue with private feeds. This should be solved in a different
way. Reproducibility of builds in case of network outages for example
cannot be guaranteed as long as silent failure is allowed.
2023-05-25 14:55:45 +00:00
Amin Ben Romdhane
cb43510264 bbfdm: 1.0.17 2023-05-25 16:30:35 +02:00
Amin Ben Romdhane
b78d6684bf Revert "bulkdata: 2.1.1"
This reverts commit f0d7922c40.

It creates some issues when running cdr test. So we need to re-design how to run micro-service data model.
2023-05-25 15:16:39 +02:00
Erik Karlsson
a83ddcc563 obuspa: Add controller MTP verification
If CONFIG_OBUSPA_CONTROLLER_MTP_VERIFY=y is set, disabled by default,
reject incoming USP records if from_id does not match a controller
connected to the MTP instance on which the record was received.
2023-05-25 04:55:30 +00:00
Mikhail Kshevetskiy
c02eff7d9d Revert "iop: feeds_update: return 1 on failure and add -i to update index only"
This reverts commit 0e1ac637ac.

It breaks build for people who do not have access to all feeds.
2023-05-24 21:47:24 +03:00
Amin Ben Romdhane
c6c7d1177e bbfdm: 1.0.16 2023-05-24 18:27:19 +02:00
Vivek Kumar Dutta
b6c1bf5568 sulu: 2.2.2 2023-05-24 18:06:20 +05:30
Vivek Kumar Dutta
1b8de9ca51 obuspa: Optimize reboot/factoryReset handling 2023-05-24 15:17:36 +05:30
Grzegorz Sluja
c3199c3ea2 libvoice-airoha: 1.0.2
Disable echo_cancel by default since it caused DTMF detection
issues.
2023-05-24 10:28:17 +02:00
Erik Karlsson
0e1ac637ac iop: feeds_update: return 1 on failure and add -i to update index only
Handle failures correctly so that CI for example will terminate. Add
-i option to update index only and not heads.

Change-Id: Idabcd8c855eb513bf702c0808aff28b28262c9c7
2023-05-23 14:26:05 +00:00
Erik Karlsson
0975f022c5 iop: genconfig: avoid false positives when validating configuration
Fix config validation to avoid false positives caused by comments.
2023-05-23 14:26:05 +00:00
Erik Karlsson
93656b57db iop: genconfig: return 1 on failure
Handle failures correctly so that CI for example will terminate.

Change-Id: I676de24a797405966ae554f9f7dad186ada14e8a
2023-05-23 14:26:05 +00:00
Erik Karlsson
eab01d27dd iop: match against the full feed name when updating feeds.conf
Fix bug that is causing the wrong hash to be updated in case one feed
name happens to be a substring of another feed name.
2023-05-23 14:26:05 +00:00
Jakob Olsson
435aafe744 map-agent: 4.3.3.1 2023-05-23 13:28:13 +02:00
Amin Ben Romdhane
b6dc071e35 bbfdm: 1.0.15 2023-05-22 16:24:56 +02:00
Padmalochan Mohapatra
df7872e3f0 ponmngr : Respawn ponmngr if at all there is a failure due to initialization delay 2023-05-22 08:59:28 +00:00
Amit Kumar
fcd0e77ba8 urlfilter: handled high cpu uage of urlfilter 2023-05-22 13:18:46 +05:30
Vivek Kumar Dutta
f2f3f34859 obuspc: USP based controller 2023-05-22 11:11:18 +05:30
Vivek Kumar Dutta
69d2a50e2e sulu: 2.2.1 2023-05-19 17:33:22 +05:30
Amin Ben Romdhane
2c51c4e23e bbfdm: 1.0.14 2023-05-19 12:36:40 +02:00
Padmalochan Mohapatra
581f1eb5db urlfilter : Defensive null check for crash protection 2023-05-19 10:37:36 +05:30
Vivek Kumar Dutta
95bb5a5b48 obuspa: 7.0.2.14 2023-05-18 15:53:22 +05:30
Vivek Kumar Dutta
9d56c142ad usermngr: 1.1.4 2023-05-18 15:38:20 +05:30
Jakob Olsson
0aec0c5019 ieee1905: 8.1.11 2023-05-17 16:29:47 +02:00
Amin Ben Romdhane
fae611801e bbfdm: 1.0.13 2023-05-17 16:11:51 +02:00
Jakob Olsson
7e0e2fcf9f decollector: 4.0.2.1 2023-05-17 15:14:25 +02:00
Jakob Olsson
955c461e1c map-agent: 4.3.3.0 2023-05-17 15:07:55 +02:00
Andreas Gnau
2c6616ef05 iop: genconfig: Add hack for custom-devices
Add hack to consume configs from custom-devices in a separate feed
custom-devices, but only in that feed and not in other feeds. There is
no value in implementing a generic solution, because the whole genconfig
system will be replaced with something else.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-05-17 10:30:50 +00:00
Rahul Thakur
3202e0fbba libqos: fix compilation for mtk target 2023-05-17 12:18:50 +05:30
Vivek Kumar Dutta
84b83560b4 sulu: 2.2.0 2023-05-17 12:13:44 +05:30
ratish.28
7a61ff27bf mcastmngr: fix mcast stats for non broadcom platforms
Script for generating mcast stats is moved from common to platform
specific files. The logic for generating mcast stats on non broadcom
platforms is different and the stats format is also different.

For generating stats we are are sending SIGUSR1 signal to mcproxy
process which then writes multicast stats to /tmp/igmp_snooping_stats.
2023-05-16 14:27:22 +00:00
Rahul Thakur
d930fdd86d mcastmngr: enable snooping on linux platforms
enabling snooping in bridges in case of linux platforms
2023-05-16 14:25:41 +00:00
Padmalochan Mohapatra
80d7e57441 dslmngr : Static Code Analysis Setup and Fix Warnings 2023-05-16 14:23:46 +00:00
Amin Ben Romdhane
a9fa5d9465 bbfdm: 1.0.12 2023-05-16 16:17:19 +02:00
Amin Ben Romdhane
e5028b2980 periodicstats: 1.4.2 2023-05-16 16:17:01 +02:00
Amin Ben Romdhane
f0d7922c40 bulkdata: 2.1.1 2023-05-16 16:16:36 +02:00
Padmalochan Mohapatra
8aeadf5fdc libqos : Setup Static Code Analysis and Warning Fix 2023-05-16 09:20:26 +00:00
Padmalochan Mohapatra
680c01b121 libdsl : Setup Static Code Analysis and Warning Fix 2023-05-16 09:16:12 +00:00
Padmalochan Mohapatra
c08679e6c0 libethernet: setup static code analysis 2023-05-16 11:11:18 +05:30
Yalu Zhang
955ed436a1 libvoice-d2-1.0.3: Support DECT 2023-05-15 15:28:03 +02:00
Vivek Kumar Dutta
157a7d3946 obuspa: 7.0.2.13 2023-05-12 19:31:09 +05:30
Yalu Zhang
a4ad40ab4a dectmngr-3.5.9: Change narrow band to wide band for incoming calls to DECT handsets 2023-05-12 11:59:47 +02:00
Vivek Kumar Dutta
298045a822 bbfdm: 1.0.11 2023-05-12 12:20:26 +05:30
Amin Ben Romdhane
853ffee425 urlfilter: 1.1.7 2023-05-11 13:58:41 +02:00
Jakob Olsson
8e979cacc1 map-agent: 4.3.2.6 2023-05-11 10:55:52 +02:00
Lukasz Kotasa
3b14454efe libvoice-broadcom: Make G.722 appear in "ubus call endpt codecs" 2023-05-11 10:13:26 +02:00
Vivek Kumar Dutta
799050d650 bbfdm: 1.0.10 2023-05-10 15:22:25 +00:00
Jakob Olsson
7664dc719d map-controller: 4.3.0.5 2023-05-10 16:41:09 +02:00
Jakob Olsson
bcc93577df map-agent: 4.3.2.5 2023-05-10 16:40:29 +02:00
Janusz Dziedzic
a3cd8b5e03 libwifi: 7.2.102 2023-05-10 09:50:17 +00:00
Amin Ben Romdhane
24999bd690 urlfilter: 1.1.6 2023-05-10 05:23:35 +00:00
Nikhil Gurram
b2c3d32b51 iop: genconfig: add qualcomm ipq53xx target
Signed-off-by: Nikhil Gurram <quic_nikhgurr@quicinc.com>
2023-05-09 14:27:56 +00:00
Amin Ben Romdhane
28280c4faf bbfdm: 1.0.9 2023-05-08 18:42:57 +02:00
Yalu Zhang
e0a4b0e62a voicemngr-1.0.4: Change the logic for DECT hook event simulation 2023-05-08 17:23:13 +02:00
Amin Ben Romdhane
033b7b9e33 usermngr: 1.1.3 2023-05-08 17:01:58 +02:00
Vivek Kumar Dutta
fea3bd90b4 obuspa: 7.0.2.12 2023-05-08 17:12:21 +05:30
Vivek Kumar Dutta
d6c6cb791f obuspa: 7.0.2.11 2023-05-08 13:48:04 +05:30
Vivek Kumar Dutta
fb6a66096e obuspa: 7.0.2.10 2023-05-05 09:45:02 +05:30
Jakob Olsson
cbb6862e18 map-controller: 4.3.0.4 2023-05-04 17:35:28 +02:00
nevadita.chatterjee
a38c7d903a map-topology: 2.5.1.21 2023-05-04 13:12:26 +00:00
Jakob Olsson
b6e9f80d2a map-agent: 4.3.2.4 2023-05-04 14:56:58 +02:00
Grzegorz Sluja
de40c67ff2 libvoice-airoha: 1.0.1
Fix VoicePort validation with MTK DSP capabilities
2023-05-04 14:04:42 +02:00
Vivek Kumar Dutta
1da95ba8c2 sulu: 2.1.5 2023-05-04 16:51:14 +05:30
Arun Muthusamy
d038e4c845 Fix: Qcm, iptv fast leave is broken 2023-05-04 10:24:17 +00:00
Anjan Chanda
d8c0622287 ieee1905: 8.1.10 2023-05-04 09:26:09 +02:00
Andreas Gnau
953c01f40f kernel: gpio-button-hotplug: Support BCM SDK kernel
Move hacks to support compiling against the kernel built using the BCM SDK and
toolchain into a separate Makefile in the broadcom feed.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-05-03 15:47:57 +00:00
Vivek Kumar Dutta
97aeb16ee1 sulu: 2.1.4 2023-05-03 19:14:39 +05:30
Amin Ben Romdhane
600419c979 bbfdm: 1.0.8 2023-05-03 13:47:29 +02:00
Padmalochan Mohapatra
01918f89c4 libethernet : Fix for counters showing all zero in linux QCM platform's ubus call output 2023-05-03 15:34:34 +05:30
Jakob Olsson
9d4985297b map-agent: 4.3.2.3 2023-05-02 16:26:49 +02:00
Jakob Olsson
c2d48fa22d map-agent: 4.3.2.2 2023-05-02 16:16:59 +02:00
Sukru Senli
5cd4ce1d8d evoice: remove package 2023-05-02 11:21:10 +02:00
Grzegorz Sluja
043e8a78b5 voicemngr-1.0.3: Set the line type as per the environmental variable "hw_board_VoicePortNames" 2023-05-02 10:57:55 +02:00
Rahul Thakur
ecf76ddb06 mcastmngr: fix uci config changes get overwritten 2023-05-02 10:42:18 +05:30
Vivek Kumar Dutta
d93d8d7d1d obuspa: 7.0.2.9 2023-05-01 19:46:09 +05:30
Vivek Kumar Dutta
abed3a87ff sulu: 2.1.3 2023-05-01 14:43:06 +05:30
Vivek Kumar Dutta
e7fb499f20 swmodd: 2.2.4 2023-05-01 11:36:09 +05:30
Amin Ben Romdhane
69e902f7b9 bbfdm: 1.0.7 2023-04-28 17:58:11 +02:00
Jakob Olsson
0d5aae21d7 map-agent: add dependency on patch and diff 2023-04-28 17:19:19 +02:00
Grzegorz Sluja
87efa30939 dectmngr: 3.5.8
a9b4e71 Fix memory corruption in converAsciiToHexString()
b48f408 CI: move code-analysis to own container registry (IOP-9341)
903ea46 Fix the second caller id display issue
2023-04-28 14:33:47 +02:00
Jakob Olsson
3807a83701 map-agent: 4.3.2.1 2023-04-28 13:19:51 +02:00
Padmalochan Mohapatra
6dbebc8e88 libethernet: fix library apis for qcm and mtk targets 2023-04-28 11:19:14 +00:00
Jakob Olsson
178953ef25 map-agent: 4.3.2.0 2023-04-28 13:11:08 +02:00
Padmalochan Mohapatra
f772c65219 libethernet : Makefile changes for eth linux stats 2023-04-28 08:45:26 +00:00
Vivek Kumar Dutta
704ddf9311 icwmp: 9.3.4 2023-04-28 13:37:58 +05:30
suvendhu
993fedb1b1 swmodd: added timeout to pull container image from registry 2023-04-28 13:30:21 +05:30
subramanianc
7168b5f1e0 qosmngr: Mapping qos queue based on marked value 2023-04-28 04:15:33 +00:00
Amin Ben Romdhane
8fb0cbfb9e bbfdm: 1.0.6 2023-04-27 19:08:18 +02:00
Markus Gothe
9298fbeb33 libqos/libethernet: Use DEPENDS instead of PKG_BUILD_DEPENDS.
Due to syntax differences the latter doesn't really solve the
dependency when we use our build-script.

Instead use the same approach as the libwifi package.

Change-Id: If37b70141b541cca03474251904863a17e07ff45
2023-04-27 08:14:07 +00:00
Jani Juvan
c708007d0b iop: Remove iopsys- prefix from targets 2023-04-27 08:02:32 +00:00
Amin Ben Romdhane
2b88d9775a bbfdm: 1.0.5 2023-04-26 22:46:57 +02:00
Yalu Zhang
7b056cd783 dectmngr: fix a bug in etc/init.d/dectmngr which kills the script itself
This is a regression caused by the below commit. The command "killall dectmngr" tries to kill
both the service /usr/sbin/dectmngr and the init-script /etc/init.d/dectmngr. This is wrong.

The fix is to kill /usr/sbin/dectmngr only.

commit 501193da98
Author: Yalu Zhang <yalu.zhang@iopsys.eu>
Date:   Tue May 11 11:15:35 2021 +0200

    Rename etc/init.d/dect to etc/init.d/dectmngr
2023-04-26 16:25:45 +02:00
Jakob Olsson
218d613ed1 map-agent: 4.3.1.4 2023-04-26 14:21:47 +02:00
Anjan Chanda
921a116893 multi-ap - update package maintainers 2023-04-26 10:26:42 +02:00
Anjan Chanda
d982df14eb libdsl, libethernet, libqos - update package maintainer 2023-04-26 10:14:16 +02:00
Anjan Chanda
abf5ccfc9e libwifi: 7.2.101 2023-04-26 10:08:24 +02:00
Anjan Chanda
d6c2c87675 libeasy: 7.2.100 2023-04-26 10:04:00 +02:00
Anatoly Mirin
1abf717fc6 mcastmngr: add filtering rules for downstream
This is necessary to filter IGMP messages from downstream interfaces.
2023-04-26 01:20:10 +00:00
Rahul Thakur
adb318f735 libqos: fix qos stats on bcm96858 2023-04-25 12:36:52 +05:30
Janusz Dziedzic
dcf4d539e9 wifimngr: 16.0.6
remove 05-wifi script
2023-04-24 15:29:45 +00:00
Vivek Kumar Dutta
f84ba19f44 sulu: 2.1.2 2023-04-24 19:30:29 +05:30
Anjan Chanda
8bde4af2d3 ieee1905: 8.1.8 2023-04-24 10:29:35 +02:00
Vivek Kumar Dutta
ff49277c70 owsd: 1.1.6 2023-04-24 13:24:34 +05:30
Vivek Kumar Dutta
d04fbc72d6 usp-js: 1.2.1 2023-04-24 12:50:25 +05:30
Vivek Kumar Dutta
bff308e8c9 quickjs-websocket: select libwebsocket-openssl as default 2023-04-24 12:16:46 +05:30
Vivek Kumar Dutta
6ca6f97237 obuspa: 7.0.2.8 2023-04-24 08:57:06 +05:30
Anjan Chanda
7b8d9cfff9 Revert "ieee1905: 8.1.7"
This reverts commit e0516db95c.
2023-04-21 16:46:27 +02:00
Janusz Dziedzic
a842ea4105 map-topology: 2.5.1.20 2023-04-21 07:43:09 +00:00
Janusz Dziedzic
97fea4bad0 map-agent: 4.3.1.3 2023-04-21 07:41:38 +00:00
Vivek Kumar Dutta
2b39193d48 obuspa: 7.0.2.7 2023-04-20 18:50:12 +05:30
Vivek Kumar Dutta
5bef6dfff6 obuspa: config option for E2ESession mode 2023-04-20 17:37:15 +05:30
Anjan Chanda
6062346802 wifimngr: 16.0.5 2023-04-20 12:48:32 +02:00
Anjan Chanda
e0516db95c ieee1905: 8.1.7 2023-04-20 12:47:12 +02:00
Amin Ben Romdhane
3287ec7c75 icwmp: 9.3.3 2023-04-20 12:39:38 +02:00
Vivek Kumar Dutta
6359d50427 obuspa: 7.0.2.5 2023-04-20 15:48:30 +05:30
Vivek Kumar Dutta
22744c65c5 iop: remove owsd from default config 2023-04-20 15:03:30 +05:30
Vivek Kumar Dutta
5fb534e31b sulu: 2.1.1 2023-04-20 15:02:22 +05:30
Jakob Olsson
e39e1806ec map-agent: 4.3.1.2 2023-04-20 09:51:25 +02:00
subramanian c
d30c1615ca qosmngr: qos q map based on traffic class 2023-04-20 05:36:26 +00:00
Amin Ben Romdhane
1c752ef851 icwmp: 9.3.2 2023-04-19 17:12:47 +02:00
Amin Ben Romdhane
7cbcdbc43c bbfdm: 1.0.4 2023-04-19 17:11:25 +02:00
nevadita.chatterjee
0fcd253304 map-topology: 2.5.1.19 2023-04-19 15:07:23 +05:30
Vivek Kumar Dutta
ee9528cfa6 swmodd: Select dependent kernel flags 2023-04-19 13:03:00 +05:30
Vivek Kumar Dutta
be03425493 obuspa: 7.0.2.4 2023-04-19 11:31:31 +05:30
Amit Kumar
60206d37fc qosmngr: handled number of q get 2023-04-19 11:02:59 +05:30
Amit Kumar
7a7719d10e qosmngr: handing to get number of queue 2023-04-19 10:38:06 +05:30
Vivek Kumar Dutta
67e43d1fd7 iop: Select default variants for TR-x69 modules 2023-04-18 19:31:36 +05:30
Vivek Kumar Dutta
c496d0bc1c stunc: Align with bbfdm 2023-04-18 19:28:17 +05:30
Andreas Gnau
350a814e95 Revert "iop: feeds_update: Workaround OpenWrt bug wrt targets"
This reverts commit e26a9affbd. We updated
to v22.03.4, so the workaround causes problems because the actual issue
has been fixed.
2023-04-18 12:57:03 +00:00
Vivek Kumar Dutta
91da2b0c5b twamp: 1.3.1 2023-04-18 18:16:58 +05:30
Vivek Kumar Dutta
e7a589a524 usermngr: 1.1.2 2023-04-18 18:07:14 +05:30
Vivek Kumar Dutta
bd943a5eeb periodicstats: 1.4.1 2023-04-18 17:37:52 +05:30
Andreas Gnau
dafd42d2e8 libqos: Build-depend on bcmkernel
libqos requires headers from Broadcom when built for the Broadcom
target. Add build-time dependency when being built for Broadcom.

This fixes a race-condition where the build would fail if bcmkernel
build did not finish before libethernet build.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-04-18 11:59:13 +00:00
Andreas Gnau
3e8f59a75c libethernet: Build-depend on bcmkernel
libethernet requires headers from Broadcom when built for the Broadcom
target. Add build-time dependency when being built for Broadcom.

This fixes a race-condition where the build would fail if bcmkernel
build did not finish before the libethernet build.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-04-18 11:59:13 +00:00
Amin Ben Romdhane
a522817e1f bbfdm: 1.0.3 2023-04-18 13:31:42 +02:00
Vivek Kumar Dutta
dc4065b68b periodicstats: 1.4.0 2023-04-18 15:33:47 +05:30
Vivek Kumar Dutta
a51633f9da icwmp: 9.3.1 2023-04-18 14:06:13 +05:30
Vivek Kumar Dutta
402b17bec2 bbfdm: 1.0.2 2023-04-18 12:59:09 +05:30
Amin Ben Romdhane
32c232cdbe swmodd: 2.2.1 2023-04-18 08:46:04 +02:00
Erik Karlsson
9cf5186546 Remove service_stop use
service_stop is a legacy function and it should never be used with
procd services which are automatically stopped by /etc/rc.common

Also remove unnecessary boot() which just runs the "start" function.
2023-04-18 05:59:55 +00:00
Amin Ben Romdhane
dc9e060ee5 iop: Align libbbfdm with new name 2023-04-18 01:05:26 +02:00
Amin Ben Romdhane
0a271e8449 udpecho: 2.1.0 2023-04-18 00:45:53 +02:00
Amin Ben Romdhane
b7fc922820 xmppc: 2.1.1 2023-04-18 00:37:15 +02:00
Amin Ben Romdhane
413bf32059 usermngr: 1.1.1 2023-04-18 00:22:01 +02:00
Amin Ben Romdhane
d5ccc91d7f periodicstats: 1.3.0 2023-04-18 00:17:56 +02:00
Amin Ben Romdhane
7dab676e68 icwmp: 9.3.0 2023-04-18 00:14:30 +02:00
Amin Ben Romdhane
9d9f5980d3 bbfdm: 1.0.1 2023-04-18 00:11:13 +02:00
Vivek Kumar Dutta
e0fb31082b swmodd: 2.2.0 2023-04-17 20:09:52 +05:30
Vivek Kumar Dutta
d4bae2ec02 bulkdata: 2.1.0 2023-04-17 19:19:25 +05:30
Vivek Kumar Dutta
fdc123c60b uspd: replaced by bbfdm 2023-04-17 17:18:35 +05:30
Vivek Kumar Dutta
842d3b416d xmppc: 2.1.0 2023-04-17 17:10:06 +05:30
Vivek Kumar Dutta
c75d6dfc5b usermngr: 1.1.0 2023-04-17 17:03:39 +05:30
Vivek Kumar Dutta
a199588e9f twamp: 1.3.0 2023-04-17 16:55:35 +05:30
Jakob Olsson
d34a1e379e map-agent: 4.3.1.1 2023-04-17 12:23:30 +02:00
Jakob Olsson
339a34490b map-agent: 4.3.1.0 2023-04-14 16:51:41 +02:00
Vivek Kumar Dutta
b16d125624 sulu: 2.1.0 2023-04-14 19:21:38 +05:30
Vivek Kumar Dutta
12b0229129 twamp: 1.2.6 2023-04-14 19:05:55 +05:30
Sukru Senli
de6c9598ba endptmngr: remove package
replaced by voicemngr
2023-04-14 14:04:49 +02:00
Vivek Kumar Dutta
cc94b288d7 obuspa: Align with bbfdm 2023-04-14 12:45:45 +02:00
Amin Ben Romdhane
6795490c6a icwmp: Align with bbfdm 2023-04-14 12:43:42 +02:00
Amin Ben Romdhane
c36f7967ae iop: enable bbfdmd 2023-04-14 12:41:03 +02:00
Amin Ben Romdhane
7006566087 bbfdm: Add bbfdmd deamon 2023-04-14 12:39:39 +02:00
Anjan Chanda
2870af12ed rename package wfa-capi -> capiagent 2023-04-14 11:02:13 +02:00
Sukru Senli
4d2cb43980 multi-ap: use new url for multi-ap components 2023-04-14 10:43:51 +02:00
Anjan Chanda
08397bed23 rename package wfadatad -> decollector 2023-04-14 10:23:47 +02:00
Janusz Dziedzic
b1a5ff1206 libwifi: 7.2.100 2023-04-13 15:13:24 +00:00
Amit Kumar
129dc2cf22 map-topology: restructured host wan stats handling 2023-04-13 18:00:35 +05:30
Anjan Chanda
db2176be45 ieee1905: 8.0.15 2023-04-12 08:40:34 +02:00
Erik Karlsson
176bbf7566 usp-js: fix publishing of USP agent endpoint ID
Also remove triggering on "network" and "mosquitto" configuration
change as it is not necessary re-publish on "network" change and
re-publishing on "mosquitto" change does not work anyway as it is not
possible to guarantee that "uspjs" is reloaded after "mosquitto" has
already been reloaded and is up and running.
2023-04-11 09:47:36 +00:00
Vivek Kumar Dutta
13c0240e55 obuspa: enable E2ESession context 2023-04-06 12:55:15 +05:30
Amin Ben Romdhane
1990bb5c87 bbf: 7.0.1 2023-04-05 18:57:24 +02:00
Anjan Chanda
5687972623 libethernet: 7.2.102 2023-04-05 11:00:44 +02:00
Rahul Thakur
e43f9a3b87 Update package [libethernet] 2023-04-04 21:51:18 +05:30
Rahul Thakur
e7b2f63e4d Update package [libqos] 2023-04-04 19:23:23 +05:30
Rahul Thakur
c4c94d544b Update package [libethernet] 2023-04-04 19:20:55 +05:30
Meng
b179460524 quickjs: update to the latest version
Also add patch to fix std.loadFile issue for reading proc and sysfs.
2023-04-03 12:20:18 +00:00
Rahul Thakur
0e3291c267 libdsl: update makefile 2023-04-03 17:22:44 +05:30
Rahul Thakur
8d901ea47f libethernet: update makefile 2023-04-03 17:05:33 +05:30
Marina Maslova
b5579e9e54 libqos: add missing flags in Makefile 2023-04-03 13:43:14 +03:00
Omar Kallel
7b0eceb68a icwmp: Auto dual stack
Automatically select IPv6 or IPv4 based on defined
default_wan_interface and default_wan6_interface uci options
2023-04-01 22:49:31 +05:30
Janusz Dziedzic
e9c4415255 map-controller: 4.3.0.3 2023-03-30 14:40:16 +00:00
Jakob Olsson
64e1cfb9d1 map-controller: 4.3.0.2 2023-03-30 15:11:05 +02:00
Vivek Kumar Dutta
0a3fefb3ab sulu: 2.0.13 2023-03-30 16:44:17 +05:30
Andreas Gnau
7de9e6c348 iop: feeds_update: Move feed-devices generation earlier
Move feed-devices generation earlier, before target installation to
ensure that generated files are correct earlier.

Fixes: 3472f88614 ("iop: feeds_update: Generate list of feed-devices dirs")
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-03-30 11:17:32 +02:00
Andreas Gnau
3472f88614 iop: feeds_update: Generate list of feed-devices dirs
During feeds_update, generate a list of directories that contain
additional device profiles. Via some includes in the target image
Makefiles, any <BOARD/image/<SUBTARGET>.mk inside those directories will
get included, thus allowing to extend the list of devices from an
external feed. Motivation for this is that the external feed might have
a different access permission than the target-definition.

This code should probably live in the Perl script scripts/feeds in the
future, but for now, while we are experimenting with the feature, the
existing approach in feeds_update is considered good enough.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-03-30 10:53:35 +02:00
Andreas Gnau
e58207edf0 iop: genconfig: Fix for targets with hyphens
A recent change broke genconfig for targets with hyphens. Fix this.

Fixes: a22898c92b ("iop: genconfig: Get subtarget using data from OpenWrt")
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-03-30 08:32:31 +02:00
Vivek Kumar Dutta
54402f6602 sulu: 2.0.12 2023-03-29 22:24:28 +05:30
Vivek Kumar Dutta
28c2060dd0 obuspa: 7.0.2.1 2023-03-29 22:23:53 +05:30
Vivek Kumar Dutta
06ac881ea8 usp-js: 1.2.0 2023-03-29 22:22:48 +05:30
Jakob Olsson
4350dad6ca map-agent: 4.3.0.1 2023-03-29 17:39:51 +02:00
Jakob Olsson
c7443c7c2d map-controller: 4.3.0.1 2023-03-29 17:39:51 +02:00
Andreas Gnau
a22898c92b iop: genconfig: Get subtarget using data from OpenWrt
Determine the subtarget for a given device using data generated from the
OpenWrt build system instead of parsing the image makefiles directly.
This provides correct results even when fancy tricks like includes
inside the Makefiles are used, which is the case for an upcoming feature
where additional devices can be defined in external feeds.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-03-29 15:33:49 +00:00
Jakob Olsson
39dbb175b9 map-agent: 4.3.0.0 2023-03-29 15:34:58 +02:00
Jakob Olsson
ef22cee7a0 map-controller: 4.3.0.0 2023-03-29 15:33:47 +02:00
Amin Ben Romdhane
27e9f13529 icwmp: 9.1.23 2023-03-29 15:20:36 +02:00
ratish.28
158927eb5f ethmngr: reset port before configuration 2023-03-29 15:46:47 +05:30
Vivek Kumar Dutta
f6966c07af obuspa: Integrate 7.0.2 2023-03-29 11:03:13 +05:30
Amin Ben Romdhane
7f9972a43b uspd: 2.2.29 2023-03-28 16:28:42 +02:00
Amin Ben Romdhane
1b10c4e030 bbf: 7.0.0 2023-03-28 16:28:19 +02:00
Vivek Kumar Dutta
6c4b157002 icwmp: 9.1.22 2023-03-28 18:56:52 +05:30
Anjan Chanda
0230678f60 libwifi: fix build when libwifi package is not selected 2023-03-27 16:10:10 +02:00
Sukru Senli
5cf4ea6045 iop: config: re-select luci-app-firewall
dependency is fixed in luci-app-firewall package
2023-03-27 11:47:07 +02:00
Amin Ben Romdhane
13062d1ba0 bbf: 6.9.5 2023-03-27 10:58:08 +02:00
Vivek Kumar Dutta
4ce3134b14 sulu: 2.0.11 2023-03-26 20:38:27 +05:30
Vivek Kumar Dutta
e18842ac85 sulu: 2.0.10 2023-03-24 19:22:35 +05:30
Vivek Kumar Dutta
2a87ab3bf4 bbf: 6.9.4 2023-03-24 17:28:32 +05:30
Anjan Chanda
e0534180ba libeasy: fix libnl3 and openssl search paths 2023-03-24 09:45:48 +01:00
Anjan Chanda
eaaba91dd2 deprecate easy-soc-libs single package approach
introduce separate packages with the names - libeasy, libdsl,
libethernet, libqos and libwifi.
2023-03-23 19:13:06 +01:00
Yalu Zhang
15d3510256 libvoice-d2-1.0.2: Initialize comfort noise (CN) in all vTSP streams 2023-03-23 17:30:49 +01:00
Andreas Gnau
7847ed2c93 dectmngr: Workaround for BCM hs_uart driver
BCM "high speed" UART driver does not put the device-tree node of the
device into sysfs
2023-03-22 17:37:19 +01:00
Andreas Gnau
aaae999e3e dectmngr: Get GPIO via gpiod-tools instead of board-db
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-03-22 17:37:19 +01:00
Andreas Gnau
77d1d82a89 dectmngr: Determine UART from device tree
Instead of hardcoding it, determine UART device to use for communication
with the DCX81 DECT chip using an alias in the device-tree
/aliases/dcx81-uart.

Also use the existence of the alias as an indicator of whether the
device supports DECT instead of checking for hw.board.hasDect in
board-db.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-03-22 17:37:19 +01:00
Anjan Chanda
fb324be411 wifimngr: 16.0.2 2023-03-22 17:25:21 +01:00
Yalu Zhang
d3b5a45c4c libvoice-d2-1.0.1: Fix a bug in DTMF event report 2023-03-22 16:42:45 +01:00
Amin Ben Romdhane
0d43ed56ba bbf: 6.9.3 2023-03-22 16:29:39 +01:00
Anjan Chanda
391887f09d wifimngr: 16.0.1 2023-03-22 15:01:18 +01:00
Anjan Chanda
630e2131b8 wifimngr: update dependencies on libwifi 2023-03-22 14:22:31 +01:00
Anjan Chanda
a73368eb2c easy-soc-libs: move libwifi to a separate new package 2023-03-22 14:22:31 +01:00
subramanianc
920a7d0346 qos: modularisation of qos code 2023-03-22 09:22:03 +00:00
vdutta
8ff5a2870f icwmp: 9.1.21 2023-03-22 14:20:07 +05:30
Amin Ben Romdhane
cf306ffaeb bbf: 6.9.2 2023-03-21 17:31:05 +01:00
Janusz Dziedzic
9702bdf7e5 map-agent: 4.2.0.8 2023-03-21 15:43:11 +00:00
Yalu Zhang
7f4e2c0675 voicemngr-1.0.2: Fix compiling errors on Broadcom due to _GNU_SOURCE 2023-03-21 11:38:21 +01:00
Andreas Gnau
9a3777dde9 dectmngr: cosmetic changes in init script 2023-03-21 09:21:13 +00:00
Suvendhu Hansa
964cff4e75 bbf: 6.9.1 2023-03-21 05:25:04 +00:00
Yalu Zhang
97398cb1f6 voicemngr-1.0.1: Remove the definition of _GNU_SOURCE from CFLAGS 2023-03-20 17:56:10 +01:00
suvendhu
c1d6a3f19e bbf: added UserInterface.HTTPAccess. 2023-03-20 12:30:02 +05:30
subramanian c
cd507fc16d bbf: Update qos dscp_filter commit-id 2023-03-20 04:49:26 +00:00
Anjan Chanda
b07f22de1f easy-soc-libs: 7.2.27 2023-03-17 15:39:40 +01:00
Yalu Zhang
b12efc747b libvoice-airoha-1.0.0: add /lib/voice/codecs.json which is used by codec capability 2023-03-17 10:42:44 +01:00
subramanianc
505c95f23b qos: Handle dscp_filter value in qos classify 2023-03-17 07:38:49 +00:00
Lukasz Kotasa
ff2f9a084e voicemngr: Fix json dependencies (re-delivery)
Was removed by accident.
2023-03-17 08:16:27 +01:00
vdutta
272bdc559c sulu: 2.0.9 2023-03-17 11:21:14 +05:30
Yalu Zhang
995764bd31 libvoice-broadcom-1.0.0: add /lib/voice/codecs.json which is used by codec capability 2023-03-16 16:44:33 +01:00
Yalu Zhang
7b483aa6e5 libvoice-d2-1.0.0: add /lib/voice/codecs.json which is used by codec capability 2023-03-16 16:44:33 +01:00
Lukasz Kotasa
8b3267a444 voicemngr: fix json dependencies (new sha) 2023-03-16 15:48:37 +01:00
Lukasz Kotasa
262e344ac3 Fix json dependencies 2023-03-16 13:05:05 +00:00
Amin Ben Romdhane
3676754e61 bbf: 6.8.51 2023-03-16 14:00:01 +01:00
vdutta
e8800e61b8 icwmp: 9.1.20 2023-03-16 16:20:50 +05:30
vdutta
b58d43d19a bbf: 6.8.50 2023-03-16 16:19:41 +05:30
vdutta
dc6f85134d uspd: 2.2.28 2023-03-16 16:18:23 +05:30
Marina Maslova
10a022c0ae ethmngr: linux: don't exclude 2500 from maxspeed candidates 2023-03-16 09:42:43 +00:00
Marina Maslova
f8c2a15174 ethmngr: switch airoha to linux 2023-03-16 11:25:48 +03:00
Yalu Zhang
5384408a63 voicemngr: add package dependency +libblobmsg-json 2023-03-15 17:07:48 +01:00
169 changed files with 3627 additions and 5746 deletions

View File

@@ -1,117 +0,0 @@
{
"Device.UserInterface.": {
"type": "object",
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"Device.UserInterface.RemoteAccess.": {
"type": "object",
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"Enable": {
"type": "boolean",
"read": true,
"write": true,
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "userinterface",
"section": {
"name": "remote_access"
},
"option": {
"name": "enable"
}
}
}
]
},
"Port": {
"type": "unsignedInt",
"read": true,
"write": true,
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"range": [
{
"max": 65535
}
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "userinterface",
"section": {
"name": "remote_access"
},
"option": {
"name": "port"
}
}
}
]
},
"SupportedProtocols": {
"type": "string",
"read": true,
"write": false,
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"list": {
"datatype": "string",
"enumerations": [
"HTTP",
"HTTPS"
]
},
"default": "HTTP"
},
"Protocol": {
"type": "string",
"read": true,
"write": true,
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "userinterface",
"section": {
"name": "remote_access"
},
"option": {
"name": "protocol"
}
}
}
]
}
}
}
}

View File

@@ -1,6 +0,0 @@
config userinterface 'remote_access'
option enable '0'
option interface 'wan'
option port '80'
option protocol 'HTTP'

View File

@@ -1,85 +0,0 @@
#!/bin/sh
#!/bin/sh
. /lib/functions.sh
IDENTIFIER="REMOTE-ACCESS-WAN"
log() {
echo "${@}"|logger -t firewall.userinterface -p info
}
if [ ! -f "/etc/config/userinterface" ]; then
exit 0;
fi
exec_cmd() {
if ! "$@"; then
log "Failed to run [$*]"
fi
}
configure_firewall_rule() {
local enable port protocol gui_port
local zone interface
config_load userinterface
config_get_bool enable remote_access enable 1
config_get port remote_access port
config_get interface remote_access interface
if [ "${enable}" -eq "0" ] || [ -z "${port}" ] || [ -z "${interface}" ]; then
return 0;
fi
zone="zone_${interface}_input"
iptables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate NEW,ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
zone="zone_${interface}_output"
iptables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
}
delete_firewall_rule() {
local zone interface
local CMD
config_load userinterface
config_get interface remote_access interface
# Clean remote interface rules
if [ -z "${interface}" ]; then
return 0
fi
zone="zone_${interface}_input"
CMD="iptables -w 1 -t filter -nL ${zone} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd iptables -w 1 -t filter -D "${zone}" "${rule_num}";
fi
done
zone="zone_${interface}_output"
CMD="iptables -w 1 -t filter -nL ${zone} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd iptables -w 1 -t filter -D "${zone}" "${rule_num}";
fi
done
}
# Delete existing remote access rules
delete_firewall_rule
# Configure the User Interface rule
configure_firewall_rule

View File

@@ -1,27 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
STOP=01
USE_PROCD=1
start_service() {
local enable
procd_open_instance usp
config_load userinterface
config_get_bool enable global enable 1
# Inject firewall rules
if [ "${enable}" -eq "1" ]; then
/etc/firewall.userinterface
fi
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger "userinterface"
}

View File

@@ -1,31 +1,30 @@
#
# Copyright (C) 2022 IOPSYS
# Copyright (C) 2023 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=6.8.49
PKG_NAME:=bbfdm
PKG_VERSION:=1.0.27
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_VERSION:=87ae46df8b4e221b8894fd861d2eb785ae1f3bf3
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=bc5060eb28de8855e957befe05194a68f688aa78
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libbbf_api
define Package/libbbfdm-api
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF datamodel library, provides API to extend datamodel using DotSO plugins
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
ABI_VERSION:=1.0
endef
@@ -34,14 +33,16 @@ define Package/libbbfdm/default
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl +libbbf_api \
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl +libbbfdm-api \
+BBF_TR471:obudpst
endef
define Package/libbbfdm
$(Package/libbbfdm/default)
TITLE += (internal)
VARIANT:=internal
TITLE += (default)
VARIANT:=default
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
DEFAULT_VARIANT:=1
endef
define Package/libbbfdm-mbedtls
@@ -49,23 +50,33 @@ define Package/libbbfdm-mbedtls
TITLE += (mbedtls)
DEPENDS += +PACKAGE_libbbfdm-mbedtls:libmbedtls
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
CONFLICTS := libbbfdm libbbfdm-openssl libbbfdm-wolfssl
endef
define Package/libbbfdm-openssl
$(Package/libbbfdm/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
CONFLICTS := libbbfdm-mbedtls
VARIANT:=openssl
CONFLICTS := libbbfdm libbbfdm-mbedtls libbbfdm-wolfssl
endef
define Package/libbbfdm-wolfssl
$(Package/libbbfdm/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_libbbfdm-wolfssl:libwolfssl
CONFLICTS := libbbfdm-mbedtls libbbfdm-openssl
VARIANT:=wolfssl
CONFLICTS := libbbfdm libbbfdm-mbedtls libbbfdm-openssl
endef
define Package/bbfdmd
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Datamodel ubus backend
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +PACKAGE_libbbfdm-mbedtls:libbbfdm-mbedtls \
+PACKAGE_libbbfdm-openssl:libbbfdm-openssl +PACKAGE_libbbfdm-wolfssl:libbbfdm-wolfssl \
+PACKAGE_libbbfdm:libbbfdm
endef
define Package/userinterface
@@ -76,14 +87,14 @@ define Package/userinterface
endef
define Package/userinterface/description
Package to add Device.UserInterface. datamodel support using libbbf JSON Plugin
Package to add Device.UserInterface. datamodel support
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
define Package/libbbf_api/description
define Package/libbbfdm-api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
@@ -100,6 +111,7 @@ endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
-DBBF_WIFI_DATAELEMENTS=ON
ifeq ($(CONFIG_BBF_TR104),y)
CMAKE_OPTIONS += \
@@ -137,6 +149,10 @@ CMAKE_OPTIONS += \
-DBBF_DOTSO_PLUGIN=ON
endif
ifeq ($(BUILD_VARIANT),default)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
@@ -149,23 +165,35 @@ ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
endif
define Package/libbbf_api/install
ifeq ($(CONFIG_PACKAGE_bbfdmd),y)
CMAKE_OPTIONS += \
-DBBFDMD_MAX_MSG_LEN:Integer=10485760
endif
define Package/libbbfdm-api/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/lib/
endef
define Package/libbbfdm/default/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/lib/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
ifeq ($(CONFIG_BBF_TR143),y)
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
endif
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
$(INSTALL_DIR) $(1)/etc/bbfdm/json
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
endif
endef
define Package/libbbfdm/default/prerm
@@ -174,22 +202,40 @@ define Package/libbbfdm/default/prerm
exit 0
endef
define Package/bbfdmd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/src/bbfdmd $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/json/input.json $(1)/etc/bbfdm/
endef
define Package/userinterface/install
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DATA) ./files/etc/bbfdm/json/UserInterface.json $(1)/etc/bbfdm/json/
$(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/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/95-portmap-firewall
$(INSTALL_BIN) ./files/etc/firewall.userinterface $(1)/etc/firewall.userinterface
$(INSTALL_BIN) ./files/etc/firewall.portmap $(1)/etc/firewall.portmap
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)
@@ -198,16 +244,22 @@ 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)/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm/dmtree/tr181/device.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm/dmtree/vendor/vendor.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbfdm-api/
# Work around for backward compatibility
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbf_api/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/libbbfdm_api.h $(1)/usr/include/libbbf_api.h
endef
$(eval $(call BuildPackage,userinterface))
$(eval $(call BuildPackage,libbbf_api))
$(eval $(call BuildPackage,libbbfdm-api))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,libbbfdm-openssl))
$(eval $(call BuildPackage,libbbfdm-wolfssl))
$(eval $(call BuildPackage,libbbfdm-mbedtls))
$(eval $(call BuildPackage,bbfdmd))
$(eval $(call BuildPackage,userinterface))

View File

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

View File

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

View File

@@ -0,0 +1,74 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "${@}"|logger -t firewall.dnat -p info
}
exec_cmd() {
if ! eval "$*"; then
log "Failed to run [$*]"
fi
}
reorder_dnat_rules() {
nat_chains=$(iptables -t nat -S | grep -E "^-N zone[a-zA-Z0-9_]+prerouting$" | cut -d' ' -f 2)
for chain in ${nat_chains}; do
# Collect empty remote host & empty dport rules
EMPTY_HOST_PORT=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep -v "\-\-dport" | grep -v "\-s ")
if [ -n "${EMPTY_HOST_PORT}" ]; then
echo "${EMPTY_HOST_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Collect empty remote host but non empty dport rules
EMPTY_HOST=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep "\-\-dport" | grep -v "\-s ")
if [ -n "${EMPTY_HOST}" ]; then
echo "${EMPTY_HOST}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Collect non empty remote host but empty dport rules
EMPTY_PORT=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep -v "\-\-dport" | grep "\-s ")
if [ -n "${EMPTY_PORT}" ]; then
echo "${EMPTY_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Now add rules as per datamodel precedence shown below
## Non empty remote host, empty dport
## empty remote host, non empty dport
## empty remote host, empty dport
if [ -n "${EMPTY_PORT}" ]; then
echo "${EMPTY_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
if [ -n "${EMPTY_HOST}" ]; then
echo "${EMPTY_HOST}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
if [ -n "${EMPTY_HOST_PORT}" ]; then
echo "${EMPTY_HOST_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
done
}
# Re-order portmapping rules according to precedence hierarchy
reorder_dnat_rules

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,33 @@
#!/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,9 @@
#!/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

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

View File

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

View File

@@ -1,28 +1,24 @@
#
# Copyright (C) 2022 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.0.10
PKG_VERSION:=2.1.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
PKG_SOURCE_VERSION:=6e85d2032e66df581fae7c72cd83cc89367b8fc8
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
PKG_SOURCE_VERSION:=2dd55d9c9eb01ed1b11e16bad9e2c3e8badfffeb
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk

View File

@@ -1,17 +1,17 @@
#
# Copyright (C) 2021 IOPSYS
# Copyright (C) 2021-2023 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=wfa-capi
PKG_VERSION:=2.0.1
PKG_NAME:=capiagent
PKG_VERSION:=2.1.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3e671db8f567b19c109fc13b25bc571c4c73a962
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfa-capi.git
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
endif
@@ -24,18 +24,18 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
#define Package/wfa-capi/config
#define Package/capiagent/config
# source "$(SOURCE)/Config.in"
#endef
define Package/wfa-capi
TITLE+= wfa-capi (agent daemon for Wi-Fi Alliance's CAPI commands)
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
endef
define Package/wfa-capi/description
This package provides agent for WiFi Alliance's CAPI specification.
define Package/capiagent/description
This package provides agent for the WiFi Alliance's CAPI specification.
endef
TARGET_CFLAGS += \
@@ -46,7 +46,7 @@ TARGET_CFLAGS += \
MAKE_PATH:=src
define Package/wfa-capi/install
define Package/capiagent/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/lib/wifi/capi
@@ -54,4 +54,4 @@ define Package/wfa-capi/install
$(CP) $(PKG_BUILD_DIR)/src/scripts/* $(1)/lib/wifi/capi
endef
$(eval $(call BuildPackage,wfa-capi))
$(eval $(call BuildPackage,capiagent))

View File

@@ -4,25 +4,27 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wfadatad
PKG_VERSION:=4.0.1.7
PKG_NAME:=decollector
PKG_VERSION:=4.0.2.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b165177f12b2cef129f36bff1be077b65fbc86aa
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git
PKG_SOURCE_VERSION:=d33a3ffec1a960aa7b5d8491a77ce4e83a9a50b1
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/wfadatad-collector
define Package/decollector
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi DataElements Collector Proxy
@@ -30,12 +32,13 @@ define Package/wfadatad-collector
+libeasy +libwifiutils +libieee1905 +map-plugin
endef
define Package/wfadatad-collector/description
It implements the WiFi DataElements Collector Proxy component.
define Package/decollector/description
It implements the WiFi DataElements Agent as defined in the Wi-Fi Alliance's
DataElements specification.
endef
define Package/wfadatad-collector/config
define Package/decollector/config
source "$(SOURCE)/Config.in"
endef
@@ -54,7 +57,7 @@ TARGET_CFLAGS += \
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/wfadatad/ $(PKG_BUILD_DIR)/
rsync -r --exclude=.* ~/git/decollector/ $(PKG_BUILD_DIR)/
endef
endif
@@ -63,15 +66,15 @@ MAKE_PATH:=src
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_DECOLLECTOR_EASYMESH_VERSION)
EXECS := \
$(if $(CONFIG_PACKAGE_wfadatad-collector),decollector)
$(if $(CONFIG_PACKAGE_decollector),decollector)
MAKE_FLAGS += EXECS="$(EXECS)"
define Package/wfadatad-collector/install
define Package/decollector/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/decollector.init $(1)/etc/init.d/decollector
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/decollector $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,wfadatad-collector))
$(eval $(call BuildPackage,decollector))

View File

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

View File

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

View File

@@ -13,7 +13,7 @@ PKG_VERSION:=1.2.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=bb754ae620a9fc66fd6fc0745f0fead0708c7a17
PKG_SOURCE_VERSION:=43dec92b1c86be7859521da337e7bd1168848b26
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -21,8 +21,6 @@ start_service() {
}
stop_service() {
[ -n "$DSLMNGR" ] && service_stop $DSLMNGR
xtm_remove_devices
xdsl_stop
}
@@ -45,4 +43,3 @@ reload_service() {
service_triggers() {
procd_add_reload_trigger dsl
}

View File

@@ -1,156 +0,0 @@
#
# Copyright (C) 2020 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs
PKG_VERSION:=7.2.26
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=350793b45873480d8981dac540c4145705a7b7ba
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/easy-soc-libs
SECTION:=libs
CATEGORY:=Libraries
TITLE:=IOPSYS Easy SoC libraries
SUBMENU:=IOPSYS Easy SoC libraries
DEPENDS:=+libopenssl
MENU:=1
endef
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
TARGET_WIFI_TYPE=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_iopsys_x86),y)
TARGET_PLATFORM=TEST
TARGET_WIFI_TYPE=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_iopsys_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_WIFI_TYPE=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TARGET_WIFI_TYPE=MEDIATEK MAC80211
TARGET_CFLAGS +=-DIOPSYS_ECONET
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
TARGET_PLATFORM=IPQ95XX
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIPQ95XX
else ifeq ($(CONFIG_TARGET_iopsys_mediatek),y)
TARGET_PLATFORM=LINUX
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIOPSYS_LINUX
else
$(info Unexpected CONFIG_TARGET, use default MAC80211)
TARGET_PLATFORM=MAC80211
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIOPSYS_MAC80211
endif
subdirs := \
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
$(if $(CONFIG_PACKAGE_libwifiutils),libwifi) \
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
$(if $(CONFIG_PACKAGE_libqos),libqos)
ifneq ($(CONFIG_PACKAGE_libwifi),)
TARGET_CFLAGS +=-DHAS_WIFI
endif
esl-pkgs := \
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
$(if $(CONFIG_PACKAGE_libwifiutils),libwifiutils) \
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
$(if $(CONFIG_PACKAGE_libqos),libqos)
esl-pkgs-all := \
libeasy \
libwifiutils \
libwifi \
libdsl \
libethernet \
libqos
ifeq ($(CONFIG_LIBWIFI_USE_CTRL_IFACE),y)
TARGET_CFLAGS +=-DLIBWIFI_USE_CTRL_IFACE
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)" \
PLATFORM="$(TARGET_PLATFORM)" \
WIFI_TYPE="$(TARGET_WIFI_TYPE)" \
subdirs="$(subdirs)"
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/easy-soc-libs/ $(PKG_BUILD_DIR)/
endef
endif
include easy.mk
include wifi.mk
include dsl.mk
include ethernet.mk
include qos.mk
ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),\
$(PKG_BUILD_DIR)/.config_$(patsubst "%",%,$(CONFIG_TARGET_PROFILE)))
define Build/Compile/rebuild
$(FIND) $(PKG_BUILD_DIR) -name \*.o -or -name \*.so\* | $(XARGS) rm -f;
$(if $(wildcard $(PKG_BUILD_DIR)/config_*), \
rm -f $(PKG_BUILD_DIR)/.config_*)
endef
endif
STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(TARGET_CFLAGS) | mkhash md5)
define Build/Compile
$(Build/Compile/rebuild)
touch $(PKG_BUILD_DIR)/.config_$(CONFIG_TARGET_PROFILE)
$(call Build/Compile/Default)
$(foreach dir,$(esl-pkgs),$(call Build/Compile/$(dir)))
endef
define Build/InstallDev
$(foreach dir,$(esl-pkgs),$(call Build/InstallDev/$(dir),$(1),$(2));)
endef
define Package/easy-soc-libs/install
:
endef
$(eval $(foreach e,$(esl-pkgs-all),$(call BuildPackage,$(e))))

View File

@@ -1,44 +0,0 @@
define Package/libdsl
$(call Package/easy-soc-libs)
TITLE:= xDSL library (libdsl)
endef
define Package/libdsl/config
if PACKAGE_libdsl
config LIBDSL_DEBUG
depends on PACKAGE_libdsl
bool "Enable dsl debugging"
default n
config LIBDSL_TEST
depends on PACKAGE_libdsl
bool "Enable dsl test program"
default n
endif
endef
define Build/InstallDev/libdsl
$(INSTALL_DIR) $(1)/usr/include/xdsl
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libdsl/xdsl.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/libdsl/xtm.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/libdsl/common.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/libdsl/libdsl.so* $(1)/usr/lib/
endef
ifeq ($(CONFIG_LIBDSL_TEST),y)
define Build/Compile/libdsl
$(MAKE) -C "$(PKG_BUILD_DIR)/libdsl/test" $(MAKE_FLAGS)
endef
endif
define Package/libdsl/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/libdsl/libdsl.so* $(1)/usr/lib/
ifeq ($(CONFIG_LIBDSL_TEST),y)
$(CP) $(PKG_BUILD_DIR)/libdsl/test/libdsl_test $(1)/usr/bin/
endif
endef

View File

@@ -1,25 +0,0 @@
define Package/libeasy
$(call Package/easy-soc-libs)
TITLE:= Common helper functions library (libeasy)
DEPENDS+=+libnl +libnl-route
endef
define Build/InstallDev/libeasy
$(INSTALL_DIR) $(1)/usr/include/easy
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libeasy/easy.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/libeasy/event.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/libeasy/utils.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/libeasy/if_utils.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/libeasy/debug.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/libeasy/hlist.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
endef
define Package/libeasy/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
endef

View File

@@ -1,27 +0,0 @@
define Package/libethernet
$(call Package/easy-soc-libs)
TITLE:= Ethernet library (libethernet)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_airoha:ecnt_api
endef
define Package/libethernet/config
config LIBETHERNET_DEBUG
depends on PACKAGE_libethernet
bool "Enable ethernet debugging"
default n
endef
define Build/InstallDev/libethernet
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libethernet/ethernet.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libethernet/libethernet.so $(1)/usr/lib/
endef
define Package/libethernet/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libethernet/libethernet.so* $(1)/usr/lib/
endef

View File

@@ -1,27 +0,0 @@
define Package/libqos
$(call Package/easy-soc-libs)
TITLE:= QoS library (libqos)
DEPENDS+=+libnl +libnl-route +libeasy
endef
define Package/libqos/config
config LIBQOS_DEBUG
depends on PACKAGE_libqos
bool "Enable qos debugging"
default n
endef
define Build/InstallDev/libqos
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libqos/include/qos.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libqos/libqos.so $(1)/usr/lib/
endef
define Package/libqos/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libqos/libqos*.so* $(1)/usr/lib/
endef

View File

@@ -1,53 +0,0 @@
define Package/libwifiutils
$(call Package/easy-soc-libs)
TITLE:= WiFi utility library (libwifiutils.so)
DEPENDS+=+libnl +libnl-route +libeasy
endef
define Build/InstallDev/libwifiutils
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/wifidefs.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/wifiutils.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifiutils/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifi
$(call Package/easy-soc-libs)
TITLE:= WiFi library (libwifi)
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcmkernel
endef
define Package/libwifi/config
if PACKAGE_libwifi
config LIBWIFI_DEBUG
depends on PACKAGE_libwifi
bool "Enable debugging in libwifi"
default n
config LIBWIFI_USE_CTRL_IFACE
bool "Create UNIX sockets to interface with hostapd/wpa_supplicant"
default n
endif
endef
define Build/InstallDev/libwifi
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/wifiops.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/wifi.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
endef
define Package/libwifi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
endef

View File

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

View File

@@ -1,68 +0,0 @@
#
# Copyright (C) 2018 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=endptmngr
PKG_VERSION:=0.6
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
PKG_SOURCE_VERSION:=fb85081443c19b5062bede49c80b1802c0f05d34
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
export CONFIG_BCM_CHIP_ID
include $(INCLUDE_DIR)/package.mk
define Package/endptmngr/config
source "$(SOURCE)/Config.in"
endef
define Package/endptmngr
CATEGORY:=Utilities
TITLE:=Broadcom Voice Endpoint Manager
URL:=
DEPENDS:= +libubox +ubus +libpicoevent +uci +bcmkernel @TARGET_HAS_VOICE @BCM_VOICE
endef
define Package/endptmngr/description
endptmngr
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* ~/git/endptmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-Wall \
-Werror
define Package/endptmngr/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/endptmngr $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,endptmngr))

View File

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

View File

@@ -23,7 +23,7 @@ define Package/ethmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ethernet status and configration utility
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_iopsys_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl
endef
define Package/ethmngr/description
@@ -37,7 +37,7 @@ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_iopsys_mediatek),)
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_mediatek),)
define Build/Compile
endef
endif
@@ -46,12 +46,10 @@ define Package/ethmngr/install
$(CP) ./files/common/* $(1)/
ifneq ($(CONFIG_TARGET_brcmbca),)
$(CP) ./files/broadcom/* $(1)/
else ifneq ($(CONFIG_TARGET_airoha),)
$(CP) ./files/airoha/* $(1)/
else
$(CP) ./files/linux/* $(1)/
endif
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_iopsys_mediatek),)
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_mediatek),)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
endif

View File

@@ -1,208 +0,0 @@
#!/bin/sh
. /lib/functions.sh
unset -f switchmgr
# alias for switchmgr
switchmgr() {
"/userfs/bin/switchmgr" "$@"
}
unset -f tc3162_get_lan_port
# get lan port port by ifname
# arg1: port ifname, ex: eth0.1
tc3162_get_lan_port() {
[[ -z "$1" ]] && return 255
local ifname="$1"
local if_idx=255
# only for tc3162 eth switch ports (eth0.x, 0 < x < 7)
case "${ifname}" in
eth0.*)
;;
*)
logger -t "port-management" \
"unsupported - ${ifname} is not tc3162 switch port"
return 255
;;
esac
let "if_idx=$(echo "${ifname}" | cut -f2 -d'.')"
[[ -z "${if_idx}" ]] && return 255
[[ ${if_idx} -lt 1 || ${if_idx} -gt 6 ]] && {
logger -t "port-management" \
"incorrect tc3162 lan port index ${if_idx} picked from ifname ${ifname}"
return 255
}
let "if_idx=${if_idx}-1"
return ${if_idx}
}
unset -f tc3162_get_mapped_port
# get mapped switch port by ifname
# arg1: port ifname, ex: eth0.1
tc3162_get_mapped_port() {
[[ -z "$1" ]] && return 255
local ifname="$1"
local if_idx=255
local prtmap_procfile="/proc/tc3162/eth_portmap"
local lan_prt=255
local port=255
local prtmap_out_line_num=4
local prtmap_out_line=""
# check "lan port map" marker in portmap output string
prtmap_out_line="$(sed -n "${prtmap_out_line_num}p" ${prtmap_procfile})"
[[ ${prtmap_out_line} != "lan_port_map" ]] && return 255
tc3162_get_lan_port "${ifname}"
let "if_idx=$?"
[[ -z "${if_idx}" || ${if_idx} -eq 255 ]] && return
# get lan portmapping string "lan_port mapped_port" for ifname by it's index
let "prtmap_out_line_num=${prtmap_out_line_num}+1+${if_idx}"
prtmap_out_line="$(sed -n "${prtmap_out_line_num}p" ${prtmap_procfile})"
# get and check lan port index from lan portmapping string
lan_prt=$(echo "${prtmap_out_line}" | cut -f 1 -d' ')
[[ -z "${lan_prt}" || "${if_idx}" != "${lan_prt}" ]] && return 255
# get and check mapped port from lan portmapping string
let "port=$(echo "${prtmap_out_line}" | cut -f 2 -d' ')"
[[ ${port} -lt 0 || ${port} -gt 255 ]] && return 255
return ${port}
}
unset -f get_max_port_speed
# arg1: port ifname, ex: eth0.1
get_max_port_speed() {
[[ -z "$1" ]] && { echo 0; return; }
local ifname="$1"
local port=255
local speed=0
[[ -d "/sys/class/net/${ifname}" ]] || {
logger -t "port-management" "interface ${ifname} is not found"
return
}
tc3162_get_lan_port "${ifname}"
let "port=$?"
[[ -z "${port}" || ${port} -eq 255 ]] && return
# tc3162 capability for all ports is 1Gbps
speed=1000
echo $speed
}
unset -f power_updown
# arg1: port ifname, ex: eth0.1
# arg2: port enabled, ex: 0/1/off/on/..
power_updown() {
[[ -z "$1" ]] && return
[[ -z "$2" ]] && return
local ifname="$1"
local enabled="$2"
local port=255
[[ -d "/sys/class/net/${ifname}" ]] || {
logger -t "port-management" "interface ${ifname} is not found"
return
}
let "enabled=$(get_bool "${enabled}" "-1")"
[[ ${enabled} -eq -1 ]] && return
tc3162_get_lan_port "${ifname}"
let "port=$?"
[[ -z "${port}" || ${port} -eq 255 ]] && return
switchmgr phy admin "${port}" "${enabled}"
}
unset -f set_port_settings
# arg1: port ifname, ex: eth0.1
# arg2: port enabled, ex: 0/1/off/on/..
# arg3: port speed, ex: 1000
# arg4: port duplex, ex: full
# arg5: port autoneg, ex: 0/1/off/on/..
# arg6: port eee, ex: 0/1/off/on/..
# arg7: port pause, ex: 0/1/off/on/..
set_port_settings() {
[[ -z "$1" ]] && return
[[ -z "$2" ]] && return
[[ -z "$3" ]] && return
[[ -z "$4" ]] && return
[[ -z "$5" ]] && return
[[ -z "$6" ]] && return
[[ -z "$7" ]] && return
local ifname="$1"
local enabled="$2"
local speed="$3"
local duplex="$4"
local autoneg=$5
local eee="$6"
local pause="$7"
local port=255
local speedmode=1
local last_speed=0
[[ -d "/sys/class/net/${ifname}" ]] || {
logger -t "port-management" "interface ${ifname} is not found"
return
}
let "enabled=$(get_bool "${enabled}" "-1")"
[[ ${enabled} -eq -1 ]] && return
let "autoneg=$(get_bool "${autoneg}" "-1")"
[[ ${autoneg} -eq -1 ]] && return
let "eee=$(get_bool "${eee}" "-1")"
[[ ${eee} -eq -1 ]] && return
let "pause=$(get_bool "${pause}" "-1")"
[[ ${pause} -eq -1 ]] && return
duplex="$(echo "${duplex}" | awk '{print tolower($0)}')"
[[ "${duplex}" != "half" && "${duplex}" != "full" ]] && return
tc3162_get_lan_port "${ifname}"
let "port=$?"
[[ -z "${port}" || ${port} -eq 255 ]] && return
last_speed="$(switchmgr phy maxspeed "${port}" | cut -f2 -d':')"
[[ -z "${last_speed}" || "${last_speed}" == "*Down*" ]] \
&& last_speed=${speed}
switchmgr phy pause "${port}" "${pause}"
# set speedmode: speed+duplex+autoneg
# FIXME: switchmgr has no separate setting for 1Gbps speed - use autoneg instead
if [[ ${autoneg} -eq 1 || ${speed} -gt 100 ]]; then
switchmgr phy speedmode ${port} "1"
else
[[ ${speed} -gt 10 ]] && let "speedmode=2" || let "speedmode=4"
[[ "${duplex}" == "half" ]] && let "speedmode=${speedmode}+1"
switchmgr phy speedmode "${port}" "${speedmode}"
fi
# TODO: implement MAC control register manipulations (mapped ports used) for
# eee settings change
# separate (tx/rx) pause (flow control) settings change
# set speed to 1Gbps separately from autoneg mode
# FIXME: workaround for duplex/pause settings being not applied if speed is unchanged
[[ ${last_speed} -eq ${speed} ]] && power_updown "${ifname}" 0
power_updown "${ifname}" ${enabled}
}

View File

@@ -6,16 +6,16 @@ get_max_port_speed() {
fi
local ifname="$1"
local phycap="$(ethctl $ifname media-type 2>/dev/null | grep 'PHY Capabilities' | awk '{print$NF}' | cut -d'|' -f1)"
local phycap="$(ethctl $ifname media-type 2>/dev/null | grep 'PHY Speed Capabilities' | awk '{print$NF}')"
local speed=1000
case "$phycap" in
10GFD) speed=10000 ;;
5GFD) speed=5000 ;;
2.5GFD) speed=2500 ;;
1GFD|1GHD) speed=1000 ;;
100MFD|100MHD) speed=100 ;;
10MFD|10MHD) speed=10 ;;
10GFD*) speed=10000 ;;
5GFD*) speed=5000 ;;
2.5GFD*) speed=2500 ;;
1GFD*) speed=1000 ;;
100MFD*|100MHD*) speed=100 ;;
10MFD*|10MHD*) speed=10 ;;
esac
echo $speed
@@ -40,6 +40,12 @@ get_port_number() {
done
}
# arg1: port ifname, ex: eth0
reset_port() {
local ifname="$1"
ethctl $ifname phy-reset >/dev/null
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
power_updown() {
@@ -86,6 +92,9 @@ set_port_settings() {
phycaps="$(ethctl $ifname media-type ${pyhendpoint:+ port $pyhendpoint} | awk -F'PHY Capabilities: ' '{print$2}')"
numofcaps="$(echo $phycaps | tr '|' ' ' | wc -w)"
# Reset the port before setting new params
reset_port $ifname
if [ "$numofcaps" == "1" ]; then
logger -t "port-management" "$ifname is capable of $phycaps only; not setting speed/duplex"
else

View File

@@ -6,7 +6,7 @@ get_max_port_speed() {
fi
local ifname="$1"
local phycap="$(ethtool $ifname | grep -A 10 "Supported link modes" | grep 000 | tail -n 1 | awk '{print$NF}')"
local phycap="$(ethtool $ifname | grep -A 10 "Supported link modes" | grep 00 | tail -n 1 | awk '{print$NF}')"
local speed=1000
case "$phycap" in

View File

@@ -1,106 +0,0 @@
#
# Copyright (C) 2022 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=evoice
PKG_VERSION:=0.2.39
LOCAL_DEV=0
LOCAL_DEV_EVOICE_DIR=~/voip/evoice
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/evoice.git
PKG_SOURCE_VERSION:=30d65330de0368f73ecf4a2e804c39a2ee280454
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
#PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Network
SUBMENU:=Telephony
TITLE:=Ensemble Voice
URL:=
DEPENDS:= +libubox +libubus +libpicoevent +libuci +libstdcpp +libopenssl +libjson-c +libblobmsg-json\
+TARGET_brcmbca:bcmkernel\
+TARGET_airoha:kmod-voip_driver\
+TARGET_airoha:voip_app +libbbf_api
endef
define Package/$(PKG_NAME)/description
Ensemble Voice. A stand alone SIP VoIP application.
endef
ifeq ($(LOCAL_DEV),1)
# If you want to build the code from your own local repositiory enable
# LOCAL_DEV and set LOCAL_DEV_EVOICE_DIR to your own git repository.
define Build/Prepare
@echo "======================================================="
@echo "DEVELOPMENT BUILD! rsync $(LOCAL_DEV_EVOICE_DIR) to $(PKG_BUILD_DIR)"
@echo "======================================================="
rsync -a $(LOCAL_DEV_EVOICE_DIR)/* $(PKG_BUILD_DIR)/
endef
endif
IDIR = $(STAGING_DIR)/usr/include
TONES_INI_REQUIRED=
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
BDIR = bcm963xx/userspace/private/apps/voice
CC_FLAGS = -I$(IDIR) -I$(IDIR)/$(BDIR)/inc\
-I$(IDIR)/bcm963xx/xchg/bos/publicInc\
-I$(IDIR)/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
TRG=SVrgBcmFxs
JSONFILE=codecs_brcm.json
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TONES_INI_REQUIRED=y
TRG=SVrgMtekOwrt
JSONFILE=codecs_airoha.json
endif
# disable temporarily some not important warnings, force PIC
CC_FLAGS_VS=$(CC_FLAGS) -Wno-unused-parameter -Wno-unused-function -fPIC
export TARGET_PLATFORM
#used and altered by BIDE makefiles
export _XFLAGS
BIDE_MAKE_OPTS = -r -R -C $(PKG_BUILD_DIR) -f _bld/src/cdabs.mk\
SWB=b_gxxqca6 HWA=a_openwrt HWC=c_hosted OSP=p_posix LIF=cerder DBG=dbg
define Build/Compile
@echo "TARGET_PLATFORM=${TARGET_PLATFORM}"
+$(MAKE) $(BIDE_MAKE_OPTS) CC_FLAGS="$(CC_FLAGS)" TRG=$(TRG)
@echo "clean libvoiceservice before building shared lib!"
+$(MAKE) $(BIDE_MAKE_OPTS) CC_FLAGS="$(CC_FLAGS_VS)" TRG=libvoiceservice cleanall
+$(MAKE) $(BIDE_MAKE_OPTS) CC_FLAGS="$(CC_FLAGS_VS)" TRG=libvoiceservice
endef
define Package/evoice/install
$(CP) ./files/* $(1)/
$(if $(TONES_INI_REQUIRED),,$(RM) $(1)/etc/evoice/tones.ini)
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(1)/lib/voice/$(JSONFILE) $(1)/lib/voice/codecs_evoice.json
$(RM) $(1)/lib/voice/codecs_brcm.json
$(RM) $(1)/lib/voice/codecs_airoha.json
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/evoice $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/libvoiceservice.so $(1)/usr/lib/bbfdm/
endef
$(eval $(call BuildPackage,evoice))

View File

@@ -1,334 +0,0 @@
config SIPClient 'Client1'
option Enable '1'
option RegisterMode 'RFC3261'
option AuthUserName '51234'
option AuthPassword '51234'
option Network 'Network1'
option MaxSessions '5'
option RegisiterURI '51234@sip-proxy.iopsys.eu'
option E164Format '1'
config SIPClient 'Client2'
option Enable '1'
option RegisterMode 'RFC3261'
option AuthUserName '51235'
option AuthPassword '51235'
option Network 'Network1'
option MaxSessions '5'
option RegisiterURI '51235@sip-proxy.iopsys.eu'
option E164Format '1'
config SIPNetwork 'Network1'
option Enable '1'
option ProxyServer 'sip-proxy.iopsys.eu'
option AcceptFromProxyOnly '0'
option ProxyServerPort '5060'
option ProxyServerTransport 'UDP'
option RegistrarServer 'sip-proxy.iopsys.eu'
option RegistrarServerPort '5060'
option RegistrarServerTransport 'UDP'
option RegistrationPeriod '3240'
option RegisterExpires '3600'
option UserAgentDomain ' '
option TimerRegistrationFailed '120'
option TimerT1 '500'
option VoIPProfile 'VoIPProfile1'
option SIPSessionTimerEnable '0'
option SIPSessionExpireInterval '1800'
option SIPSessionMinimumTimer '90'
option SIPSessionRefresher 'NONE'
option SIPSessionTimerMode 'REQUEST'
option SIPSessionRefreshRequest 'UPDATE'
list CodecList '1CodecProfile1'
list CodecList '1CodecProfile2'
list CodecList '1CodecProfile3'
list CodecList '1CodecProfile5'
list CodecList '1CodecProfile4'
config CodecProfile '1CodecProfile1'
option Enable '1'
option Codec 'G.711ALaw'
option PacketizationPeriod '20'
option SilenceSupression '1'
config CodecProfile '1CodecProfile2'
option Enable '1'
option Codec 'G.711MuLaw'
option PacketizationPeriod '20'
option SilenceSupression '1'
config CodecProfile '1CodecProfile3'
option Enable '1'
option Codec 'G.726'
option PacketizationPeriod '20'
option SilenceSupression '0'
config CodecProfile '1CodecProfile4'
option Enable '1'
option Codec 'G.722'
option PacketizationPeriod '20'
option SilenceSupression '0'
config CodecProfile '1CodecProfile5'
option Enable '1'
option Codec 'G.729'
option PacketizationPeriod '20'
option SilenceSupression '0'
config VoIPProfile 'VoIPProfile1'
option Enable '1'
option DTMFMethod 'RFC4733'
option RTP '1RTP'
config RTP '1RTP'
option LocalPortMin '10020'
option LocalPortMax '10039'
option JitterBufferType 'Static'
config FXXPorts 'POTS'
option Region 'US'
config FXSPorts 'FXS1'
option Enable '1'
option DialType 'Tone'
option TransmitGain '0'
option ReceiveGain '0'
option EchoCancellationEnable '1'
config FXSPorts 'FXS2'
option Enable '1'
option DialType 'Tone'
option TransmitGain '0'
option ReceiveGain '0'
option EchoCancellationEnable '1'
config Extension 'Extension1'
option Enable '1'
option ExtensionNumber '10#'
option Provider 'FXS1'
option CallingFeatures 'Set1'
option Name 'Phone 1'
config Extension 'Extension2'
option Enable '1'
option ExtensionNumber '11#'
option Provider 'FXS2'
option CallingFeatures 'Set1'
option Name 'Phone 2'
config Line 'Line1'
option Enable '1'
option Provider 'Client1'
option CallingFeatures 'Set1'
config Line 'Line2'
option Enable '1'
option Provider 'Client2'
option CallingFeatures 'Set2'
config IncomingMap 'IncomingMap1'
option Enable '1'
option Extension 'Extension1'
option Line 'Line1'
config IncomingMap 'IncomingMap2'
option Enable '1'
option Extension 'Extension2'
option Line 'Line2'
config IncomingMap 'IncomingMap3'
option Enable '0'
option Extension 'Extension2'
option Line 'Line1'
config OutgoingMap 'OutgoingMap1'
option Enable '1'
option Extension 'Extension1'
option Line 'Line1'
config OutgoingMap 'OutgoingMap2'
option Enable '1'
option Extension 'Extension2'
option Line 'Line2'
config CallingFeatures 'Set1'
option CallerIDEnable '1'
option CallerIDNameEnable '1'
option CallForwardUnconditionalEnable '0'
option CallForwardUnconditionalNumber ' '
option CallForwardOnBusyEnable '0'
option CallForwardOnBusyNumber ' '
option CallForwardOnNoAnswerEnable '0'
option CallForwardOnNoAnswerRingTimeout '24'
option CallForwardOnNoAnswerNumber ' '
option CallTransferEnable '1'
option MWIEnable '1'
option VMWIEnable '1'
option LineMessagesWaiting '0'
option AnonymousCallRejectionEnable '0'
option AnonymousCallEnable '1'
option DoNotDisturbEnable '1'
option RepeatDialEnable '1'
option VoiceMailEnable '1'
option CallPickUpEnable '1'
option CCBSEnable '1'
option CallWaitingEnable '0'
config CallingFeatures 'Set2'
option CallerIDEnable '1'
option CallerIDNameEnable '1'
option CallForwardUnconditionalEnable '0'
option CallForwardUnconditionalNumber ' '
option CallForwardOnBusyEnable '0'
option CallForwardOnBusyNumber ' '
option CallForwardOnNoAnswerEnable '0'
option CallForwardOnNoAnswerRingTimeout '24'
option CallForwardOnNoAnswerNumber ' '
option CallTransferEnable '1'
option MWIEnable '1'
option VMWIEnable '1'
option LineMessagesWaiting '0'
option AnonymousCallRejectionEnable '0'
option AnonymousCallEnable '1'
option DoNotDisturbEnable '1'
option RepeatDialEnable '1'
option VoiceMailEnable '1'
option CallPickUpEnable '1'
option CCBSEnable '1'
option CallWaitingEnable '1'
config NumberingPlan 'NumberingPlan1'
option MinimumNumberOfDigits '1'
option MaximumNumberOfDigits '15'
option InterDigitTimerStd '2000'
option InterDigitTimerOpen '2000'
option TerminationDigit '#'
config NumberingPlan 'NumberingPlan2'
option MinimumNumberOfDigits '5'
option MaximumNumberOfDigits '15'
option InterDigitTimerStd '2000'
option InterDigitTimerOpen '2000'
option TerminationDigit ' '
list PrefixList '2PrefixInfo1'
list PrefixList '2PrefixInfo2'
list PrefixList '2PrefixInfo3'
list PrefixList '2PrefixInfo4'
list PrefixList '2PrefixInfo5'
list PrefixList '2PrefixInfo6'
list PrefixList '2PrefixInfo7'
list PrefixList '2PrefixInfo8'
list PrefixList '2PrefixInfo9'
config NumberingPlan 'NumberingPlan3'
option MinimumNumberOfDigits '5'
option MaximumNumberOfDigits '15'
option InterDigitTimerStd '2000'
option InterDigitTimerOpen '2000'
option TerminationDigit '#'
list PrefixList '3PrefixInfo1'
config PrefixInfo '2PrefixInfo1'
option Enable '1'
option PrefixRange '*43#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CW_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '2PrefixInfo2'
option Enable '1'
option PrefixRange '#43#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CW_DEACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '2PrefixInfo3'
option Enable '1'
option PrefixRange '*21*(X+)#'
option PrefixMinNumberOfDigits '9'
option PrefixMaxNumberOfDigits '9'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFU_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '2PrefixInfo4'
option Enable '1'
option PrefixRange '#21#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFU_DEACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '2PrefixInfo5'
option Enable '1'
option PrefixRange '*67*(X+)#'
option PrefixMinNumberOfDigits '9'
option PrefixMaxNumberOfDigits '9'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFB_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '2PrefixInfo6'
option Enable '1'
option PrefixRange '#67#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFB_DEACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '2PrefixInfo7'
option Enable '1'
option PrefixRange '*61*(X+(*X+)?)#'
option PrefixMinNumberOfDigits '15'
option PrefixMaxNumberOfDigits '15'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFNR_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '2PrefixInfo8'
option Enable '1'
option PrefixRange '#61#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFNR_DEACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '2PrefixInfo9'
option Enable '1'
option PrefixRange '*31*'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CA_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo1'
option Enable '1'
option PrefixRange '110|112'
option PrefixMinNumberOfDigits '7'
option PrefixMaxNumberOfDigits '7'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'X_IOPSYS_EU_EMERGENCY'
option FacilityActionArgument ' '
config DialPlan 'X_IOPSYS_EU_InternalNumber1'
option RegExp '1X#'

File diff suppressed because it is too large Load Diff

View File

@@ -1,181 +0,0 @@
# RO (Main)
config account 'map_board'
option HW_Has_Voice 'hw.board.hasVoice'
option HW_Has_DECT 'hw.board.hasDect'
option HW_Nr_Of_POTS_Ports 'hw.board.VoicePorts'
option HW_VoiceDSP 'hw.board.VoiceDSP'
option ProductID 'device.deviceinfo.ModelName'
option I3_VERSION 'device.deviceinfo.SoftwareVersion'
option SerialNumber 'device.deviceinfo.SerialNumber'
config account 'map_pots'
option Country 'voice.POTS.Region'
# Voice Service navigation paths
# Not used to initialize internal configuration
config navigation 'map_vs'
option Account 'voice.Client@.'
option Network 'voice.Client@.Network'
option VoIPProfile 'voice.Network@.VoIPProfile'
option CfAccount 'voice.Line@.CallingFeatures'
option CfPhone 'voice.Extension@.CallingFeatures'
option CodecList 'voice.Network@.CodecList'
option Codec 'voice.Codec@.Codec'
option OutgoingMapEnabled 'voice.OutgoingMap@.Enable'
option From_Phone 'voice.OutgoingMap@.Extension'
option Extension 'voice.Extension@.Provider'
option To_Account 'voice.OutgoingMap@.Line'
option Line 'voice.Line@.Provider'
option LineEnable 'voice.Line@.Enable'
option LineProvider 'voice.Line@.Provider'
option IncomingMapEnabled 'voice.IncomingMap@.Enable'
option From_Account 'voice.IncomingMap@.Line'
option To_Phone 'voice.IncomingMap@.Extension'
option ExtensionEnable 'voice.Extension@.Enable'
option ExtensionProvider 'voice.Extension@.Provider'
# Registration for account A-Z is associate with SIP.Clienti.Enable
# All parameters in this table are written to internal configuration
config account 'map_account'
option Registration 'voice.Client@.Enable'
option Display_Name ''
option PhoneNumber 'voice.Client@.RegisiterURI'
option Username 'voice.Client@.AuthUserName'
option Password 'voice.Client@.AuthPassword'
option SIP_Telephone_Syntax 'voice.Client@.E164Format'
option Device_Description 'voice.Client@.UserAgent'
# Network stuff associated with an account.
# All parameters in this table are written to internal configuration
config network 'map_net'
option Enable 'voice.Network@.Enable'
option Registration_Server 'voice.Network@.RegistrarServer'
option Outbound_Proxy 'voice.Network@.ProxyServer'
option Accept_From_Registered 'voice.Network@.AcceptFromProxyOnly'
option SIP_Port 'voice.Network@.RegistrarServerPort'
option SIP_Transport 'voice.Network@.RegistrarServerTransport'
option RegistrationPeriod 'voice.Network@.RegistrationPeriod'
option Registration_Interval 'voice.Network@.RegisterExpires'
option Reg_Failure_Interval 'voice.Network@.TimerRegistrationFailed'
option T1 'voice.Network@.TimerT1'
option UserAgentDomain 'voice.Network@.UserAgentDomain'
option SIP_SessTmrEnable 'voice.Network@.SIPSessionTimerEnable'
option SIP_SessTmrMode 'voice.Network@.SIPSessionTimerMode'
option SIP_SessTmrMsg 'voice.Network@.SIPSessionRefreshRequest'
option SIP_SessTmrRefresher 'voice.Network@.SIPSessionRefresher'
option SIP_MinSE 'voice.Network@.SIPSessionMinimumTimer'
option SIP_SessInterval 'voice.Network@.SIPSessionExpireInterval'
config VoIPProfile 'map_voip'
option Enable 'voice.VoIPProfile@.Enable'
option DTMF_Method 'voice.VoIPProfile@.DTMFMethod'
option RTP 'voice.VoIPProfile@.RTP'
config RTP 'map_rtp'
option RTP_Port_Base 'voice.@RTP@.LocalPortMin'
option RTP_Port_End 'voice.@RTP@.LocalPortMax'
config codecs 'map_codec'
option Codec 'voice.CodecProfile@.Codec'
option enable 'voice.CodecProfile@.Enable'
option ptime 'voice.CodecProfile@.PacketizationPeriod'
option dtx 'voice.CodecProfile@.SilenceSupression'
config fxsinfo 'map_fxs'
option Enable 'voice.FXS@.Enable'
option DialType 'voice.FXS@.DialType'
option TransmitGain 'voice.FXS@.TransmitGain'
option ReceiveGain 'voice.FXS@.ReceiveGain'
option EchoCancellationEnable 'voice.FXS@.EchoCancellationEnable'
config extensioninfo 'map_ext'
option Enable 'voice.Extension@.Enable'
option Internal_Number_Phone 'voice.Extension@.ExtensionNumber'
option Display_Name_Phone 'voice.Extension@.Name'
config capabilities 'map_capa'
option Call_Waiting_Enable 'voice.Capabilities@FacilityActions'
option Enable_Call_Diversion 'voice.Capabilities@FacilityActions'
config cs_account 'map_set'
option BusyCallWait 'voice.Set@.CallWaitingEnable'
option AlwaysDivert 'voice.Set@.CallForwardUnconditionalEnable'
option CFU_Number 'voice.Set@.CallForwardUnconditionalNumber'
option BusyDivert 'voice.Set@.CallForwardOnBusyEnable'
option CFB_Number 'voice.Set@.CallForwardOnBusyNumber'
option NoAnswDivert 'voice.Set@.CallForwardOnNoAnswerEnable'
option CFNR_Number 'voice.Set@.CallForwardOnNoAnswerNumber'
option CFNR_Timeout 'voice.Set@.CallForwardOnNoAnswerRingTimeout'
option Enable_Call_Transfer 'voice.Set@.CallTransferEnable'
option AnonymousReject 'voice.Set@.AnonymousCallRejectionEnable'
option AllowAnonymousConf 'voice.Set@.AnonymousCallEnable'
option CallerIDEnable 'voice.Set@.CallerIDEnable'
config cs_xvendor 'map_np_cs'
option np_sc_actCW 'voice.X_IOPSYS_EU_NpSc@.CW_ACT'
option np_sc_actCW_output 'voice.X_IOPSYS_EU_NpSc@.CW_OUT'
option np_sc_deactCW 'voice.X_IOPSYS_EU_NpSc@.CW_DEACT'
option np_sc_isactCW 'voice.X_IOPSYS_EU_NpSc@.CW_ISACT'
option np_sc_actCFU 'voice.X_IOPSYS_EU_NpSc@.CFU_ACT'
option np_sc_actCFU_output 'voice.X_IOPSYS_EU_NpSc@.CFU_OUT'
option np_sc_deactCFU 'voice.X_IOPSYS_EU_NpSc@.CFU_DEACT'
option np_sc_actCFB 'voice.X_IOPSYS_EU_NpSc@.CFB_ACT'
option np_sc_actCFB_output 'voice.X_IOPSYS_EU_NpSc@.CFB_OUT'
option np_sc_deactCFB 'voice.X_IOPSYS_EU_NpSc@.CFB_DEACT'
option np_sc_actCFNR 'voice.X_IOPSYS_EU_NpSc@.CFNR_ACT'
option np_sc_actCFNR_output 'voice.X_IOPSYS_EU_NpSc@.CFNR_OUT'
option np_sc_deactCFNR 'voice.X_IOPSYS_EU_NpSc@.CFNR_DEACT'
option np_sc_actRA 'voice.X_IOPSYS_EU_NpSc@.RA_ACT'
option np_sc_deactRA 'voice.X_IOPSYS_EU_NpSc@.RA_DEACT'
option np_sc_actAC 'voice.X_IOPSYS_EU_NpSc@.AC_ACT'
option np_sc_deactAC 'voice.X_IOPSYS_EU_NpSc@.AC_DEACT'
option np_sc_actAA 'voice.X_IOPSYS_EU_NpSc@.AA_ACT'
option np_sc_deactAA 'voice.X_IOPSYS_EU_NpSc@.AA_DEACT'
option np_sc_actAD 'voice.X_IOPSYS_EU_NpSc@.AD_ACT'
option np_sc_actAD_output 'voice.X_IOPSYS_EU_NpSc@.AD_OUT'
option np_sc_deactAD 'voice.X_IOPSYS_EU_NpSc@.AD_DEACT'
option np_sc_actMWSplash 'voice.X_IOPSYS_EU_NpSc@.MWI_SPLASH_ACT'
option np_sc_deactMWSplash 'voice.X_IOPSYS_EU_NpSc@.MWI_SPLASH_DEACT'
option np_sc_actMWTone 'voice.X_IOPSYS_EU_NpSc@.MWI_TONE_ACT'
option np_sc_deactMWTone 'voice.X_IOPSYS_EU_NpSc@.MWI_TONE_DEACT'
option np_sc_redial 'voice.X_IOPSYS_EU_NpSc@.REDIAL'
option np_sc_setMiscConf 'voice.X_IOPSYS_EU_NpSc@.SET_MISC'
config cc_xvendor 'map_np_in'
option np_in_limitExp 'voice.X_IOPSYS_EU_InternalNumber@.RegExp'
config cc_xvendor 'map_np_sh'
option sh_no_str 'voice.X_IOPSYS_EU_ShortNumber@.RegExp'
config cc_xvendor 'map_np_eme'
option np_eme 'voice.X_IOPSYS_EU_EmergencyNumber@.RegExp'
option np_eme_out 'voice.X_IOPSYS_EU_EmergencyNumber@.OutStr'
config cc_xvendor 'map_np_rn'
option np_rn 'voice.X_IOPSYS_EU_RegularNumber@.RegExp'
option np_rn_out 'voice.X_IOPSYS_EU_RegularNumber@.OutStr'
option np_rn_account 'voice.X_IOPSYS_EU_RegularNumber@.AccStr'
config cc_xvendor 'map_np_bn'
option np_bn 'voice.X_IOPSYS_EU_BarredNumber@.RegExp'
option np_bn_out 'voice.X_IOPSYS_EU_BarredNumber@.OutStr'
config TR104NumberingPlan 'map_np_tr'
option min_digits 'voice.NumberingPlan@.MinimumNumberOfDigits'
option max_digits 'voice.NumberingPlan@.MaximumNumberOfDigits'
option tmo_std 'voice.NumberingPlan@.InterDigitTimerStd'
option tmo_open 'voice.NumberingPlan@.InterDigitTimerOpen'
option term_digit 'voice.NumberingPlan@.TerminationDigit'
option prefix_list 'voice.NumberingPlan@.PrefixList'
config TR104NumberingPlanPrefix 'map_np_pf'
option enable 'voice.@PrefixInfo@.Enable'
option range 'voice.@PrefixInfo@.PrefixRange'
option prefix_min_digits 'voice.@PrefixInfo@.PrefixMinNumberOfDigits'
option prefix_max_digits 'voice.@PrefixInfo@.PrefixMaxNumberOfDigits'
option remove_digits 'voice.@PrefixInfo@.NumberOfDigitsToRemove'
option remove_pos 'voice.@PrefixInfo@.NumberOfDigitsToRemove'
option facility_act 'voice.@PrefixInfo@.FacilityAction'
option facility_arg 'voice.@PrefixInfo@.FacilityActionArgument'

View File

@@ -1,56 +0,0 @@
config static_prm 'defaults'
option Print_Control '4'
option Print_UDP_Addr '192.168.1.3'
option Print_UDP_Port '60000'
option Verbosity 'On'
option Failure_Log 'On'
option Message_Log 'On'
option Method_Trace 'Off'
option Dial_Cache_Size '0'
option Reverse_Fax_Detection '0'
option DSP_24 '0'
option DSP_36 '0'
option DSP_43 '0'
option Swap_Name_Nr_CID '0'
option R_Button_Lower_Lim '100'
option R_Button_Upper_Lim '800'
option HookOn_Delay '0'
option SupportLDD '0'
option LDD_Min_Break_Time '41'
option LDD_Max_Break_Time '94'
option LDD_Percent_Break '55'
option Tone_On_Hangup '1'
option BusyTone_On_Hangup '1'
option Enable_Analouge_Conf '0'
option PrackUsage '1'
option SIP_SupportedPath '0'
option IMS_Access_Network_Info ' '
option SIP_Reason_Protocol '0'
option SIP_Body_QOST '0'
option SIP_HistoryInfo '0'
option Customer_Spec2 '1'
option UTF8_Enable '0'
option RFC3325 '0'
option Accept_From_Registered '0'
option Polarity_Reversal '0'
option Closed_Dial_Plan '0'
option Netw_Dial '0'
option No_Answer_Tmo '180'
option UPnP_Enabled '0'
option NAT_Address ' '
option NAT_Address_From_SIP '0'
option HookOn_Transfer '0'
option Enable_Call_Transfer '1'
option CallerIDEnable '1'
option Multiparty_Transp '0'
option Presence_Indication '0'
option Login_Note ' '
option Login_Description ' '
option Logout_Note ' '
option Logout_Description ' '
option Resolve_Every_Transaction '2'
option Translate_Plus '1'
option Mid_Call_Services '0'
option Account_Restriction '0'
option Answering_Machine_Enable '0'

View File

@@ -1,32 +0,0 @@
#!/bin/sh /etc/rc.common
START=68
STOP=12
USE_PROCD=1
NAME=evoice
VOICE_UCI_CONFIG=voice
start_service() {
[ "$(db -q get hw.board.hasVoice)" = "1" ] || return
which endptmngr >/dev/null 2>&1 && {
echo "evoice can't be started since endptmngr is installed. Please remove endptmngr and retry"
return
}
procd_open_instance
procd_set_param command $NAME
procd_set_param respawn "5" "0" "3"
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger $VOICE_UCI_CONFIG
}

View File

@@ -1,50 +0,0 @@
{
"G.711ALaw": [
{
"BitRate": 64000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"G.711MuLaw": [
{
"BitRate": 64000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"G.722": [
{
"BitRate": 64000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"G.726": [
{
"BitRate": 32000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
},
{
"BitRate": 24000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"G.729": [
{
"BitRate": 8000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"AMR": [
{
"BitRate": 7400,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
]
}

View File

@@ -1,140 +0,0 @@
{
"G.711MuLaw": [
{
"BitRate": 64000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.711ALaw": [
{
"BitRate": 64000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.726": [
{
"BitRate": 16000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 24000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 32000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 40000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.723.1": [
{
"BitRate": 5300,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 6300,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.729": [
{
"BitRate": 8000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"iLBC": [
{
"BitRate": 15200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 13300,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.722": [
{
"BitRate": 64000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"AMR": [
{
"BitRate": 12200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 10200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 7950,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 7400,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 6700,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 5900,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 5150,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 4750,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"GSM-EFR": [
{
"BitRate": 12200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"GSM-FR": [
{
"BitRate": 13200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"GSM-HR": [
{
"BitRate": 5600,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -41,32 +41,8 @@ EXTRA_KCONFIG:= CONFIG_RGB_LED=m
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
ifeq ($(CONFIG_TARGET_brcmbca),y)
LINUX_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.19
# This assumes that the MODULES_SUBDIR set by OpenWrt is of the form
# lib/modules/4.19.235-abcdef where 4.19.235 is the version of our fake bcmlinux kernel
# and abcdef the git-commit.
# The kernel compiled by the Broadcom SDK has a uname -r of 4.19.235, i.e. without the git-commit.
# The assignment below removes the part after the - which puts modules in the right directory as
# long as the bcmlinux version matches the kernel version in the BCM SDK.
# So, this will only stop working in the time window where the BCM SDK has been updated
# but bcmlinux has not yet been updated.
MODULES_SUBDIR:=$(firstword $(subst -, ,$(MODULES_SUBDIR)))
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_PREFIX)-
ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"63158" "6856" "6858"))
# These targets use a 64-bit kernel
LINUX_KARCH:=arm64
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_PREFIX)-
else ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"6855" "6756" "47622" "63148" "63178"))
# These targets use a 32-bit arm-sfp kernel
LINUX_KARCH:=arm
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_ARMSFP_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_ARMSFP_TOOLCHAIN_PREFIX)-
endif
# For some reason, Broadcom's kernel does not set the include paths correctly when compiling out-of-tree modules
EXTRA_KCPPFLAGS:="-I $(LINUX_DIR)/../bcmkernel/include -I $(LINUX_DIR)/arch/arm/mach-bcm963xx/include"
endif
# support compilation against BCM SDK kernel
include ../../broadcom/bcmkernel/bcm-kernel-toolchain.mk
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)/kdevlinks/

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2020-2022 IOPSYS Software Solutions AB
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
#
# This is free software, licensed under the BSD-3-Clause
# See /LICENSE for more information.
@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.1.19
PKG_VERSION:=9.3.7
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_VERSION:=9d8389cda16f410826920bb27fd8af4d28c79de9
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=6293f933dc40c45597edccfa9837d47e431da03d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -29,33 +29,44 @@ define Package/icwmp/default
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=TR069 CWMP client
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libbbf_api
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libbbfdm-api
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)
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
VARIANT:=openssl
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
CONFLICTS := icwmp icwmp-mbedtls icwmp-wolfssl
endef
define Package/icwmp-wolfssl
$(Package/icwmp/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_icwmp-wolfssl:libwolfssl
CONFLICTS := icwmp-openssl
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
CONFLICTS := icwmp-openssl icwmp-wolfssl
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
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
@@ -99,10 +110,12 @@ define Package/icwmp/default/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
endef
Package/icwmp/install = $(Package/icwmp/default/install)
Package/icwmp-openssl/install = $(Package/icwmp/default/install)
Package/icwmp-wolfssl/install = $(Package/icwmp/default/install)
Package/icwmp-mbedtls/install = $(Package/icwmp/default/install)
$(eval $(call BuildPackage,icwmp))
$(eval $(call BuildPackage,icwmp-openssl))
$(eval $(call BuildPackage,icwmp-wolfssl))
$(eval $(call BuildPackage,icwmp-mbedtls))

View File

@@ -11,8 +11,6 @@ config acs 'acs'
option retry_min_wait_interval '5'
#­ possible configs interval :[1000:65535]
option retry_interval_multiplier '2000'
option ipv6_enable '0'
option ip_version '4'
config cpe 'cpe'
option enable '1'

View File

@@ -5,14 +5,14 @@ log() {
echo "${@}"|logger -t firewall.cwmp -p info
}
if [ ! -f "/var/state/cwmp" ]; then
if [ ! -f "/var/state/icwmp" ]; then
exit 0;
fi
zone_name=$(uci -c /var/state -q get cwmp.acs.zonename)
zone_name=$(uci -c /var/state -q get icwmp.acs.zonename)
port=$(uci -q get cwmp.cpe.port)
ipaddr=$(uci -c /var/state -q get cwmp.acs.ip)
ip6addr=$(uci -c /var/state -q get cwmp.acs.ip6)
ipaddr=$(uci -c /var/state -q get icwmp.acs.ip)
ip6addr=$(uci -c /var/state -q get icwmp.acs.ip6)
incoming_rule=$(uci -q get cwmp.cpe.incoming_rule|tr 'A-Z' 'a-z')
if [ -z "${zone_name}" ]; then
@@ -76,5 +76,5 @@ if [ "$?" -eq 0 ]; then
${cmd6}
fi
uci -c /var/state -q set cwmp.cpe.firewall_restart="init"
uci -c /var/state -q commit cwmp
uci -c /var/state -q set icwmp.cpe.firewall_restart="init"
uci -c /var/state -q commit icwmp

View File

@@ -14,11 +14,13 @@ handle_icwmp_update() {
return 0
fi
# wait for some time to avoid interface fluctuation
sleep 10
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
if [ "$ret" = "true" ]; then
# read status from var/state/cwmp
status=$(uci -q -c /var/state get cwmp.sess_status.current_status)
# read status from var/state/icwmp
status=$(uci -q -c /var/state get icwmp.sess_status.current_status)
if [ "$status" != "running" ]; then
log "Trigger out of bound inform, since last inform status was failure"
ubus -t 10 call tr069 inform >/dev/null 2>&1

View File

@@ -320,7 +320,6 @@ validate_acs_section()
'compression:or("GZIP","Deflate","Disabled")' \
'retry_min_wait_interval:range(1, 65535)' \
'retry_interval_multiplier:range(1000, 65535)' \
'ipv6_enable:bool' \
'ssl_capath:string'
}
@@ -382,12 +381,15 @@ boot() {
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
local wan_interface=""
config_get wan_interface cpe default_wan_interface "wan"
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
config_get dhcp_discovery acs dhcp_discovery "0"
config_get wan_interface cpe default_wan_interface "wan"
if [ "${dhcp_discovery}" = "enable" ] || [ "${dhcp_discovery}" = "1" ]; then
# Set dhcp option 43 if not already configured
@@ -486,20 +488,17 @@ reload_service() {
fi
}
service_triggers() {
procd_add_reload_trigger "cwmp"
procd_open_trigger
json_add_array
json_add_string "" "interface.update"
json_add_array
json_add_array
json_add_string "" "run_script"
json_add_string "" "/etc/icwmpd/update.sh"
json_close_array
json_close_array
json_add_int "" "2000"
json_close_array
procd_close_trigger
add_interface_trigger() {
procd_add_interface_trigger "interface.update" "$1" /etc/icwmpd/update.sh
}
service_triggers() {
local wan_interface
config_load cwmp
config_get wan_interface cpe default_wan_interface "wan"
procd_add_reload_trigger "cwmp"
add_interface_trigger ${default_wan_interface}
}

View File

@@ -1,17 +1,17 @@
#
# Copyright (C) 2021 IOPSYS
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.0.12
PKG_VERSION:=8.1.15
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b265053762a3d6c901872f29fa3e70b8666daf46
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE_VERSION:=a6d1c5c3e6a23129ce260613cadfaad3b2b31cc8
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
endif

View File

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

View File

@@ -65,11 +65,12 @@ CONFIG_PACKAGE_ieee1905=y
CONFIG_PACKAGE_map-agent=m
CONFIG_PACKAGE_map-controller=m
CONFIG_PACKAGE_map-topology=y
CONFIG_PACKAGE_wfadatad-collector=y
CONFIG_PACKAGE_decollector=y
CONFIG_IEEE1905_CMDU_SA_IS_ALMAC=y
# Network #
CONFIG_PACKAGE_netmode=y
CONFIG_PACKAGE_owsd=m
CONFIG_PACKAGE_urlfilter=y
# System #
@@ -79,12 +80,13 @@ CONFIG_PACKAGE_rulengd=y
CONFIG_PACKAGE_usermngr=y
# TR-x69 #
CONFIG_PACKAGE_uspd-mbedtls=y
CONFIG_PACKAGE_icwmp-mbedtls=y
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-mbedtls=m
CONFIG_PACKAGE_stunc=m
CONFIG_PACKAGE_swmodd=m
CONFIG_PACKAGE_twamp=m
CONFIG_PACKAGE_udpecho-client=m
@@ -108,6 +110,8 @@ 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
@@ -303,10 +307,3 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_SQUASHFS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS=y
CONFIG_BUSYBOX_CONFIG_TIMEOUT=y
CONFIG_BUSYBOX_CONFIG_NOHUP=y
# Use fw3 iptables-based instead of newer nftables-based fw4
# TODO: for now we cannot build an image with fw3 and luci-app-firewall (i.e. fw3)
# Enabling luci-app-firewall enables fw4
# CONFIG_PACKAGE_luci-app-firewall is not set
CONFIG_PACKAGE_firewall=y
# CONFIG_PACKAGE_firewall4 is not set

View File

@@ -1,15 +1,26 @@
#! /bin/bash
#!/bin/bash
function feeds_update {
heads=1
developer=0
override=1
start=$(date -u +'%s')
while getopts "n" opt; do
while getopts "inh" opt; do
case $opt in
i)
heads=0
;;
n)
override=0
;;
h|\?)
echo "Usage: ./iop feeds_update [-i] [-n] [-h]"
echo
echo "OPTIONS:"
echo " -i - Only update index. Do not change HEAD in feeds."
echo " -n - Do not replace core packages with iopsys versions."
echo " -h - Display this help message and exit."
exit 1
;;
esac
done
@@ -17,47 +28,42 @@ function feeds_update {
cp .config .genconfig_config_bak
#if -d argument is passed, clone feeds with ssh instead of http
if [ $developer == 1 ]; then
./scripts/feeds update -g
else
./scripts/feeds update
if [ $heads == 1 ]; then
if [ $developer == 1 ]; then
./scripts/feeds update -g
else
./scripts/feeds update
fi
fi
./scripts/feeds update -ai
./scripts/feeds update -ai || exit 1
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p openwrt_core -a
./scripts/feeds install -f -p openwrt_core -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
rm -f target/linux/$target
./scripts/feeds install -p targets $target
done
# Workaround for bug in 22.03.0-rc4 where installed target path has been
# moved to target/linux/feeds but Config.in and Makefile from installed
# targets are not properly included from the new location.
# This hack is to be removed once the issues are fixed.
# Note that the above block of code might no longer necessary because
# targets no longer need to be installed explicitly.
echo "Working around installed-target-bug"
for f in target/linux/feeds/*; do
ln -vsf "feeds/$(basename "$f")" "target/linux/$(basename "$f")"
./scripts/feeds install -f -p targets $target || exit 1
done
# install all packages
./scripts/feeds install -a
./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
find -L package/feeds -maxdepth 2 -type l -delete || exit 1
cp .genconfig_config_bak .config
make defconfig
make defconfig || exit 1
# record when we last run this script
touch tmp/.iop_bootstrap
touch tmp/.iop_bootstrap || exit 1
# always return true
exit 0

View File

@@ -15,10 +15,11 @@ function genconfig {
target_config_path=""
brcmbca_feed="target/linux/feeds/brcmbca"
airoha_feed="target/linux/feeds/airoha"
x86_feed="target/linux/feeds/iopsys-x86"
armvirt_feed="target/linux/feeds/iopsys-armvirt"
mediatek_feed="target/linux/feeds/iopsys-mediatek"
x86_feed="target/linux/feeds/x86"
armvirt_feed="target/linux/feeds/armvirt"
mediatek_feed="target/linux/feeds/mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
qualcomm_ipq53xx_feed="target/linux/feeds/ipq53xx"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
@@ -41,19 +42,13 @@ function genconfig {
}
function verify_config {
IFS=$'\n'
org=$(<.genconfig.config)
unset IFS
local num
local conf_opt
local conf_org
local conf_new
#echo "lines to check $tot_lines"
num=0
for line in $org
while read -r line
do
conf_opt=$(echo $line | grep CONFIG_ | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
conf_opt=$(echo $line | grep "^[ #]*CONFIG_" | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
if [ -n "${conf_opt}" ]
then
conf_org=$(find_last ${conf_opt} .genconfig.config)
@@ -74,8 +69,7 @@ function genconfig {
#echo -e "wanted [$conf_org] got [$conf_new]"
fi
fi
num=$((num+1))
done
done < .genconfig.config
}
# Takes a board name and returns the target name in global var $target
@@ -113,32 +107,27 @@ function genconfig {
[ -e $airoha_feed/genconfig ] &&
airoha=$(cd $airoha_feed; ./genconfig)
[ -e $x86_feed/genconfig ] &&
iopsys_x86=$(cd $x86_feed; ./genconfig)
x86=$(cd $x86_feed; ./genconfig)
[ -e $armvirt_feed/genconfig ] &&
iopsys_armvirt=$(cd $armvirt_feed; ./genconfig)
armvirt=$(cd $armvirt_feed; ./genconfig)
[ -e $mediatek_feed/genconfig ] &&
iopsys_mediatek=$(cd $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 iopsys_x86 iopsys_armvirt iopsys_mediatek ipq95xx; do
for list in brcmbca airoha x86 armvirt mediatek ipq95xx ipq53xx; do
echo "$list based boards:"
for b in ${!list}; do
a=$(echo "${!list}" | sort)
for b in $a; do
echo -e "\t$b"
done
done
return
fi
for p in $brcmbca; do
if [ $p == $profile ]; then
target="brcmbca"
target_config_path="$brcmbca_feed/config"
return
fi
done
for p in $airoha; do
if [ $p == $profile ]; then
target="airoha"
@@ -147,25 +136,25 @@ function genconfig {
fi
done
for p in $iopsys_x86; do
for p in $x86; do
if [ $p == $profile ]; then
target="iopsys_x86"
target="x86"
target_config_path="$x86_feed/config"
return
fi
done
for p in $iopsys_armvirt; do
for p in $armvirt; do
if [ $p == $profile ]; then
target="iopsys_armvirt"
target="armvirt"
target_config_path="$armvirt_feed/config"
return
fi
done
for p in $iopsys_mediatek; do
for p in $mediatek; do
if [ $p == $profile ]; then
target="iopsys_mediatek"
target="mediatek"
target_config_path="$mediatek_feed/config"
return
fi
@@ -178,6 +167,22 @@ function genconfig {
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://)' && {
@@ -298,6 +303,24 @@ function genconfig {
fi
}
get_subtarget_for_device() {
readonly target="$1"
readonly device="$2"
readonly targetinfo_file="tmp/info/.targetinfo-feeds_$target"
readonly target_profile_line="Target-Profile: DEVICE_$device"
# We want to know after which Target: $target/$subtarget line
# our $target_profile_line appears
# This is a crude way to "parse" the file using shell 🤯
# 1. grep for both lines with line number output
# 2. grep again to determine the device profile line that we looked for
# but output one context line before as well to determine corresponding subtarget line
# 4. Use head and sed to extract the subtarget
grep "^Target: $target/\|^$target_profile_line" "$targetinfo_file" \
| grep -E -B1 "^$target_profile_line" \
| head -n1 \
| sed -E "s|^Target: $target/||"
}
create_and_copy_files()
{
local BOARDTYPE=$1
@@ -339,18 +362,22 @@ function genconfig {
cat $target_config_path/$BOARDTYPE/config >> .config
echo "" >> .config
fi
# hack to support custom-devices until we have deprecated this genconfig-script...
if [ -f "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" ]; then
cat "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" >> .config
echo "" >> .config
fi
# Special handling for targets which use TARGET_DEVICES
case "$target" in
airoha | iopsys_mediatek | brcmbca | ipq95xx)
airoha | mediatek | brcmbca | ipq95xx | ipq53xx)
# This assumes the device name to be unique within one target,
# which is a fair assumption to make.
local mk_file="$(grep -Fx --files-with-matches "define Device/${BOARDTYPE}" "$target_config_path/../image/"*.mk)"
if [ -z "$mk_file" ]; then
local subtarget="$(get_subtarget_for_device "${target/_/-}" "$BOARDTYPE")"
if [ -z "$subtarget" ]; then
echo "Error determining subtarget for $target / ${BOARDTYPE}"
return 1
fi
local subtarget="$(basename "${mk_file%.mk}")"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
@@ -443,7 +470,7 @@ function genconfig {
if [ ! -e tmp/.iop_bootstrap ]; then
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
echo "Run: iop feeds_update"
exit 0
exit 1
fi
if [ $# -eq 0 ]; then
@@ -480,7 +507,7 @@ function genconfig {
CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}"
setup_dirs
create_and_copy_files "$@"
create_and_copy_files "$@" || exit 1
fi
}

View File

@@ -14,10 +14,11 @@ function genconfig_min {
target_config_path=""
brcmbca_feed="target/linux/feeds/brcmbca"
airoha_feed="target/linux/feeds/airoha"
x86_feed="target/linux/feeds/iopsys-x86"
armvirt_feed="target/linux/feeds/iopsys-armvirt"
mediatek_feed="target/linux/feeds/iopsys-mediatek"
x86_feed="target/linux/feeds/x86"
armvirt_feed="target/linux/feeds/armvirt"
mediatek_feed="target/linux/feeds/mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
qualcomm_ipq53xx_feed="target/linux/feeds/ipq53xx"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
@@ -40,19 +41,13 @@ function genconfig_min {
}
function verify_config {
IFS=$'\n'
org=$(<.genconfig.config)
unset IFS
local num
local conf_opt
local conf_org
local conf_new
#echo "lines to check $tot_lines"
num=0
for line in $org
while read -r line
do
conf_opt=$(echo $line | grep CONFIG_ | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
conf_opt=$(echo $line | grep "^[ #]*CONFIG_" | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
if [ -n "${conf_opt}" ]
then
conf_org=$(find_last ${conf_opt} .genconfig.config)
@@ -73,8 +68,7 @@ function genconfig_min {
#echo -e "wanted [$conf_org] got [$conf_new]"
fi
fi
num=$((num+1))
done
done < .genconfig.config
}
# Takes a board name and returns the target name in global var $target
@@ -112,32 +106,27 @@ function genconfig_min {
[ -e $airoha_feed/genconfig ] &&
airoha=$(cd $airoha_feed; ./genconfig)
[ -e $x86_feed/genconfig ] &&
iopsys_x86=$(cd $x86_feed; ./genconfig)
x86=$(cd $x86_feed; ./genconfig)
[ -e $armvirt_feed/genconfig ] &&
iopsys_armvirt=$(cd $armvirt_feed; ./genconfig)
armvirt=$(cd $armvirt_feed; ./genconfig)
[ -e $mediatek_feed/genconfig ] &&
iopsys_mediatek=$(cd $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 iopsys_x86 iopsys_armvirt iopsys_mediatek ipq95xx; do
for list in brcmbca airoha x86 armvirt mediatek ipq95xx ipq53xx; do
echo "$list based boards:"
for b in ${!list}; do
a=$(echo "${!list}" | sort)
for b in $a; do
echo -e "\t$b"
done
done
return
fi
for p in $brcmbca; do
if [ $p == $profile ]; then
target="brcmbca"
target_config_path="$brcmbca_feed/config"
return
fi
done
for p in $airoha; do
if [ $p == $profile ]; then
target="airoha"
@@ -146,25 +135,25 @@ function genconfig_min {
fi
done
for p in $iopsys_x86; do
for p in $x86; do
if [ $p == $profile ]; then
target="iopsys_x86"
target="x86"
target_config_path="$x86_feed/config"
return
fi
done
for p in $iopsys_armvirt; do
for p in $armvirt; do
if [ $p == $profile ]; then
target="iopsys_armvirt"
target="armvirt"
target_config_path="$armvirt_feed/config"
return
fi
done
for p in $iopsys_mediatek; do
for p in $mediatek; do
if [ $p == $profile ]; then
target="iopsys_mediatek"
target="mediatek"
target_config_path="$mediatek_feed/config"
return
fi
@@ -177,6 +166,22 @@ function genconfig_min {
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://)' && {
@@ -272,6 +277,24 @@ function genconfig_min {
fi
}
get_subtarget_for_device() {
readonly target="$1"
readonly device="$2"
readonly targetinfo_file="tmp/info/.targetinfo-feeds_$target"
readonly target_profile_line="Target-Profile: DEVICE_$device"
# We want to know after which Target: $target/$subtarget line
# our $target_profile_line appears
# This is a crude way to "parse" the file using shell 🤯
# 1. grep for both lines with line number output
# 2. grep again to determine the device profile line that we looked for
# but output one context line before as well to determine corresponding subtarget line
# 4. Use head and sed to extract the subtarget
grep "^Target: $target/\|^$target_profile_line" "$targetinfo_file" \
| grep -E -B1 "^$target_profile_line" \
| head -n1 \
| sed -E "s|^Target: $target/||"
}
create_and_copy_files()
{
local BOARDTYPE=$1
@@ -313,18 +336,22 @@ function genconfig_min {
cat $target_config_path/$BOARDTYPE/config >> .config
echo "" >> .config
fi
# hack to support custom-devices until we have deprecated this genconfig-script...
if [ -f "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" ]; then
cat "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" >> .config
echo "" >> .config
fi
# Special handling for targets which use TARGET_DEVICES
case "$target" in
airoha | iopsys_mediatek | brcmbca | ipq95xx)
airoha | mediatek | brcmbca | ipq95xx | ipq53xx)
# This assumes the device name to be unique within one target,
# which is a fair assumption to make.
local mk_file="$(grep -Fx --files-with-matches "define Device/${BOARDTYPE}" "$target_config_path/../image/"*.mk)"
if [ -z "$mk_file" ]; then
local subtarget="$(get_subtarget_for_device "${target/_/-}" "$BOARDTYPE")"
if [ -z "$subtarget" ]; then
echo "Error determining subtarget for $target / ${BOARDTYPE}"
return 1
fi
local subtarget="$(basename "${mk_file%.mk}")"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
@@ -411,7 +438,7 @@ function genconfig_min {
if [ ! -e tmp/.iop_bootstrap ]; then
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
echo "Run: iop feeds_update"
exit 0
exit 1
fi
if [ $# -eq 0 ]; then

View File

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

View File

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

106
libdsl/Makefile Normal file
View File

@@ -0,0 +1,106 @@
#
# Copyright (C) 2020-2023 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libdsl
PKG_VERSION:=7.2.99
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f9f3fcd0f4140540db5bd41059bcca7ded083024
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libdsl.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)" \
PLATFORM="$(TARGET_PLATFORM)" \
subdirs="$(subdirs)"
define Package/libdsl
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= xDSL library (libdsl)
endef
define Package/libdsl/description
Library provides xDSL/GFAST HAL APIs
endef
define Package/libdsl/config
if PACKAGE_libdsl
config LIBDSL_DEBUG
depends on PACKAGE_libdsl
bool "Enable dsl debugging"
default n
config LIBDSL_TEST
depends on PACKAGE_libdsl
bool "Enable dsl test program"
default n
endif
endef
define Build/InstallDev/libdsl
$(INSTALL_DIR) $(1)/usr/include/xdsl
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/xdsl.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/xtm.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/common.h $(1)/usr/include/xdsl
$(CP) $(PKG_BUILD_DIR)/libdsl.so* $(1)/usr/lib/
endef
define Build/InstallDev
$(call Build/InstallDev/libdsl,$(1),$(2))
endef
ifeq ($(CONFIG_LIBDSL_TEST),y)
define Build/Compile/libdsl
$(MAKE) -C "$(PKG_BUILD_DIR)/test" $(MAKE_FLAGS)
endef
endif
define Package/libdsl/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/libdsl.so* $(1)/usr/lib/
ifeq ($(CONFIG_LIBDSL_TEST),y)
$(CP) $(PKG_BUILD_DIR)/test/libdsl_test $(1)/usr/bin/
endif
endef
$(eval $(call BuildPackage,libdsl))

68
libeasy/Makefile Normal file
View File

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

105
libethernet/Makefile Normal file
View File

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

103
libqos/Makefile Normal file
View File

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

View File

@@ -7,7 +7,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-airoha
PKG_VERSION:=0.1
PKG_RELEASE:=1
PKG_VERSION:=1.0.4
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -16,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:=2a6ef141747ad0f7b32a536b5b5bd174834a7af5
PKG_SOURCE_VERSION:=bbfcf0f803f63530ee3d9675c1584a8f8422ecb0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -49,9 +50,7 @@ endef
endif
define Package/$(PKG_NAME)/install
# Although there is nothing needs to be installed, but the install section must NOT be empty. Otherwise the package will be skipped as below.
# WARNING: skipping libvoice-airoha -- package has no install section
$(INSTALL_DIR) $(1)/usr/lib
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

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

View File

@@ -7,7 +7,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-broadcom
PKG_VERSION:=0.1
PKG_RELEASE:=1
PKG_VERSION:=1.0.1
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -16,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:=401a392a72e2933f527eb92466faaf2907c38730
PKG_SOURCE_VERSION:=5466f832abaac677f25a750ddf19793dadf3774c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -51,9 +52,7 @@ endef
endif
define Package/$(PKG_NAME)/install
# Although there is nothing needs to be installed, but the install section must NOT be empty. Otherwise the package will be skipped as below.
# WARNING: skipping libvoice-broadcom -- package has no install section
$(INSTALL_DIR) $(1)/usr/lib
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

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

View File

@@ -7,7 +7,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-d2
PKG_VERSION:=0.1
PKG_RELEASE:=1
PKG_VERSION:=1.0.5
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -16,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:=8a67b666e57836600457167ccadfba8c46461e5c
PKG_SOURCE_VERSION:=84f1eec3154c96486f6c8662f0431fcc41486010
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -49,9 +50,7 @@ endef
endif
define Package/$(PKG_NAME)/install
# Although there is nothing needs to be installed, but the install section must NOT be empty. Otherwise the package will be skipped as below.
# WARNING: skipping libvoice-d2 -- package has no install section
$(INSTALL_DIR) $(1)/usr/lib
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

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

162
libwifi/Makefile Normal file
View File

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

View File

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

View File

@@ -1,14 +1,14 @@
#
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=4.2.0.7
PKG_VERSION:=4.3.3.6
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=142314d9a555ce30399d99ae1a44fbf8be8bb247
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE_VERSION:=aafe248932eb8e4802bb70daf6eea199d97f5222
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
@@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-agent
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-agent
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -175,6 +175,7 @@ validate_agent_config() {
create_dir() {
mkdir -p /var/run/multiap
mkdir -p /etc/multiap
}
start_service() {

View File

@@ -1,18 +1,19 @@
#
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=4.2.0.3
PKG_VERSION:=4.3.0.8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=a88dea065f40c81d3356d850fe447a9deeb972e4
PKG_SOURCE_VERSION:=0d83f8acd66a4cb97f2f123149696334d7f03e6e
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-controller
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-controller
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -70,7 +70,6 @@ validate_ap_section() {
'encryption:or("sae", "sae+aes", "psk2",
"psk2+aes", "sae-mixed", "sae-mixed+aes",
"none", "psk-mixed", "psk-mixed+aes",
"wpa", "wpa+aes", "wpa2", "wpa2+aes",
"psk", "psk+aes")' \
'key:string' \
'vid:range(1,65535):1' \
@@ -156,6 +155,10 @@ validate_controller_config() {
return 0
}
create_dir() {
mkdir -p /etc/multiap
}
start_service() {
local enabled
@@ -165,6 +168,8 @@ start_service() {
config_get_bool enabled controller enabled 1
[ "$enabled" -eq 0 ] && return
create_dir
procd_open_instance
procd_set_param command "/usr/sbin/mapcontroller" "-d"

View File

@@ -18,5 +18,9 @@ config TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI
enabled through TOPOLOGYD_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
through which such features would be exposed.
config TOPOLOGYD_HOST_WAN_STATS
bool "Enable wan statistics collection per hosts"
default y
endmenu
endif

View File

@@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=map-topology
PKG_VERSION:=2.5.1.18
PKG_VERSION:=2.5.1.24
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_VERSION:=4320fa30e73b916ae6e4ff489294640e61feeb34
PKG_SOURCE_VERSION:=9f15e813c39ff23cef27975ce138bd3286f30adf
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.git
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-topology.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -52,6 +52,9 @@ ifeq ($(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT),y)
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI)\\\"
endif
ifeq ($(CONFIG_TOPOLOGYD_HOST_WAN_STATS),y)
TARGET_CFLAGS += -DHOST_WAN_STATS
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare

View File

@@ -20,7 +20,12 @@ compare_mcast_proxy_upstream() {
for dev in $upstream; do
if [ "$l3device" == "$dev" ]; then
ubus call uci commit '{"config":"mcast"}'
running=$(ubus call service list '{"name": "mcast"}' | jsonfilter -e '@.mcast.instances')
if [ -z "${running}" ];then
/etc/init.d/mcast start
else
ubus call uci commit '{"config":"mcast"}'
fi
exit
fi
done

View File

@@ -51,10 +51,6 @@ boot() {
start
}
stop_service() {
service_stop "${PROG_EXE}"
}
reload_service() {
stop
start

View File

@@ -95,8 +95,13 @@ interfaces_ok(){
dev_section=$(ubus call uci get '{"config":"network", "type":"device", "match":{"name":"'"$itf"'"}}' | jsonfilter -e @.values | jq keys[])
# mcast config is outdated, simply generate as per new logic
[ -z "$dev_section" ] && return 1
if [ -z "$dev_section" ]; then
# check if the itf is a native interface && return 1
native=$(ubus call uci get '{"config":"ports", "type":"ethport", "match":{"ifname":"'"$itf"'"}}' | jsonfilter -e @.values | jq keys[])
[ -z "native" ] && return 1
fi
done
return 0
}

View File

@@ -1,6 +1,7 @@
#!/bin/sh
. /lib/mcast/common.sh
. /lib/functions/network.sh
include /lib/network
@@ -10,7 +11,40 @@ PROG_PARAMS=
PROG_PARAMS_SEPARATOR=:
setup_mcast_mode() {
unused(){ :;}
local snooped_interface=$1
local mcast_mode=$2
local mcast_flood=
local devsec=
local sectype=
local devtype=
local ports=
if [ -z "$snooped_interface" ]; then
return
fi
if [ $mcast_mode == "2" ]; then # disable mcast flood
mcast_flood=0
else
mcast_flood=1
fi
for intf in $snooped_interface;
do
devsec="$(uci show network | grep name=.*$intf | cut -d'.' -f2)"
sectype="$(uci -q get network.$devsec)"
devtype="$(uci -q get network.$devsec.type)"
if [ "$sectype" == "device" -a "$devtype" == "bridge" ]; then
ports="$(uci get network.$devsec.ports)"
for prt in $ports; do
echo $mcast_flood > /sys/class/net/$prt/brport/multicast_flood
done
else
if [ -f /sys/class/net/$intf/brport/multicast_flood ]; then
echo $mcast_flood > /sys/class/net/$intf/brport/multicast_flood
fi
fi
done
}
config_mcproxy_interfaces() {
@@ -41,22 +75,45 @@ config_mcproxy_interfaces() {
return
fi
for upstream in $upstreams; do
for excp in $exceptions; do
local filter=""
for excp in $exceptions; do
case $excp in
*/*)
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
ip_end="$(ipcalc.sh $excp | grep BROADCAST | awk '{print substr($0,11)}')"
filter="$filter ($ip_start - $ip_end | *)"
;;
*)
filter="$filter ($excp | *)"
;;
esac
case $excp in
*/*)
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
ip_end="$(ipcalc.sh $excp | grep BROADCAST | awk '{print substr($0,11)}')"
filter="$filter ($ip_start - $ip_end | *)"
;;
*)
filter="$filter ($excp | *)"
;;
esac
for upstream in $upstreams; do
echo "pinstance main upstream \"$upstream\" in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main upstream \"$upstream\" out blacklist table{$filter };" >> $CONFFILE
done
echo "pinstance main upstream \"$upstream\" in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main upstream \"$upstream\" out blacklist table{$filter };" >> $CONFFILE
for downstream in $downstreams; do
echo "pinstance main downstream \"$downstream\" in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main downstream \"$downstream\" out blacklist table{$filter };" >> $CONFFILE
done
done
}
config_sysfs_mcast_snooping() {
local devsec=
local sectype=
local devtype=
local ports=
for downstream in $downstreams; do
devsec="$(uci show network | grep name=.*$downstream | cut -d'.' -f2)"
sectype="$(uci -q get network.$devsec)"
devtype="$(uci -q get network.$devsec.type)"
if [ "$sectype" == "device" -a "$devtype" == "bridge" ]; then
echo 1 > /sys/class/net/$downstream/bridge/multicast_snooping
fi
done
}
@@ -72,6 +129,8 @@ config_mcproxy_instance() {
local exceptions=
local upstreams=
local downstreams=
local intf_has_ip=
local mcast_mode=2 # default value 2 is for blocking mode
CONFFILE=/var/etc/mcproxy_"$protocol".conf
rm -f $CONFFILE
@@ -96,6 +155,7 @@ config_mcproxy_instance() {
upstreams=$igmp_p_up_interfaces
downstreams=$igmp_p_down_interfaces
mcast_mode=$igmp_p_mode
elif [ "$protocol" == "mld" ]; then
case "$version" in
[1-2])
@@ -115,18 +175,61 @@ config_mcproxy_instance() {
upstreams=$mld_p_up_interfaces
downstreams=$mld_p_down_interfaces
mcast_mode=$mld_p_mode
fi
# for snooping to work we should enable it on the bridge, doing it from
# here instead of from inside network config
config_sysfs_mcast_snooping
[ -n "$max_groups" ] && echo -e "max_groups $max_groups;" >> $CONFFILE
[ -n "$robustness" ] && echo -e "rv $robustness;" >> $CONFFILE
[ -n "$query_interval" ] && echo -e "qi $query_interval;" >> $CONFFILE
[ -n "$q_resp_interval" ] && echo -e "qri $q_resp_interval;" >> $CONFFILE
[ -n "$last_mem_q_int" ] && echo -e "lmqi $last_mem_q_int;" >> $CONFFILE
[ -n "$fast_leave" ] && echo -e "fastleave $fast_leave;\n" >> $CONFFILE
if [[ -n $fast_leave ]]; then
echo -e "fastleave $fast_leave;\n" >> $CONFFILE
config_sysfs_mcast_fastleave $fast_leave
fi
setup_mcast_mode $downstreams $mcast_mode
[ -n "$upstreams" ] && [ -n "$downstreams" ] &&
config_mcproxy_interfaces "$upstreams" "$downstreams" "$exceptions"
PROG_PARAMS="${PROG_PARAMS} -f ${CONFFILE}${PROG_PARAMS_SEPARATOR}"
# In case on proxy, upstreams is a list. Iterating and running the mcproxy
# for each valid upstream interface
for upstream_device in $upstreams;
do
# Read the upstream interface for the upstream device
# upstream device can have multiple logical interfaces like wan and wan6
# but same l3 device
local upstream_ifaces=$(get_network_of $upstream_device)
for iface in $upstream_ifaces;
do
if [ "$protocol" == "igmp" ]; then
network_get_ipaddr upstream_ip $iface
if [ ! -z "${upstream_ip}" ]; then
intf_has_ip=1
break
fi
fi
if [ "$protocol" == "mld" ]; then
network_get_ipaddr6 upstream_ip $iface
if [ ! -z "${upstream_ip}" ]; then
intf_has_ip=1
break
fi
fi
done
if [ -z "${intf_has_ip}" ]; then
continue
fi
PROG_PARAMS="${PROG_PARAMS} -f ${CONFFILE}${PROG_PARAMS_SEPARATOR}"
done
}
config_mcproxy() {
@@ -139,11 +242,41 @@ config_mcproxy() {
fi
}
config_sysfs_mcast_fastleave() {
local devsec=
local sectype=
local devtype=
local ports=
for downstream in $downstreams; do
devsec="$(uci show network | grep name=.*$downstream | cut -d'.' -f2)"
sectype="$(uci -q get network.$devsec)"
devtype="$(uci -q get network.$devsec.type)"
if [ "$sectype" == "device" -a "$devtype" == "bridge" ]; then
ports="$(uci get network.$devsec.ports)"
for prt in $ports; do
echo $1 > /sys/class/net/$prt/brport/multicast_fast_leave
done
else
[[ -f /sys/class/net/$downstream/brport/multicast_fast_leave ]] && echo $1 > /sys/class/net/$downstream/brport/multicast_fast_leave
fi
done
}
configure_mcast() {
config_global_params "set_max_groups_and_sources"
# mcproxy reserves two multicast subscriptions for igmp router service groups
local mg=$(cat /proc/sys/net/ipv4/igmp_max_memberships)
mg=$((mg+2))
echo $mg > /proc/sys/net/ipv4/igmp_max_memberships
read_mcast_snooping_params
read_mcast_proxy_params
config_mcproxy
if [ -z "${PROG_PARAMS}" ]; then
exit 0
fi
}

View File

@@ -0,0 +1,163 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
read_mcast_stats() {
local temp_igmp_file='/tmp/igmp_stats_'$$
local snooping_stats='/tmp/igmp_snooping_stats'
local old_mod_time=$(date +%s 2>/dev/null -r "$snooping_stats")
# Sending signal to mcproxy to dump multicast data in /tmp/igmp_snooping_stats
local mcast_pids=$(pidof mcproxy)
for pid in $mcast_pids
do
$(kill -10 $pid)
done
# Wait for signal is being processed by mcproxy
if [ -n "$mcast_pids" ]; then
for i in 1 2 3; do
local new_mod_time=$(date +%s 2>/dev/null -r "$snooping_stats")
[ -n "$new_mod_time" ] && [ "$new_mod_time" != "$old_mod_time" ] && break
sleep 0.1
done
fi
cat "$snooping_stats" > "$temp_igmp_file"
local mcast_addrs=""
local ifaces=""
while read line; do
# reading each line
case $line in
br-*)
found_iface=0
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ -z "$ifaces" ]; then
ifaces="$snoop_iface"
continue
fi
IFS=" "
for ifx in $ifaces; do
if [ $ifx == $snoop_iface ]; then
found_iface=1
break
fi
done
if [ $found_iface -eq 0 ]; then
ifaces="$ifaces $snoop_iface"
continue
fi
;;
esac
done < "$temp_igmp_file"
while read line; do
# reading each line
case $line in
br-*)
found_ip=0
grp_ip="$(echo $line | awk -F ' ' '{ print $2 }')"
if [ -z "$mcast_addrs" ]; then
mcast_addrs="$grp_ip"
continue
fi
IFS=" "
for ip_addr in $mcast_addrs; do
if [ $ip_addr == $grp_ip ]; then
found_ip=1
break
fi
done
if [ $found_ip -eq 0 ]; then
mcast_addrs="$mcast_addrs $grp_ip"
continue
fi
;;
esac
done < "$temp_igmp_file"
json_init
json_add_array "snooping"
json_add_object ""
IFS=" "
for intf in $ifaces; do
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
json_add_string "interface" "$intf"
json_add_array "groups"
break
;;
esac
done < "$temp_igmp_file"
IFS=" "
for gip_addr in $mcast_addrs; do
grp_obj_added=0
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
grp_ip="$(echo $line | awk -F ' ' '{ print $2 }')"
if [ "$grp_ip" != "$gip_addr" ]; then
continue
fi
if [ $grp_obj_added -eq 0 ]; then
json_add_object ""
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
json_add_string "groupaddr" "$gip"
json_add_array "clients"
grp_obj_added=1
fi
json_add_object ""
host_ip="$(echo $line | awk -F ' ' '{ print $3 }')"
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
json_add_string "ipaddr" "$h_ip"
src_port="$(echo $line | awk -F ' ' '{ print $4 }')"
json_add_string "device" "$src_port"
timeout="$(echo $line | awk -F ' ' '{ print $5 }')"
json_add_int "timeout" "$timeout"
json_close_object #close the associated device object
;;
esac
done < "$temp_igmp_file"
json_close_array #close the associated devices array
json_close_object # close the groups object
done # close the loop for group addresses
json_close_array #close the groups array
done # close the loop for interfaces
json_close_object # close the snooping object
json_close_array # close the snooping array
json_dump
rm -f "$temp_igmp_file"
}
case "$1" in
list)
echo '{ "stats":{} }'
;;
call)
case "$2" in
stats)
read_mcast_stats
;;
esac
;;
esac

View File

@@ -23,7 +23,7 @@ config OBUSPA_MTP_ENABLE_COAP
default y
config OBUSPA_CONTROLLER_MTP_VERIFY
bool "Enable verification of MQTT response topic before processing the message"
bool "Enable verification of controller MTP before processing the message"
default n
endmenu
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=7.0.0.9
PKG_VERSION:=7.0.2.21
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
PKG_SOURCE_VERSION:=0a2a3481dddea672a2b12d1fcaa689d7fa761fe3
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=7d9ae65ca28a558214d99f4fa5674bbfef006c97
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -110,7 +110,6 @@ define Package/obuspa/install
$(INSTALL_DATA) ./files/etc/bbfdm/json/USPAgent.json $(1)/etc/bbfdm/json/USPAgent.json
$(INSTALL_DATA) ./files/etc/bbfdm/json/TransferComplete.json $(1)/etc/bbfdm/json/TransferComplete.json
$(INSTALL_BIN) ./files/etc/uci-defaults/01-fix-upgrade-uci $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/05-obuspa-mqtt-config $(1)/etc/uci-defaults/
endef
$(eval $(call BuildPackage,obuspa))

View File

@@ -10,23 +10,3 @@ config obuspa 'global'
#option client_cert '/etc/obuspa/client.pem'
#option log_dest '/var/log/obuspa'
# Adds Device.LocalAgent.MTP.
config mtp 'test_mtp'
option Protocol 'MQTT'
option ResponseTopicConfigured '/usp/endpoint'
option mqtt 'testmqtt'
# Adds Device.MQTT.Client.
config mqtt 'testmqtt'
option BrokerAddress '127.0.0.1'
option BrokerPort '1883'
option TransportProtocol 'TCP/IP'
# Adds Device.LocalAgent.Controller.
config controller 'testcontroller'
option EndpointID 'proto::interop-usp-controller'
option Protocol 'MQTT'
option Topic '/usp/controller'
option mqtt 'testmqtt'
option assigned_role_name 'full_access'

View File

@@ -12,7 +12,7 @@ KEEP_FILE="/lib/upgrade/keep.d/obuspa"
RESET_FILE="/tmp/obuspa/obuspa_param_reset.txt"
SQL_DB_FILE="/tmp/obuspa/usp.db"
DB_DUMP="/tmp/obuspa/usp.dump"
DB_DUMP="/tmp/obuspa/usp.dump_$(date +%s)"
BASEPATH=""
INSTANCE_COUNT=0
@@ -55,38 +55,28 @@ db_set_sql()
value="$*"
if [ -n "${param}" ] && [ -n "${value}" ]; then
${PROG} -f ${SQL_DB_FILE} -c dbset "${param}" "${value}" >/dev/null 2>&1
fi
}
db_del_sql()
{
local param
param="${1}"
if [ -n "${param}" ]; then
${PROG} -f ${SQL_DB_FILE} -c dbdel "${param}" >/dev/null 2>&1
if grep -q "${param} " ${DB_DUMP}; then
value="${value//\//\\/}"
sed -i "s/${param} .*/${param} \"${value}\"/g" ${DB_DUMP}
else
echo "${param} \"${value}\"" >> ${DB_DUMP}
fi
fi
}
db_set()
{
# if sql db present, update sql db
# else update reset file
if [ -f "${SQL_DB_FILE}" ]; then
# if sql db dump file present, update it
if [ -f "${DB_DUMP}" ]; then
db_set_sql "$@"
else
db_set_reset_file "$@"
fi
}
update_db_dump()
dump_db()
{
if [ -f "${DB_DUMP}" ]; then
rm ${DB_DUMP}
${PROG} -f ${SQL_DB_FILE} -c show database |sort > ${DB_DUMP}
fi
${PROG} -v0 -f ${SQL_DB_FILE} -c show database |awk '/^Device./ || /^Internal./ {print $1 " \"" $3 "\""}' | sort > ${DB_DUMP}
}
# if db present then check if it matches with existing instances
@@ -102,7 +92,7 @@ get_base_path()
count=0
if [ -f "${DB_DUMP}" ]; then
path=$(grep "${refpath}\d.Alias => ${value}" ${DB_DUMP})
path=$(grep "${refpath}\d.Alias \"${value}\"" ${DB_DUMP})
path=${path%.*}
if [ -z "${path}" ]; then
path=$(grep -o "${refpath}\d" ${DB_DUMP} |sort -r|head -n 1)
@@ -234,7 +224,10 @@ validate_controller_section()
'Host:string' \
'Port:port' \
'Path:string' \
'EnableEncryption:bool'
'EnableEncryption:bool' \
'PeriodicNotifInterval:uinteger' \
'SessionMode:string:Allow'
}
validate_subscription_section()
@@ -259,6 +252,7 @@ validate_mtp_section()
'mqtt:string' \
'stomp:string' \
'Reference:string' \
'PublishQoS:uinteger' \
'EnableEncryption:bool'
}
@@ -300,56 +294,6 @@ validate_challenge_section()
'LockoutPeriod:uinteger:0'
}
get_oui_from_db()
{
db -q get device.deviceinfo.ManufacturerOUI
}
get_serial_from_db()
{
db -q get device.deviceinfo.SerialNumber
}
publish_endpoint()
{
local AgentEndpointID serial oui user pass
if ! uci -q get obuspa.testmqtt; then
return 0;
fi
# return if mosquitto_pub is not present
if [ ! "$(command -v mosquitto_pub)" ]; then
log "mosquitto_pub not present can't publish EndpointID"
return 0;
fi
# Get endpoint id from obuspa config first
config_load obuspa
config_get AgentEndpointID localagent EndpointID ""
if [ -z "${AgentEndpointID}" ]; then
serial=$(get_serial_from_db)
oui=$(get_oui_from_db)
AgentEndpointID="os::${oui}-${serial//+/%2B}"
fi
config_get user testmqtt Username
config_get pass testmqtt Password
# publish Agent's EndpointID in mosquito broker for discovery by usp-js
# This is a work around till obuspa adds supports for mDNS discovery
if [ -n "${user}" ] && [ -n "${pass}" ]; then
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker with username, password"
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}" -u "${user}" -P "${pass}"
elif [ -n "${user}" ]; then
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker with username only"
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}" -u "${user}"
else
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker"
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}"
fi
}
configure_localagent()
{
local EndpointID
@@ -360,7 +304,6 @@ configure_localagent()
}
db_set Device.LocalAgent.EndpointID "${EndpointID}"
update_db_dump
}
update_reset_reason()
@@ -377,7 +320,7 @@ configure_controller()
local EndpointID Enable
local Protocol Destination
local Topic mqtt stomp assigned_role_name AssignedRole ParameterName
local Host Port Path EnableEncryption Reference
local Host Port Path EnableEncryption Reference SessionMode PeriodicNotifInterval
local dm_ref sec
sec="${1}"
@@ -414,6 +357,15 @@ configure_controller()
db_set "${BASEPATH}.Alias" "${sec}"
db_set "${BASEPATH}.Enable" "${Enable}"
db_set "${BASEPATH}.EndpointID" "${EndpointID}"
if [ -n "${PeriodicNotifInterval}" ]; then
db_set "${BASEPATH}.PeriodicNotifInterval" "${PeriodicNotifInterval}"
fi
if [ -n "${SessionMode}" ]; then
db_set "${BASEPATH}.E2ESession.SessionMode" "${SessionMode}"
fi
if [ -n "${assigned_role_name}" ]; then
AssignedRole=$(get_role_index "${assigned_role_name}")
fi
@@ -454,9 +406,6 @@ configure_controller()
db_set "${BASEPATH}.BootParameter.${_pnum}.ParameterName" "${param}"
_pnum=$(( _pnum + 1 ))
done
db_set
update_db_dump
}
configure_subscription()
@@ -549,7 +498,6 @@ configure_challenges()
sec="${1}"
validate_challenge_section "${1}" || {
log "Validation of challenge section failed"
exit 1;
}
sec="${sec/challenge_/cpe-}"
@@ -582,7 +530,7 @@ configure_challenges()
configure_mtp() {
local Enable Protocol ResponseTopicConfigured
local Path Port EnableEncryption
local Path Port EnableEncryption PublishQoS
local stomp mqtt dm_ref sec
sec="${1}"
@@ -621,6 +569,9 @@ configure_mtp() {
if [ "${Protocol}" = "MQTT" ]; then
db_set "${BASEPATH}.MQTT.Reference" "${dm_ref}"
db_set "${BASEPATH}.MQTT.ResponseTopicConfigured" "${ResponseTopicConfigured}"
if [ -n "${PublishQoS}" ]; then
db_set "${BASEPATH}.MQTT.PublishQoS" "${PublishQoS}"
fi
elif [ "${Protocol}" = "STOMP" ]; then
db_set "${BASEPATH}.STOMP.Reference" "${dm_ref}"
db_set "${BASEPATH}.STOMP.Destination" "${Destination}"
@@ -632,8 +583,6 @@ configure_mtp() {
db_set "${BASEPATH}.WebSocket.Port" "${Port}"
db_set "${BASEPATH}.WebSocket.EnableEncryption" "${EnableEncryption}"
fi
db_set
update_db_dump
}
configure_stomp_connection() {
@@ -664,8 +613,6 @@ configure_stomp_connection() {
db_set "${BASEPATH}.EnableEncryption" "${EnableEncryption}"
db_set "${BASEPATH}.EnableHeartbeats" "${EnableHeartbeats}"
db_set "${BASEPATH}.VirtualHost" "${VirtualHost}"
db_set
update_db_dump
}
configure_mqtt_client() {
@@ -695,9 +642,6 @@ configure_mqtt_client() {
db_set "${BASEPATH}.ProtocolVersion" "${ProtocolVersion}"
db_set "${BASEPATH}.TransportProtocol" "${TransportProtocol}"
db_set "${BASEPATH}.ClientID" "${ClientID}"
db_set
update_db_dump
}
@@ -751,6 +695,9 @@ configure_obuspa() {
fi
if [ -f "${RESET_FILE}" ]; then
if [ -f "${SQL_DB_FILE}" ]; then
mv ${SQL_DB_FILE} ${SQL_DB_FILE}.old
fi
procd_append_param command -r ${RESET_FILE}
fi
@@ -795,9 +742,9 @@ get_param_value_from_dump()
return 0
fi
value="$(grep "^${param} " ${DB_DUMP}|awk '{print $3}')"
value="$(grep "^${param} " ${DB_DUMP}|awk '{print $2}')"
echo "$value"
echo "${value//\"/}"
}
update_uci_sec()
@@ -821,7 +768,7 @@ sync_db_controller()
{
local cntrs copts sec pvalue protocol
copts="Enable EndpointID AssignedRole"
copts="Enable EndpointID AssignedRole PeriodicNotifInterval"
popts="Destination Topic Reference Host Port Path EnableEncryption"
cntrs="$(get_instances_from_db_dump Device.LocalAgent.Controller.)"
@@ -854,7 +801,7 @@ sync_db_localagent_mtp()
local mtps opts popts sec pvalue protocol
opts="Enable"
popts="ResponseTopicConfigured Destination Port Path Reference EnableEncryption"
popts="ResponseTopicConfigured Destination Port Path Reference EnableEncryption PublishQoS"
ropts="mqtt stomp"
mtps="$(get_instances_from_db_dump Device.LocalAgent.MTP.)"
@@ -970,10 +917,8 @@ delete_sql_db_entry_with_pattern()
return 0;
fi
params="$(grep "${pattern}" ${DB_DUMP}|awk '{print $1}')"
for p in ${params}; do
db_del_sql "${p}"
done
#log "Deleting with pattern [${pattern}] from ${DB_DUMP}"
sed -i "/${pattern}/d" ${DB_DUMP}
}
check_n_delete_db()
@@ -989,7 +934,7 @@ check_n_delete_db()
r="${3}"
sec="${sec/${t}_/cpe-}"
path=$(grep "${r}\d.Alias => ${sec}" ${DB_DUMP})
path=$(grep "${r}\d.Alias \"${sec}\"" ${DB_DUMP})
path=${path%.*}
delete_sql_db_entry_with_pattern "${path}"
@@ -1017,28 +962,42 @@ db_init()
reason="${1}"
mkdir -p /tmp/obuspa/
# Load configuration
config_load $CONFIGURATION
config_get SQL_DB_FILE global db_file "/tmp/obuspa/usp.db"
if [ -f "${SQL_DB_FILE}.old" ] && [ ! -f "${SQL_DB_FILE}" ]; then
log "Copying old db, since new db not present ..."
mv ${SQL_DB_FILE}.old ${SQL_DB_FILE}
fi
# Dump datamodel parameters from DB
if [ -f "${SQL_DB_FILE}" ]; then
${PROG} -f ${SQL_DB_FILE} -c show database |sort > ${DB_DUMP}
dump_db
fi
# Only sync uci with db in case of non service triggers
# In case of Reboot or service restart update the uci
# from usp.db file
if [ -f "${DB_DUMP}" ] && [ "${reason}" != "update" ]; then
sync_uci_with_db
# Only do this if db have reasonable data
val="$(awk 'END{print NR}' ${DB_DUMP})"
if [ "$val" -gt 15 ]; then
log "Syncing obuspa uci with usp.db ...."
sync_uci_with_db
fi
fi
# remove entries from db if deleted from uci
# remove entries from db if deleted from uci, only in case of reload
if [ -f "${DB_DUMP}" ] && [ "${reason}" = "update" ] && [ -f "/tmp/obuspa/obuspa" ]; then
log "Deleting entries from usp.db if uci not present ...."
reverse_update_db_with_uci
fi
# Remove reset file if present
[ -f "${RESET_FILE}" ] && rm -f ${RESET_FILE}
[ -f "${RESET_FILE}" ] && mv ${RESET_FILE} ${RESET_FILE}.old
#log "Create reset file ...."
config_load $CONFIGURATION
global_init
config_foreach configure_localagent localagent
@@ -1059,8 +1018,9 @@ db_init()
uci_commit ${CONFIGURATION}
cp /etc/config/obuspa /tmp/obuspa/
[ -f "${DB_DUMP}" ] && rm -f ${DB_DUMP}
if [ -f "${DB_DUMP}" ]; then
mv ${DB_DUMP} ${RESET_FILE}
fi
return 0;
}
@@ -1075,14 +1035,10 @@ register_service()
"${respawn_threshold:-5}" \
"${respawn_timeout:-10}" "${respawn_retry:-3}"
procd_set_param watch usp.raw
procd_set_param watch bbfdm
procd_close_instance
}
service_running() {
publish_endpoint
}
start_service() {
local enabled
@@ -1113,7 +1069,7 @@ service_triggers() {
# Create a reload trigger if schema update avaialble
procd_open_trigger
json_add_array
json_add_string "" "usp.raw"
json_add_string "" "bbfdm"
json_add_array
json_add_string "" "if"
json_add_array

View File

@@ -0,0 +1,117 @@
diff --git a/src/core/device.h b/src/core/device.h
index 5ca0782..ee6d88c 100644
--- a/src/core/device.h
+++ b/src/core/device.h
@@ -157,6 +157,9 @@ int DEVICE_CONTROLLER_Start(void);
void DEVICE_CONTROLLER_Stop(void);
int DEVICE_CONTROLLER_FindInstanceByEndpointId(char *endpoint_id);
int DEVICE_CONTROLLER_QueueBinaryMessage(mtp_send_item_t *msi, char *endpoint_id, char *usp_msg_id, mtp_reply_to_t *mtp_reply_to, time_t expiry_time);
+#ifdef OBUSPA_CONTROLLER_MTP_VERIFY
+bool DEVICE_CONTROLLER_IsMTPAllowed(char *endpoint_id, mtp_reply_to_t *mrt);
+#endif
bool DEVICE_CONTROLLER_IsMTPConfigured(char *endpoint_id, mtp_protocol_t protocol);
char *DEVICE_CONTROLLER_FindEndpointIdByInstance(int instance);
char *DEVICE_CONTROLLER_FindEndpointByMTP(mtp_reply_to_t *mrt);
diff --git a/src/core/device_controller.c b/src/core/device_controller.c
index ae609f5..a6335f5 100644
--- a/src/core/device_controller.c
+++ b/src/core/device_controller.c
@@ -900,6 +900,78 @@ int DEVICE_CONTROLLER_QueueBinaryMessage(mtp_send_item_t *msi, char *endpoint_id
return USP_ERR_OK;
}
+#ifdef OBUSPA_CONTROLLER_MTP_VERIFY
+/*********************************************************************//**
+**
+** DEVICE_CONTROLLER_IsMTPAllowed
+**
+** Determines whether an MTP is allowed to be used by the specified controller
+** This function is used by ValidateUspRecord() to determine whether to process a received USP message
+**
+** \param endpoint_id - Endpoint ID of controller that sent a USP message
+** \param mrt - pointer to structure specifying on which MTP the message was received
+**
+** \return true if the MTP is allowed, false otherwise
+**
+**************************************************************************/
+bool DEVICE_CONTROLLER_IsMTPAllowed(char *endpoint_id, mtp_reply_to_t *mrt)
+{
+ controller_t *cont = FindEnabledControllerByEndpointId(endpoint_id);
+ controller_mtp_t *mtp;
+
+ // Disallow if no controller instance is found
+ if (cont == NULL)
+ {
+ return false;
+ }
+
+ mtp = FindFirstEnabledMtp(cont, mrt->protocol);
+
+#ifdef ENABLE_WEBSOCKETS
+ // Allow websocket server if no other MTP is configured
+ if ((mrt->protocol == kMtpProtocol_WebSockets) && (mrt->wsserv_conn_id != INVALID))
+ {
+ return mtp == NULL;
+ }
+#endif
+
+ // Disallow if there is no MTP configured with matching protocol
+ if ((mtp == NULL) || (mtp->protocol != mrt->protocol))
+ {
+ return false;
+ }
+
+ // Check that the configured MTP matches the MTP on which the message was received
+ switch(mtp->protocol)
+ {
+#ifndef DISABLE_STOMP
+ case kMtpProtocol_STOMP:
+ return mtp->stomp_connection_instance == mrt->stomp_instance;
+#endif
+
+#ifdef ENABLE_COAP
+ case kMtpProtocol_CoAP:
+ return true; // More detailed checks are not implemented for CoAP
+#endif
+
+#ifdef ENABLE_MQTT
+ case kMtpProtocol_MQTT:
+ return mtp->mqtt_connection_instance == mrt->mqtt_instance;
+#endif
+
+#ifdef ENABLE_WEBSOCKETS
+ case kMtpProtocol_WebSockets:
+ return (mrt->wsclient_cont_instance == cont->instance) && (mrt->wsclient_mtp_instance == mtp->instance);
+#endif
+ default:
+ TERMINATE_BAD_CASE(mtp->protocol);
+ break;
+ }
+
+ return false;
+}
+#endif
+
/*********************************************************************//**
**
** DEVICE_CONTROLLER_IsMTPConfigured
diff --git a/src/core/msg_handler.c b/src/core/msg_handler.c
index 8313342..a953562 100644
--- a/src/core/msg_handler.c
+++ b/src/core/msg_handler.c
@@ -759,6 +759,15 @@ int ValidateUspRecord(UspRecord__Record *rec, mtp_reply_to_t *mrt)
return USP_ERR_RECORD_FIELD_INVALID;
}
+#ifdef OBUSPA_CONTROLLER_MTP_VERIFY
+ // Exit if the controller is not allowed to use the MTP on which the message was received
+ if (DEVICE_CONTROLLER_IsMTPAllowed(rec->from_id, mrt) == false)
+ {
+ USP_ERR_SetMessage("%s: Ignoring message from endpoint_id=%s (unauthorized MTP)", __FUNCTION__, rec->from_id);
+ return USP_ERR_PERMISSION_DENIED;
+ }
+#endif
+
// Exit if the controller is unknown
cur_msg_controller_instance = DEVICE_CONTROLLER_FindInstanceByEndpointId(rec->from_id);
if (cur_msg_controller_instance == INVALID)

View File

@@ -10,7 +10,7 @@
{
--- a/src/core/data_model.h
+++ b/src/core/data_model.h
@@ -324,6 +324,7 @@ void DATA_MODEL_DumpSchema(void);
@@ -325,6 +325,7 @@ void DATA_MODEL_DumpSchema(void);
void DATA_MODEL_DumpInstances(void);
char DATA_MODEL_GetJSONParameterType(char *path);
int DATA_MODEL_SetParameterInDatabase(char *path, char *value);

View File

@@ -1,6 +1,6 @@
--- a/src/core/data_model.c
+++ b/src/core/data_model.c
@@ -1239,7 +1239,7 @@ int DATA_MODEL_NotifyInstanceAdded(char
@@ -1242,7 +1242,7 @@ int DATA_MODEL_NotifyInstanceAdded(char
// Exit if instance already exists - nothing to do
if (exists)
{
@@ -9,7 +9,7 @@
return USP_ERR_CREATION_FAILURE;
}
@@ -1324,7 +1324,7 @@ int DATA_MODEL_NotifyInstanceDeleted(cha
@@ -1327,7 +1327,7 @@ int DATA_MODEL_NotifyInstanceDeleted(cha
// Exit if instance does not exist - nothing to do
if (exists == false)
{

View File

@@ -1,8 +1,6 @@
diff --git a/src/core/bdc_exec.c b/src/core/bdc_exec.c
index 3670361..6a6325d 100644
--- a/src/core/bdc_exec.c
+++ b/src/core/bdc_exec.c
@@ -547,11 +547,19 @@ int StartSendingReport(bdc_connection_t *bc)
@@ -547,11 +547,19 @@ int StartSendingReport(bdc_connection_t
// Set the list of headers
bc->headers = NULL;
@@ -25,8 +23,6 @@ index 3670361..6a6325d 100644
if (bc->flags & BDC_FLAG_GZIP)
{
diff --git a/src/core/bdc_exec.h b/src/core/bdc_exec.h
index ff37a2d..ee29c85 100644
--- a/src/core/bdc_exec.h
+++ b/src/core/bdc_exec.h
@@ -53,6 +53,9 @@ void BDC_EXEC_ScheduleExit(void);
@@ -40,8 +36,6 @@ index ff37a2d..ee29c85 100644
+#define BDC_FLAG_HEADER_PER_COL 0x00000040 // If set, report format in header would be csv ParameterPerColumn
#endif
diff --git a/src/core/device_bulkdata.c b/src/core/device_bulkdata.c
index a7d1b3e..fab9731 100755
--- a/src/core/device_bulkdata.c
+++ b/src/core/device_bulkdata.c
@@ -67,9 +67,12 @@
@@ -78,7 +72,7 @@ index a7d1b3e..fab9731 100755
} profile_ctrl_params_t;
//------------------------------------------------------------------------------
@@ -208,6 +217,7 @@ int Validate_BulkDataEncodingType(dm_req_t *req, char *value);
@@ -208,6 +217,7 @@ int Validate_BulkDataEncodingType(dm_req
int Validate_BulkDataReportingInterval(dm_req_t *req, char *value);
int Validate_BulkDataReference(dm_req_t *req, char *value);
int Validate_BulkDataReportFormat(dm_req_t *req, char *value);
@@ -86,7 +80,7 @@ index a7d1b3e..fab9731 100755
int Validate_BulkDataReportTimestamp(dm_req_t *req, char *value);
int Validate_BulkDataCompression(dm_req_t *req, char *value);
int Validate_BulkDataHTTPMethod(dm_req_t *req, char *value);
@@ -236,6 +246,8 @@ bulkdata_profile_t *bulkdata_find_profile(int profile_id);
@@ -236,6 +246,8 @@ bulkdata_profile_t *bulkdata_find_profil
int bulkdata_calc_report_map(bulkdata_profile_t *bp, kv_vector_t *report_map);
int bulkdata_reduce_to_alt_name(char *spec, char *path, char *alt_name, char *out_buf, int buf_len);
char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format);
@@ -95,7 +89,7 @@ index a7d1b3e..fab9731 100755
unsigned char *bulkdata_compress_report(profile_ctrl_params_t *ctrl, char *input_buf, int input_len, int *p_output_len);
int bulkdata_schedule_sending_http_report(profile_ctrl_params_t *ctrl, bulkdata_profile_t *bp, unsigned char *json_report, int report_len);
int bulkdata_start_profile(bulkdata_profile_t *bp);
@@ -250,6 +262,7 @@ char *bulkdata_platform_calc_uri_query_string(kv_vector_t *escaped_map);
@@ -250,6 +262,7 @@ char *bulkdata_platform_calc_uri_query_s
int bulkdata_platform_get_param_refs(int profile_id, param_ref_vector_t *param_refs);
void bulkdata_expand_param_ref(param_ref_entry_t *pr, group_get_vector_t *ggv);
void bulkdata_append_to_result_map(param_ref_entry_t *pr, group_get_vector_t *ggv, kv_vector_t *report_map);
@@ -135,7 +129,7 @@ index a7d1b3e..fab9731 100755
// Device.BulkData.Profile.{i}.HTTP
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.URL", "", NULL, NotifyChange_BulkDataURL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.Username", "", NULL, NULL, DM_STRING);
@@ -591,9 +611,10 @@ int Validate_BulkDataProtocol(dm_req_t *req, char *value)
@@ -591,9 +611,10 @@ int Validate_BulkDataProtocol(dm_req_t *
int Validate_BulkDataEncodingType(dm_req_t *req, char *value)
{
// Exit if trying to set a value outside of the range we accept
@@ -148,12 +142,10 @@ index a7d1b3e..fab9731 100755
return USP_ERR_INVALID_VALUE;
}
@@ -674,6 +695,32 @@ int Validate_BulkDataReportFormat(dm_req_t *req, char *value)
return USP_ERR_OK;
}
@@ -676,6 +697,32 @@ int Validate_BulkDataReportFormat(dm_req
+/*********************************************************************//**
+**
/*********************************************************************//**
**
+** Validate_BulkDataCSVReportFormat
+**
+** Validates Device.BulkData.Profile.{i}.CSVEncoding.ReportFormat
@@ -178,10 +170,12 @@ index a7d1b3e..fab9731 100755
+ return USP_ERR_OK;
+}
+
/*********************************************************************//**
**
+/*********************************************************************//**
+**
** Validate_BulkDataReportTimestamp
@@ -1970,6 +2017,14 @@ int bulkdata_platform_get_profile_control_params(bulkdata_profile_t *bp, profile
**
** Validates Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
@@ -1970,6 +2017,14 @@ int bulkdata_platform_get_profile_contro
return err;
}
@@ -196,7 +190,7 @@ index a7d1b3e..fab9731 100755
// Exit if unable to get ReportTimestamp
USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportTimestamp", bp->profile_id);
err = DATA_MODEL_GetParameterValue(path, ctrl_params->report_timestamp, sizeof(ctrl_params->report_timestamp), 0);
@@ -1986,6 +2041,46 @@ int bulkdata_platform_get_profile_control_params(bulkdata_profile_t *bp, profile
@@ -1986,6 +2041,46 @@ int bulkdata_platform_get_profile_contro
return err;
}
@@ -243,7 +237,7 @@ index a7d1b3e..fab9731 100755
return USP_ERR_OK;
}
@@ -2222,7 +2317,7 @@ void bulkdata_process_profile_http(bulkdata_profile_t *bp)
@@ -2222,7 +2317,7 @@ void bulkdata_process_profile_http(bulkd
{
int err;
report_t *cur_report;
@@ -252,7 +246,7 @@ index a7d1b3e..fab9731 100755
profile_ctrl_params_t ctrl;
unsigned char *compressed_report;
int compressed_len;
@@ -2261,10 +2356,23 @@ void bulkdata_process_profile_http(bulkdata_profile_t *bp)
@@ -2261,10 +2356,23 @@ void bulkdata_process_profile_http(bulkd
}
// Exit if unable to generate the report
@@ -280,7 +274,7 @@ index a7d1b3e..fab9731 100755
return;
}
@@ -2273,14 +2381,14 @@ void bulkdata_process_profile_http(bulkdata_profile_t *bp)
@@ -2273,14 +2381,14 @@ void bulkdata_process_profile_http(bulkd
USP_LOG_Info("BULK DATA: using compression method=%s", ctrl.compression);
if (enable_protocol_trace)
{
@@ -299,7 +293,7 @@ index a7d1b3e..fab9731 100755
}
// NOTE: From this point on, only the compressed_report exists
@@ -2310,9 +2418,15 @@ void bulkdata_process_profile_usp_event(bulkdata_profile_t *bp)
@@ -2310,9 +2418,15 @@ void bulkdata_process_profile_usp_event(
kv_vector_t event_args;
kv_pair_t kv;
report_t *cur_report;
@@ -316,7 +310,7 @@ index a7d1b3e..fab9731 100755
// Exit if the MTP has not been connected to successfully after bootup
// This is to prevent BDC events being enqueued before the Boot! event is sent (the Boot! event is only sent after successfully connecting to the MTP).
@@ -2321,20 +2435,62 @@ void bulkdata_process_profile_usp_event(bulkdata_profile_t *bp)
@@ -2321,20 +2435,62 @@ void bulkdata_process_profile_usp_event(
goto exit;
}
@@ -390,7 +384,7 @@ index a7d1b3e..fab9731 100755
}
// When sending via USP events, only one report is ever sent in each USP event
@@ -2354,10 +2510,16 @@ void bulkdata_process_profile_usp_event(bulkdata_profile_t *bp)
@@ -2354,10 +2510,16 @@ void bulkdata_process_profile_usp_event(
bp->num_retained_reports = 1;
// Exit if unable to generate the report
@@ -410,7 +404,7 @@ index a7d1b3e..fab9731 100755
return;
}
@@ -2365,15 +2527,15 @@ void bulkdata_process_profile_usp_event(bulkdata_profile_t *bp)
@@ -2365,15 +2527,15 @@ void bulkdata_process_profile_usp_event(
// Construct event_args manually to avoid the overhead of a malloc and copy of the report in KV_VECTOR_Add()
kv.key = "Data";
@@ -429,12 +423,10 @@ index a7d1b3e..fab9731 100755
// From the point of view of this code, the report(s) have been successfully sent, so don't retain them
// NOTE: Sending of the reports successfully is delegated to the USP notification retry mechanism
@@ -2833,6 +2995,219 @@ char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timesta
return result;
}
@@ -2835,6 +2997,219 @@ char *bulkdata_generate_json_report(bulk
+/*********************************************************************//**
+**
/*********************************************************************//**
**
+** append_string_to_target
+**
+** concatenates the src string with target string in newly allocated memory
@@ -646,10 +638,12 @@ index a7d1b3e..fab9731 100755
+ return output;
+}
+
/*********************************************************************//**
**
+/*********************************************************************//**
+**
** bulkdata_compress_report
@@ -2986,9 +3361,18 @@ int bulkdata_schedule_sending_http_report(profile_ctrl_params_t *ctrl, bulkdata_
**
** Compresses the report to send
@@ -2986,9 +3361,18 @@ int bulkdata_schedule_sending_http_repor
flags |= BDC_FLAG_DATE_HEADER;
}

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