mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-22 10:03:57 +08:00
Compare commits
1132 Commits
mxml
...
add_libblo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08dbacb62a | ||
|
|
71ea7517a7 | ||
|
|
306aabe4ea | ||
|
|
21b15495da | ||
|
|
96c2a4885a | ||
|
|
6e992b3a8b | ||
|
|
4d17441d44 | ||
|
|
41f83bb782 | ||
|
|
80fbdf2afe | ||
|
|
a0477ff19d | ||
|
|
73e6a19070 | ||
|
|
1811f4e42f | ||
|
|
177d4b43b2 | ||
|
|
c86a387a17 | ||
|
|
c8c1bb2a47 | ||
|
|
45f4468736 | ||
|
|
43fe6e522b | ||
|
|
b731667227 | ||
|
|
302a93121a | ||
|
|
212872b353 | ||
|
|
1d894d390b | ||
|
|
9b3611b287 | ||
|
|
de8c4dbc02 | ||
|
|
e8c3370f35 | ||
|
|
c37809e629 | ||
|
|
376b69eef1 | ||
|
|
92cde1ab5f | ||
|
|
f722c70859 | ||
|
|
ed1194be9d | ||
|
|
ef0c49d853 | ||
|
|
44ad141311 | ||
|
|
28e8fda73b | ||
|
|
44c6d5e7e6 | ||
|
|
6a8734ad4f | ||
|
|
91cd49c655 | ||
|
|
cb7256eba9 | ||
|
|
82fe2012eb | ||
|
|
26d9c43c7a | ||
|
|
a88061f8bf | ||
|
|
a92372c236 | ||
|
|
f4a33e75bd | ||
|
|
7c8b92e588 | ||
|
|
cd29e81357 | ||
|
|
da85372764 | ||
|
|
5b7a4d13ca | ||
|
|
86a553c697 | ||
|
|
769d814a6a | ||
|
|
51b076831a | ||
|
|
316a861269 | ||
|
|
d88eb8054b | ||
|
|
7d3387b095 | ||
|
|
f3059ca516 | ||
|
|
ae94f3390f | ||
|
|
5b3ad47604 | ||
|
|
e5bda20934 | ||
|
|
a6bde81c24 | ||
|
|
d1f74be5d5 | ||
|
|
8f3a5ca899 | ||
|
|
e5826116c1 | ||
|
|
a3bbe22c4d | ||
|
|
d850fa30bc | ||
|
|
ae9aa435db | ||
|
|
5ab73e5ff8 | ||
|
|
663afa1332 | ||
|
|
d343d53c36 | ||
|
|
c22193831e | ||
|
|
ac99059cd1 | ||
|
|
ecf1e6780f | ||
|
|
c3cdc2e859 | ||
|
|
b5e675774e | ||
|
|
5f116f84a2 | ||
|
|
e16f723dd0 | ||
|
|
c392ca42b9 | ||
|
|
3b5f77d70d | ||
|
|
5a44065b48 | ||
|
|
3c030ea40d | ||
|
|
00d9c04d22 | ||
|
|
7502a9418d | ||
|
|
ecbf78e517 | ||
|
|
024e9d6291 | ||
|
|
d7f607aaa4 | ||
|
|
bd5b448d38 | ||
|
|
10ee5827b9 | ||
|
|
bc0e86f2de | ||
|
|
6584bcb6d5 | ||
|
|
adc3dee346 | ||
|
|
8f3027c10a | ||
|
|
7f542aef0c | ||
|
|
bb213672f7 | ||
|
|
c0bdd69f42 | ||
|
|
05d96f2adf | ||
|
|
702f18b133 | ||
|
|
ffb2ca218f | ||
|
|
cdcc69a881 | ||
|
|
cdcafdb724 | ||
|
|
ec7175267e | ||
|
|
64d58681ea | ||
|
|
7355dcb205 | ||
|
|
82afbb191c | ||
|
|
62d586fc60 | ||
|
|
227a65b4c3 | ||
|
|
9e28ed1733 | ||
|
|
95471502d7 | ||
|
|
b00207e894 | ||
|
|
e508592575 | ||
|
|
d911030e19 | ||
|
|
b69a074909 | ||
|
|
5639e84185 | ||
|
|
406de53d91 | ||
|
|
6c6abcd25a | ||
|
|
32ea5ee333 | ||
|
|
4f8e7d9899 | ||
|
|
331441e450 | ||
|
|
1ab88ddc70 | ||
|
|
57733d7f69 | ||
|
|
f99105089a | ||
|
|
649d57c9d3 | ||
|
|
2e61d61460 | ||
|
|
f92d060e06 | ||
|
|
242948948b | ||
|
|
ddd2f3a7da | ||
|
|
aa7ac703b4 | ||
|
|
f91fdd322e | ||
|
|
e39818e9d1 | ||
|
|
e62f24cc8e | ||
|
|
dc20f7f5f0 | ||
|
|
f6fa3f1a0b | ||
|
|
60ae096737 | ||
|
|
fc0ad5ba69 | ||
|
|
8ae1aa6d8c | ||
|
|
0e774b253c | ||
|
|
a853005c4d | ||
|
|
19b0491590 | ||
|
|
dd153fb261 | ||
|
|
87ef9d3f67 | ||
|
|
fb24ea7fef | ||
|
|
fd5b6a249b | ||
|
|
287db84d6d | ||
|
|
6c59af0c91 | ||
|
|
8072d96785 | ||
|
|
7a552e7faf | ||
|
|
21bef13eff | ||
|
|
379d09248d | ||
|
|
31e356de22 | ||
|
|
58afb75fd5 | ||
|
|
f6cf333457 | ||
|
|
5e71c0b886 | ||
|
|
7fb146dea4 | ||
|
|
669c87149f | ||
|
|
9c2a82ea90 | ||
|
|
1e74f24e1c | ||
|
|
e82b011f20 | ||
|
|
09211031ac | ||
|
|
7a877b0c45 | ||
|
|
814e17842f | ||
|
|
5340619a96 | ||
|
|
9e65220253 | ||
|
|
3cd58f18cc | ||
|
|
36a51d0a77 | ||
|
|
52ae39fa32 | ||
|
|
139c5a7d6e | ||
|
|
28fa1ed6f9 | ||
|
|
116b9c4e70 | ||
|
|
e728729917 | ||
|
|
ed1c6c4cbb | ||
|
|
84f10fa947 | ||
|
|
6c2439841d | ||
|
|
428071241f | ||
|
|
8c651abc6d | ||
|
|
5a1a0af706 | ||
|
|
a79b121895 | ||
|
|
f859973f32 | ||
|
|
a9706e0d73 | ||
|
|
9953e9ee9b | ||
|
|
0b680a8f67 | ||
|
|
ef3e1681f9 | ||
|
|
e28995fa4e | ||
|
|
aee1acab41 | ||
|
|
0c7aa209b5 | ||
|
|
827d2768d6 | ||
|
|
60e4467f88 | ||
|
|
81950e5334 | ||
|
|
d8c7ebb2d6 | ||
|
|
5de90c7a9c | ||
|
|
5d7e5772a8 | ||
|
|
0f886bbdf1 | ||
|
|
2275c00b9f | ||
|
|
00c6f60f2e | ||
|
|
6fd65dddc8 | ||
|
|
4c7577bf1c | ||
|
|
d162e82d20 | ||
|
|
49f95c3d05 | ||
|
|
f361dbd5e7 | ||
|
|
bce4779702 | ||
|
|
a715e0a659 | ||
|
|
f288578904 | ||
|
|
1231fc226c | ||
|
|
1d189552b2 | ||
|
|
ce4d398492 | ||
|
|
b553bc34bf | ||
|
|
ddb3e69af8 | ||
|
|
fc6a687322 | ||
|
|
d7c553457c | ||
|
|
2a82271322 | ||
|
|
a2b454ccb6 | ||
|
|
cb17e5b375 | ||
|
|
c54cb80862 | ||
|
|
bf1d366ce7 | ||
|
|
346319892c | ||
|
|
060a1ccfbb | ||
|
|
74a8169050 | ||
|
|
15bb04abd1 | ||
|
|
51b2ffd607 | ||
|
|
091c4b81f9 | ||
|
|
c68554a42c | ||
|
|
10de78cd1a | ||
|
|
6bd995e445 | ||
|
|
087e0e3750 | ||
|
|
c3f5c269aa | ||
|
|
4ef1ac4703 | ||
|
|
b9c58a99a5 | ||
|
|
4bec432070 | ||
|
|
e2556a0f3d | ||
|
|
f265b9fe7b | ||
|
|
c2bf977fb6 | ||
|
|
44030e710a | ||
|
|
e0028e8079 | ||
|
|
9c14d21609 | ||
|
|
d690e1a7a5 | ||
|
|
bfacccba18 | ||
|
|
8b93d6ce3a | ||
|
|
69d12b567d | ||
|
|
4fbede4cb2 | ||
|
|
e758208a17 | ||
|
|
a5f04ddb5f | ||
|
|
48913ed4bf | ||
|
|
a8e8d4b109 | ||
|
|
3a968d1914 | ||
|
|
58f4ad8e5a | ||
|
|
549d681fab | ||
|
|
5313770972 | ||
|
|
9046c71d00 | ||
|
|
87a71c7389 | ||
|
|
834bab34ab | ||
|
|
a04593f02d | ||
|
|
f7456c22f9 | ||
|
|
34e5487f75 | ||
|
|
a49e91f18e | ||
|
|
ff55ae40f9 | ||
|
|
3bdc11c5c4 | ||
|
|
2cd976f5b9 | ||
|
|
cc306932e8 | ||
|
|
d3927168b2 | ||
|
|
96ede99d63 | ||
|
|
86e90969e3 | ||
|
|
99024c3111 | ||
|
|
93777c899c | ||
|
|
d4bf893482 | ||
|
|
9da34a4fff | ||
|
|
f7e6238928 | ||
|
|
9192b863ea | ||
|
|
0ef4d4e6b1 | ||
|
|
af22e1abc3 | ||
|
|
b9e6f56110 | ||
|
|
d8454fab29 | ||
|
|
8abeee9d23 | ||
|
|
1164e33371 | ||
|
|
15a65a071e | ||
|
|
ecddbb5992 | ||
|
|
4dbf7ac1da | ||
|
|
f071d28911 | ||
|
|
16e834d0f6 | ||
|
|
881711bb11 | ||
|
|
6961bbb4a7 | ||
|
|
591f9d9dde | ||
|
|
d942f2c606 | ||
|
|
01819a7f72 | ||
|
|
c8969996c7 | ||
|
|
0bb0ade1ec | ||
|
|
52c338366b | ||
|
|
0dae8c3786 | ||
|
|
cbbe02096f | ||
|
|
fae6a213ac | ||
|
|
5e57b31c45 | ||
|
|
eb5437892d | ||
|
|
12e2a84ad1 | ||
|
|
0b11d79816 | ||
|
|
56fffd6b9c | ||
|
|
0c28e45434 | ||
|
|
72f48f9230 | ||
|
|
787810e8ab | ||
|
|
15f2cd62e6 | ||
|
|
6153f47f95 | ||
|
|
1ec4f0f0da | ||
|
|
c0e5dfae7f | ||
|
|
d3766ede6c | ||
|
|
f03743634f | ||
|
|
5419eb07d2 | ||
|
|
34c0b3bb9e | ||
|
|
d664b70bf6 | ||
|
|
dd674c2d93 | ||
|
|
19ff43afe2 | ||
|
|
2f80620644 | ||
|
|
67555eed9f | ||
|
|
8e7738a153 | ||
|
|
5ca4dabf49 | ||
|
|
e6042743cb | ||
|
|
7353a6bfe7 | ||
|
|
deef704d42 | ||
|
|
a1e93540c5 | ||
|
|
d37e6944f5 | ||
|
|
794c6f09b4 | ||
|
|
39f2dab3f2 | ||
|
|
a53706b95b | ||
|
|
53e13bc58c | ||
|
|
9ed7feed87 | ||
|
|
4b05713ae7 | ||
|
|
08a31cccad | ||
|
|
5ed51849bb | ||
|
|
677c712117 | ||
|
|
04fb03e1f4 | ||
|
|
d6cddef202 | ||
|
|
c4a417a4b0 | ||
|
|
8e6d97453d | ||
|
|
60d606e0fb | ||
|
|
5c1afe5b78 | ||
|
|
aefcd070d6 | ||
|
|
2a8316d7a1 | ||
|
|
cf16fa7a6f | ||
|
|
ee58c5e429 | ||
|
|
a17b91452c | ||
|
|
185fd76b46 | ||
|
|
07eb27b1dd | ||
|
|
548ae9605b | ||
|
|
a4f4add21b | ||
|
|
fe8f39cd5a | ||
|
|
77626b51b0 | ||
|
|
d10ca5330e | ||
|
|
c2e77a5fbe | ||
|
|
93b9aa8312 | ||
|
|
937ad7c0fc | ||
|
|
cb6d5bdc36 | ||
|
|
df3d450671 | ||
|
|
16951b9c31 | ||
|
|
cd9149efad | ||
|
|
c4965c9c05 | ||
|
|
d439066686 | ||
|
|
826aeb477e | ||
|
|
63b776f97d | ||
|
|
a7383806cd | ||
|
|
81d15db29c | ||
|
|
07bf2de658 | ||
|
|
5c94394a6b | ||
|
|
224a40f7b4 | ||
|
|
f7bc58530b | ||
|
|
c11bf82271 | ||
|
|
4bf446929a | ||
|
|
85c916aa6d | ||
|
|
a142950c90 | ||
|
|
0f28109363 | ||
|
|
e2c593662d | ||
|
|
749713615c | ||
|
|
e6ff986010 | ||
|
|
7f8869cdae | ||
|
|
9a5658fa23 | ||
|
|
9874a26de2 | ||
|
|
ee54c28426 | ||
|
|
71d8a2ac30 | ||
|
|
b35cc044b4 | ||
|
|
8d80e4d38f | ||
|
|
55afb62ba0 | ||
|
|
07a8753149 | ||
|
|
5d3027c777 | ||
|
|
8c2421018a | ||
|
|
a4f7d4650b | ||
|
|
ab92e503bc | ||
|
|
f0f3560789 | ||
|
|
a7577d8975 | ||
|
|
243e034156 | ||
|
|
ea242d4e4d | ||
|
|
2c154d09e6 | ||
|
|
62166c5465 | ||
|
|
89264fa175 | ||
|
|
6091b22937 | ||
|
|
e0f2f11174 | ||
|
|
1df0c1472f | ||
|
|
cc5348a282 | ||
|
|
d18a1b6788 | ||
|
|
8553a5c00f | ||
|
|
67d2e0fe01 | ||
|
|
423c7e7f7a | ||
|
|
ff6a0e67da | ||
|
|
65f8a28962 | ||
|
|
ccd154cfa5 | ||
|
|
7b987fa396 | ||
|
|
3f4a439de4 | ||
|
|
a1cc37d3a6 | ||
|
|
8af85b8883 | ||
|
|
55b69db576 | ||
|
|
07f2cc555e | ||
|
|
6b6383c237 | ||
|
|
03344e0df5 | ||
|
|
75ed0c7a18 | ||
|
|
0d076595f8 | ||
|
|
1ba2d5ab89 | ||
|
|
ec6533707f | ||
|
|
f868713ed9 | ||
|
|
1ef8245cf9 | ||
|
|
0385a0b715 | ||
|
|
5dd35e99e2 | ||
|
|
43dd5bf8c7 | ||
|
|
98ea973e61 | ||
|
|
f7d0cc8dbd | ||
|
|
0afb94dc77 | ||
|
|
3835cc0bc9 | ||
|
|
7b766ea7f1 | ||
|
|
4efacdaee5 | ||
|
|
fb91a7f70f | ||
|
|
47f47ac097 | ||
|
|
b4cb466f4e | ||
|
|
9a1cd147d0 | ||
|
|
c67e429387 | ||
|
|
a5e6d08394 | ||
|
|
a37729d885 | ||
|
|
2efa706f67 | ||
|
|
1911881b94 | ||
|
|
8c9f390b89 | ||
|
|
9dacae709b | ||
|
|
363fb57b3e | ||
|
|
99ed84be4d | ||
|
|
930611301b | ||
|
|
e06e0a6599 | ||
|
|
9de5fe3362 | ||
|
|
c9fded45b7 | ||
|
|
545a54eb9f | ||
|
|
b979bf4891 | ||
|
|
d2111b2bad | ||
|
|
ffb839b1d0 | ||
|
|
360e48a3cf | ||
|
|
71198a83de | ||
|
|
87eb713593 | ||
|
|
5fbc3e9efb | ||
|
|
6140efcb5a | ||
|
|
108c98c8bb | ||
|
|
887fb46dbd | ||
|
|
1b65330af4 | ||
|
|
cf709c995f | ||
|
|
6a1b7d91a1 | ||
|
|
a1bbf877a1 | ||
|
|
ac24516ec0 | ||
|
|
aab79b15f1 | ||
|
|
39fd5323b0 | ||
|
|
ba6f732628 | ||
|
|
ada4e7cfd5 | ||
|
|
c9d73a6bcb | ||
|
|
e91fc5169c | ||
|
|
452b1e548a | ||
|
|
630c3ec7ba | ||
|
|
c808bb188d | ||
|
|
dce4728377 | ||
|
|
38d77bcf5c | ||
|
|
e99cdc434f | ||
|
|
225bf15ae7 | ||
|
|
dd69c0b4b1 | ||
|
|
cc7d076dc8 | ||
|
|
1d1c621821 | ||
|
|
d70db5ef94 | ||
|
|
656ead95cb | ||
|
|
d13ee35789 | ||
|
|
0534b9c616 | ||
|
|
db3147076e | ||
|
|
3c67fbf70b | ||
|
|
49d6c61a8a | ||
|
|
549746bffd | ||
|
|
bc73d859a2 | ||
|
|
998ea1fa85 | ||
|
|
020606132e | ||
|
|
d693cb2fbb | ||
|
|
9cf572e22e | ||
|
|
1759f36740 | ||
|
|
c3666a7b40 | ||
|
|
c691dd210a | ||
|
|
d3c5f0d78a | ||
|
|
62dc66831a | ||
|
|
1ba9025809 | ||
|
|
da2a5a6a9d | ||
|
|
da9bd48dd5 | ||
|
|
56a49d4628 | ||
|
|
152a15d147 | ||
|
|
47f938f0fd | ||
|
|
56f653c84b | ||
|
|
5527f66c11 | ||
|
|
aadc11e7f4 | ||
|
|
15e7f35459 | ||
|
|
8569ef77fc | ||
|
|
e3c1e47040 | ||
|
|
c722f70f10 | ||
|
|
e6a6703b73 | ||
|
|
dddd927d30 | ||
|
|
f9a31cd9dc | ||
|
|
abeedffa94 | ||
|
|
bda286a27d | ||
|
|
3039f3725e | ||
|
|
21d63db2f8 | ||
|
|
6ec7d8c06b | ||
|
|
09949f6823 | ||
|
|
e870ac2161 | ||
|
|
2415a92f08 | ||
|
|
f3be07599e | ||
|
|
2593f9d472 | ||
|
|
7d8396f21c | ||
|
|
84c8f673c5 | ||
|
|
e3ed5f9581 | ||
|
|
e904e57bc8 | ||
|
|
3fcb150330 | ||
|
|
928cde7e3c | ||
|
|
f2aa11ba83 | ||
|
|
dd18b4ff9a | ||
|
|
875ed0fc12 | ||
|
|
affdd43f7a | ||
|
|
9de9248d5a | ||
|
|
31a89052f8 | ||
|
|
0248cd1e38 | ||
|
|
6f21f9bb4b | ||
|
|
0f87f89b71 | ||
|
|
ab65dba802 | ||
|
|
6c40e135e9 | ||
|
|
893deb57d0 | ||
|
|
c3b450a679 | ||
|
|
62573f47dc | ||
|
|
71bf9943b7 | ||
|
|
d0fe5d68e3 | ||
|
|
612ea61b0e | ||
|
|
53b6001a51 | ||
|
|
ad8cee56df | ||
|
|
ae8c079e8c | ||
|
|
68d1b91701 | ||
|
|
3389378868 | ||
|
|
6a6c123a63 | ||
|
|
64c0fa39a0 | ||
|
|
c19fd6cd11 | ||
|
|
6dd17390d7 | ||
|
|
59e724dcf2 | ||
|
|
cc71eb3ef5 | ||
|
|
d4ac43a3bf | ||
|
|
56fa7db0a7 | ||
|
|
1b58259562 | ||
|
|
23d564116c | ||
|
|
a5aeba560e | ||
|
|
58688bd436 | ||
|
|
3682edfe7b | ||
|
|
feb1932e25 | ||
|
|
696dc1f798 | ||
|
|
4ad3a464fe | ||
|
|
b75f473a5a | ||
|
|
26023599c1 | ||
|
|
5f276201b3 | ||
|
|
f9072e9a21 | ||
|
|
3638e0efa2 | ||
|
|
fa613814d5 | ||
|
|
9b673e44dc | ||
|
|
44f0bc818e | ||
|
|
5d64b987aa | ||
|
|
da4f911bd9 | ||
|
|
8c0ae77797 | ||
|
|
613656d485 | ||
|
|
570f421c3d | ||
|
|
1c538249ea | ||
|
|
2b94cae86b | ||
|
|
c2d92def50 | ||
|
|
32628e4165 | ||
|
|
2501484ac2 | ||
|
|
87b565d552 | ||
|
|
56af686410 | ||
|
|
90fd7508b6 | ||
|
|
5f8cbe5393 | ||
|
|
94433b4502 | ||
|
|
e311e64900 | ||
|
|
973b11e33b | ||
|
|
fd3f544210 | ||
|
|
078bcd16c1 | ||
|
|
4c5073ad03 | ||
|
|
2660d8ad2e | ||
|
|
588478e981 | ||
|
|
0f9326cff6 | ||
|
|
e01fc47ab6 | ||
|
|
a35893a722 | ||
|
|
f372cd51b6 | ||
|
|
4c227280fb | ||
|
|
13d8a7a607 | ||
|
|
8f9afae970 | ||
|
|
079abea853 | ||
|
|
83fb67c9a2 | ||
|
|
2391836769 | ||
|
|
d275e37d3b | ||
|
|
773dc75531 | ||
|
|
a9dbead1b3 | ||
|
|
dd4d6e3d94 | ||
|
|
105fbe6b1f | ||
|
|
242a030470 | ||
|
|
7babfc6995 | ||
|
|
b29e32fcb7 | ||
|
|
dcd2fb51c7 | ||
|
|
69d07fe12b | ||
|
|
e4acdd529b | ||
|
|
5c375c19fc | ||
|
|
d00a3d313e | ||
|
|
d8e1e75dd1 | ||
|
|
c1dae8f69f | ||
|
|
64f08670b5 | ||
|
|
4890420a25 | ||
|
|
5c94741584 | ||
|
|
9934ee03c6 | ||
|
|
63a2edb417 | ||
|
|
9a9bef4935 | ||
|
|
0078265697 | ||
|
|
3a7d8b1c51 | ||
|
|
30bfe70fb3 | ||
|
|
243642c35e | ||
|
|
63201030d2 | ||
|
|
ff96e85487 | ||
|
|
da24d924a3 | ||
|
|
7fce1eda88 | ||
|
|
c79ff0f80f | ||
|
|
3aa34e53bc | ||
|
|
fd632de0d9 | ||
|
|
2df2eb0b9e | ||
|
|
2cc92999a6 | ||
|
|
f0bf41c302 | ||
|
|
6972d6d283 | ||
|
|
88a2fa13f2 | ||
|
|
1756adc4b8 | ||
|
|
4187ed6f9d | ||
|
|
ed3c62e3c9 | ||
|
|
4bf4158244 | ||
|
|
4c95640376 | ||
|
|
7142dd0632 | ||
|
|
68f6cbc200 | ||
|
|
68d3ed8556 | ||
|
|
e901bc12ba | ||
|
|
dfc004dc6e | ||
|
|
c6d3812b92 | ||
|
|
574c79ae92 | ||
|
|
8b4f3f97f2 | ||
|
|
69ae0f7bf0 | ||
|
|
28c321f158 | ||
|
|
02d7c0f529 | ||
|
|
88c28dc57f | ||
|
|
b2e2441e7b | ||
|
|
d8f85e7acb | ||
|
|
c8cb95b3ed | ||
|
|
1b44b25ebd | ||
|
|
3f23c85333 | ||
|
|
6bfe20624c | ||
|
|
a03eb1aa6a | ||
|
|
d7e50ff2ab | ||
|
|
9d46a90f65 | ||
|
|
ea6d08a7e5 | ||
|
|
b8ddd40178 | ||
|
|
de59b0b4f2 | ||
|
|
fd8e528bf2 | ||
|
|
f564df8ccc | ||
|
|
c746d2570d | ||
|
|
6f1e638de8 | ||
|
|
f5087667f1 | ||
|
|
2b35f223c1 | ||
|
|
f3e9a95442 | ||
|
|
a7f395b78a | ||
|
|
7f23d16dbe | ||
|
|
4bad4e85c4 | ||
|
|
7db0583db1 | ||
|
|
1a6bdab29e | ||
|
|
991984e134 | ||
|
|
4099551ad2 | ||
|
|
5c654616cf | ||
|
|
1b864150db | ||
|
|
6cd2562140 | ||
|
|
083e36f321 | ||
|
|
d4f8c95dea | ||
|
|
35f978ed06 | ||
|
|
6595f891c1 | ||
|
|
bdd7b77952 | ||
|
|
29f63a5b48 | ||
|
|
c904d6097c | ||
|
|
1826aeed60 | ||
|
|
e120749b02 | ||
|
|
3c46f47c36 | ||
|
|
2fa416f872 | ||
|
|
df014b142a | ||
|
|
073e41c9e3 | ||
|
|
02d5148c4d | ||
|
|
ed96a273a0 | ||
|
|
a6d4d56922 | ||
|
|
c3645ffd3e | ||
|
|
f3379af93a | ||
|
|
b86771d08f | ||
|
|
d96d43b1a4 | ||
|
|
5e69f3d66d | ||
|
|
193e74d69b | ||
|
|
cc4cb1f904 | ||
|
|
d59a76796f | ||
|
|
dff67bb214 | ||
|
|
086c29f1c8 | ||
|
|
07e7f218d2 | ||
|
|
da3facef06 | ||
|
|
c6a16aa2a6 | ||
|
|
913ea35d98 | ||
|
|
2405cdd43b | ||
|
|
8ada6569f2 | ||
|
|
0edd8400e7 | ||
|
|
e654ea7788 | ||
|
|
6735d199a0 | ||
|
|
2f06fbd258 | ||
|
|
25220fb547 | ||
|
|
30bb56e9bf | ||
|
|
e62792d397 | ||
|
|
7f81a5167b | ||
|
|
1c3cb6b72a | ||
|
|
2b0aec400a | ||
|
|
4e8f85ffc6 | ||
|
|
dd1fc7ff7d | ||
|
|
97ef5bcc7b | ||
|
|
976244d57f | ||
|
|
a019ac2c4a | ||
|
|
5fff839b53 | ||
|
|
bc21aa4590 | ||
|
|
b4a23934ef | ||
|
|
aa1e866263 | ||
|
|
677007f613 | ||
|
|
a25b0672e0 | ||
|
|
d7403f5711 | ||
|
|
e6427ae2f8 | ||
|
|
245dbaacda | ||
|
|
0c313fef05 | ||
|
|
92032fd1ac | ||
|
|
b40c4279fa | ||
|
|
874151f4d3 | ||
|
|
97f2517211 | ||
|
|
81c30ab502 | ||
|
|
9c9f230054 | ||
|
|
f5f791b0b7 | ||
|
|
6563c53a63 | ||
|
|
473ea18680 | ||
|
|
0fcabc3ab5 | ||
|
|
183a363c00 | ||
|
|
a5d9464b7e | ||
|
|
f81a48aeaa | ||
|
|
15a68f1807 | ||
|
|
a59e08e629 | ||
|
|
45129bb230 | ||
|
|
89123cee31 | ||
|
|
04676cf26b | ||
|
|
76f525ed98 | ||
|
|
9a02ad5175 | ||
|
|
fec2851814 | ||
|
|
aac0616aac | ||
|
|
adfc80948c | ||
|
|
7107087ba2 | ||
|
|
cfc2d5bb57 | ||
|
|
79f65638b1 | ||
|
|
18a28dbec3 | ||
|
|
12254b050b | ||
|
|
5db896e32a | ||
|
|
6e23e2cde5 | ||
|
|
11d02e4dc6 | ||
|
|
3a8e56603c | ||
|
|
558f56017e | ||
|
|
17e325ff16 | ||
|
|
abf7e7a8e1 | ||
|
|
e2377d482c | ||
|
|
cd9891b0ba | ||
|
|
05938b6ddd | ||
|
|
fbeaed38a1 | ||
|
|
f470be09ff | ||
|
|
e306650990 | ||
|
|
ffca576b3a | ||
|
|
de19106bb7 | ||
|
|
fd9193056a | ||
|
|
ec884b9adf | ||
|
|
9aed3b5e63 | ||
|
|
a231c9f993 | ||
|
|
bee450ea77 | ||
|
|
977d6f51f1 | ||
|
|
73c40d2b96 | ||
|
|
77d75b2256 | ||
|
|
5ef3575e54 | ||
|
|
1c873d34ea | ||
|
|
ba961a1407 | ||
|
|
d36930c8ce | ||
|
|
6d6f61ee80 | ||
|
|
9a84f43534 | ||
|
|
76070242ff | ||
|
|
8c876537e3 | ||
|
|
34edbde3e1 | ||
|
|
f24366bdf3 | ||
|
|
6840ad8afb | ||
|
|
d923e8bd28 | ||
|
|
3728f3a143 | ||
|
|
c00c03f28f | ||
|
|
3c3469efbe | ||
|
|
88f1ec5788 | ||
|
|
7a1ff2b8d1 | ||
|
|
4b0b880102 | ||
|
|
8654d2ad4b | ||
|
|
050a5d4853 | ||
|
|
07693e7c1b | ||
|
|
60c29e3107 | ||
|
|
615a104b7b | ||
|
|
ab75188733 | ||
|
|
c76daa8c81 | ||
|
|
796e985d05 | ||
|
|
9bc985e87f | ||
|
|
e85e676c65 | ||
|
|
55aa77e670 | ||
|
|
d81b7bd07b | ||
|
|
6add41b654 | ||
|
|
e5933d2938 | ||
|
|
8b4e7586ad | ||
|
|
d70c637aa4 | ||
|
|
c296cc2963 | ||
|
|
721fcb8b38 | ||
|
|
e26a9affbd | ||
|
|
f009a030a8 | ||
|
|
17ba40e8f6 | ||
|
|
495df7354d | ||
|
|
f012724dc5 | ||
|
|
ee77040781 | ||
|
|
e04a463e62 | ||
|
|
180d8d1168 | ||
|
|
2af7a8d044 | ||
|
|
5a6126270e | ||
|
|
488c89a6d1 | ||
|
|
ca5d16257a | ||
|
|
07b1902fe2 | ||
|
|
bcfe608301 | ||
|
|
63f448f4a8 | ||
|
|
5438c3c5da | ||
|
|
111ff9835a | ||
|
|
7cc4c33911 | ||
|
|
c61723b711 | ||
|
|
c065b8e819 | ||
|
|
885b7ff1eb | ||
|
|
ffd9ad17e2 | ||
|
|
051da80708 | ||
|
|
56aff208ba | ||
|
|
1c65f4f321 | ||
|
|
b2755d8586 | ||
|
|
9618a41d25 | ||
|
|
61eaa026a2 | ||
|
|
9ec67031b3 | ||
|
|
acc9158c33 | ||
|
|
827f47e4db | ||
|
|
e3eacc0ba8 | ||
|
|
ed9437058e | ||
|
|
191c284d97 | ||
|
|
dba98d50f7 | ||
|
|
7cf6c6f068 | ||
|
|
f6f20450a6 | ||
|
|
a003467b00 | ||
|
|
26b3432f9a | ||
|
|
f20c7ffb24 | ||
|
|
9a16c6d418 | ||
|
|
3033462d89 | ||
|
|
fe126b0de0 | ||
|
|
c64586ead5 | ||
|
|
63f1addeea | ||
|
|
1bbd034a73 | ||
|
|
8dd1190033 | ||
|
|
f3443ca88a | ||
|
|
ff0a886664 | ||
|
|
8ab7956b95 | ||
|
|
e261a216b3 | ||
|
|
8b6fb31b63 | ||
|
|
465b8e36fc | ||
|
|
af9f09493d | ||
|
|
127f9e867d | ||
|
|
8b493581e1 | ||
|
|
65edb4ab06 | ||
|
|
6ce65b0160 | ||
|
|
4e5eaad00d | ||
|
|
a11151fdd9 | ||
|
|
bd4bfd211b | ||
|
|
8d624c4951 | ||
|
|
f5dd4c185f | ||
|
|
8e1fc7dcb0 | ||
|
|
f8a0d6e54b | ||
|
|
2fd02bac1d | ||
|
|
8ccf13aca4 | ||
|
|
b21bc6c919 | ||
|
|
ba537e82cc | ||
|
|
0c8654a3b9 | ||
|
|
ac019660bd | ||
|
|
a3ccf301ca | ||
|
|
a4f8dfe53e | ||
|
|
853ba5bb3e | ||
|
|
a06fe38ed8 | ||
|
|
223461213e | ||
|
|
f5526d0a25 | ||
|
|
d551173c68 | ||
|
|
26a3790bbd | ||
|
|
755442556d | ||
|
|
164e9f21c9 | ||
|
|
9a5643cf43 | ||
|
|
671e8189c0 | ||
|
|
c31158a7ad | ||
|
|
9e46a57443 | ||
|
|
161cd71da8 | ||
|
|
1b6126456b | ||
|
|
f69864554a | ||
|
|
61a5751e0b | ||
|
|
78d3dfec15 | ||
|
|
f5ed3a7ff1 | ||
|
|
681041b7c3 | ||
|
|
264e1daf5c | ||
|
|
c19ee4f050 | ||
|
|
d225c215ee | ||
|
|
adcba33657 | ||
|
|
29ec062b90 | ||
|
|
4feecbd438 | ||
|
|
525f5c11b0 | ||
|
|
d9800428c0 | ||
|
|
339ff22025 | ||
|
|
4d94374162 | ||
|
|
4b1cc22250 | ||
|
|
fcdd71177b | ||
|
|
d100832548 | ||
|
|
3eb4b07880 | ||
|
|
6214cbb4e7 | ||
|
|
e183005a9f | ||
|
|
960d44942c | ||
|
|
d2aca948fb | ||
|
|
bf9b057ef3 | ||
|
|
703105b4cf | ||
|
|
99dd785dfd | ||
|
|
9f02022353 | ||
|
|
6bcd934ab3 | ||
|
|
1888c1ead8 | ||
|
|
6557ba4cd6 | ||
|
|
db998e69e3 | ||
|
|
e9d563ce03 | ||
|
|
b33a390839 | ||
|
|
53f80fbf10 | ||
|
|
96fc14c22f | ||
|
|
476a593656 | ||
|
|
dd9b7a8774 | ||
|
|
3f214bb959 | ||
|
|
f02b097ba3 | ||
|
|
431d29733d | ||
|
|
352f1d0cbc | ||
|
|
4fde49b43a | ||
|
|
a4576e43e9 | ||
|
|
6d7a8e5417 | ||
|
|
d05c0fa6e3 | ||
|
|
02b3f1d091 | ||
|
|
759a12b759 | ||
|
|
4f7c30f13a | ||
|
|
902b3bb8bc | ||
|
|
ece17326c8 | ||
|
|
497d17dafc | ||
|
|
36ef73caaa | ||
|
|
6142d82806 | ||
|
|
adf314079b | ||
|
|
036e57ac4e | ||
|
|
f2393cd8f1 | ||
|
|
ae91e016f5 | ||
|
|
1adfc0815f | ||
|
|
acdf50d88d | ||
|
|
30804d3556 | ||
|
|
5307d393f6 | ||
|
|
75a6c7479c | ||
|
|
8c20ef4ec7 | ||
|
|
98bebf3da1 | ||
|
|
4d8d09523e | ||
|
|
0b5a69bc31 | ||
|
|
641f9eaad2 | ||
|
|
269b13e868 | ||
|
|
b96a5d307f | ||
|
|
cb25e6708d | ||
|
|
60e3c70e57 | ||
|
|
e0ba2b94dd | ||
|
|
559c1996b9 | ||
|
|
33d951b0ec | ||
|
|
c270d3cf09 | ||
|
|
00a687cd4a | ||
|
|
24ecfe7f34 | ||
|
|
b5ff544f79 | ||
|
|
d3153244e4 | ||
|
|
2227c01289 | ||
|
|
f0407b8a37 | ||
|
|
62935f5016 | ||
|
|
3b7b6fd627 | ||
|
|
d68a6add62 | ||
|
|
12b6a72a48 | ||
|
|
812fad8c5b | ||
|
|
0a4f296858 | ||
|
|
62d3efd67e | ||
|
|
e6780b20fb | ||
|
|
84af7641ec | ||
|
|
a0195bf457 | ||
|
|
17ba9d0d6f | ||
|
|
71963c914f | ||
|
|
374892c869 | ||
|
|
af5a788d3e | ||
|
|
36f4a69b2e | ||
|
|
214bb6939f | ||
|
|
abd741b9e6 | ||
|
|
c33fd589fb | ||
|
|
b1750ac6ba | ||
|
|
de51136608 | ||
|
|
3da3e6b86d | ||
|
|
fdba0d497a | ||
|
|
4092c0e43f | ||
|
|
4b06b07acf | ||
|
|
6636e7ff47 | ||
|
|
ec8a7cffa2 | ||
|
|
41cdc9672c | ||
|
|
6fdf37e179 | ||
|
|
60c198e2e2 | ||
|
|
154b8465a6 | ||
|
|
d352796d46 | ||
|
|
562aefcab2 | ||
|
|
a4c6aec761 | ||
|
|
0e1894e5ff | ||
|
|
ca89315960 | ||
|
|
5764f7dd1d | ||
|
|
3d2b69bd33 | ||
|
|
56bfdfaf57 | ||
|
|
28835fc0ea | ||
|
|
0f7d057261 | ||
|
|
9aaef85895 | ||
|
|
50e1be5214 | ||
|
|
13f1dcfdc3 | ||
|
|
545f41ab6a | ||
|
|
a5306cb837 | ||
|
|
415768dd71 | ||
|
|
744bd43658 | ||
|
|
f6cdb4c55d | ||
|
|
01d009734c | ||
|
|
120e333a67 | ||
|
|
caf1367dd2 | ||
|
|
82d3171604 | ||
|
|
68b8051fb2 | ||
|
|
9fc87d618b | ||
|
|
013a2f2b19 | ||
|
|
b4d831147e | ||
|
|
2816342a69 | ||
|
|
68bb2d48d5 | ||
|
|
4333127c74 | ||
|
|
d03fa0c5e3 | ||
|
|
584e3db8f0 | ||
|
|
4e365be18e | ||
|
|
e722665f2f | ||
|
|
7566301349 | ||
|
|
213f840309 | ||
|
|
35c58d63d7 | ||
|
|
8382bcc0ac | ||
|
|
ac32ff013e | ||
|
|
3d077f2a18 | ||
|
|
1d6c3b5466 | ||
|
|
47130407a5 | ||
|
|
9f7db62c89 | ||
|
|
8d1d4b5590 | ||
|
|
889524d9a7 | ||
|
|
f293fa36a7 | ||
|
|
ab144f4af9 | ||
|
|
621010e16b | ||
|
|
3f2b130848 | ||
|
|
504c78965d | ||
|
|
c625d8dc29 | ||
|
|
9234254f76 | ||
|
|
436751ce8f | ||
|
|
30bf53c79c | ||
|
|
775b71b6f1 | ||
|
|
cf08d70000 | ||
|
|
48727867eb | ||
|
|
e82294aa2f | ||
|
|
768304c5a1 | ||
|
|
00c6557d0a | ||
|
|
1c22d7a19d | ||
|
|
1eb12b7923 | ||
|
|
1661322307 | ||
|
|
a408642afa | ||
|
|
62b1d840dc | ||
|
|
55afadf895 | ||
|
|
4c4e12a8ff | ||
|
|
73c5d2c481 | ||
|
|
7c041f933d | ||
|
|
fddb7e3ba7 | ||
|
|
bf82f6966d | ||
|
|
81a348efee | ||
|
|
f24602d8d4 | ||
|
|
0f5677e544 | ||
|
|
02d52bd9e1 | ||
|
|
acb2f35982 | ||
|
|
c1ef23456b | ||
|
|
00fd54ba1b | ||
|
|
3406185b1c | ||
|
|
6f233e19bf | ||
|
|
9227f52a16 | ||
|
|
70889fd1ae | ||
|
|
c09267da8f | ||
|
|
d4a9cde562 | ||
|
|
1824013aeb | ||
|
|
13c858421c | ||
|
|
a917d47854 | ||
|
|
4c11a12d11 | ||
|
|
73a7d9cc42 | ||
|
|
68a51047e9 | ||
|
|
42db3eaf5d | ||
|
|
8c867fc829 | ||
|
|
c9bc7a3dea | ||
|
|
7c05f41418 | ||
|
|
47fe3342d3 | ||
|
|
135b15c101 | ||
|
|
26a75d11f0 | ||
|
|
85a20c9485 | ||
|
|
e239e77fdd | ||
|
|
4824b441b6 | ||
|
|
3bb9298485 | ||
|
|
557ed06daa | ||
|
|
1f0e4a191c | ||
|
|
03e29020e2 | ||
|
|
f314c20b8a | ||
|
|
5f2e737e7c | ||
|
|
0e32d885b0 | ||
|
|
363ae3044e | ||
|
|
2f5d167976 | ||
|
|
558936d23d | ||
|
|
b946784deb | ||
|
|
7adf27bcaf | ||
|
|
85d804d575 | ||
|
|
4a756c84c7 |
@@ -1,78 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys Software Solutions AB. All rights reserved.
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# version 2 as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ated
|
||||
PKG_VERSION:=1.2.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=f614cba983d827d5185c60a6a5a35530621d44d2
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/mediatek/ated.git
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
# support parallel build
|
||||
#PKG_BUILD_PARALLEL:=1
|
||||
|
||||
#re create configure scripts if not present.
|
||||
#PKG_FIXUP:=autoreconf
|
||||
|
||||
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
|
||||
# this way we don't need to pick out the resulting files from the build dir.
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ated
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Daemon for handling wifi calibration
|
||||
URL:=
|
||||
DEPENDS:= libc
|
||||
endef
|
||||
|
||||
define Package/ated/description
|
||||
Daemon for handling wifi calibration
|
||||
endef
|
||||
|
||||
#TARGET_CFLAGS += -I$(LINUX_DIR)/include -I$(LINUX_DIR)/arch/mips/include
|
||||
|
||||
MAKE_FLAGS += \
|
||||
v=2 \
|
||||
m=3
|
||||
|
||||
|
||||
#TARGET_CPPFLAGS := \
|
||||
# -I$(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx \
|
||||
# -I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
|
||||
# $(TARGET_CPPFLAGS)
|
||||
|
||||
# we donot wwant to have any install.
|
||||
define Build/Install/Default
|
||||
endef
|
||||
|
||||
define Package/ated/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ated $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ated))
|
||||
@@ -1,5 +1,3 @@
|
||||
if PACKAGE_libbbfdm
|
||||
|
||||
config BBF_VENDOR_EXTENSION
|
||||
bool "Enable Vendor Extension"
|
||||
default y
|
||||
@@ -12,10 +10,6 @@ config BBF_VENDOR_PREFIX
|
||||
string "Vendor Prefix"
|
||||
default "X_IOPSYS_EU_"
|
||||
|
||||
config BBF_TR181
|
||||
bool "Enable TR-181 Data Model Support"
|
||||
default y
|
||||
|
||||
config BBF_TR104
|
||||
bool "Enable TR-104 Data Model Support"
|
||||
default y
|
||||
@@ -24,26 +18,18 @@ config BBF_TR143
|
||||
bool "Enable TR-143 Data Model Support"
|
||||
default y
|
||||
|
||||
config BBF_TR471
|
||||
bool "Enable TR-471 Data Model Support"
|
||||
default y
|
||||
|
||||
config BBFDM_ENABLE_JSON_PLUGIN
|
||||
bool "Enable json plugin to extend datamodel"
|
||||
default n
|
||||
default y
|
||||
|
||||
config BBFDM_ENABLE_DOTSO_PLUGIN
|
||||
bool "Enable shared library plugin to extend datamodel"
|
||||
default n
|
||||
default y
|
||||
|
||||
choice
|
||||
prompt "Select SSL utility"
|
||||
default BBF_USE_WOLFSSL
|
||||
|
||||
config BBF_USE_WOLFSSL
|
||||
bool "Use WolfSSL for ssl utilities"
|
||||
select CONFIG_PACKAGE_libwolfssl
|
||||
|
||||
config BBF_USE_OPENSSL
|
||||
bool "Use OpenSSL for ssl utilities"
|
||||
select CONFIG_PACKAGE_libopenssl
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
config BBF_MAX_OBJECT_INSTANCES
|
||||
int "Maximum number of instances per object"
|
||||
default 255
|
||||
|
||||
166
bbf/Makefile
166
bbf/Makefile
@@ -1,42 +1,82 @@
|
||||
#
|
||||
# Copyright (C) 2021 IOPSYS
|
||||
# Copyright (C) 2022 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=6.6.20
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_VERSION:=6.8.49
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=491a8b0c00680ba110fb42d17a51627365b1baed
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_SOURCE_VERSION:=87ae46df8b4e221b8894fd861d2eb785ae1f3bf3
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/libbbf_api
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Library for libbbfdm API
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libopenssl +libwolfssl
|
||||
TITLE:=BBF datamodel library, provides API to extend datamodel using DotSO plugins
|
||||
ABI_VERSION:=1.0
|
||||
endef
|
||||
|
||||
define Package/libbbfdm
|
||||
define Package/libbbfdm/default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Library for broadband-forum data model
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libbbf_api +libcurl +libopenssl +libwolfssl
|
||||
MENU:=1
|
||||
TITLE:=Library for broadband forum data model support
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl +libbbf_api \
|
||||
+BBF_TR471:obudpst
|
||||
endef
|
||||
|
||||
define Package/libbbfdm
|
||||
$(Package/libbbfdm/default)
|
||||
TITLE += (internal)
|
||||
VARIANT:=internal
|
||||
endef
|
||||
|
||||
define Package/libbbfdm-mbedtls
|
||||
$(Package/libbbfdm/default)
|
||||
TITLE += (mbedtls)
|
||||
DEPENDS += +PACKAGE_libbbfdm-mbedtls:libmbedtls
|
||||
VARIANT:=mbedtls
|
||||
DEFAULT_VARIANT:=1
|
||||
endef
|
||||
|
||||
define Package/libbbfdm-openssl
|
||||
$(Package/libbbfdm/default)
|
||||
TITLE += (openssl)
|
||||
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
|
||||
CONFLICTS := libbbfdm-mbedtls
|
||||
VARIANT:=openssl
|
||||
endef
|
||||
|
||||
define Package/libbbfdm-wolfssl
|
||||
$(Package/libbbfdm/default)
|
||||
TITLE += (wolfssl)
|
||||
DEPENDS += +PACKAGE_libbbfdm-wolfssl:libwolfssl
|
||||
CONFLICTS := libbbfdm-mbedtls libbbfdm-openssl
|
||||
VARIANT:=wolfssl
|
||||
endef
|
||||
|
||||
define Package/userinterface
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Package to add Device.UserInterface. datamodel support
|
||||
endef
|
||||
|
||||
define Package/userinterface/description
|
||||
Package to add Device.UserInterface. datamodel support using libbbf JSON Plugin
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/config
|
||||
@@ -58,79 +98,102 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE \
|
||||
-Wall -Werror \
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR181),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr181
|
||||
endif
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR181=ON
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR104),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr104
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR104=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR143),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr143
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR143=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR471),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR471=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-vendor-extension
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_VENDOR_EXTENSION=ON
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
BBF_VENDOR_LIST="$(CONFIG_BBF_VENDOR_LIST)" \
|
||||
BBF_VENDOR_PREFIX="$(CONFIG_BBF_VENDOR_PREFIX)"
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
|
||||
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
|
||||
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
|
||||
|
||||
endif ##CONFIG_BBF_VENDOR_EXTENSION
|
||||
|
||||
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-json-plugin
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_JSON_PLUGIN=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-shared-library
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_DOTSO_PLUGIN=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_USE_WOLFSSL), y)
|
||||
CONFIGURE_ARGS += --enable-libwolfssl
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
|
||||
TARGET_LDFLAGS += "-lwolfssl"
|
||||
ifeq ($(BUILD_VARIANT),openssl)
|
||||
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_USE_OPENSSL), y)
|
||||
CONFIGURE_ARGS += --enable-libopenssl
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
|
||||
TARGET_LDFLAGS += "-lssl"
|
||||
ifeq ($(BUILD_VARIANT),wolfssl)
|
||||
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
||||
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
|
||||
endif
|
||||
|
||||
define Package/libbbf_api/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/.libs/libbbf_api.so* $(1)/lib/
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/install
|
||||
define Package/libbbfdm/default/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
|
||||
$(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
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/prerm
|
||||
define Package/libbbfdm/default/prerm
|
||||
#!/bin/sh
|
||||
rm -rf /etc/bbfdm/dmmap/*
|
||||
exit 0
|
||||
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_DATA) ./files/etc/config/userinterface $(1)/etc/config/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/firewall.userinterface $(1)/etc/firewall.userinterface
|
||||
endef
|
||||
|
||||
Package/libbbfdm-openssl/prerm = $(Package/libbbfdm/default/prerm)
|
||||
Package/libbbfdm-wolfssl/prerm = $(Package/libbbfdm/default/prerm)
|
||||
Package/libbbfdm-mbedtls/prerm = $(Package/libbbfdm/default/prerm)
|
||||
|
||||
Package/libbbfdm-openssl/install = $(Package/libbbfdm/default/install)
|
||||
Package/libbbfdm-wolfssl/install = $(Package/libbbfdm/default/install)
|
||||
Package/libbbfdm-mbedtls/install = $(Package/libbbfdm/default/install)
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
@@ -139,9 +202,12 @@ define Build/InstallDev
|
||||
$(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/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/.libs/libbbf_api.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,userinterface))
|
||||
$(eval $(call BuildPackage,libbbf_api))
|
||||
$(eval $(call BuildPackage,libbbfdm))
|
||||
$(eval $(call BuildPackage,libbbfdm-openssl))
|
||||
$(eval $(call BuildPackage,libbbfdm-wolfssl))
|
||||
$(eval $(call BuildPackage,libbbfdm-mbedtls))
|
||||
|
||||
117
bbf/files/etc/bbfdm/json/UserInterface.json
Normal file
117
bbf/files/etc/bbfdm/json/UserInterface.json
Normal file
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
6
bbf/files/etc/config/userinterface
Normal file
6
bbf/files/etc/config/userinterface
Normal file
@@ -0,0 +1,6 @@
|
||||
config userinterface 'remote_access'
|
||||
option enable '0'
|
||||
option interface 'wan'
|
||||
option port '80'
|
||||
option protocol 'HTTP'
|
||||
|
||||
85
bbf/files/etc/firewall.userinterface
Executable file
85
bbf/files/etc/firewall.userinterface
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/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
|
||||
27
bbf/files/etc/init.d/userinterface
Normal file
27
bbf/files/etc/init.d/userinterface
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/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"
|
||||
}
|
||||
12
bbf/files/etc/uci-defaults/93-userinterface-firewall
Executable file
12
bbf/files/etc/uci-defaults/93-userinterface-firewall
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOT
|
||||
delete firewall.userinterface
|
||||
set firewall.userinterface=include
|
||||
set firewall.userinterface.path=/etc/firewall.userinterface
|
||||
set firewall.userinterface.reload=1
|
||||
commit firewall
|
||||
EOT
|
||||
|
||||
exit 0
|
||||
|
||||
1
bbf/files/lib/upgrade/keep.d/bbf
Normal file
1
bbf/files/lib/upgrade/keep.d/bbf
Normal file
@@ -0,0 +1 @@
|
||||
/etc/bbfdm/sysctl.conf
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2020 iopsys Software Solutions AB
|
||||
# Copyright (C) 2022 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@@ -8,19 +8,20 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bulkdata
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_VERSION:=2.0.10
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
|
||||
PKG_SOURCE_VERSION:=b35e7862bc17fc11dc1f757c7b93900995a28633
|
||||
PKG_SOURCE_VERSION:=6e85d2032e66df581fae7c72cd83cc89367b8fc8
|
||||
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_FILES:=LICENSE
|
||||
|
||||
@@ -31,11 +32,7 @@ define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=BBF BulkData Collection
|
||||
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +curl +libblobmsg-json +libbbfdm +libbbf_api
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
BBF BulkData Collection
|
||||
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json +zlib
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
@@ -51,8 +48,8 @@ endif
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.json $(1)/etc/bbfdm/json
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,43 +1,6 @@
|
||||
|
||||
config bulkdata 'bulkdata'
|
||||
option enable '0'
|
||||
#Log levels: Critical=0, Warning=1, Notice=2, Info=3, Debug=4
|
||||
#Log levels: Error=1, Warning=2, Info=3, Debug=4
|
||||
option log_level '3'
|
||||
|
||||
config profile
|
||||
option profile_id '1'
|
||||
option enable '0'
|
||||
option name ''
|
||||
option nbre_of_retained_failed_reports '0'
|
||||
option protocol 'http'
|
||||
option encoding_type ''
|
||||
option reporting_interval '86400'
|
||||
option time_reference '0'
|
||||
option csv_encoding_field_separator ','
|
||||
option csv_encoding_row_separator ' '
|
||||
option csv_encoding_escape_character '"'
|
||||
option csv_encoding_report_format 'column'
|
||||
option csv_encoding_row_time_stamp 'unix'
|
||||
option json_encoding_report_format 'objecthierarchy'
|
||||
option json_encoding_report_time_stamp 'unix'
|
||||
option http_url ''
|
||||
option http_username ''
|
||||
option http_password ''
|
||||
option http_compression 'none'
|
||||
option http_method 'post'
|
||||
option http_use_date_header '1'
|
||||
option http_retry_enable '0'
|
||||
option http_retry_minimum_wait_interval '5'
|
||||
option http_retry_interval_multiplier '2000'
|
||||
option http_persist_across_reboot '0'
|
||||
|
||||
config profile_parameter
|
||||
option profile_id '1'
|
||||
option name ''
|
||||
option reference ''
|
||||
|
||||
config profile_http_request_uri_parameter
|
||||
option profile_id '1'
|
||||
option name ''
|
||||
option reference ''
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Bulkdata Software
|
||||
# Copyright (C) 2020 iopsys Software Solutions AB
|
||||
# Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
|
||||
|
||||
START=99
|
||||
STOP=10
|
||||
@@ -10,17 +7,17 @@ USE_PROCD=1
|
||||
PROG="/usr/sbin/bulkdatad"
|
||||
|
||||
start_service() {
|
||||
local bulkdata_enable=`uci -q get bulkdata.bulkdata.enable`
|
||||
if [ "$bulkdata_enable" = "1" ]; then
|
||||
procd_open_instance
|
||||
local enable
|
||||
|
||||
config_load bulkdata
|
||||
config_get_bool enable bulkdata enable 1
|
||||
|
||||
procd_open_instance bulkdata
|
||||
[ "$enable" -eq "1" ] && {
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn "3" "7" "0"
|
||||
procd_close_instance
|
||||
fi
|
||||
}
|
||||
|
||||
boot() {
|
||||
start
|
||||
}
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
PROFILE_COUNT=1
|
||||
|
||||
get_next_count()
|
||||
{
|
||||
local config="$1"
|
||||
local default_name="${2}"
|
||||
local count=${3}
|
||||
local found=0
|
||||
|
||||
if [ -z "$count" ]; then
|
||||
count=1
|
||||
fi
|
||||
|
||||
while [ "${found}" -ne 1 ]; do
|
||||
uci -q get "${config}"."${default_name}"_${count} >/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
count=$((count + 1))
|
||||
else
|
||||
found=1;
|
||||
fi
|
||||
done
|
||||
|
||||
echo "${default_name}_${count}"
|
||||
}
|
||||
|
||||
translate_profile_id_to_profile_name() {
|
||||
local section="${1}"
|
||||
local profile_id="${2}"
|
||||
local profile_name="${3}"
|
||||
local curr_profile_id
|
||||
|
||||
config_get curr_profile_id "${section}" profile_id
|
||||
|
||||
[ -n "${curr_profile_id}" ] || return
|
||||
|
||||
[ "${curr_profile_id}" != "${profile_id}" ] && return
|
||||
|
||||
uci -q set bulkdata."${section}".profile_name="${profile_name}"
|
||||
uci -q set bulkdata."${section}".profile_id=""
|
||||
}
|
||||
|
||||
update_profile_sections() {
|
||||
local section="${1}"
|
||||
local default="${2}"
|
||||
local profile_name
|
||||
|
||||
config_get profile_id "${section}" profile_id
|
||||
|
||||
[ -n "${profile_id}" ] || return
|
||||
|
||||
case "${section}" in
|
||||
"cfg"*)
|
||||
profile_name="$(get_next_count bulkdata "${default}" ${PROFILE_COUNT})"
|
||||
uci_rename bulkdata "${section}" "${profile_name}"
|
||||
;;
|
||||
esac
|
||||
PROFILE_COUNT=$((PROFILE_COUNT + 1))
|
||||
|
||||
[ -n "$profile_name" ] && section="${profile_name}"
|
||||
|
||||
uci -q set bulkdata."${section}".profile_id=""
|
||||
|
||||
config_foreach translate_profile_id_to_profile_name profile_parameter "${profile_id}" "${profile_name}"
|
||||
config_foreach translate_profile_id_to_profile_name profile_http_request_uri_parameter "${profile_id}" "${profile_name}"
|
||||
}
|
||||
|
||||
config_load bulkdata
|
||||
config_foreach update_profile_sections profile profile
|
||||
uci commit bulkdata
|
||||
|
||||
exit 0
|
||||
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.5.1
|
||||
PKG_VERSION:=3.5.7
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=cc475d5bfe663b73f4ae28d74c9035e210a8ad24
|
||||
PKG_SOURCE_VERSION:=83f89a83cf860bbcf2b7f2e030215db315a5bbbf
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
|
||||
Binary file not shown.
BIN
dectmngr/files/etc/dspg/04130011.bin
Normal file
BIN
dectmngr/files/etc/dspg/04130011.bin
Normal file
Binary file not shown.
@@ -11,6 +11,8 @@ PROG=/usr/sbin/dectmngr
|
||||
LOG_PATH=/var/log/dectmngr
|
||||
DB_PATH=/etc/dect
|
||||
|
||||
DECT_GPIO=$(db -q get hw.board.dect_gpio)
|
||||
|
||||
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
|
||||
stop_and_wait_dectmngr() {
|
||||
pidof $NAME && killall -q $NAME
|
||||
@@ -30,7 +32,7 @@ start_service() {
|
||||
|
||||
test $(db get hw.board.hasDect) = "0" && return
|
||||
|
||||
echo 1 > /sys/class/gpio/gpio14/value
|
||||
[ -n "$DECT_GPIO" ] && echo 1 > /sys/class/gpio/gpio${DECT_GPIO}/value
|
||||
|
||||
rfpi=$(db -q get hw.board.dect_rfpi)
|
||||
[ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi"
|
||||
@@ -71,7 +73,7 @@ start_service() {
|
||||
stop_service() {
|
||||
test $(db get hw.board.hasDect) = "0" && return
|
||||
|
||||
echo 0 > /sys/class/gpio/gpio14/value
|
||||
[ -n "$DECT_GPIO" ] && echo 0 > /sys/class/gpio/gpio${DECT_GPIO}/value
|
||||
stop_and_wait_dectmngr
|
||||
}
|
||||
|
||||
@@ -86,8 +88,10 @@ service_triggers()
|
||||
}
|
||||
|
||||
boot() {
|
||||
echo 14 > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio14/direction
|
||||
[ -n "$DECT_GPIO" ] && {
|
||||
echo ${DECT_GPIO} > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio${DECT_GPIO}/direction
|
||||
}
|
||||
|
||||
[ ! -d $LOG_PATH ] && mkdir -p $LOG_PATH
|
||||
[ ! -d $DB_PATH ] && mkdir -p $DB_PATH
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dslmngr
|
||||
PKG_VERSION:=1.1.2
|
||||
PKG_VERSION:=1.2.0
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
@@ -26,7 +26,7 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
else
|
||||
$(info Unexpected CONFIG_TARGET)
|
||||
@@ -68,6 +68,10 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/dslmngr/install
|
||||
$(CP) ./files/common/* $(1)/
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
$(CP) ./files/broadcom/* $(1)/
|
||||
endif
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
|
||||
endef
|
||||
|
||||
311
dslmngr/files/broadcom/lib/dsl/broadcom.sh
Normal file
311
dslmngr/files/broadcom/lib/dsl/broadcom.sh
Normal file
@@ -0,0 +1,311 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
# ATM #
|
||||
check_pvc() {
|
||||
local vpi=$1
|
||||
local vci=$2
|
||||
local ret
|
||||
|
||||
ret=$(xtmctl operate conn --show | awk -v test="$vpi/$vci" '{if ($3==test ) print $5 }')
|
||||
|
||||
case $ret in
|
||||
''|*[!0-9]*) return 0 ;;
|
||||
*) return $ret ;;
|
||||
esac
|
||||
}
|
||||
|
||||
check_xtm_list() {
|
||||
local qclass=$1
|
||||
local pcr scr mbs
|
||||
local ret
|
||||
|
||||
case $# in
|
||||
1)
|
||||
pcr=0
|
||||
scr=0
|
||||
mbs=0
|
||||
;;
|
||||
2)
|
||||
pcr=$2
|
||||
scr=0
|
||||
mbs=0
|
||||
;;
|
||||
4)
|
||||
pcr=$2
|
||||
scr=$3
|
||||
mbs=$4
|
||||
;;
|
||||
esac
|
||||
|
||||
ret=$(xtmctl operate tdte --show | awk -v test="$qclass" -v pcr="$pcr" -v scr="$scr" -v mbs="$mbs" '{if ($2==test && $3==pcr && $4==scr && $5==mbs ) print $1 }')
|
||||
|
||||
case $ret in
|
||||
''|*[!0-9]*) return 0 ;;
|
||||
*) return $ret ;;
|
||||
esac
|
||||
}
|
||||
|
||||
configure_atm_device() {
|
||||
local name vpi vci device link_type encapsulation qos_class pcr mbs scr i
|
||||
|
||||
config_get name $1 name "ATM"
|
||||
config_get vpi $1 vpi "8"
|
||||
config_get vci $1 vci "35"
|
||||
config_get device $1 device "atm0"
|
||||
config_get link_type $1 link_type "eoa"
|
||||
config_get encapsulation $1 encapsulation "llc"
|
||||
config_get qos_class $1 qos_class "ubr"
|
||||
config_get pcr $1 pcr
|
||||
config_get mbs $1 mbs
|
||||
config_get scr $1 scr
|
||||
|
||||
check_pvc $vpi $vci
|
||||
ret=$?
|
||||
|
||||
if [ "$ret" -eq 0 ]; then
|
||||
check_xtm_list $qos_class $pcr $scr $mbs
|
||||
ret=$?
|
||||
|
||||
if [ "$ret" -eq 0 ]; then
|
||||
case $qos_class in # ubr, cbr, gfr, vbr-nrt, vbr-rt, ubr+, abr
|
||||
ubr)
|
||||
xtmctl operate tdte --add "$qos_class"
|
||||
;;
|
||||
ubr_pcr|ubr+)
|
||||
xtmctl operate tdte --add "$qos_class" $pcr
|
||||
;;
|
||||
cbr)
|
||||
xtmctl operate tdte --add "$qos_class" $pcr
|
||||
;;
|
||||
nrtvbr|vbr-nrt)
|
||||
xtmctl operate tdte --add "$qos_class" $pcr $scr $mbs
|
||||
;;
|
||||
rtvbr|vbr-rt)
|
||||
xtmctl operate tdte --add "$qos_class" $pcr $scr $mbs
|
||||
;;
|
||||
gfr)
|
||||
;;
|
||||
abr)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case $link_type in # EoA, IPoA, PPPoA, CIP
|
||||
EoA|eoa)
|
||||
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_eth" || encapsulation="llcsnap_eth"
|
||||
;;
|
||||
PPPoA|pppoa)
|
||||
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_pppoa" || encapsulation="llcencaps_ppp"
|
||||
;;
|
||||
IPoA|ipoa)
|
||||
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_ipoa" || encapsulation="llcsnap_rtip"
|
||||
;;
|
||||
CIP|cip)
|
||||
;;
|
||||
esac
|
||||
|
||||
check_xtm_list $qos_class $pcr $scr $mbs
|
||||
ret="$?"
|
||||
|
||||
xtmctl operate conn --add 1.$vpi.$vci aal5 $encapsulation 0 1 $ret
|
||||
for i in `seq 0 7`; do
|
||||
xtmctl operate conn --addq 1.$vpi.$vci $i wrr 1 dt # queue priority 0-7
|
||||
done
|
||||
xtmctl operate conn --createnetdev 1.$vpi.$vci $device
|
||||
xtmctl operate intf --state 1 enable
|
||||
fi
|
||||
}
|
||||
|
||||
remove_atm_devices() {
|
||||
local vpi vci rest
|
||||
local vpivci=`xtmctl operate conn --show | grep "ATM\|mode" | awk '{if (NR!=1 && $1!="PTM") {print $3}}'`
|
||||
|
||||
for i in $vpivci
|
||||
do
|
||||
rest=${i#\/}
|
||||
vpi=${rest%%\/*}
|
||||
vci=${rest#*\/}
|
||||
echo "xtmctl operate conn --delete 1.$vpi.$vci"
|
||||
xtmctl operate conn --delete 1.$vpi.$vci
|
||||
echo "xtmctl operate conn --deletenetdev 1.$vpi.$vci"
|
||||
xtmctl operate conn --deletenetdev 1.$vpi.$vci
|
||||
done
|
||||
}
|
||||
|
||||
create_atm_devices() {
|
||||
echo "Creating ATM Device(s)"
|
||||
config_load dsl
|
||||
config_foreach configure_atm_device atm-device
|
||||
}
|
||||
# ATM END #
|
||||
|
||||
# PTM #
|
||||
check_ptm() {
|
||||
local ret
|
||||
local ptmprio=$1
|
||||
local dslat=$2
|
||||
|
||||
if [ "$ptmprio" -eq 2 ]; then
|
||||
ptmprio="high"
|
||||
else
|
||||
ptmprio="low"
|
||||
fi
|
||||
|
||||
ret=$(xtmctl operate conn --show | awk -v dslat="$dslat" -v ptmprio="$ptmprio" '{if ($2 == dslat && $3 == ptmprio ) print $2 }')
|
||||
|
||||
case $ret in
|
||||
''|*[!0-9]*) return 0 ;;
|
||||
*) return $ret ;;
|
||||
esac
|
||||
}
|
||||
|
||||
configure_ptm_device() {
|
||||
local name device priority portid i
|
||||
|
||||
config_get name $1 name "PTM"
|
||||
config_get device $1 device "ptm0"
|
||||
config_get priority $1 priority 1
|
||||
config_get portid $1 portid 1
|
||||
|
||||
check_ptm $priority $portid
|
||||
ret=$?
|
||||
|
||||
if [ "$ret" -eq 0 ]; then
|
||||
xtmctl operate conn --add $portid.$priority
|
||||
|
||||
for i in `seq 0 7`; do
|
||||
xtmctl operate conn --addq $portid.$priority $i wrr 1 dt -1 -1 3000 # queue priority 0-7
|
||||
done
|
||||
echo "xtmctl operate conn --createnetdev $portid.$priority $device"
|
||||
xtmctl operate conn --createnetdev $portid.$priority $device
|
||||
xtmctl operate intf --state 1 enable
|
||||
fi
|
||||
}
|
||||
|
||||
remove_ptm_devices() {
|
||||
local delptm
|
||||
local x=0
|
||||
|
||||
IFS=$'\n'
|
||||
for i in `xtmctl operate conn --show | grep "PTM\|mode"`
|
||||
do
|
||||
if [ $x -eq 1 ]; then
|
||||
delptm=$(echo $i | awk '{if ($1!="ATM") print $2"."$11}')
|
||||
echo "xtmctl operate conn --delete $delptm"
|
||||
xtmctl operate conn --delete $delptm
|
||||
xtmctl operate conn --deletenetdev $delptm
|
||||
fi
|
||||
x=1
|
||||
done
|
||||
unset IFS
|
||||
}
|
||||
|
||||
create_ptm_devices() {
|
||||
echo "Creating PTM Device(s)"
|
||||
config_load dsl
|
||||
config_foreach configure_ptm_device ptm-device
|
||||
}
|
||||
# PTM END #
|
||||
|
||||
prioritize_arp()
|
||||
{
|
||||
ebtables -t nat -D POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
|
||||
ebtables -t nat -A POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
|
||||
}
|
||||
|
||||
xtm_remove_devices() {
|
||||
remove_atm_devices
|
||||
remove_ptm_devices
|
||||
}
|
||||
|
||||
xtm_create_devices() {
|
||||
local tpstc="$(xdslctl info --show | grep TPS-TC)"
|
||||
if echo "$tpstc" | grep -q "ATM Mode"; then
|
||||
create_atm_devices
|
||||
elif echo "$tpstc" | grep -q "PTM Mode"; then
|
||||
create_ptm_devices
|
||||
fi
|
||||
}
|
||||
|
||||
xdsl_configure() {
|
||||
local VDSL=0
|
||||
local GFAST=0
|
||||
local mod=""
|
||||
local modes=""
|
||||
local profile=""
|
||||
|
||||
config_load dsl
|
||||
|
||||
# Modes
|
||||
config_get mode line mode
|
||||
for mod in $mode; do
|
||||
[ $mod == "gdmt" ] && modes="${modes}d"
|
||||
[ $mod == "glite" ] && modes="${modes}l"
|
||||
[ $mod == "t1413" ] && modes="${modes}t"
|
||||
[ $mod == "adsl2" ] && modes="${modes}2"
|
||||
[ $mod == "adsl2p" ] && modes="${modes}p"
|
||||
[ $mod == "annexl" ] && modes="${modes}e"
|
||||
[ $mod == "annexm" ] && modes="${modes}m"
|
||||
[ $mod == "vdsl2" ] && modes="${modes}v" && VDSL=1
|
||||
[ $mod == "gfast" ] && modes="${modes}f" && GFAST=1
|
||||
done
|
||||
|
||||
# VDSL Profiles
|
||||
config_get profile line profile
|
||||
# Capabilities
|
||||
config_get_bool bitswap line bitswap 1
|
||||
[ $bitswap -eq 1 ] && bitswap="on" || bitswap="off"
|
||||
config_get_bool sra line sra 1
|
||||
[ $sra -eq 1 ] && sra="on" || sra="off"
|
||||
# config_get_bool trellis line trellis 1
|
||||
config_get_bool sesdrop line sesdrop 0
|
||||
[ $sesdrop -eq 1 ] && sesdrop="on" || sesdrop="off"
|
||||
# VDSL2 only
|
||||
config_get_bool us0 line us0 1
|
||||
[ $us0 -eq 1 ] && us0="on" || us0="off"
|
||||
# config_get_bool dynamicd line dynamicd 1
|
||||
# config_get_bool dynamicf line dynamicf 1
|
||||
config_get_bool sos line sos 0
|
||||
[ $sos -eq 1 ] && sos="on" || sos="off"
|
||||
|
||||
config_get_bool phyReXmtUs line phyReXmtUs 0
|
||||
config_get_bool phyReXmtDs line phyReXmtDs 1
|
||||
phyReXmt=$(( $((phyReXmtUs<<1)) + phyReXmtDs))
|
||||
|
||||
if [ $VDSL -eq 1 -o $GFAST -eq 1 ]; then
|
||||
echo "xdslctl start --up --mod $modes --profile "$profile" --sra $sra --bitswap $bitswap --us0 $us0 --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt"
|
||||
xdslctl start --up --mod $modes --profile "$profile" --sra $sra --bitswap $bitswap --us0 $us0 --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt
|
||||
# G.Fast hardware to VDSL hardware, to set the driver bit kPhyCfg2EnableGfastVdslMMTimeOut0.
|
||||
# Enable V43 tone for GFAST.
|
||||
echo "xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400"
|
||||
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400
|
||||
else
|
||||
echo "xdslctl start --up --mod $modes --sra $sra --bitswap $bitswap --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt"
|
||||
xdslctl start --up --mod $modes --sra $sra --bitswap $bitswap --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt
|
||||
fi
|
||||
|
||||
if [ $GFAST -eq 1 ]; then
|
||||
# G.Fast hardware to VDSL hardware, to set the driver bit kPhyCfg2EnableGfastVdslMMTimeOut0.
|
||||
# Enable V43 tone for GFAST.
|
||||
echo "xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400"
|
||||
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400
|
||||
fi
|
||||
}
|
||||
|
||||
xdsl_stop() {
|
||||
# echo "Stopping DSL"
|
||||
# stop causes IRQ issues
|
||||
# xdslctl stop
|
||||
return 0
|
||||
}
|
||||
|
||||
xdsl_init() {
|
||||
prioritize_arp
|
||||
|
||||
echo "Starting DSL"
|
||||
|
||||
xtmctl start
|
||||
xtmctl operate intf --state 1 enable
|
||||
}
|
||||
53
dslmngr/files/common/etc/config/dsl
Normal file
53
dslmngr/files/common/etc/config/dsl
Normal file
@@ -0,0 +1,53 @@
|
||||
# OEM specific parameters
|
||||
config oem-parameters 'oem'
|
||||
# option country_code "0000" # 2 bytes hex
|
||||
# option vendor_id "IO" # 4 bytes string
|
||||
# option vendor_suffix "0000" # 2 bytes hex
|
||||
# option sw_version "iopsys" # 16 bytes string
|
||||
# option serial_nr "00000000" # 32 bytes string
|
||||
|
||||
# DSL Modes
|
||||
config dsl-line line
|
||||
list mode gdmt
|
||||
list mode glite
|
||||
list mode t1413
|
||||
list mode adsl2
|
||||
list mode adsl2p
|
||||
list mode annexl
|
||||
list mode annexm
|
||||
list mode vdsl2
|
||||
# VDSL2 profiles
|
||||
list profile 8a
|
||||
list profile 8b
|
||||
list profile 8c
|
||||
list profile 8d
|
||||
list profile 12a
|
||||
list profile 12b
|
||||
list profile 17a
|
||||
list profile 30a
|
||||
option bitswap 1
|
||||
option sra 1
|
||||
option us0 1 # VDSL2 only
|
||||
option sesdrop 0
|
||||
option sos 0
|
||||
option phyReXmtUs 0
|
||||
option phyReXmtDs 1
|
||||
|
||||
config atm-device atm0
|
||||
option name 'ATM'
|
||||
option vpi '8'
|
||||
option vci '35'
|
||||
option device atm0
|
||||
option link_type 'eoa' # EoA, IPoA, PPPoA, CIP
|
||||
option encapsulation 'llc' # llc, vcmux
|
||||
option qos_class 'ubr' # ubr, cbr, gfr, vbr-nrt, vbr-rt, ubr+, abr
|
||||
# option pcr '512'
|
||||
# option scr '256'
|
||||
# option mbs '1024'
|
||||
|
||||
config ptm-device ptm0
|
||||
option name 'PTM'
|
||||
option device 'ptm0'
|
||||
option priority '1'
|
||||
option portid '1'
|
||||
|
||||
7
dslmngr/files/common/etc/hotplug.d/dsl/10-devices
Normal file
7
dslmngr/files/common/etc/hotplug.d/dsl/10-devices
Normal file
@@ -0,0 +1,7 @@
|
||||
[ "$STATUS" == "up" -o "$STATUS" == "down" ] || exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/dsl
|
||||
|
||||
xtm_remove_devices
|
||||
xtm_create_devices
|
||||
7
dslmngr/files/common/etc/hotplug.d/dsl/20-leds
Normal file
7
dslmngr/files/common/etc/hotplug.d/dsl/20-leds
Normal file
@@ -0,0 +1,7 @@
|
||||
if [ "$STATUS" == "up" ]; then
|
||||
ubus call led.dsl set '{"state":"ok"}'
|
||||
elif [ "$STATUS" == "down" ]; then
|
||||
ubus call led.dsl set '{"state":"off"}'
|
||||
elif [ "$STATUS" == "training" ]; then
|
||||
ubus call led.dsl set '{"state":"alert"}'
|
||||
fi
|
||||
48
dslmngr/files/common/etc/init.d/dsl
Executable file
48
dslmngr/files/common/etc/init.d/dsl
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/dsl
|
||||
|
||||
START=20
|
||||
USE_PROCD=1
|
||||
|
||||
DSLMNGR=$(which dslmngr)
|
||||
|
||||
start_service() {
|
||||
[ -n "$DSLMNGR" ] && {
|
||||
procd_open_instance
|
||||
procd_set_param command "$DSLMNGR"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
xdsl_configure
|
||||
xtm_create_devices
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
[ -n "$DSLMNGR" ] && service_stop $DSLMNGR
|
||||
|
||||
xtm_remove_devices
|
||||
xdsl_stop
|
||||
}
|
||||
|
||||
boot() {
|
||||
local HASADSL="$(db -q get hw.board.hasAdsl)"
|
||||
local HASVDSL="$(db -q get hw.board.hasVdsl)"
|
||||
[ "$HASADSL" == "1" -o "$HASVDSL" == "1" ] || return
|
||||
|
||||
xdsl_init
|
||||
|
||||
start
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger dsl
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ define Package/easy-qos
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Easy QoS
|
||||
DEPENDS:=@TARGET_iopsys_brcm63xx_arm
|
||||
DEPENDS:=@(TARGET_brcmbca||TARGET_airoha)
|
||||
endef
|
||||
|
||||
define Package/easy-qos/description
|
||||
|
||||
@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
-include $(TOPDIR)/.config
|
||||
|
||||
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
|
||||
ifneq ($(CONFIG_TARGET_brcmbca),)
|
||||
LINUX_DIR=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.1
|
||||
LINUX_VERSION := 4.1.52
|
||||
LINUXINCLUDE=-Iarch/$(LINUX_KARCH)/mach-bcm963xx/include
|
||||
@@ -85,7 +85,7 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
|
||||
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
|
||||
ifneq ($(CONFIG_TARGET_brcmbca),)
|
||||
define KernelPackage/easy-soc-events/install-extra
|
||||
cp $(PKG_BUILD_DIR)/easyevent.ko $(FS_DIR)/lib/modules/$(LINUX_VERSION)/extra
|
||||
endef
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# libeasy configuration
|
||||
|
||||
config LIBWIFI_USE_CTRL_IFACE
|
||||
bool "Use UNIX sockets"
|
||||
default n
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=6.4.44
|
||||
PKG_VERSION:=7.2.26
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=e4f811b7cd2836cdcce5ea0f97f515a317da5bc3
|
||||
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
|
||||
@@ -36,38 +36,63 @@ define Package/easy-soc-libs
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
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_ramips),y)
|
||||
TARGET_PLATFORM=MEDIATEK
|
||||
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
|
||||
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
|
||||
|
||||
export TARGET_PLATFORM
|
||||
|
||||
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)
|
||||
|
||||
EASY_SOC_LIBS := \
|
||||
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 \
|
||||
@@ -87,6 +112,7 @@ MAKE_FLAGS += \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
FPIC="$(FPIC)" \
|
||||
PLATFORM="$(TARGET_PLATFORM)" \
|
||||
WIFI_TYPE="$(TARGET_WIFI_TYPE)" \
|
||||
subdirs="$(subdirs)"
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
@@ -116,15 +142,15 @@ define Build/Compile
|
||||
$(Build/Compile/rebuild)
|
||||
touch $(PKG_BUILD_DIR)/.config_$(CONFIG_TARGET_PROFILE)
|
||||
$(call Build/Compile/Default)
|
||||
$(foreach dir,$(subdirs),$(call Build/Compile/$(dir)))
|
||||
$(foreach dir,$(esl-pkgs),$(call Build/Compile/$(dir)))
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(foreach dir,$(subdirs),$(call Build/InstallDev/$(dir),$(1),$(2));)
|
||||
$(foreach dir,$(esl-pkgs),$(call Build/InstallDev/$(dir),$(1),$(2));)
|
||||
endef
|
||||
|
||||
define Package/easy-soc-libs/install
|
||||
:
|
||||
endef
|
||||
|
||||
$(eval $(foreach e,$(EASY_SOC_LIBS),$(call BuildPackage,$(e))))
|
||||
$(eval $(foreach e,$(esl-pkgs-all),$(call BuildPackage,$(e))))
|
||||
|
||||
@@ -6,10 +6,6 @@ define Package/libeasy
|
||||
DEPENDS+=+libnl +libnl-route
|
||||
endef
|
||||
|
||||
define Package/libeasy/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libeasy
|
||||
$(INSTALL_DIR) $(1)/usr/include/easy
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
define Package/libethernet
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= Ethernet library (libethernet)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_iopsys_ramips:swconfig
|
||||
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_airoha:ecnt_api
|
||||
endef
|
||||
|
||||
define Package/libethernet/config
|
||||
|
||||
@@ -1,29 +1,53 @@
|
||||
|
||||
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 +TARGET_iopsys_brcm63xx_arm:bcmkernel
|
||||
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcmkernel
|
||||
endef
|
||||
|
||||
define Package/libwifi/config
|
||||
if PACKAGE_libdsl
|
||||
config LIBWIFI_DEBUG
|
||||
if PACKAGE_libwifi
|
||||
config LIBWIFI_DEBUG
|
||||
depends on PACKAGE_libwifi
|
||||
bool "Enable wifi debugging"
|
||||
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*.so* $(1)/usr/lib/
|
||||
$(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*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@ LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
|
||||
PKG_SOURCE_VERSION:=2390a3503990e04e33e8e448ad9dccc00f206908
|
||||
PKG_SOURCE_VERSION:=fb85081443c19b5062bede49c80b1802c0f05d34
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
export BUILD_DIR
|
||||
@@ -30,7 +30,6 @@ PKG_BUILD_PARALLEL:=1
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
export CONFIG_BRCM_SDK_VER_504021
|
||||
export CONFIG_BCM_CHIP_ID
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ethmngr
|
||||
PKG_VERSION:=2.0.1
|
||||
PKG_VERSION:=2.1.0
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5a0ff3bc7c49dcb05129f423ef8e0c4929f6aa03
|
||||
@@ -23,7 +23,7 @@ define Package/ethmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Ethernet status and configration utility
|
||||
DEPENDS:=+libethernet +libuci +libubox +ubus +libpthread +libnl-genl
|
||||
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_iopsys_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl
|
||||
endef
|
||||
|
||||
define Package/ethmngr/description
|
||||
@@ -37,10 +37,24 @@ 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),)
|
||||
define Build/Compile
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/ethmngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
|
||||
$(INSTALL_BIN) ./files/ethmngr.init $(1)/etc/init.d/ethmngr
|
||||
$(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),)
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ethmngr))
|
||||
|
||||
208
ethmngr/files/airoha/lib/ethernet/airoha.sh
Normal file
208
ethmngr/files/airoha/lib/ethernet/airoha.sh
Normal file
@@ -0,0 +1,208 @@
|
||||
#!/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}
|
||||
|
||||
}
|
||||
140
ethmngr/files/broadcom/lib/ethernet/broadcom.sh
Normal file
140
ethmngr/files/broadcom/lib/ethernet/broadcom.sh
Normal file
@@ -0,0 +1,140 @@
|
||||
# arg1: port ifname, ex: eth0
|
||||
get_max_port_speed() {
|
||||
if [ -z "$1" ]; then
|
||||
echo 0
|
||||
return
|
||||
fi
|
||||
|
||||
local ifname="$1"
|
||||
local phycap="$(ethctl $ifname media-type 2>/dev/null | grep 'PHY Capabilities' | awk '{print$NF}' | cut -d'|' -f1)"
|
||||
local speed=1000
|
||||
|
||||
case "$phycap" in
|
||||
10GFD) speed=10000 ;;
|
||||
5GFD) speed=5000 ;;
|
||||
2.5GFD) speed=2500 ;;
|
||||
1GFD|1GHD) speed=1000 ;;
|
||||
100MFD|100MHD) speed=100 ;;
|
||||
10MFD|10MHD) speed=10 ;;
|
||||
esac
|
||||
|
||||
echo $speed
|
||||
}
|
||||
|
||||
# arg1: port name, ex: eth0
|
||||
get_port_number() {
|
||||
[ -z "$1" ] && return
|
||||
local ports="0 1 2 3 4 5 6 7 8"
|
||||
local units="0 1"
|
||||
local port="$1"
|
||||
local ifname
|
||||
|
||||
for unit in $units; do
|
||||
for prt in $ports; do
|
||||
ifname="$(ethswctl getifname $unit $prt 2>/dev/null | awk '{print$NF}')"
|
||||
if [ "$ifname" == "$port" ]; then
|
||||
echo "$unit $prt"
|
||||
return
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# arg1: port ifname, ex: eth0
|
||||
# arg2: port enabled, ex: 1
|
||||
power_updown() {
|
||||
local ifname="$1"
|
||||
local enabled=$2
|
||||
|
||||
local updown="up"
|
||||
[ $enabled -eq 0 ] && updown="down"
|
||||
ethctl $ifname phy-power $updown >/dev/null
|
||||
}
|
||||
|
||||
# arg1: port ifname, ex: eth0
|
||||
# arg2: port enabled, ex: 1
|
||||
# arg3: port speed, ex: 1000
|
||||
# arg4: port duplex, ex: full
|
||||
# arg5: port autoneg, ex: on
|
||||
# arg6: port eee, ex: 0
|
||||
# arg7: port pause, ex: 0
|
||||
set_port_settings() {
|
||||
local ifname="$1"
|
||||
local enabled=$2
|
||||
local speed="$3"
|
||||
local duplex=$4
|
||||
local autoneg=$5
|
||||
local eee=$6
|
||||
local pause=$7
|
||||
|
||||
[ -d /sys/class/net/$ifname ] || return
|
||||
|
||||
local unitport="$(get_port_number $ifname)"
|
||||
local unit=$(echo $unitport | cut -d ' ' -f 1)
|
||||
local port=$(echo $unitport | cut -d ' ' -f 2)
|
||||
|
||||
[ $autoneg -eq 1 ] && autoneg="on" || autoneg="off"
|
||||
[ "$duplex" == "half" ] && duplex=0 || duplex=1
|
||||
[ "$duplex" == 0 ] && dplx="HD" || dplx="FD"
|
||||
[ "$autoneg" == "on" ] && media_type="auto" || media_type="$speed$dplx"
|
||||
|
||||
phycrossbar="$(ethctl $ifname phy-crossbar | head -1)"
|
||||
crossbartype="$(echo $phycrossbar | awk '{print$2$3}')"
|
||||
# Take only the last PHY Endpoint (non-Serdes) into account as Serdes port number precedes
|
||||
[ "$crossbartype" == "oncrossbar" ] && pyhendpoint="$(echo $phycrossbar | awk '{print$NF}')"
|
||||
|
||||
phycaps="$(ethctl $ifname media-type ${pyhendpoint:+ port $pyhendpoint} | awk -F'PHY Capabilities: ' '{print$2}')"
|
||||
numofcaps="$(echo $phycaps | tr '|' ' ' | wc -w)"
|
||||
|
||||
if [ "$numofcaps" == "1" ]; then
|
||||
logger -t "port-management" "$ifname is capable of $phycaps only; not setting speed/duplex"
|
||||
else
|
||||
logger -t "port-management" "$ifname is capable of $phycaps; setting speed/duplex to $media_type"
|
||||
ethctl $ifname media-type $media_type ${pyhendpoint:+ port $pyhendpoint} &>/dev/null
|
||||
fi
|
||||
|
||||
[ $eee -eq 1 ] && eee="on" || eee="off"
|
||||
ethtool --set-eee $ifname eee $eee 2>/dev/null
|
||||
|
||||
case $pause in
|
||||
off|0)
|
||||
pause=0x0
|
||||
auto=off
|
||||
rx=off
|
||||
tx=off
|
||||
;;
|
||||
on|1)
|
||||
pause=0x2
|
||||
auto=off
|
||||
rx=on
|
||||
tx=on
|
||||
;;
|
||||
auto)
|
||||
pause=0x1
|
||||
auto=on
|
||||
rx=on
|
||||
tx=on
|
||||
;;
|
||||
tx)
|
||||
pause=0x3
|
||||
auto=off
|
||||
rx=off
|
||||
tx=on
|
||||
;;
|
||||
rx)
|
||||
pause=0x4
|
||||
auto=off
|
||||
rx=on
|
||||
tx=off
|
||||
;;
|
||||
esac
|
||||
if [ "$auto" == "on" ]; then
|
||||
# Use ethswctl utility to set pause autoneg
|
||||
# as ethtool is not setting it properly
|
||||
ethswctl -c pause -n $unit -p $port -v $pause 2>&1 >/dev/null
|
||||
else
|
||||
ethtool --pause $ifname autoneg $auto rx $rx tx $tx 2>/dev/null
|
||||
fi
|
||||
|
||||
power_updown $ifname $enabled
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=15
|
||||
STOP=90
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/ethmngr
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/network
|
||||
include /lib/ethernet
|
||||
|
||||
configure_ports(){
|
||||
configure_ethernet_port(){
|
||||
local cfg=$1
|
||||
local ifname enabled speed duplex autoneg eee pause
|
||||
|
||||
@@ -24,11 +27,22 @@ configure_ports(){
|
||||
}
|
||||
|
||||
start_service() {
|
||||
[ -f /lib/network/port.sh ] || return
|
||||
if [ -s /etc/config/ports ]; then
|
||||
config_load ports
|
||||
config_foreach configure_ethernet_port ethport
|
||||
fi
|
||||
|
||||
config_load ports
|
||||
config_foreach configure_ports ethport
|
||||
config_foreach configure_ports sfpport
|
||||
if [ -f $PROG ]; then
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
fi
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
populate_config_from_db() {
|
||||
. /lib/functions.sh
|
||||
include /lib/network
|
||||
. /lib/network/utils.sh
|
||||
include /lib/ethernet
|
||||
|
||||
portorder="$(db -q get hw.board.ethernetPortOrder)"
|
||||
for port in $portorder; do
|
||||
@@ -30,17 +31,25 @@ populate_config_from_db() {
|
||||
}
|
||||
|
||||
populate_config_from_device_tree() {
|
||||
for port in $(find /proc/device-tree/ -name "port@*"); do
|
||||
port="$(cat $port/label)"
|
||||
for path in $(find /proc/device-tree/ -name "port@*"); do
|
||||
port="$(cat $path/label)"
|
||||
[ -n "$port" ] || continue
|
||||
[ "$port" = "cpu" ] && continue
|
||||
speed=1000
|
||||
if [ -e "$path/phy-mode" ]; then
|
||||
phymode="$(cat $path/phy-mode)"
|
||||
case "$phymode" in
|
||||
10000*) speed=10000 ;;
|
||||
2500*) speed=2500 ;;
|
||||
esac
|
||||
fi
|
||||
PORT="$(echo $port | tr '[a-z]' '[A-Z]')"
|
||||
uci add ports ethport
|
||||
uci rename ports.@ethport[-1]="$PORT"
|
||||
uci set ports.@ethport[-1].enabled=1
|
||||
uci set ports.@ethport[-1].name="$PORT"
|
||||
uci set ports.@ethport[-1].ifname="$port"
|
||||
uci set ports.@ethport[-1].speed=1000
|
||||
uci set ports.@ethport[-1].speed="$speed"
|
||||
uci set ports.@ethport[-1].duplex="full"
|
||||
uci set ports.@ethport[-1].autoneg=1
|
||||
uci set ports.@ethport[-1].eee=0
|
||||
@@ -65,7 +74,7 @@ fi
|
||||
|
||||
touch /etc/config/ports
|
||||
|
||||
if [ -f /sbin/db ] && [ -f /etc/board-db/config/hw ]; then
|
||||
if [ -f /sbin/db -a -n "$(db get hw.board.ethernetPortOrder 2>/dev/null)" ]; then
|
||||
populate_config_from_db
|
||||
elif [ -d /proc/device-tree/ ]; then
|
||||
populate_config_from_device_tree
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=95
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/ethmngr
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
95
ethmngr/files/linux/lib/ethernet/linux.sh
Normal file
95
ethmngr/files/linux/lib/ethernet/linux.sh
Normal file
@@ -0,0 +1,95 @@
|
||||
# arg1: port ifname, ex: eth0
|
||||
get_max_port_speed() {
|
||||
if [ -z "$1" ]; then
|
||||
echo 0
|
||||
return
|
||||
fi
|
||||
|
||||
local ifname="$1"
|
||||
local phycap="$(ethtool $ifname | grep -A 10 "Supported link modes" | grep 000 | tail -n 1 | awk '{print$NF}')"
|
||||
local speed=1000
|
||||
|
||||
case "$phycap" in
|
||||
10000*) speed=10000 ;;
|
||||
5000*) speed=5000 ;;
|
||||
2500*) speed=2500 ;;
|
||||
1000*) speed=1000 ;;
|
||||
100*) speed=100 ;;
|
||||
10*) speed=10 ;;
|
||||
esac
|
||||
|
||||
echo $speed
|
||||
}
|
||||
|
||||
# arg1: port ifname, ex: eth0
|
||||
# arg2: port enabled, ex: 1
|
||||
power_updown() {
|
||||
local ifname="$1"
|
||||
local enabled=$2
|
||||
|
||||
local updown="up"
|
||||
[ $enabled -eq 0 ] && updown="down"
|
||||
ip link set dev $ifname $updown
|
||||
}
|
||||
|
||||
# arg1: port ifname, ex: eth0
|
||||
# arg2: port enabled, ex: 1
|
||||
# arg3: port speed, ex: 1000
|
||||
# arg4: port duplex, ex: full
|
||||
# arg5: port autoneg, ex: on
|
||||
# arg6: port eee, ex: 0
|
||||
# arg7: port pause, ex: 0
|
||||
set_port_settings() {
|
||||
local ifname="$1"
|
||||
local enabled=$2
|
||||
local speed="$3"
|
||||
local duplex=$4
|
||||
local autoneg=$5
|
||||
local eee=$6
|
||||
local pause=$7
|
||||
|
||||
[ -d /sys/class/net/$ifname ] || return
|
||||
|
||||
[ $autoneg -eq 1 ] && autoneg="on" || autoneg="off"
|
||||
ethtool --change $ifname speed $speed duplex $duplex autoneg $autoneg
|
||||
|
||||
[ $eee -eq 1 ] && eee="on" || eee="off"
|
||||
ethtool --set-eee $ifname eee $eee 2>/dev/null
|
||||
|
||||
case $pause in
|
||||
off|0)
|
||||
pause=0x0
|
||||
auto=off
|
||||
rx=off
|
||||
tx=off
|
||||
;;
|
||||
on|1)
|
||||
pause=0x2
|
||||
auto=off
|
||||
rx=on
|
||||
tx=on
|
||||
;;
|
||||
auto)
|
||||
pause=0x1
|
||||
auto=on
|
||||
rx=on
|
||||
tx=on
|
||||
;;
|
||||
tx)
|
||||
pause=0x3
|
||||
auto=off
|
||||
rx=off
|
||||
tx=on
|
||||
;;
|
||||
rx)
|
||||
pause=0x4
|
||||
auto=off
|
||||
rx=on
|
||||
tx=off
|
||||
;;
|
||||
esac
|
||||
|
||||
ethtool --pause $ifname autoneg $auto rx $rx tx $tx 2>/dev/null
|
||||
|
||||
power_updown $ifname $enabled
|
||||
}
|
||||
@@ -5,21 +5,22 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=evoice
|
||||
PKG_VERSION:=0.1
|
||||
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:=56a568164e84c8e2d7f2c7f06d26265e837b11ef
|
||||
PKG_SOURCE_VERSION:=30d65330de0368f73ecf4a2e804c39a2ee280454
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
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
|
||||
@@ -31,7 +32,10 @@ define Package/$(PKG_NAME)
|
||||
SUBMENU:=Telephony
|
||||
TITLE:=Ensemble Voice
|
||||
URL:=
|
||||
DEPENDS:= +libubox +libubus +libpicoevent +libuci +libstdcpp
|
||||
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
|
||||
@@ -40,23 +44,63 @@ endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
# If you want to build the code from your own local repositiory enable
|
||||
# LOCAL_DEV and change the path below to your own git repository.
|
||||
# LOCAL_DEV and set LOCAL_DEV_EVOICE_DIR to your own git repository.
|
||||
define Build/Prepare
|
||||
rsync -av /swdev/bide/evoice_clean/* $(PKG_BUILD_DIR)/
|
||||
@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
|
||||
export IDIR = $(STAGING_DIR)/usr/include
|
||||
export BDIR = bcm963xx/userspace/private/apps/voice
|
||||
export _XFLAGS = -I$(IDIR) -I$(IDIR)/$(BDIR)/inc -I$(IDIR)/bcm963xx/xchg/bos/publicInc -I$(IDIR)/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
|
||||
|
||||
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
|
||||
+$(MAKE) -r -R -C $(PKG_BUILD_DIR) -f _bld/src/cdabs.mk SWB=b_gxxqca6 HWA=a_openwrt HWC=c_hosted OSP=p_posix TRG=SVrgBcmFxs LIF=cerder DBG=dbg
|
||||
@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))
|
||||
|
||||
@@ -22,6 +22,7 @@ config SIPClient 'Client2'
|
||||
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'
|
||||
@@ -33,57 +34,45 @@ config SIPNetwork 'Network1'
|
||||
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 Capabilities 'Capabilities'
|
||||
option FacilityActions 'CW_ACTIVE,CFU_ACTIVE'
|
||||
|
||||
config CapabilitiesCodec 'Codec1'
|
||||
option Codec 'G.711ALaw'
|
||||
|
||||
config CapabilitiesCodec 'Codec2'
|
||||
option Codec 'G.711MuLaw'
|
||||
|
||||
config CapabilitiesCodec 'Codec3'
|
||||
option Codec 'G.726'
|
||||
|
||||
config CapabilitiesCodec 'Codec4'
|
||||
option Codec 'G.722'
|
||||
|
||||
config CapabilitiesCodec 'Codec5'
|
||||
option Codec 'G.729'
|
||||
|
||||
config CodecProfile '1CodecProfile1'
|
||||
option Enable '1'
|
||||
option Codec 'Codec1'
|
||||
option Codec 'G.711ALaw'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '1'
|
||||
|
||||
config CodecProfile '1CodecProfile2'
|
||||
option Enable '1'
|
||||
option Codec 'Codec2'
|
||||
option Codec 'G.711MuLaw'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '1'
|
||||
|
||||
config CodecProfile '1CodecProfile3'
|
||||
option Enable '1'
|
||||
option Codec 'Codec3'
|
||||
option Codec 'G.726'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config CodecProfile '1CodecProfile4'
|
||||
option Enable '1'
|
||||
option Codec 'Codec4'
|
||||
option Codec 'G.722'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config CodecProfile '1CodecProfile5'
|
||||
option Enable '1'
|
||||
option Codec 'Codec5'
|
||||
option Codec 'G.729'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '0'
|
||||
|
||||
@@ -98,20 +87,20 @@ config RTP '1RTP'
|
||||
option JitterBufferType 'Static'
|
||||
|
||||
config FXXPorts 'POTS'
|
||||
option Region 'SE'
|
||||
option Region 'US'
|
||||
|
||||
config FXSPorts 'FXS1'
|
||||
option Enable '1'
|
||||
option DialType 'Tone'
|
||||
option TransmitGain '4'
|
||||
option ReceiveGain '4'
|
||||
option TransmitGain '0'
|
||||
option ReceiveGain '0'
|
||||
option EchoCancellationEnable '1'
|
||||
|
||||
config FXSPorts 'FXS2'
|
||||
option Enable '1'
|
||||
option DialType 'Tone'
|
||||
option TransmitGain '4'
|
||||
option ReceiveGain '4'
|
||||
option TransmitGain '0'
|
||||
option ReceiveGain '0'
|
||||
option EchoCancellationEnable '1'
|
||||
|
||||
config Extension 'Extension1'
|
||||
@@ -149,7 +138,7 @@ config IncomingMap 'IncomingMap2'
|
||||
option Line 'Line2'
|
||||
|
||||
config IncomingMap 'IncomingMap3'
|
||||
option Enable '1'
|
||||
option Enable '0'
|
||||
option Extension 'Extension2'
|
||||
option Line 'Line1'
|
||||
|
||||
@@ -222,15 +211,15 @@ config NumberingPlan 'NumberingPlan2'
|
||||
option InterDigitTimerStd '2000'
|
||||
option InterDigitTimerOpen '2000'
|
||||
option TerminationDigit ' '
|
||||
list PrefixList '3PrefixInfo1'
|
||||
list PrefixList '3PrefixInfo2'
|
||||
list PrefixList '3PrefixInfo3'
|
||||
list PrefixList '3PrefixInfo4'
|
||||
list PrefixList '3PrefixInfo5'
|
||||
list PrefixList '3PrefixInfo6'
|
||||
list PrefixList '3PrefixInfo7'
|
||||
list PrefixList '3PrefixInfo8'
|
||||
list PrefixList '3PrefixInfo9'
|
||||
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'
|
||||
@@ -238,9 +227,9 @@ config NumberingPlan 'NumberingPlan3'
|
||||
option InterDigitTimerStd '2000'
|
||||
option InterDigitTimerOpen '2000'
|
||||
option TerminationDigit '#'
|
||||
list PrefixList '4PrefixInfo1'
|
||||
list PrefixList '3PrefixInfo1'
|
||||
|
||||
config PrefixInfo '3PrefixInfo1'
|
||||
config PrefixInfo '2PrefixInfo1'
|
||||
option Enable '1'
|
||||
option PrefixRange '*43#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
@@ -250,7 +239,7 @@ config PrefixInfo '3PrefixInfo1'
|
||||
option FacilityAction 'CW_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo2'
|
||||
config PrefixInfo '2PrefixInfo2'
|
||||
option Enable '1'
|
||||
option PrefixRange '#43#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
@@ -260,7 +249,7 @@ config PrefixInfo '3PrefixInfo2'
|
||||
option FacilityAction 'CW_DEACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo3'
|
||||
config PrefixInfo '2PrefixInfo3'
|
||||
option Enable '1'
|
||||
option PrefixRange '*21*(X+)#'
|
||||
option PrefixMinNumberOfDigits '9'
|
||||
@@ -270,7 +259,7 @@ config PrefixInfo '3PrefixInfo3'
|
||||
option FacilityAction 'CFU_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo4'
|
||||
config PrefixInfo '2PrefixInfo4'
|
||||
option Enable '1'
|
||||
option PrefixRange '#21#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
@@ -280,7 +269,7 @@ config PrefixInfo '3PrefixInfo4'
|
||||
option FacilityAction 'CFU_DEACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo5'
|
||||
config PrefixInfo '2PrefixInfo5'
|
||||
option Enable '1'
|
||||
option PrefixRange '*67*(X+)#'
|
||||
option PrefixMinNumberOfDigits '9'
|
||||
@@ -290,7 +279,7 @@ config PrefixInfo '3PrefixInfo5'
|
||||
option FacilityAction 'CFB_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo6'
|
||||
config PrefixInfo '2PrefixInfo6'
|
||||
option Enable '1'
|
||||
option PrefixRange '#67#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
@@ -300,7 +289,7 @@ config PrefixInfo '3PrefixInfo6'
|
||||
option FacilityAction 'CFB_DEACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo7'
|
||||
config PrefixInfo '2PrefixInfo7'
|
||||
option Enable '1'
|
||||
option PrefixRange '*61*(X+(*X+)?)#'
|
||||
option PrefixMinNumberOfDigits '15'
|
||||
@@ -310,7 +299,7 @@ config PrefixInfo '3PrefixInfo7'
|
||||
option FacilityAction 'CFNR_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo8'
|
||||
config PrefixInfo '2PrefixInfo8'
|
||||
option Enable '1'
|
||||
option PrefixRange '#61#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
@@ -320,7 +309,7 @@ config PrefixInfo '3PrefixInfo8'
|
||||
option FacilityAction 'CFNR_DEACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo9'
|
||||
config PrefixInfo '2PrefixInfo9'
|
||||
option Enable '1'
|
||||
option PrefixRange '*31*'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
@@ -330,7 +319,7 @@ config PrefixInfo '3PrefixInfo9'
|
||||
option FacilityAction 'CA_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '4PrefixInfo1'
|
||||
config PrefixInfo '3PrefixInfo1'
|
||||
option Enable '1'
|
||||
option PrefixRange '110|112'
|
||||
option PrefixMinNumberOfDigits '7'
|
||||
|
||||
1564
evoice/files/etc/evoice/tones.ini
Normal file
1564
evoice/files/etc/evoice/tones.ini
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@ 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'
|
||||
@@ -47,16 +48,23 @@ config account 'map_account'
|
||||
# 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 SIP_Port 'voice.Network@.RegistrarServerPort'
|
||||
option SIP_Transport 'voice.Network@.RegistrarServerTransport'
|
||||
option RegistrationPeriod 'voice.Network@.RegistrationPeriod'
|
||||
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 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'
|
||||
@@ -73,6 +81,13 @@ config codecs 'map_codec'
|
||||
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'
|
||||
@@ -94,6 +109,7 @@ config cs_account 'map_set'
|
||||
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'
|
||||
|
||||
@@ -2,9 +2,9 @@ config static_prm 'defaults'
|
||||
option Print_Control '4'
|
||||
option Print_UDP_Addr '192.168.1.3'
|
||||
option Print_UDP_Port '60000'
|
||||
option Verbosity 'Off'
|
||||
option Verbosity 'On'
|
||||
option Failure_Log 'On'
|
||||
option Message_Log 'Off'
|
||||
option Message_Log 'On'
|
||||
option Method_Trace 'Off'
|
||||
option Dial_Cache_Size '0'
|
||||
option Reverse_Fax_Detection '0'
|
||||
@@ -22,7 +22,6 @@ config static_prm 'defaults'
|
||||
option Tone_On_Hangup '1'
|
||||
option BusyTone_On_Hangup '1'
|
||||
option Enable_Analouge_Conf '0'
|
||||
option SIP_SessTmrEnable '0'
|
||||
option PrackUsage '1'
|
||||
option SIP_SupportedPath '0'
|
||||
option IMS_Access_Network_Info ' '
|
||||
@@ -42,6 +41,7 @@ config static_prm 'defaults'
|
||||
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 ' '
|
||||
|
||||
@@ -5,10 +5,17 @@ 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"
|
||||
@@ -20,3 +27,6 @@ reload_service() {
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger $VOICE_UCI_CONFIG
|
||||
}
|
||||
|
||||
50
evoice/files/lib/voice/codecs_airoha.json
Normal file
50
evoice/files/lib/voice/codecs_airoha.json
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
140
evoice/files/lib/voice/codecs_brcm.json
Normal file
140
evoice/files/lib/voice/codecs_brcm.json
Normal file
@@ -0,0 +1,140 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
BIN
evoice/files/usr/share/evoice/sounds/activated.g711a
Normal file
BIN
evoice/files/usr/share/evoice/sounds/activated.g711a
Normal file
Binary file not shown.
1
evoice/files/usr/share/evoice/sounds/activated.g722
Normal file
1
evoice/files/usr/share/evoice/sounds/activated.g722
Normal file
File diff suppressed because one or more lines are too long
BIN
evoice/files/usr/share/evoice/sounds/deactivated.g711a
Normal file
BIN
evoice/files/usr/share/evoice/sounds/deactivated.g711a
Normal file
Binary file not shown.
1
evoice/files/usr/share/evoice/sounds/deactivated.g722
Normal file
1
evoice/files/usr/share/evoice/sounds/deactivated.g722
Normal file
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ PKG_VERSION:=1.0
|
||||
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/fdtextract.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=0ebaf1e7d1f09318ae75d0f475a25280742b790e
|
||||
PKG_SOURCE_VERSION:=e3cefda3b26c9aea3021b20725ce7b31b33eebc4
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
@@ -28,7 +28,7 @@ define KernelPackage/$(PKG_NAME)
|
||||
FILES:=$(PKG_BUILD_DIR)/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
|
||||
KCONFIG:=CONFIG_PACKAGE_kmod-gryphon-led-kernel-module=y
|
||||
AUTOLOAD:=$(call AutoLoad,60,$(PKG_NAME))
|
||||
DEPENDS:= +(TARGET_iopsys_brcm63xx_arm):bcmkernel
|
||||
DEPENDS:= +(TARGET_brcmbca):bcmkernel
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_URL:=
|
||||
endef
|
||||
@@ -42,15 +42,27 @@ EXTRA_KCONFIG:= CONFIG_RGB_LED=m
|
||||
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
|
||||
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
LINUX_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.19
|
||||
MODULES_SUBDIR:=lib/modules/4.19.183
|
||||
# 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"
|
||||
|
||||
@@ -220,7 +220,6 @@ static int canyon_led_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(leds->clock_gpio)) {
|
||||
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
|
||||
PTR_ERR(leds->clock_gpio));
|
||||
leds->clock_gpio = NULL;
|
||||
return PTR_ERR(leds->clock_gpio);
|
||||
}
|
||||
|
||||
@@ -228,7 +227,6 @@ static int canyon_led_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(leds->clock_gpio)) {
|
||||
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
|
||||
PTR_ERR(leds->clock_gpio));
|
||||
leds->clock_gpio = NULL;
|
||||
return PTR_ERR(leds->clock_gpio);
|
||||
} else {
|
||||
printk(KERN_INFO "Got clock gpio\n");
|
||||
@@ -246,7 +244,6 @@ static int canyon_led_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(leds->data_gpio)) {
|
||||
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
|
||||
PTR_ERR(leds->data_gpio));
|
||||
leds->data_gpio = NULL;
|
||||
return PTR_ERR(leds->data_gpio);
|
||||
}
|
||||
|
||||
@@ -254,7 +251,6 @@ static int canyon_led_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(leds->data_gpio)) {
|
||||
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
|
||||
PTR_ERR(leds->data_gpio));
|
||||
leds->data_gpio = NULL;
|
||||
return PTR_ERR(leds->data_gpio);
|
||||
} else {
|
||||
printk(KERN_INFO "Got data gpio\n");
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
if PACKAGE_icwmp
|
||||
|
||||
choice
|
||||
prompt "Select ACS sever"
|
||||
default CWMP_ACS_MULTI
|
||||
|
||||
config CWMP_ACS_MULTI
|
||||
bool "No specific ACS, follow standard"
|
||||
|
||||
config CWMP_ACS_HDM
|
||||
bool "HDM"
|
||||
endchoice
|
||||
|
||||
config CWMP_DEBUG
|
||||
bool "Compile with debug options"
|
||||
default y
|
||||
|
||||
config CWMP_DEVEL_DEBUG
|
||||
bool "Compile with development debug options"
|
||||
default n
|
||||
|
||||
choice
|
||||
prompt "Select SSL utility"
|
||||
default CWMP_USE_WOLFSSL
|
||||
|
||||
config CWMP_USE_WOLFSSL
|
||||
bool "Use WolfSSL for ssl utilities"
|
||||
select CONFIG_PACKAGE_libwolfssl
|
||||
|
||||
config CWMP_USE_OPENSSL
|
||||
bool "Use OpenSSL for ssl utilities"
|
||||
select CONFIG_PACKAGE_libopenssl
|
||||
|
||||
endchoice
|
||||
endif
|
||||
|
||||
124
icwmp/Makefile
124
icwmp/Makefile
@@ -1,53 +1,73 @@
|
||||
#
|
||||
# Copyright (C) 2020 iopsys Software Solutions AB
|
||||
# Copyright (C) 2020-2022 IOPSYS Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# This is free software, licensed under the BSD-3-Clause
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=8.3.10
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_VERSION:=9.1.19
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=e12c739d300165a0baae978dc5424aebf051ff8b
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_VERSION:=9d8389cda16f410826920bb27fd8af4d28c79de9
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_CWMP_ACS_MULTI \
|
||||
CONFIG_CWMP_ACS_HDM \
|
||||
CONFIG_CWMP_DEBUG \
|
||||
CONFIG_CWMP_DEVEL_DEBUG
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
define Package/icwmp/default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=CWMP client
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libwolfssl +curl +libcurl +libopenssl
|
||||
MENU := 1
|
||||
TITLE:=TR069 CWMP client
|
||||
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libbbf_api
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
A free client implementation of CWMP (TR-069) protocol
|
||||
define Package/icwmp-openssl
|
||||
$(Package/icwmp/default)
|
||||
TITLE += (openssl)
|
||||
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
|
||||
VARIANT:=openssl
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
source "$(SOURCE)/Config_cwmp.in"
|
||||
define Package/icwmp-wolfssl
|
||||
$(Package/icwmp/default)
|
||||
TITLE += (wolfssl)
|
||||
DEPENDS += +PACKAGE_icwmp-wolfssl:libwolfssl
|
||||
CONFLICTS := icwmp-openssl
|
||||
VARIANT:=wolfssl
|
||||
endef
|
||||
|
||||
define Package/icwmp-mbedtls
|
||||
$(Package/icwmp/default)
|
||||
TITLE += (mbedtls)
|
||||
DEPENDS += +PACKAGE_icwmp-mbedtls:libmbedtls
|
||||
CONFLICTS := icwmp-openssl icwmp-wolfssl
|
||||
VARIANT:=mbedtls
|
||||
DEFAULT_VARIANT:=1
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),openssl)
|
||||
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),wolfssl)
|
||||
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
||||
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
|
||||
endif
|
||||
|
||||
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
|
||||
ifneq ($(USE_LOCAL),)
|
||||
define Build/Prepare
|
||||
@@ -55,58 +75,34 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE \
|
||||
"-DCWMP_REVISION=\\\"$(PKG_SOURCE_VERSION)\\\""
|
||||
|
||||
ifeq ($(CONFIG_CWMP_ACS_MULTI),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-acs=multi
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_ACS_HDM),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-acs=hdm
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_DEBUG),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-debug
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_DEVEL_DEBUG),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-devel
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_USE_WOLFSSL), y)
|
||||
CONFIGURE_ARGS += --enable-libwolfssl
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
|
||||
TARGET_LDFLAGS += "-lwolfssl"
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_USE_OPENSSL), y)
|
||||
CONFIGURE_ARGS += --enable-libopenssl
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
|
||||
TARGET_LDFLAGS += "-lssl"
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
define Package/icwmp/default/install
|
||||
$(INSTALL_DIR) $(1)/etc/icwmpd
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json/
|
||||
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libcwmpdm.so $(1)/usr/lib/bbfdm/libcwmpdm.so
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
|
||||
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
|
||||
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
|
||||
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/95-icwmp-generate-ssl $(1)/etc/uci-defaults/
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
|
||||
$(INSTALL_BIN) ./files/etc/icwmpd/update.sh $(1)/etc/icwmpd/update.sh
|
||||
$(INSTALL_DATA) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1)/etc/bbfdm/json/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
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-openssl))
|
||||
$(eval $(call BuildPackage,icwmp-wolfssl))
|
||||
$(eval $(call BuildPackage,icwmp-mbedtls))
|
||||
|
||||
36
icwmp/files/etc/bbfdm/json/CWMPManagementServer.json
Normal file
36
icwmp/files/etc/bbfdm/json/CWMPManagementServer.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"json_plugin_version": 1,
|
||||
"Device.CWMPManagementServer.": {
|
||||
"type": "object",
|
||||
"version": "2.15",
|
||||
"protocols": [
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"dependency": "file:/etc/config/cwmp",
|
||||
"EnableCWMP": {
|
||||
"type": "boolean",
|
||||
"version": "2.15",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "cwmp",
|
||||
"section": {
|
||||
"name": "cpe"
|
||||
},
|
||||
"option": {
|
||||
"name": "enable"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,12 +11,13 @@ config acs 'acs'
|
||||
option retry_min_wait_interval '5'
|
||||
# possible configs interval :[1000:65535]
|
||||
option retry_interval_multiplier '2000'
|
||||
option https_ssl_capath ''
|
||||
option ipv6_enable '0'
|
||||
option ip_version '4'
|
||||
|
||||
config cpe 'cpe'
|
||||
option enable '1'
|
||||
option default_wan_interface 'wan'
|
||||
option default_lan_interface 'lan'
|
||||
option log_to_console 'disable'
|
||||
option log_to_file 'disable'
|
||||
# log_severity: INFO (Default)
|
||||
@@ -31,12 +32,13 @@ config cpe 'cpe'
|
||||
option amd_version '5'
|
||||
# compression possible configs: InstanceNumber, InstanceAlias
|
||||
option instance_mode 'InstanceNumber'
|
||||
option session_timeout '60'
|
||||
option session_timeout '300'
|
||||
option notification '1'
|
||||
option exec_download '0'
|
||||
option periodic_notify_enable '1'
|
||||
option periodic_notify_interval '10'
|
||||
option incoming_rule 'Port_Only'
|
||||
option active_notif_throttle '0'
|
||||
|
||||
config lwn 'lwn'
|
||||
option enable '1'
|
||||
|
||||
@@ -20,13 +20,13 @@ if [ -z "${zone_name}" ]; then
|
||||
exit 0
|
||||
elif [ "$zone_name" = "icwmp" ]; then
|
||||
iptables -nL zone_icwmp_input 2> /dev/null
|
||||
if [ $? != 0 ]; then
|
||||
if [ "$?" != 0 ]; then
|
||||
iptables -w 1 -N zone_icwmp_input
|
||||
iptables -w 1 -t filter -A INPUT -j zone_icwmp_input
|
||||
iptables -w 1 -I zone_icwmp_input -p tcp --dport $port -j REJECT
|
||||
iptables -w 1 -I zone_icwmp_input -p tcp --dport "${port}" -j REJECT
|
||||
else
|
||||
iptables -w 1 -F zone_icwmp_input
|
||||
iptables -w 1 -I zone_icwmp_input -p tcp --dport $port -j REJECT
|
||||
iptables -w 1 -I zone_icwmp_input -p tcp --dport "${port}" -j REJECT
|
||||
fi
|
||||
else
|
||||
iptables -w 1 -F zone_icwmp_input 2> /dev/null
|
||||
@@ -64,13 +64,13 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ${cmd}|grep -q "\-\-dport \|\-s "
|
||||
echo "${cmd}"|grep -q "\-\-dport \|\-s "
|
||||
if [ "$?" -eq 0 ]; then
|
||||
cmd="${cmd} -j ACCEPT -m comment --comment=Open_ACS_port"
|
||||
${cmd}
|
||||
fi
|
||||
|
||||
echo ${cmd6}|grep -q "\-\-dport \|\-s "
|
||||
echo "${cmd6}"|grep -q "\-\-dport \|\-s "
|
||||
if [ "$?" -eq 0 ]; then
|
||||
cmd6="${cmd6} -j ACCEPT -m comment --comment=Open_ACS_port"
|
||||
${cmd6}
|
||||
|
||||
@@ -1,93 +1,32 @@
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
|
||||
log() {
|
||||
echo "$@" |logger -t cwmp.update -p info
|
||||
}
|
||||
|
||||
handle_icwmp_update() {
|
||||
local defwan vendorspecinf update
|
||||
local cwmp_enable
|
||||
config_load cwmp
|
||||
|
||||
update="0"
|
||||
defwan="$(uci -q get cwmp.cpe.default_wan_interface)"
|
||||
vendorspecinf="$(ifstatus "${defwan}" | jsonfilter -e "@.data.vendorspecinf")"
|
||||
config_get_bool cwmp_enable cpe enable 1
|
||||
if [ "$cwmp_enable" = "0" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
log "Handling dhcp option value [${vendorspecinf}]"
|
||||
[ -n "$vendorspecinf" ] && {
|
||||
local url old_url
|
||||
local prov_code old_prov_code
|
||||
local min_wait_interval old_min_wait_interval
|
||||
local retry_interval_multiplier old_retry_interval_multiplier
|
||||
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
|
||||
|
||||
old_url="$(uci -q get cwmp.acs.dhcp_url)"
|
||||
old_prov_code="$(uci -q get cwmp.cpe.dhcp_provisioning_code)"
|
||||
old_min_wait_interval="$(uci -q get cwmp.acs.dhcp_retry_min_wait_interval)"
|
||||
old_retry_interval_multiplier="$(uci -q get cwmp.acs.dhcp_retry_interval_multiplier)"
|
||||
|
||||
case $vendorspecinf in
|
||||
http://*|https://*)
|
||||
url="${vendorspecinf}"
|
||||
;;
|
||||
*)
|
||||
for optval in $vendorspecinf; do
|
||||
case $optval in
|
||||
1=*)
|
||||
url="$(echo "$optval" | cut -d"=" -f2-)"
|
||||
;;
|
||||
2=*)
|
||||
prov_code="$(echo "$optval" | cut -d"=" -f2-)"
|
||||
;;
|
||||
3=*)
|
||||
min_wait_interval="$(echo "$optval" | cut -d"=" -f2-)"
|
||||
;;
|
||||
4=*)
|
||||
retry_interval_multiplier="$(echo "$optval" | cut -d"=" -f2-)"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$url" ]; then
|
||||
if [ "${url}" != "${old_url}" ]; then
|
||||
log "## icwmp url[${old_url}] changed to [${url}]"
|
||||
uci -q set cwmp.acs.dhcp_url="$url"
|
||||
update=1
|
||||
fi
|
||||
if [ "$ret" = "true" ]; then
|
||||
# read status from var/state/cwmp
|
||||
status=$(uci -q -c /var/state get cwmp.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
|
||||
fi
|
||||
if [ -n "$prov_code" ]; then
|
||||
if [ "${prov_code}" != "${old_prov_code}" ]; then
|
||||
log "## icwmp prov_code[${old_prov_code}] changed to [${prov_code}]"
|
||||
uci -q set cwmp.cpe.dhcp_provisioning_code="$prov_code"
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
if [ -n "$min_wait_interval" ]; then
|
||||
if [ "${min_wait_interval}" != "${old_min_wait_interval}" ]; then
|
||||
log "## icwmp min_wait_interval[${old_min_wait_interval}] changed to [${min_wait_interval}]"
|
||||
uci -q set cwmp.acs.dhcp_retry_min_wait_interval="$min_wait_interval"
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
if [ -n "$retry_interval_multiplier" ]; then
|
||||
if [ "${retry_interval_multiplier}" != "${old_retry_interval_multiplier}" ]; then
|
||||
log "## icwmp retry_interval_multiplier[${old_retry_interval_multiplier}] changed to [${retry_interval_multiplier}]"
|
||||
uci -q set cwmp.acs.dhcp_retry_interval_multiplier="$retry_interval_multiplier"
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
if [ "${update}" -eq "1" ]; then
|
||||
log "CWMP uci changes, reload cwmp with uci commit"
|
||||
ubus call uci commit '{"config":"cwmp"}'
|
||||
else
|
||||
if ubus list tr069 >/dev/null 2>&1 ; then
|
||||
log "Trigger out of bound inform"
|
||||
ubus call tr069 inform
|
||||
else
|
||||
log "Restarting icwmp tr069 object not found"
|
||||
/etc/init.d/icwmpd restart
|
||||
fi
|
||||
log "Restarting icwmp tr069 object"
|
||||
/etc/init.d/icwmpd restart
|
||||
fi
|
||||
}
|
||||
|
||||
handle_icwmp_update
|
||||
handle_icwmp_update "$@"
|
||||
|
||||
@@ -15,12 +15,40 @@ log() {
|
||||
echo "${@}"|logger -t cwmp.init -p info
|
||||
}
|
||||
|
||||
regenerate_ssl_link()
|
||||
{
|
||||
local cert_dir all_file rehash
|
||||
|
||||
cert_dir="${1}"
|
||||
[ ! -d "${cert_dir}" ] && return 0;
|
||||
|
||||
### Generate all ssl link for pem certicates ###
|
||||
all_file=$(ls "${cert_dir}"/*.pem 2>/dev/null)
|
||||
if [ -n "${all_file}" ]; then
|
||||
for cfile in $all_file; do
|
||||
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
|
||||
[ -f "${cert_dir}"/"${rehash}".0 ] || \
|
||||
ln -s "${cfile}" "${cert_dir}"/"${rehash}".0
|
||||
done
|
||||
fi
|
||||
|
||||
### Generate all ssl link for crt certicates ###
|
||||
all_file=$(ls "${cert_dir}"/*.crt 2>/dev/null)
|
||||
if [ -n "${all_file}" ]; then
|
||||
for cfile in $all_file; do
|
||||
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
|
||||
[ -f "${cert_dir}"/"${rehash}".0 ] || \
|
||||
ln -s "${cfile}" "${cert_dir}"/"${rehash}".0
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
enable_dhcp_option43() {
|
||||
local wan="${1}"
|
||||
|
||||
### Ask for DHCP Option 43 only if CWMP is enabled ###
|
||||
local reqopts="$(uci -q get network.$wan.reqopts)"
|
||||
local proto="$(uci -q get network.$wan.proto)"
|
||||
local reqopts="$(uci -q get network."${wan}".reqopts)"
|
||||
local proto="$(uci -q get network."${wan}".proto)"
|
||||
local newreqopts=""
|
||||
local option43_present=0
|
||||
|
||||
@@ -36,8 +64,203 @@ enable_dhcp_option43() {
|
||||
fi
|
||||
|
||||
newreqopts="$reqopts 43"
|
||||
if [ "${proto}" == "dhcp" ]; then
|
||||
uci -q set network.$wan.reqopts="$newreqopts"
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
uci -q set network."${wan}".reqopts="$newreqopts"
|
||||
uci commit network
|
||||
ubus call network reload
|
||||
fi
|
||||
}
|
||||
|
||||
convert_to_hex() {
|
||||
local val=""
|
||||
local optval="${1}"
|
||||
OPTIND=1
|
||||
while getopts ":" opt "-$optval"
|
||||
do
|
||||
temp=$(printf "%02X" "'${OPTARG:-:}")
|
||||
val="${val}:${temp}"
|
||||
done
|
||||
|
||||
echo "${val}"
|
||||
}
|
||||
|
||||
configure_send_op125() {
|
||||
local sendopt="${1}"
|
||||
local intf="${2}"
|
||||
local uci="${3}"
|
||||
local hex_oui=""
|
||||
local hex_serial=""
|
||||
local hex_class=""
|
||||
local oui_len=0
|
||||
local serial_len=0
|
||||
local class_len=0
|
||||
|
||||
if [ "${uci}" = "network" ]; then
|
||||
local opt125="125:00:00:0D:E9"
|
||||
else
|
||||
local opt125="125,00:00:0D:E9"
|
||||
fi
|
||||
|
||||
config_get oui cpe manufacturer_oui ""
|
||||
if [ -z "${oui}" ]; then
|
||||
oui=$(db -q get device.deviceinfo.ManufacturerOUI)
|
||||
fi
|
||||
|
||||
oui=$(echo "${oui}" | tr 'a-f' 'A-F')
|
||||
|
||||
config_get serial cpe serial_number ""
|
||||
if [ -z "${serial}" ]; then
|
||||
serial=$(db -q get device.deviceinfo.SerialNumber)
|
||||
fi
|
||||
|
||||
config_get class cpe product_class ""
|
||||
if [ -z "${class}" ]; then
|
||||
class=$(db -q get device.deviceinfo.ProductClass)
|
||||
fi
|
||||
|
||||
oui_len=$(echo -n "${oui}" | wc -m)
|
||||
serial_len=$(echo -n "${serial}" | wc -m)
|
||||
class_len=$(echo -n "${class}" | wc -m)
|
||||
|
||||
if [ "${oui_len}" -eq 0 ] || [ "${serial_len}" -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
opt125_len=$((oui_len + serial_len + class_len))
|
||||
if [ "${class_len}" -gt 0 ]; then
|
||||
opt125_len=$((opt125_len + 6))
|
||||
else
|
||||
opt125_len=$((opt125_len + 4))
|
||||
fi
|
||||
|
||||
hex_opt125_len=$(printf "%02X" "${opt125_len}")
|
||||
opt125="${opt125}:${hex_opt125_len}"
|
||||
hex_oui=$(convert_to_hex "${oui}")
|
||||
if [ -z "${hex_oui}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
hex_oui_len=$(printf "%02X" "${oui_len}")
|
||||
if [ "${uci}" = "network" ]; then
|
||||
opt125="${opt125}:01:${hex_oui_len}${hex_oui}"
|
||||
else
|
||||
opt125="${opt125}:04:${hex_oui_len}${hex_oui}"
|
||||
fi
|
||||
|
||||
hex_serial=$(convert_to_hex "${serial}")
|
||||
if [ -z "${hex_serial}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
hex_serial_len=$(printf "%02X" "${serial_len}")
|
||||
if [ "${uci}" = "network" ]; then
|
||||
opt125="${opt125}:02:${hex_serial_len}${hex_serial}"
|
||||
else
|
||||
opt125="${opt125}:05:${hex_serial_len}${hex_serial}"
|
||||
fi
|
||||
|
||||
if [ "${class_len}" -gt 0 ]; then
|
||||
hex_class=$(convert_to_hex "${class}")
|
||||
if [ -z "${hex_class}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
hex_class_len=$(printf "%02X" "${class_len}")
|
||||
if [ "${uci}" = "network" ]; then
|
||||
opt125="${opt125}:03:${hex_class_len}${hex_class}"
|
||||
else
|
||||
opt125="${opt125}:06:${hex_class_len}${hex_class}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "${uci}" = "network" ]; then
|
||||
new_send_opt="$sendopt $opt125"
|
||||
uci -q set network."${intf}".sendopts="$new_send_opt"
|
||||
else
|
||||
uci -q add_list dhcp."${intf}".dhcp_option="$opt125"
|
||||
fi
|
||||
}
|
||||
|
||||
enable_dnsmasq_option125() {
|
||||
local lan="${1}"
|
||||
local send125_present=0
|
||||
local opt125="125,"
|
||||
|
||||
local proto="$(uci -q get dhcp."${lan}".dhcpv4)"
|
||||
if [ "${proto}" = "server" ]; then
|
||||
opt_list="$(uci -q get dhcp."${lan}".dhcp_option)"
|
||||
|
||||
for sopt in $opt_list; do
|
||||
if [[ "$sopt" == "$opt125"* ]]; then
|
||||
send125_present=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${send125_present} -eq 0 ]; then
|
||||
configure_send_op125 "" "${lan}" "dhcp"
|
||||
ubus call uci commit '{"config":"dhcp"}'
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
set_vendor_id() {
|
||||
local wan="${1}"
|
||||
local proto="$(uci -q get network."${wan}".proto)"
|
||||
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
vendorid="$(uci -q get network."${wan}".vendorid)"
|
||||
if [ -z "${vendorid}" ]; then
|
||||
uci -q set network."${wan}".vendorid="dslforum.org"
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
elif [[ $vendorid != *"dslforum.org"* ]]; then
|
||||
uci -q set network."${wan}".vendorid="${vendorid},dslforum.org"
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
enable_dhcp_option125() {
|
||||
local wan="${1}"
|
||||
local reqopts="$(uci -q get network."${wan}".reqopts)"
|
||||
local sendopts="$(uci -q get network."${wan}".sendopts)"
|
||||
local proto="$(uci -q get network."${wan}".proto)"
|
||||
local newreqopts=""
|
||||
local newsendopts=""
|
||||
local req125_present=0
|
||||
local send125_present=0
|
||||
local network_uci_update=0
|
||||
local opt125="125:"
|
||||
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
125) req125_present=1 ;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
for sopt in $sendopts; do
|
||||
if [[ "$sopt" == "$opt125"* ]]; then
|
||||
send125_present=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
if [ ${req125_present} -eq 0 ]; then
|
||||
newreqopts="$reqopts 125"
|
||||
uci -q set network."${wan}".reqopts="$newreqopts"
|
||||
network_uci_update=1
|
||||
fi
|
||||
|
||||
if [ ${send125_present} -eq 0 ]; then
|
||||
configure_send_op125 "${sendopts}" "${wan}" "network"
|
||||
network_uci_update=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${network_uci_update} -eq 1 ]; then
|
||||
uci commit network
|
||||
ubus call network reload
|
||||
fi
|
||||
@@ -60,12 +283,6 @@ wait_for_resolvfile() {
|
||||
copy_cwmp_etc_files_to_varstate() {
|
||||
mkdir -p /var/run/icwmpd
|
||||
|
||||
if [ -f /etc/icwmpd/cwmp ]; then
|
||||
uci -q -c /etc/icwmpd delete cwmp.acs
|
||||
uci -q -c /etc/icwmpd commit cwmp
|
||||
cp -f /etc/icwmpd/cwmp /var/state/cwmp
|
||||
fi
|
||||
|
||||
if [ -f /etc/icwmpd/icwmpd_backup_session.xml ]; then
|
||||
cp -f /etc/icwmpd/icwmpd_backup_session.xml /var/run/icwmpd/ 2>/dev/null
|
||||
fi
|
||||
@@ -84,10 +301,6 @@ copy_cwmp_varstate_files_to_etc() {
|
||||
cp -f /var/run/icwmpd/dm_enabled_notify /etc/icwmpd/ 2>/dev/null
|
||||
fi
|
||||
|
||||
if [ -f /var/state/cwmp ]; then
|
||||
cp -f /var/state/cwmp /etc/icwmpd/
|
||||
fi
|
||||
|
||||
# move the successful custom notify import marker to persistent storage
|
||||
if [ -f /var/run/icwmpd/icwmpd_notify_import_marker ]; then
|
||||
cp -f /var/run/icwmpd/icwmpd_notify_import_marker /etc/icwmpd/
|
||||
@@ -102,12 +315,13 @@ validate_acs_section()
|
||||
'periodic_inform_interval:uinteger' \
|
||||
'periodic_inform_time:string' \
|
||||
'url:string' \
|
||||
'dhcp_discovery:string' \
|
||||
'dhcp_url:string' \
|
||||
'compression:or("GZIP","Deflate","Disabled")' \
|
||||
'retry_min_wait_interval:range(1, 65535)' \
|
||||
'retry_interval_multiplier:range(1000, 65535)' \
|
||||
'https_ssl_capath:file' \
|
||||
'ipv6_enable:bool'
|
||||
'ipv6_enable:bool' \
|
||||
'ssl_capath:string'
|
||||
|
||||
}
|
||||
|
||||
@@ -136,6 +350,7 @@ validate_cpe_section()
|
||||
}
|
||||
|
||||
validate_defaults() {
|
||||
local ssl_capath
|
||||
config_load cwmp
|
||||
|
||||
validate_acs_section || {
|
||||
@@ -143,10 +358,15 @@ validate_defaults() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
[ -z "${url}" ] && [ -z "${dhcp_url}" ] && {
|
||||
log "ACS url is empty can't start"
|
||||
return 1;
|
||||
}
|
||||
ssl_capath="${ssl_capath%/}"
|
||||
# Put the cert pem file in keep list
|
||||
if [ -d "${ssl_capath}" ]; then
|
||||
if ! grep "*.pem\|*.crt" /lib/upgrade/keep.d/icwmp; then
|
||||
echo "${ssl_capath}"'/*.pem' >> /lib/upgrade/keep.d/icwmp
|
||||
echo "${ssl_capath}"'/*.crt' >> /lib/upgrade/keep.d/icwmp
|
||||
echo "${ssl_capath}"'/*.0' >> /lib/upgrade/keep.d/icwmp
|
||||
fi
|
||||
fi
|
||||
|
||||
validate_cpe_section || {
|
||||
log "Validation of cpe section failed"
|
||||
@@ -156,24 +376,55 @@ validate_defaults() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local enable_cwmp
|
||||
local wan_interface
|
||||
local dhcp_discovery
|
||||
boot() {
|
||||
local enable_cwmp="0"
|
||||
local dhcp_discovery="0"
|
||||
|
||||
config_load cwmp
|
||||
config_get_bool enable_cwmp cpe enable 1
|
||||
config_get dhcp_discovery acs dhcp_discovery
|
||||
config_get wan_interface cpe default_wan_interface "wan"
|
||||
|
||||
if [ "$enable_cwmp" = "0" ] || [ "$enable_cwmp" = "false" ]; then
|
||||
log "CWMP is not enabled"
|
||||
if [ "$enable_cwmp" = "0" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Set dhcp option 43 if dhcp discovery enabled
|
||||
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
|
||||
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
|
||||
enable_dhcp_option43 "${wan_interface}"
|
||||
# Set dhcp option 60
|
||||
set_vendor_id "${wan_interface}"
|
||||
fi
|
||||
|
||||
config_get lan_interface cpe default_lan_interface ""
|
||||
if [ -n "${lan_interface}" ]; then
|
||||
# Set dhcp_option 125 if not already configured
|
||||
enable_dhcp_option125 "${wan_interface}"
|
||||
enable_dnsmasq_option125 "${lan_interface}"
|
||||
fi
|
||||
|
||||
config_get ssl_capath acs ssl_capath
|
||||
|
||||
if [ -n "${ssl_capath}" ]; then
|
||||
regenerate_ssl_link "${ssl_capath}"
|
||||
fi
|
||||
|
||||
# Copy backup data so that if it restart latter on, it gets the info
|
||||
copy_cwmp_etc_files_to_varstate
|
||||
mkdir -p /var/run/icwmpd/
|
||||
touch /var/run/icwmpd/cwmp
|
||||
|
||||
start
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local enable_cwmp
|
||||
|
||||
config_load cwmp
|
||||
config_get_bool enable_cwmp cpe enable 1
|
||||
|
||||
if [ "$enable_cwmp" = "0" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
[ -f /sbin/netifd ] && log "Waiting for Network to be started ..." && ubus -t 5 wait_for network.interface
|
||||
@@ -185,9 +436,6 @@ start_service() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Copy backup data so that if it restart latter on it gets the info
|
||||
copy_cwmp_etc_files_to_varstate
|
||||
|
||||
procd_open_instance icwmp
|
||||
procd_set_param command "$PROG"
|
||||
procd_append_param command -b
|
||||
@@ -199,15 +447,39 @@ start_service() {
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_stopped()
|
||||
stop_service()
|
||||
{
|
||||
copy_cwmp_varstate_files_to_etc
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
log "Reloading CWMP client"
|
||||
ubus -t 1 call tr069 command '{"command":"reload"}'
|
||||
if [ "$?" -ne "0" ]; then
|
||||
local ret
|
||||
|
||||
config_load cwmp
|
||||
config_get_bool enable_cwmp cpe enable 1
|
||||
|
||||
ret="0"
|
||||
if [ "$enable_cwmp" = "0" ]; then
|
||||
stop
|
||||
start
|
||||
return 0
|
||||
fi
|
||||
|
||||
tr069_status="$(ubus -t 1 call tr069 status)"
|
||||
ret="$?"
|
||||
if [ "$ret" = "7" ]; then
|
||||
# ubus timed out may be due to uloop is busy in some task so returning
|
||||
return 0
|
||||
fi
|
||||
|
||||
status="$(echo "${tr069_status}" | jsonfilter -qe '@.cwmp.status')"
|
||||
ret="$?"
|
||||
if [ "$status" = "up" ]; then
|
||||
ubus -t 1 call tr069 command '{"command":"reload"}'
|
||||
ret="$?"
|
||||
fi
|
||||
|
||||
if [ "$status" = "init" ] || [ "$ret" -ne "0" ]; then
|
||||
log "Restarting CWMP client"
|
||||
stop
|
||||
start
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
# Copy defaults by the factory to the cwmp UCI user section.
|
||||
config_load cwmp
|
||||
|
||||
# Get Manufacturer OUI.
|
||||
oui=$(uci -q get cwmp.cpe.manufacturer_oui)
|
||||
config_get oui cpe manufacturer_oui ""
|
||||
if [ -z "${oui}" ]; then
|
||||
oui=$(db -q get device.deviceinfo.ManufacturerOUI)
|
||||
fi
|
||||
@@ -9,24 +13,29 @@ fi
|
||||
oui=$(echo "${oui}" | tr 'a-f' 'A-F')
|
||||
|
||||
# Get system serial number.
|
||||
serial=$(uci -q get cwmp.cpe.serial_number)
|
||||
config_get serial cpe serial_number ""
|
||||
if [ -z "${serial}" ]; then
|
||||
serial=$(db -q get device.deviceinfo.SerialNumber)
|
||||
fi
|
||||
|
||||
# Get userid values
|
||||
acs_userid=$(uci -q get cwmp.acs.userid)
|
||||
cpe_userid=$(uci -q get cwmp.cpe.userid)
|
||||
config_get acs_userid acs userid ""
|
||||
config_get cpe_userid cpe userid ""
|
||||
|
||||
# Only set if they are empty
|
||||
if [ -z "$acs_userid" ]
|
||||
then
|
||||
if [ -z "${acs_userid}" ]; then
|
||||
uci -q set cwmp.acs.userid="${oui}-${serial}"
|
||||
fi
|
||||
|
||||
if [ -z "$cpe_userid" ]
|
||||
then
|
||||
if [ -z "${cpe_userid}" ]; then
|
||||
uci -q set cwmp.cpe.userid="${oui}-${serial}"
|
||||
fi
|
||||
|
||||
# Fix the cwmp.cpe.enable parameter
|
||||
# set default to 1 if not defined
|
||||
config_get enable_cwmp cpe enable ""
|
||||
if [ -z "${enable_cwmp}" ]; then
|
||||
uci -q set cwmp.cpe.enable="1"
|
||||
fi
|
||||
|
||||
# No need for commit here, it is done by uci_apply_defaults().
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
regenerate_ssl_link(){
|
||||
[ ! -d "/etc/ssl/certs" ] && return 0;
|
||||
[ ! -f "/etc/ssl/certs/*.pem" ] && return 0;
|
||||
|
||||
local cert_dir="/etc/ssl/certs"
|
||||
local all_file=$(ls $cert_dir/*.pem)
|
||||
|
||||
for cfile in $all_file
|
||||
do
|
||||
ln -s $cfile $cert_dir/$(openssl x509 -hash -noout -in $cfile).0
|
||||
done
|
||||
}
|
||||
|
||||
regenerate_ssl_link
|
||||
@@ -1 +1,2 @@
|
||||
/var/run/icwmpd/icwmpd_backup_session.xml
|
||||
/etc/icwmpd/cwmp
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
if (PACKAGE_ieee1905)
|
||||
|
||||
menu "Configurations"
|
||||
menu "Configuration"
|
||||
|
||||
config IEEE1905_EXTENSION_ALLOWED
|
||||
bool "Allow plugins to extend 1905 CMDUs and/or TLVs"
|
||||
@@ -10,5 +10,18 @@ config IEEE1905_PLATFORM_HAS_WIFI
|
||||
bool "Platform has WiFi"
|
||||
default y if PACKAGE_libwifi
|
||||
|
||||
config IEEE1905_CMDU_SA_IS_ALMAC
|
||||
bool "Send CMDUs with SA set to 1905 AL-macaddress instead of interface macaddress"
|
||||
default n
|
||||
|
||||
config IEEE1905_WIFI_EASYMESH
|
||||
bool "Include WiFi-Alliance's Easymesh updates"
|
||||
default y
|
||||
|
||||
config IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
|
||||
bool "Fragment large CMDU frame at TLV boundary instead of octet boundary"
|
||||
default y
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
if (PACKAGE_map-plugin)
|
||||
|
||||
menu "Configurations"
|
||||
|
||||
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
|
||||
bool "Sync configuration between dynamic controllers in the network"
|
||||
default n
|
||||
|
||||
config MULTIAP_FUZZ_1905_CMDUS
|
||||
bool "Include support to fuzz 1905 CMDUs for testing purpose"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
endif
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=4.7.4
|
||||
PKG_VERSION:=8.0.12
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=efe39a957f8512243e6ee6044e91d8f5a97c318e
|
||||
PKG_SOURCE_VERSION:=b265053762a3d6c901872f29fa3e70b8666daf46
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -35,31 +35,21 @@ define Package/ieee1905/config
|
||||
endef
|
||||
|
||||
define Package/libieee1905
|
||||
$(call Package/ieee1905/Default,$(1))
|
||||
TITLE+= (library for CMDU and TLV handling)
|
||||
$(call Package/ieee1905/Default)
|
||||
TITLE:=libieee1905.so (library for CMDU and TLV handling)
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json
|
||||
endef
|
||||
|
||||
define Package/ieee1905
|
||||
$(call Package/ieee1905/Default,$(1))
|
||||
TITLE+= ieee1905d (daemon implementing 1905.1 and provides cli)
|
||||
$(call Package/ieee1905/Default)
|
||||
TITLE:=ieee1905d (daemon implementing 1905.1 and provides cli)
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +ubus +libpthread \
|
||||
+libieee1905 +IEEE1905_PLATFORM_HAS_WIFI:libwifi
|
||||
endef
|
||||
|
||||
|
||||
define Package/map-plugin
|
||||
$(call Package/ieee1905/Default,$(1))
|
||||
TITLE:=Multi-AP (Easymesh) plugin
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
|
||||
endef
|
||||
|
||||
define Package/map-plugin/config
|
||||
source "$(SOURCE)/Config.map-plugin.in"
|
||||
endef
|
||||
include $(wildcard plugins/*.mk)
|
||||
|
||||
define Package/ieee1905/description
|
||||
This package provides IEEE Std 1905.1 stack.
|
||||
@@ -69,6 +59,15 @@ define Package/libieee1905/description
|
||||
This package provides library functions for IEEE Std 1905.1 stack.
|
||||
endef
|
||||
|
||||
plugins := \
|
||||
$(if $(CONFIG_PACKAGE_map-plugin),map) \
|
||||
$(if $(CONFIG_PACKAGE_snoop-plugin),snoop) \
|
||||
$(if $(CONFIG_PACKAGE_topology-plugin),topology)
|
||||
|
||||
|
||||
ppkg:=$(patsubst plugins/%.mk,%-plugin,$(wildcard plugins/*.mk))
|
||||
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
@@ -78,10 +77,20 @@ ifeq ($(CONFIG_IEEE1905_PLATFORM_HAS_WIFI),y)
|
||||
TARGET_CFLAGS += -DHAS_WIFI
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
|
||||
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
|
||||
ifeq ($(CONFIG_IEEE1905_CMDU_SA_IS_ALMAC),y)
|
||||
TARGET_CFLAGS += -DCMDU_SA_IS_ALMAC
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IEEE1905_WIFI_EASYMESH),y)
|
||||
TARGET_CFLAGS += -DWIFI_EASYMESH
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY),y)
|
||||
TARGET_CFLAGS += -DIEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
|
||||
endif
|
||||
|
||||
MAKE_FLAGS += \
|
||||
extmod_subdirs="$(patsubst %,extensions/%,$(plugins))"
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
@@ -100,25 +109,6 @@ define Package/libieee1905/install
|
||||
$(CP) $(PKG_BUILD_DIR)/src/libmidgen.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/map-plugin/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
|
||||
endef
|
||||
|
||||
define Build/InstallDev/map-plugin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map2.h $(1)/usr/include/map2.h
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map_module.h $(1)/usr/include/map_module.h
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/cntlrsync.h $(1)/usr/include/cntlrsync.h
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
|
||||
endef
|
||||
|
||||
|
||||
define Build/InstallDev/libieee1905
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
@@ -136,7 +126,7 @@ endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(call Build/InstallDev/libieee1905,$(1),$(2))
|
||||
$(call Build/InstallDev/map-plugin,$(1),$(2))
|
||||
$(foreach p,$(ppkg),$(call Build/InstallDev/$(p),$(1),$(2)))
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
@@ -147,4 +137,4 @@ endif
|
||||
|
||||
$(eval $(call BuildPackage,ieee1905))
|
||||
$(eval $(call BuildPackage,libieee1905))
|
||||
$(eval $(call BuildPackage,map-plugin))
|
||||
$(eval $(foreach p,$(ppkg),$(call BuildPackage,$(p))))
|
||||
|
||||
@@ -2,21 +2,31 @@ config ieee1905 'ieee1905'
|
||||
option enabled '1'
|
||||
option extension '1'
|
||||
list extmodule 'map'
|
||||
option registrar '2 5'
|
||||
option registrar '2 5 6'
|
||||
# option macaddress '0a:1b:2c:3d:4e:50'
|
||||
|
||||
config al-iface
|
||||
option enabled '1'
|
||||
option ifname 'br-lan'
|
||||
option type 'bridge'
|
||||
|
||||
# ap sections are auto-generated/overwritten during onboarding
|
||||
#
|
||||
config ap
|
||||
option band '2'
|
||||
option ssid 'TestSSID.2'
|
||||
option encryption 'psk2'
|
||||
option key '5555500000'
|
||||
option ssid 'IOWRT-2.4GHz'
|
||||
option encryption 'sae-mixed'
|
||||
option key '1234567890'
|
||||
|
||||
config ap
|
||||
option band '5'
|
||||
option ssid 'TestSSID.5'
|
||||
option encryption 'psk2'
|
||||
option key '2222200000'
|
||||
option ssid 'IOWRT-5GHz'
|
||||
option encryption 'sae-mixed'
|
||||
option key '1234567890'
|
||||
|
||||
config ap
|
||||
option band '6'
|
||||
option ssid 'IOWRT-6GHz'
|
||||
option encryption 'sae-mixed'
|
||||
option key '1234567890'
|
||||
|
||||
config al-iface
|
||||
option enabled 1
|
||||
option ifname 'br-lan'
|
||||
option type 'bridge'
|
||||
@@ -42,9 +42,10 @@ validate_ap_section() {
|
||||
local section="$1"
|
||||
|
||||
uci_validate_section ieee1905 $section "${1}" \
|
||||
'band:or("2", "5", "60")' \
|
||||
'band:or("2", "5", "60", "6")' \
|
||||
'ssid:string' \
|
||||
'encryption:or("psk2", "sae-mixed", "sae", string)' \
|
||||
'encryption:or("psk2", "sae-mixed", "sae",
|
||||
"psk", "psk-mixed", "none", string)' \
|
||||
'key:string' \
|
||||
'uuid:string' \
|
||||
'manufacturer:string' \
|
||||
@@ -82,8 +83,10 @@ start_service() {
|
||||
validate_ieee1905_config || return 1;
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/ieee1905d"
|
||||
procd_set_param command "/usr/sbin/ieee1905d" "-o" "/tmp/ieee1905.log" "-f"
|
||||
procd_set_param respawn
|
||||
procd_set_param limits core="unlimited"
|
||||
# procd_set_param env IEEE1905_LOG_CMDU=1
|
||||
# procd_set_param stdout 1
|
||||
# procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
|
||||
22
ieee1905/files/etc/uci-defaults/30-set-ieee1905-al-macaddr
Normal file
22
ieee1905/files/etc/uci-defaults/30-set-ieee1905-al-macaddr
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
BMAC=$(db -q get hw.board.basemac)
|
||||
BMAC=${BMAC//:/}
|
||||
BMAC=${BMAC// /}
|
||||
BMAC=$(printf "%12.12X" $((0x$BMAC)))
|
||||
|
||||
[ "$BMAC" == "" ] && exit 1
|
||||
|
||||
LMAC=$((0x$BMAC & 0xfeffffffffff))
|
||||
LMAC=$(($LMAC | 0x020000000000))
|
||||
LMAC=$(printf "%12.12X" $LMAC)
|
||||
LMAC=$(echo $LMAC | sed -e 's/[0-9A-F]\{2\}/&:/g' -e 's/:$//')
|
||||
|
||||
mac=$(uci -q get ieee1905.ieee1905.macaddress)
|
||||
|
||||
[ "$mac" != "" ] && exit 0
|
||||
|
||||
uci set ieee1905.ieee1905.macaddress="$LMAC"
|
||||
uci commit ieee1905
|
||||
|
||||
18
ieee1905/files/etc/uci-defaults/31-ifname-option-to-list
Normal file
18
ieee1905/files/etc/uci-defaults/31-ifname-option-to-list
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
config_load ieee1905
|
||||
|
||||
ifname_to_list() {
|
||||
local section=$1
|
||||
|
||||
config_get ifname $section ifname # get list or option as space separated values
|
||||
ifname=${ifname//,/\ } # convert csv with space separation
|
||||
uci del ieee1905.${section}.ifname # delete entry
|
||||
for i in ${ifname}; do
|
||||
uci add_list ieee1905.${section}.ifname="$i" # writeback entry as list
|
||||
done
|
||||
}
|
||||
|
||||
config_foreach ifname_to_list al-iface
|
||||
51
ieee1905/plugins/map.mk
Normal file
51
ieee1905/plugins/map.mk
Normal file
@@ -0,0 +1,51 @@
|
||||
define Package/map-plugin
|
||||
$(call Package/ieee1905/Default)
|
||||
TITLE:=Multi-AP plugin supporting WiFi-Alliance Easymesh standard
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
|
||||
endef
|
||||
|
||||
define Package/map-plugin/config
|
||||
if (PACKAGE_map-plugin)
|
||||
|
||||
menu "Configuration"
|
||||
|
||||
config MULTIAP_EASYMESH_VERSION
|
||||
int "Easymesh version"
|
||||
default 2
|
||||
|
||||
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
|
||||
bool "Sync configuration between dynamic controllers in the network"
|
||||
default n
|
||||
|
||||
config MULTIAP_FUZZ_1905_CMDUS
|
||||
bool "Include support to fuzz 1905 CMDUs for testing purpose"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
endif
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_MULTIAP_EASYMESH_VERSION)
|
||||
|
||||
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
|
||||
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
|
||||
endif
|
||||
|
||||
define Build/InstallDev/map-plugin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/easymesh.h $(1)/usr/include/easymesh.h
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map_module.h $(1)/usr/include/map_module.h
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/cntlrsync.h $(1)/usr/include/cntlrsync.h
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
|
||||
endef
|
||||
|
||||
define Package/map-plugin/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
|
||||
endef
|
||||
12
ieee1905/plugins/snoop.mk
Normal file
12
ieee1905/plugins/snoop.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
define Package/snoop-plugin
|
||||
$(call Package/ieee1905/Default)
|
||||
TITLE:=Show all received 1905 CMDUs over UBUS
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
|
||||
endef
|
||||
|
||||
define Package/snoop-plugin/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/snoop/snoop.so $(1)/usr/lib/ieee1905/snoop.so
|
||||
endef
|
||||
12
ieee1905/plugins/topology.mk
Normal file
12
ieee1905/plugins/topology.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
define Package/topology-plugin
|
||||
$(call Package/ieee1905/Default)
|
||||
TITLE:=Build full network topology of the 1905 nodes only
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
|
||||
endef
|
||||
|
||||
define Package/topology-plugin/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/topology/topology.so $(1)/usr/lib/ieee1905/topology.so
|
||||
endef
|
||||
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=inbd
|
||||
PKG_VERSION:=1.2.2
|
||||
PKG_VERSION:=1.2.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=10f765f3d0fcc226b6ecf0c481598c9e7f76315e
|
||||
PKG_SOURCE_VERSION:=d4e910a31039e0c0b7a539311eafcd716c36be77
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
48
iop/config
48
iop/config
@@ -18,8 +18,21 @@ CONFIG_TARGET_ROOTFS_TARGZ=y
|
||||
# /etc/banner and /etc/device_info #
|
||||
CONFIG_IMAGEOPT=y
|
||||
CONFIG_VERSIONOPT=y
|
||||
CONFIG_VERSION_MANUFACTURER="iopsysWrt"
|
||||
CONFIG_VERSION_MANUFACTURER="IOPSYS"
|
||||
CONFIG_VERSION_MANUFACTURER_URL="https://iopsys.eu/"
|
||||
CONFIG_VERSION_DIST="IOWRT"
|
||||
|
||||
# OpenWrt is given by CONFIG_VERSION_NUMBER which we do not want to override.
|
||||
# disabling CONFIG_VERSION_FILENAMES will hide the OpenWrt version from the image filename
|
||||
# CONFIG_VERSION_FILENAMES is not set
|
||||
|
||||
# CONFIG_VERSION_CODE is set to the IOWRT version instead by the genconfig-script and
|
||||
# CONFIG_VERSION_CODE_FILENAMES will put it into the image filename.
|
||||
CONFIG_VERSION_CODE_FILENAMES=y
|
||||
|
||||
CONFIG_VERSION_HOME_URL="https://iopsys.eu"
|
||||
CONFIG_VERSION_BUG_URL="https://iopsys.eu"
|
||||
CONFIG_VERSION_SUPPORT_URL="https://iopsys.eu"
|
||||
|
||||
# /lib/preinit #
|
||||
CONFIG_PREINITOPT=y
|
||||
@@ -43,15 +56,15 @@ CONFIG_LOCALMIRROR="https://download.iopsys.eu/iopsys/mirror/"
|
||||
|
||||
# EasySoC HAL #
|
||||
CONFIG_PACKAGE_inbd=y
|
||||
CONFIG_PACKAGE_libwifi=y
|
||||
CONFIG_PACKAGE_peripheral_manager=y
|
||||
CONFIG_PACKAGE_port-management=y
|
||||
CONFIG_PACKAGE_qosmngr=y
|
||||
CONFIG_PACKAGE_libwifiutils=y
|
||||
CONFIG_PACKAGE_wifimngr=y
|
||||
|
||||
# Multi-AP #
|
||||
CONFIG_PACKAGE_ieee1905=y
|
||||
CONFIG_PACKAGE_map-agent=m
|
||||
CONFIG_PACKAGE_map-controller=m
|
||||
CONFIG_PACKAGE_map-topology=y
|
||||
CONFIG_PACKAGE_wfadatad=y
|
||||
CONFIG_PACKAGE_wfadatad-collector=y
|
||||
|
||||
# Network #
|
||||
@@ -63,17 +76,19 @@ CONFIG_PACKAGE_urlfilter=y
|
||||
CONFIG_PACKAGE_imonitor=m
|
||||
CONFIG_PACKAGE_questd=y
|
||||
CONFIG_PACKAGE_rulengd=y
|
||||
CONFIG_PACKAGE_usermngr=y
|
||||
|
||||
# TR-x69 #
|
||||
CONFIG_PACKAGE_uspd=y
|
||||
CONFIG_PACKAGE_icwmp=y
|
||||
CONFIG_PACKAGE_uspd-mbedtls=y
|
||||
CONFIG_PACKAGE_icwmp-mbedtls=y
|
||||
CONFIG_PACKAGE_obuspa=y
|
||||
CONFIG_PACKAGE_bulkdata=y
|
||||
CONFIG_PACKAGE_periodicstats=y
|
||||
CONFIG_PACKAGE_stunc=m
|
||||
CONFIG_PACKAGE_stunc-mbedtls=m
|
||||
CONFIG_PACKAGE_swmodd=m
|
||||
CONFIG_PACKAGE_twamp=m
|
||||
CONFIG_PACKAGE_udpechoserver=m
|
||||
CONFIG_PACKAGE_udpecho-client=m
|
||||
CONFIG_PACKAGE_udpecho-server=m
|
||||
CONFIG_PACKAGE_xmppc=m
|
||||
|
||||
# WebGUI #
|
||||
@@ -115,7 +130,8 @@ CONFIG_PACKAGE_xl2tpd=y
|
||||
CONFIG_PACKAGE_atftp=m
|
||||
CONFIG_PACKAGE_atftpd=m
|
||||
CONFIG_PACKAGE_ddns-scripts=y
|
||||
CONFIG_PACKAGE_miniupnpd=y
|
||||
CONFIG_PACKAGE_dnsmasq=y
|
||||
CONFIG_PACKAGE_ssdpd=y
|
||||
CONFIG_PACKAGE_mosquitto-client-ssl=y
|
||||
CONFIG_PACKAGE_mosquitto-ssl=y
|
||||
CONFIG_PACKAGE_nginx=y
|
||||
@@ -133,10 +149,12 @@ CONFIG_LIBCURL_CRYPTO_AUTH=y
|
||||
# CONFIG_LIBCURL_MBEDTLS is not set
|
||||
CONFIG_LIBCURL_OPENSSL=y
|
||||
CONFIG_PACKAGE_ethtool=y
|
||||
CONFIG_PACKAGE_ip-bridge=y
|
||||
CONFIG_PACKAGE_ip-full=y
|
||||
CONFIG_PACKAGE_iperf3=y
|
||||
CONFIG_PACKAGE_ipset=y
|
||||
CONFIG_PACKAGE_iptables=y
|
||||
CONFIG_PACKAGE_ip6tables-zz-legacy=y
|
||||
CONFIG_PACKAGE_iptables-zz-legacy=y
|
||||
CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
|
||||
CONFIG_PACKAGE_iptables-mod-filter=y
|
||||
CONFIG_PACKAGE_iptables-mod-ipopt=y
|
||||
@@ -161,6 +179,7 @@ CONFIG_PACKAGE_lscpu=y
|
||||
CONFIG_PACKAGE_nand-utils=y
|
||||
CONFIG_PACKAGE_openssl-util=y
|
||||
CONFIG_OPENSSL_WITH_COMPRESSION=y
|
||||
CONFIG_PACKAGE_procd-ujail=m
|
||||
CONFIG_PACKAGE_rpcd=y
|
||||
CONFIG_PACKAGE_rpcd-mod-rpcsys=y
|
||||
CONFIG_PACKAGE_rpcd-mod-rrdns=y
|
||||
@@ -284,3 +303,10 @@ 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
|
||||
|
||||
@@ -2,57 +2,65 @@
|
||||
|
||||
function feeds_update {
|
||||
|
||||
developer=0
|
||||
override=1
|
||||
start=$(date -u +'%s');
|
||||
while getopts "n" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
override=0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
developer=0
|
||||
override=1
|
||||
start=$(date -u +'%s')
|
||||
while getopts "n" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
override=0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
git remote -v | grep -qE '(git@|ssh://)' && developer=1
|
||||
|
||||
git remote -v | grep -qE '(git@|ssh://)' && developer=1
|
||||
cp .config .genconfig_config_bak
|
||||
|
||||
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
|
||||
fi
|
||||
#if -d argument is passed, clone feeds with ssh instead of http
|
||||
if [ $developer == 1 ]; then
|
||||
./scripts/feeds update -g
|
||||
else
|
||||
./scripts/feeds update
|
||||
fi
|
||||
./scripts/feeds update -ai
|
||||
|
||||
# replace core packages with iopsys versions
|
||||
if [ $override == 1 ]; then
|
||||
# replace core packages with iopsys versions
|
||||
if [ $override == 1 ]; then
|
||||
./scripts/feeds install -f -p openwrt_core -a
|
||||
fi
|
||||
fi
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# install all packages
|
||||
./scripts/feeds install -a
|
||||
# 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")"
|
||||
done
|
||||
|
||||
# remove broken symlinks ( for packages that are no longer in the feed )
|
||||
find -L package/feeds -maxdepth 2 -type l -delete
|
||||
# install all packages
|
||||
./scripts/feeds install -a
|
||||
|
||||
cp .genconfig_config_bak .config
|
||||
make defconfig
|
||||
# remove broken symlinks ( for packages that are no longer in the feed )
|
||||
find -L package/feeds -maxdepth 2 -type l -delete
|
||||
|
||||
# record when we last run this script
|
||||
touch tmp/.iop_bootstrap
|
||||
cp .genconfig_config_bak .config
|
||||
make defconfig
|
||||
|
||||
# always return true
|
||||
exit 0
|
||||
# record when we last run this script
|
||||
touch tmp/.iop_bootstrap
|
||||
|
||||
# always return true
|
||||
exit 0
|
||||
}
|
||||
|
||||
register_command "feeds_update" "Update feeds to point to commit hashes from feeds.conf"
|
||||
|
||||
|
||||
@@ -13,11 +13,12 @@ function genconfig {
|
||||
export DEVELOPER=0
|
||||
target="bogus"
|
||||
target_config_path=""
|
||||
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
|
||||
ramips="target/linux/iopsys-ramips"
|
||||
econet="target/linux/iopsys-econet"
|
||||
x86="target/linux/iopsys-x86"
|
||||
armvirt="target/linux/iopsys-armvirt"
|
||||
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"
|
||||
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
|
||||
|
||||
Red='\033[0;31m' # Red
|
||||
Color_Off='\033[0m' # Text Reset
|
||||
@@ -83,8 +84,8 @@ function genconfig {
|
||||
|
||||
[ -n "$profile" ] || return
|
||||
|
||||
if [ -n "$TARGET" -a -d "./target/linux/$TARGET" ]; then
|
||||
local targetpath="./target/linux/$TARGET"
|
||||
if [ -n "$TARGET" -a -d "./target/linux/feeds/$TARGET" ]; then
|
||||
local targetpath="./target/linux/feeds/$TARGET"
|
||||
local profiles=
|
||||
local pfound=0
|
||||
|
||||
@@ -107,19 +108,21 @@ function genconfig {
|
||||
return
|
||||
fi
|
||||
|
||||
[ -e $brcm63xx_arm/genconfig ] &&
|
||||
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
|
||||
[ -e $ramips/genconfig ] &&
|
||||
iopsys_ramips=$(cd $ramips; ./genconfig)
|
||||
[ -e $econet/genconfig ] &&
|
||||
iopsys_econet=$(cd $econet; ./genconfig)
|
||||
[ -e $x86/genconfig ] &&
|
||||
iopsys_x86=$(cd $x86; ./genconfig)
|
||||
[ -e $armvirt/genconfig ] &&
|
||||
iopsys_armvirt=$(cd $armvirt; ./genconfig)
|
||||
[ -e $brcmbca_feed/genconfig ] &&
|
||||
brcmbca=$(cd $brcmbca_feed; ./genconfig)
|
||||
[ -e $airoha_feed/genconfig ] &&
|
||||
airoha=$(cd $airoha_feed; ./genconfig)
|
||||
[ -e $x86_feed/genconfig ] &&
|
||||
iopsys_x86=$(cd $x86_feed; ./genconfig)
|
||||
[ -e $armvirt_feed/genconfig ] &&
|
||||
iopsys_armvirt=$(cd $armvirt_feed; ./genconfig)
|
||||
[ -e $mediatek_feed/genconfig ] &&
|
||||
iopsys_mediatek=$(cd $mediatek_feed; ./genconfig)
|
||||
[ -e $qualcomm_ipq95xx_feed/genconfig ] &&
|
||||
ipq95xx=$(cd $qualcomm_ipq95xx_feed; ./genconfig)
|
||||
|
||||
if [ "$profile" == "LIST" ]; then
|
||||
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_econet iopsys_x86 iopsys_armvirt; do
|
||||
for list in brcmbca airoha iopsys_x86 iopsys_armvirt iopsys_mediatek ipq95xx; do
|
||||
echo "$list based boards:"
|
||||
for b in ${!list}; do
|
||||
echo -e "\t$b"
|
||||
@@ -128,26 +131,18 @@ function genconfig {
|
||||
return
|
||||
fi
|
||||
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
for p in $brcmbca; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
target_config_path="$brcm63xx_arm/config"
|
||||
target="brcmbca"
|
||||
target_config_path="$brcmbca_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_ramips; do
|
||||
for p in $airoha; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_ramips"
|
||||
target_config_path="$ramips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_econet; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_econet"
|
||||
target_config_path="$econet/config"
|
||||
target="airoha"
|
||||
target_config_path="$airoha_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -155,7 +150,7 @@ function genconfig {
|
||||
for p in $iopsys_x86; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_x86"
|
||||
target_config_path="$x86/config"
|
||||
target_config_path="$x86_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -163,7 +158,23 @@ function genconfig {
|
||||
for p in $iopsys_armvirt; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_armvirt"
|
||||
target_config_path="$armvirt/config"
|
||||
target_config_path="$armvirt_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_mediatek; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_mediatek"
|
||||
target_config_path="$mediatek_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $ipq95xx; do
|
||||
if [ $p == $profile ]; then
|
||||
target="ipq95xx"
|
||||
target_config_path="$qualcomm_ipq95xx_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -254,11 +265,22 @@ function genconfig {
|
||||
setup_dirs()
|
||||
{
|
||||
git remote -v | grep -q http || {
|
||||
CUSTBRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||
if git ls-remote $CUSTREPO -q 2>/dev/null; then
|
||||
if [ ! -d "$CUSTPATH" ]; then
|
||||
git clone "$CUSTREPO" "$CUSTPATH"
|
||||
echo "Cloning $CUSTBRANCH branch of $CUSTREPO"
|
||||
git clone -b "$CUSTBRANCH" "$CUSTREPO" "$CUSTPATH" 2>/dev/null || {
|
||||
DEFBRANCH="$(git remote show $CUSTREPO | grep 'HEAD branch' | cut -d' ' -f5)"
|
||||
echo "$CUSTBRANCH branch is not found, cloning $DEFBRANCH branch of $CUSTREPO"
|
||||
git clone "$CUSTREPO" "$CUSTPATH"
|
||||
}
|
||||
elif [ $IMPORT -eq 1 ]; then
|
||||
cd $CUSTPATH
|
||||
echo "Checking out $CUSTBRANCH branch in $CUSTPATH"
|
||||
git checkout "$CUSTBRANCH" 2>/dev/null || {
|
||||
DEFBRANCH="$(git symbolic-ref refs/remotes/origin/HEAD | cut -d '/' -f4)"
|
||||
echo "Checking out $CUSTBRANCH branch has failed, using $DEFBRANCH branch in $CUSTPATH"
|
||||
}
|
||||
v "git pull"
|
||||
git pull
|
||||
cd - >/dev/null #go back
|
||||
@@ -318,20 +340,26 @@ function genconfig {
|
||||
echo "" >> .config
|
||||
fi
|
||||
|
||||
# Special handling for targets which use TARGET_DEVICES
|
||||
if [ "$target" = "iopsys_ramips" ]; then
|
||||
subtarget="mt7621"
|
||||
# Special handling for targets which use TARGET_DEVICES
|
||||
case "$target" in
|
||||
airoha | iopsys_mediatek | brcmbca | ipq95xx)
|
||||
# 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
|
||||
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
|
||||
elif [ "$target" = "iopsys_econet" ]; then
|
||||
subtarget="en7562"
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
else
|
||||
;;
|
||||
*)
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
|
||||
|
||||
@@ -360,12 +388,15 @@ function genconfig {
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
local GIT_TAG=$(git describe --abbrev=0 --tags)
|
||||
local GIT_REV=$(git rev-parse --short HEAD)
|
||||
local GIT_VER="$GIT_TAG"
|
||||
git describe --contains $GIT_REV >/dev/null 2>&1 || GIT_VER="${GIT_TAG}_${GIT_REV}"
|
||||
echo "CONFIG_TARGET_VERSION=\"${GIT_VER}\"" >> .config
|
||||
echo "CONFIG_VERSION_CODE=\"${GIT_VER}\"" >> .config
|
||||
local git_version
|
||||
if ! git_version="$(git describe --always --dirty --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
|
||||
echo "ERROR: Failed getting version via git describe, exiting." >&2
|
||||
return 1
|
||||
fi
|
||||
local version="${git_version,,}${CUSTOMERS:+-${CUSTOMERS// /}}"
|
||||
local version_lower="${version,,}"
|
||||
echo "CONFIG_TARGET_VERSION=\"${version_lower}\"" >> .config
|
||||
echo "CONFIG_VERSION_CODE=\"${version_lower}\"" >> .config
|
||||
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
|
||||
|
||||
# Enable Package source tree override if selected
|
||||
|
||||
@@ -12,11 +12,12 @@ function genconfig_min {
|
||||
export DEVELOPER=0
|
||||
target="bogus"
|
||||
target_config_path=""
|
||||
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
|
||||
ramips="target/linux/iopsys-ramips"
|
||||
econet="target/linux/iopsys-econet"
|
||||
x86="target/linux/iopsys-x86"
|
||||
armvirt="target/linux/iopsys-armvirt"
|
||||
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"
|
||||
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
|
||||
|
||||
Red='\033[0;31m' # Red
|
||||
Color_Off='\033[0m' # Text Reset
|
||||
@@ -82,8 +83,8 @@ function genconfig_min {
|
||||
|
||||
[ -n "$profile" ] || return
|
||||
|
||||
if [ -n "$TARGET" -a -d "./target/linux/$TARGET" ]; then
|
||||
local targetpath="./target/linux/$TARGET"
|
||||
if [ -n "$TARGET" -a -d "./target/linux/feeds/$TARGET" ]; then
|
||||
local targetpath="./target/linux/feeds/$TARGET"
|
||||
local profiles=
|
||||
local pfound=0
|
||||
|
||||
@@ -106,19 +107,21 @@ function genconfig_min {
|
||||
return
|
||||
fi
|
||||
|
||||
[ -e $brcm63xx_arm/genconfig ] &&
|
||||
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
|
||||
[ -e $ramips/genconfig ] &&
|
||||
iopsys_ramips=$(cd $ramips; ./genconfig)
|
||||
[ -e $econet/genconfig ] &&
|
||||
iopsys_econet=$(cd $econet; ./genconfig)
|
||||
[ -e $x86/genconfig ] &&
|
||||
iopsys_x86=$(cd $x86; ./genconfig)
|
||||
[ -e $armvirt/genconfig ] &&
|
||||
iopsys_armvirt=$(cd $armvirt; ./genconfig)
|
||||
[ -e $brcmbca_feed/genconfig ] &&
|
||||
brcmbca=$(cd $brcmbca_feed; ./genconfig)
|
||||
[ -e $airoha_feed/genconfig ] &&
|
||||
airoha=$(cd $airoha_feed; ./genconfig)
|
||||
[ -e $x86_feed/genconfig ] &&
|
||||
iopsys_x86=$(cd $x86_feed; ./genconfig)
|
||||
[ -e $armvirt_feed/genconfig ] &&
|
||||
iopsys_armvirt=$(cd $armvirt_feed; ./genconfig)
|
||||
[ -e $mediatek_feed/genconfig ] &&
|
||||
iopsys_mediatek=$(cd $mediatek_feed; ./genconfig)
|
||||
[ -e $qualcomm_ipq95xx_feed/genconfig ] &&
|
||||
ipq95xx=$(cd $qualcomm_ipq95xx_feed; ./genconfig)
|
||||
|
||||
if [ "$profile" == "LIST" ]; then
|
||||
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_econet iopsys_x86 iopsys_armvirt; do
|
||||
for list in brcmbca airoha iopsys_x86 iopsys_armvirt iopsys_mediatek ipq95xx; do
|
||||
echo "$list based boards:"
|
||||
for b in ${!list}; do
|
||||
echo -e "\t$b"
|
||||
@@ -127,26 +130,18 @@ function genconfig_min {
|
||||
return
|
||||
fi
|
||||
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
for p in $brcmbca; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
target_config_path="$brcm63xx_arm/config"
|
||||
target="brcmbca"
|
||||
target_config_path="$brcmbca_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_ramips; do
|
||||
for p in $airoha; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_ramips"
|
||||
target_config_path="$ramips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_econet; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_econet"
|
||||
target_config_path="$econet/config"
|
||||
target="airoha"
|
||||
target_config_path="$airoha_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -154,7 +149,7 @@ function genconfig_min {
|
||||
for p in $iopsys_x86; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_x86"
|
||||
target_config_path="$x86/config"
|
||||
target_config_path="$x86_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -162,7 +157,23 @@ function genconfig_min {
|
||||
for p in $iopsys_armvirt; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_armvirt"
|
||||
target_config_path="$armvirt/config"
|
||||
target_config_path="$armvirt_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_mediatek; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_mediatek"
|
||||
target_config_path="$mediatek_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $ipq95xx; do
|
||||
if [ $p == $profile ]; then
|
||||
target="ipq95xx"
|
||||
target_config_path="$qualcomm_ipq95xx_feed/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -170,12 +181,6 @@ function genconfig_min {
|
||||
|
||||
git remote -v | grep -qE '(git@|ssh://)' && {
|
||||
DEVELOPER=1
|
||||
|
||||
bcmAllowed=0
|
||||
endptAllowed=0
|
||||
|
||||
git ls-remote git@dev.iopsys.eu:broadcom/bcmcreator.git -q 2>/dev/null && bcmAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:iopsys/endptmngr.git -q 2>/dev/null && endptAllowed=1
|
||||
}
|
||||
|
||||
v() {
|
||||
@@ -310,19 +315,25 @@ function genconfig_min {
|
||||
fi
|
||||
|
||||
# Special handling for targets which use TARGET_DEVICES
|
||||
if [ "$target" = "iopsys_ramips" ]; then
|
||||
subtarget="mt7621"
|
||||
case "$target" in
|
||||
airoha | iopsys_mediatek | brcmbca | ipq95xx)
|
||||
# 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
|
||||
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
|
||||
elif [ "$target" = "iopsys_econet" ]; then
|
||||
subtarget="en7562"
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
else
|
||||
;;
|
||||
*)
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
|
||||
|
||||
@@ -351,12 +362,15 @@ function genconfig_min {
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
local GIT_TAG=$(git describe --abbrev=0 --tags)
|
||||
local GIT_REV=$(git rev-parse --short HEAD)
|
||||
local GIT_VER="$GIT_TAG"
|
||||
git describe --contains $GIT_REV >/dev/null 2>&1 || GIT_VER="${GIT_TAG}_${GIT_REV}"
|
||||
echo "CONFIG_TARGET_VERSION=\"${GIT_VER}\"" >> .config
|
||||
echo "CONFIG_VERSION_CODE=\"${GIT_VER}\"" >> .config
|
||||
local git_version
|
||||
if ! git_version="$(git describe --always --dirty --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
|
||||
echo "ERROR: Failed getting version via git describe, exiting." >&2
|
||||
return 1
|
||||
fi
|
||||
local version="${git_version,,}${CUSTOMERS:+-${CUSTOMERS// /}}"
|
||||
local version_lower="${version,,}"
|
||||
echo "CONFIG_TARGET_VERSION=\"${version_lower}\"" >> .config
|
||||
echo "CONFIG_VERSION_CODE=\"${version_lower}\"" >> .config
|
||||
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
|
||||
|
||||
# Enable Package source tree override if selected
|
||||
|
||||
@@ -48,7 +48,10 @@ function ssh_install_key {
|
||||
local keys="$(get_ssh_public_keys)"
|
||||
echo "Adding the following keys to $DROPBEAR_AUTHORIZED_KEYS_FILE on $host:"
|
||||
echo "$keys"
|
||||
ssh root@$host "echo '$keys' >> '$DROPBEAR_AUTHORIZED_KEYS_FILE'" && echo ok
|
||||
ssh \
|
||||
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
|
||||
root@$host \
|
||||
"echo '$keys' >> '$DROPBEAR_AUTHORIZED_KEYS_FILE'" && echo ok
|
||||
}
|
||||
|
||||
register_command "ssh_install_key" "Install the users public ssh key on host running dropbear"
|
||||
|
||||
@@ -1,344 +1,283 @@
|
||||
# this is a developer helper script to install firmware on a remote host with SSH
|
||||
|
||||
function upd_usage {
|
||||
echo "usage: $0 iopupgrade -t <host> -f <file> [opts] "
|
||||
echo ""
|
||||
echo " Default host is 192.168.1.1"
|
||||
echo " Default firmware file is the newest one found"
|
||||
echo " Default is to not keep configuration"
|
||||
echo "opts:"
|
||||
echo ""
|
||||
echo " -i Interactive use, Allows to select firmware file"
|
||||
echo " -n Do not do the final reboot of the target board"
|
||||
echo " -c Keep configuration"
|
||||
echo " -x Force install even if firmware is not for this board"
|
||||
echo " -b Force install of bootloader regardless of version installed"
|
||||
echo " -s Use sysupgade. old upgrade method, needed for old releases that do not have iopu"
|
||||
echo "usage: $0 ssh_upgrade [-t <host>] [-f <file>] [opts] "
|
||||
echo ""
|
||||
echo " Default host is 192.168.1.1"
|
||||
echo " Default firmware file is the latest one (last.{itb,pkgtb})"
|
||||
echo " Default is to not keep configuration"
|
||||
echo "opts:"
|
||||
echo ""
|
||||
echo " -i Interactive use, allows to select firmware file"
|
||||
echo " -n Do not do the final reboot of the target board"
|
||||
echo " -c Keep configuration"
|
||||
echo " -x Force install even if firmware is not for this board"
|
||||
echo " -b Force install of bootloader regardless of version installed"
|
||||
}
|
||||
|
||||
function set_config_string {
|
||||
eval `grep $1 .config`
|
||||
eval $(grep $1 .config)
|
||||
}
|
||||
|
||||
function upd_ask_ok {
|
||||
echo "Will Continue with the following settings"
|
||||
echo "-----------------------------------------"
|
||||
printf "%20s: %s\n" "Firmare file" "$upd_fw_base"
|
||||
printf "%20s: %s\n" "Host ip" "$upd_host"
|
||||
printf "%20s: " "Reboot"; if [ "$upd_noreboot" == "0" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
printf "%20s: " "Keep config"; if [ "$upd_keepconf" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
printf "%20s: " "Force bootloader"; if [ "$upd_forceboot" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
printf "%20s: " "Force image upgrade"; if [ "$upd_forceimage" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
printf "%20s: " "Use sysupgrade"; if [ "$upd_sysupgrade" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
echo "-----------------------------------------"
|
||||
echo "Will continue with the following settings:"
|
||||
echo "-----------------------------------------"
|
||||
printf "%20s: %s\n" "Firmware file" "$upd_fw_base"
|
||||
printf "%20s: %s\n" "Host IP" "$upd_host"
|
||||
printf "%20s: " "Reboot"
|
||||
if [ "$upd_noreboot" == "0" ]; then printf "Yes\n"; else printf "No\n"; fi
|
||||
printf "%20s: " "Keep config"
|
||||
if [ "$upd_keepconf" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
|
||||
printf "%20s: " "Force bootloader"
|
||||
if [ "$upd_forceboot" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
|
||||
printf "%20s: " "Force image upgrade"
|
||||
if [ "$upd_forceimage" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
|
||||
echo "-----------------------------------------"
|
||||
|
||||
if [ "$upd_sysupgrade" == "0" ]
|
||||
then
|
||||
if [ "$upd_keepconf" == "1" ] ;then echo "keeping config is just a fantasy it's not yet implemented, try sysupgrade";fi
|
||||
fi
|
||||
echo -n "Continue? [Y/n/q]:"
|
||||
read answer
|
||||
|
||||
echo -n "Continue? [Y/n/q]:"
|
||||
read answer
|
||||
|
||||
case $answer in
|
||||
n|N)
|
||||
return 1;;
|
||||
q|Q)
|
||||
exit 1;;
|
||||
y|Y|*)
|
||||
return 0;;
|
||||
esac
|
||||
case $answer in
|
||||
n | N)
|
||||
return 1
|
||||
;;
|
||||
q | Q)
|
||||
exit 1
|
||||
;;
|
||||
y | Y | *)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_file {
|
||||
dialog --keep-tite --title "To select a file, use TAB/ARROW to highlight then press SPACEBAR -> RETURN" \
|
||||
--fselect "${upd_fw:-bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/}" \
|
||||
$((lines - 10)) $((cols - 5)) \
|
||||
2>$tempfile
|
||||
|
||||
dialog --keep-tite --title "To select file use TAB/ARROW to hilight then press SPACEBAR -> RETURN" \
|
||||
--fselect "bin/targets/$CONFIG_TARGET_BOARD/generic/" \
|
||||
$((lines -10)) $((cols -5)) \
|
||||
2> $tempfile
|
||||
|
||||
new_file=$(cat $tempfile)
|
||||
if [ -n "$new_file" ]
|
||||
then
|
||||
upd_fw="$new_file"
|
||||
upd_fw_base=$(basename $upd_fw);
|
||||
fi
|
||||
new_file=$(cat $tempfile)
|
||||
if [ -n "$new_file" ]; then
|
||||
upd_fw="$new_file"
|
||||
upd_fw_base=$(basename $upd_fw)
|
||||
fi
|
||||
}
|
||||
|
||||
function upd_select_target {
|
||||
dialog --keep-tite --title "Input the hostname/IP of the target board" \
|
||||
--inputbox "Name/IP" \
|
||||
$((lines - 10)) $((cols - 5)) \
|
||||
"$upd_host" \
|
||||
2>$tempfile
|
||||
|
||||
dialog --keep-tite --title "Input the name/ip number of target board" \
|
||||
--inputbox "Name/IP" \
|
||||
$((lines -10)) $((cols -5)) \
|
||||
"$upd_host" \
|
||||
2> $tempfile
|
||||
|
||||
new_file=$(cat $tempfile)
|
||||
if [ -n "$new_file" ]
|
||||
then
|
||||
upd_host="$new_file"
|
||||
fi
|
||||
new_file=$(cat $tempfile)
|
||||
if [ -n "$new_file" ]; then
|
||||
upd_host="$new_file"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function upd_select_reboot {
|
||||
dialog --keep-tite --radiolist "Should the board reboot after download finished" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Reboot" "Restart board after done" `if [ "$upd_noreboot" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"No reboot" "Continue running old system" `if [ "$upd_noreboot" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
dialog --keep-tite --radiolist "Should the board reboot after download finished" \
|
||||
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
|
||||
"Reboot" "Restart board after done" $(if [ "$upd_noreboot" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
|
||||
"No reboot" "Continue running old system" $(if [ "$upd_noreboot" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
|
||||
2>$tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"No reboot")
|
||||
upd_noreboot=1
|
||||
;;
|
||||
upd_noreboot=1
|
||||
;;
|
||||
"Reboot")
|
||||
upd_noreboot=0
|
||||
;;
|
||||
esac
|
||||
upd_noreboot=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_config {
|
||||
dialog --keep-tite --radiolist "Should the configuration be keept" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Keep" "Keep the config from old system" `if [ "$upd_keepconf" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"Default" "Use default config for new system" `if [ "$upd_keepconf" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
dialog --keep-tite --radiolist "Should the configuration be kept" \
|
||||
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
|
||||
"Keep" "Keep the config from old system" $(if [ "$upd_keepconf" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
|
||||
"Default" "Use default config for new system" $(if [ "$upd_keepconf" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
|
||||
2>$tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"Keep")
|
||||
upd_keepconf=1
|
||||
;;
|
||||
upd_keepconf=1
|
||||
;;
|
||||
"Default")
|
||||
upd_keepconf=0
|
||||
;;
|
||||
esac
|
||||
upd_keepconf=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_forceboot {
|
||||
dialog --keep-tite --radiolist "Should the boot loader be updated reagardless of version installed" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Force" "Alwasy update boot loader" `if [ "$upd_forceboot" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"Version check" "Only upgrade if version is newer" `if [ "$upd_forceboot" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
dialog --keep-tite --radiolist "Should the boot loader be updated regardless of the version installed" \
|
||||
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
|
||||
"Force" "Always update boot loader" $(if [ "$upd_forceboot" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
|
||||
"Version check" "Only upgrade if version is newer" $(if [ "$upd_forceboot" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
|
||||
2>$tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"Force")
|
||||
upd_forceboot=1
|
||||
;;
|
||||
upd_forceboot=1
|
||||
;;
|
||||
"Version check")
|
||||
upd_forceboot=0
|
||||
;;
|
||||
esac
|
||||
upd_forceboot=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_forceimage {
|
||||
dialog --keep-tite --radiolist "Should the image be stored in flash even if sanity checks would reject it" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Force" "Dissable sanity check and force use of image (dangerous)" `if [ "$upd_forceimage" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"Only compatible" "Normal checks apply" `if [ "$upd_forceimage" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
dialog --keep-tite --radiolist "Should the image be stored in flash even if sanity checks would reject it" \
|
||||
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
|
||||
"Force" "Disable sanity check and force use of image (dangerous)" $(if [ "$upd_forceimage" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
|
||||
"Only compatible" "Normal checks apply" $(if [ "$upd_forceimage" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
|
||||
2>$tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"Force")
|
||||
upd_forceimage=1
|
||||
;;
|
||||
upd_forceimage=1
|
||||
;;
|
||||
"Only compatible")
|
||||
upd_forceimage=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_sysupgrade {
|
||||
dialog --keep-tite --radiolist "Use the old way to upgrade a board" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"iopu" "Use the iop upgrade methode" `if [ "$upd_sysupgrade" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"sysupgrade" "Use the old sysupgrade methode" `if [ "$upd_sysupgrade" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"iopu")
|
||||
upd_sysupgrade=0
|
||||
;;
|
||||
"sysupgrade")
|
||||
upd_sysupgrade=1
|
||||
;;
|
||||
esac
|
||||
upd_forceimage=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select {
|
||||
dialog --keep-tite --ok-label "Select" --cancel-label "Done" --menu "Select item to change" \
|
||||
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
|
||||
"Firmware file" "$upd_fw_base" \
|
||||
"Host IP" "$upd_host" \
|
||||
"Reboot" $(if [ "$upd_noreboot" == "0" ]; then printf "Yes\n"; else printf "No\n"; fi) \
|
||||
"Keep config" $(if [ "$upd_keepconf" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
|
||||
"Force bootloader" $(if [ "$upd_forceboot" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
|
||||
"Force image upgrade" $(if [ "$upd_forceimage" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
|
||||
2>$tempfile
|
||||
|
||||
dialog --keep-tite --ok-label "Select" --cancel-label "Done" --menu "Select Item to change" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Firmare file" "$upd_fw_base"\
|
||||
"Host ip" "$upd_host" \
|
||||
"Reboot" `if [ "$upd_noreboot" == "0" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
"Keep config" `if [ "$upd_keepconf" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
"Force bootloader" `if [ "$upd_forceboot" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
"Force image upgrade" `if [ "$upd_forceimage" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
"sysupgrade" `if [ "$upd_sysupgrade" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
2> $tempfile
|
||||
|
||||
|
||||
case $(cat $tempfile) in
|
||||
"Firmare file")
|
||||
upd_select_file
|
||||
;;
|
||||
"Host ip")
|
||||
upd_select_target
|
||||
;;
|
||||
case $(cat $tempfile) in
|
||||
"Firmware file")
|
||||
upd_select_file
|
||||
;;
|
||||
"Host IP")
|
||||
upd_select_target
|
||||
;;
|
||||
"Reboot")
|
||||
upd_select_reboot
|
||||
;;
|
||||
upd_select_reboot
|
||||
;;
|
||||
"Keep config")
|
||||
upd_select_config
|
||||
;;
|
||||
upd_select_config
|
||||
;;
|
||||
"Force bootloader")
|
||||
upd_select_forceboot
|
||||
;;
|
||||
upd_select_forceboot
|
||||
;;
|
||||
"Force image upgrade")
|
||||
upd_select_forceimage
|
||||
;;
|
||||
"sysupgrade")
|
||||
upd_select_sysupgrade
|
||||
;;
|
||||
upd_select_forceimage
|
||||
;;
|
||||
*)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
upd_select
|
||||
return
|
||||
;;
|
||||
esac
|
||||
upd_select
|
||||
}
|
||||
function upd_select_start {
|
||||
lines=$(tput lines)
|
||||
cols=$(tput cols)
|
||||
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
|
||||
trap "rm -f $tempfile" 0 1 2 5 15
|
||||
upd_select
|
||||
lines=$(tput lines)
|
||||
cols=$(tput cols)
|
||||
tempfile="$(mktemp)"
|
||||
trap "rm -f $tempfile" 0 1 2 5 15
|
||||
upd_select
|
||||
|
||||
}
|
||||
|
||||
function ssh_upgrade {
|
||||
upd_noreboot=0
|
||||
upd_forceboot=0
|
||||
upd_keepconf=0
|
||||
upd_forceimage=0
|
||||
upd_fw_base=""
|
||||
upd_fw=""
|
||||
upd_host="192.168.1.1"
|
||||
upd_sysupgrade=1
|
||||
do_dialog=0
|
||||
upd_noreboot=0
|
||||
upd_forceboot=0
|
||||
upd_keepconf=0
|
||||
upd_forceimage=0
|
||||
upd_fw_base=""
|
||||
upd_fw=""
|
||||
upd_host="192.168.1.1"
|
||||
do_dialog=0
|
||||
|
||||
while getopts "f:hnxt:iscb" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
upd_noreboot=1
|
||||
;;
|
||||
x)
|
||||
upd_forceimage=1
|
||||
;;
|
||||
b)
|
||||
upd_forceboot=1
|
||||
;;
|
||||
c)
|
||||
upd_keepconf=1
|
||||
;;
|
||||
v)
|
||||
verbose=$OPTARG
|
||||
;;
|
||||
f)
|
||||
upd_fw=$OPTARG
|
||||
;;
|
||||
t)
|
||||
upd_host=$OPTARG
|
||||
;;
|
||||
i)
|
||||
do_dialog=1
|
||||
;;
|
||||
s)
|
||||
upd_sysupgrade=1
|
||||
;;
|
||||
h)
|
||||
upd_usage
|
||||
exit 1
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$upd_fw" ]
|
||||
then
|
||||
upd_fw_base=$(basename $upd_fw);
|
||||
else
|
||||
set_config_string CONFIG_TARGET_BOARD
|
||||
firmwares=$(cd bin/targets/$CONFIG_TARGET_BOARD/generic/; ls -t *[0-9].y[3])
|
||||
|
||||
# if target uses pkgtb
|
||||
if [ -z "$firmwares"]
|
||||
then
|
||||
# pkgtb files can not be streamed so copy over the file witch scp
|
||||
use_scp=1
|
||||
firmwares=$(cd bin/targets/$CONFIG_TARGET_BOARD/generic/; ls -t last.pkgtb)
|
||||
fi
|
||||
|
||||
for upd_fw_base in $firmwares
|
||||
do
|
||||
#echo "firmware $upd_fw"
|
||||
break
|
||||
while getopts "f:hnxt:icb" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
upd_noreboot=1
|
||||
;;
|
||||
x)
|
||||
upd_forceimage=1
|
||||
;;
|
||||
b)
|
||||
upd_forceboot=1
|
||||
;;
|
||||
c)
|
||||
upd_keepconf=1
|
||||
;;
|
||||
v)
|
||||
verbose=$OPTARG
|
||||
;;
|
||||
f)
|
||||
upd_fw=$OPTARG
|
||||
;;
|
||||
t)
|
||||
upd_host=$OPTARG
|
||||
;;
|
||||
i)
|
||||
do_dialog=1
|
||||
;;
|
||||
h)
|
||||
upd_usage
|
||||
exit 1
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
upd_fw="bin/targets/$CONFIG_TARGET_BOARD/generic/$upd_fw_base"
|
||||
fi
|
||||
|
||||
[ $do_dialog -eq 1 ] && upd_select_start
|
||||
|
||||
if ! upd_ask_ok
|
||||
then
|
||||
upd_select_start
|
||||
if ! upd_ask_ok
|
||||
then
|
||||
exit 1
|
||||
if [ -z "$upd_fw" ]; then
|
||||
set_config_string CONFIG_TARGET_BOARD
|
||||
set_config_string CONFIG_TARGET_SUBTARGET
|
||||
upd_fw="$(realpath -q --canonicalize-existing --relative-to=. "bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/"last.{pkgtb,itb})"
|
||||
if [ -z "$upd_fw" ] && [ $do_dialog -eq 0 ]; then
|
||||
echo "Could not find image. Check that last.{itb,pkgtb} exists or specify an image using -f <image> or -i (interactive)." >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
upd_fw_base="$(basename "$upd_fw")"
|
||||
|
||||
if [ ! -f $upd_fw ]
|
||||
then
|
||||
echo "firmware file $firmware do not exist"
|
||||
exit 1
|
||||
fi
|
||||
[ $do_dialog -eq 1 ] && upd_select_start
|
||||
|
||||
if [ $upd_sysupgrade -eq 0 ]
|
||||
then
|
||||
extra_args=""
|
||||
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args -n"
|
||||
[ $upd_forceimage -eq 1 ] && extra_args="$extra_args -x"
|
||||
[ $upd_forceboot -eq 1 ] && extra_args="$extra_args -b"
|
||||
|
||||
file_size_kb=`du -k "$upd_fw" | cut -f1`
|
||||
if [ "$use_scp" == "1" ]
|
||||
then
|
||||
scp $upd_fw root@$upd_host:/tmp/ &&
|
||||
ssh -o ConnectTimeout=60 root@$upd_host "iopu $extra_arg -f /tmp/$upd_fw_base"
|
||||
else
|
||||
cat $upd_fw | pv -s ${file_size_kb}k | ssh root@$upd_host "iopu $extra_args"
|
||||
if ! upd_ask_ok; then
|
||||
upd_select_start
|
||||
if ! upd_ask_ok; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
extra_args=""
|
||||
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args -d"
|
||||
[ $upd_keepconf -eq 0 ] && extra_args="$extra_args -n"
|
||||
|
||||
scp $upd_fw root@$upd_host:/tmp/ &&
|
||||
ssh -o ConnectTimeout=60 root@$upd_host "sysupgrade -v $extra_args /tmp/$upd_fw_base" &&
|
||||
echo "sysupgrade done!"
|
||||
fi
|
||||
if [ ! -f $upd_fw ]; then
|
||||
echo "Firmware file $firmware does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
extra_args=""
|
||||
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args --no-reboot"
|
||||
[ $upd_forceimage -eq 1 ] && extra_args="$extra_args --force"
|
||||
[ $upd_keepconf -eq 0 ] && extra_args="$extra_args -n"
|
||||
[ $upd_forceboot -eq 1 ] && extra_args="$extra_args --force-loader-upgrade"
|
||||
|
||||
pv "$upd_fw" |
|
||||
ssh \
|
||||
-o ConnectTimeout=60 \
|
||||
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
|
||||
root@"$upd_host" \
|
||||
sh -c "cat > '/tmp/$upd_fw_base' && (set -x && sysupgrade -v $extra_args /tmp/$upd_fw_base)" ||
|
||||
echo "Sysupgrade failed" >&2 && return 1
|
||||
}
|
||||
|
||||
register_command "ssh_upgrade" "-h <host> -f <file> [opts] Install firmware on remote host with SSH"
|
||||
|
||||
|
||||
register_command "ssh_upgrade" "-t <host> -f <file> [opts] Install firmware on remote host with SSH"
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2012-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libmicroxml
|
||||
PKG_VERSION:=2012-06-11
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/mirror/microxml.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=72965423184f24cc0b963d91c2d1863cdb01b6aa
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_LICENSE:=LGPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libmicroxml
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=XML library
|
||||
MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
||||
endef
|
||||
|
||||
define Package/libmicroxml/description
|
||||
A micro sized XML library
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-threads \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_BUILD_DIR)/microxml.h $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libmicroxml.so* $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_BUILD_DIR)/microxml.pc $(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/libmicroxml/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libmicroxml.so* $(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libmicroxml))
|
||||
@@ -1,130 +0,0 @@
|
||||
diff --git a/mxml-file.c b/mxml-file.c
|
||||
index 02eca9d..f10d202 100644
|
||||
--- a/mxml-file.c
|
||||
+++ b/mxml-file.c
|
||||
@@ -363,9 +363,12 @@ mxmlSaveFile(mxml_node_t *node, /* I - Node to write */
|
||||
* Write the node...
|
||||
*/
|
||||
|
||||
- if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0)
|
||||
+ if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0){
|
||||
+ global_free(global);
|
||||
return (-1);
|
||||
-
|
||||
+ }
|
||||
+
|
||||
+ global_free(global);
|
||||
if (col > 0)
|
||||
if (putc('\n', fp) < 0)
|
||||
return (-1);
|
||||
@@ -1448,6 +1451,7 @@ mxml_load_data(
|
||||
if ((buffer = malloc(64)) == NULL)
|
||||
{
|
||||
mxml_error("Unable to allocate string buffer!");
|
||||
+ global_free(global);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -2083,11 +2087,12 @@ mxml_load_data(
|
||||
node->parent ? node->parent->value.element.name : "(null)");
|
||||
|
||||
mxmlDelete(first);
|
||||
-
|
||||
+ global_free(global);
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
+ global_free(global);
|
||||
if (parent)
|
||||
return (parent);
|
||||
else
|
||||
@@ -2102,7 +2107,7 @@ error:
|
||||
mxmlDelete(first);
|
||||
|
||||
free(buffer);
|
||||
-
|
||||
+ global_free(global);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
diff --git a/mxml-private.c b/mxml-private.c
|
||||
index 4378ca3..ea6e452 100644
|
||||
--- a/mxml-private.c
|
||||
+++ b/mxml-private.c
|
||||
@@ -41,6 +41,32 @@
|
||||
* This code currently supports AIX, HP-UX, Linux, Mac OS X, Solaris, and
|
||||
* Windows. It might work on the BSDs and IRIX, but I haven't tested that.
|
||||
*/
|
||||
+void *global_mem[16] = {0};
|
||||
+
|
||||
+static void *global_calloc(int x, int size)
|
||||
+{
|
||||
+ int i;
|
||||
+ void *m = calloc(x, size);
|
||||
+ for (i = ((sizeof(global_mem)/sizeof(global_mem[0])) - 1); i > 0; i--) {
|
||||
+ global_mem[i] = global_mem[i-1];
|
||||
+ }
|
||||
+ global_mem[0] = m;
|
||||
+ return m;
|
||||
+}
|
||||
+
|
||||
+void global_free(void *m)
|
||||
+{
|
||||
+ int i;
|
||||
+ if (m == NULL)
|
||||
+ return;
|
||||
+ for (i = ((sizeof(global_mem)/sizeof(global_mem[0])) - 1); i >= 0; i--) {
|
||||
+ if (global_mem[i] == m) {
|
||||
+ global_mem[i] = NULL;
|
||||
+ free(m);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
#if defined(__sun) || defined(_AIX)
|
||||
# pragma fini(_mxml_fini)
|
||||
@@ -148,7 +174,6 @@ mxml_real_cb(mxml_node_t *node) /* I - Current node */
|
||||
return (MXML_REAL);
|
||||
}
|
||||
|
||||
-
|
||||
#ifdef HAVE_PTHREAD_H /**** POSIX threading ****/
|
||||
# include <pthread.h>
|
||||
|
||||
@@ -190,7 +215,6 @@ _MXML_FINI(void)
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
/*
|
||||
* '_mxml_global()' - Get global data.
|
||||
*/
|
||||
@@ -205,7 +229,7 @@ _mxml_global(void)
|
||||
|
||||
if ((global = (_mxml_global_t *)pthread_getspecific(_mxml_key)) == NULL)
|
||||
{
|
||||
- global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t));
|
||||
+ global = (_mxml_global_t *)global_calloc(1, sizeof(_mxml_global_t));
|
||||
pthread_setspecific(_mxml_key, global);
|
||||
|
||||
global->num_entity_cbs = 1;
|
||||
@@ -288,7 +312,7 @@ _mxml_global(void)
|
||||
|
||||
if ((global = (_mxml_global_t *)TlsGetValue(_mxml_tls_index)) == NULL)
|
||||
{
|
||||
- global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t));
|
||||
+ global = (_mxml_global_t *)global_calloc(1, sizeof(_mxml_global_t));
|
||||
|
||||
global->num_entity_cbs = 1;
|
||||
global->entity_cbs[0] = _mxml_entity_cb;
|
||||
diff --git a/mxml-private.h b/mxml-private.h
|
||||
index c591208..72ed338 100644
|
||||
--- a/mxml-private.h
|
||||
+++ b/mxml-private.h
|
||||
@@ -43,3 +43,4 @@ typedef struct _mxml_global_s
|
||||
extern _mxml_global_t *_mxml_global(void);
|
||||
extern int _mxml_entity_cb(const char *name);
|
||||
|
||||
+extern void global_free(void *m);
|
||||
52
libpicoevent-bcm/Makefile
Normal file
52
libpicoevent-bcm/Makefile
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.3
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libpicoevent.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f446f186102539cceedaa15a95a33547ac3c1fd7
|
||||
PKG_NAME:=libpicoevent-bcm
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libpicoevent-bcm
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Libpicoevent-bcm
|
||||
URL:=
|
||||
DEPENDS:= +TARGET_brcmbca:bcmkernel
|
||||
include $(TOPDIR)/feeds/broadcom/bcmkernel/bcm-toolchain.mk
|
||||
TARGET_CFLAGS := -Os -pipe -mfpu=vfpv3-d16 -mfloat-abi=softfp -DCONFIG_TARGET_brcmbca -g3 -fno-caller-saves -fno-plt -Wno-error=unused-but-set-variable -Wno-error=unused-result \
|
||||
-mfloat-abi=soft -fmacro-prefix-map=$(BUILD_DIR)libpicoevent-bcm-0.3=libpicoevent-bcm-0.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 \
|
||||
-Wl,-z,now -Wl,-z,relro -Wl,--build-i
|
||||
endef
|
||||
|
||||
define Package/libpicoevent-bcm/description
|
||||
Minimal event library
|
||||
endef
|
||||
|
||||
define Package/libpicoevent-bcm/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/broadcom
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx
|
||||
$(CP) $(PKG_BUILD_DIR)/libpicoevent.h $(STAGING_DIR)/usr/include/bcm963xx
|
||||
mkdir -p $(1)/usr/lib/broadcom
|
||||
$(CP) $(PKG_BUILD_DIR)/libpicoevent.so $(STAGING_DIR)/usr/lib/broadcom
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libpicoevent.so $(1)/usr/lib/broadcom
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libpicoevent-bcm))
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libtrace
|
||||
PKG_VERSION:=3.0.22
|
||||
PKG_VERSION:=3.0.23
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
@@ -72,11 +72,11 @@ endef
|
||||
|
||||
define Package/libtrace/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libtrace.so.* $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libwandio.so.* $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump.so.* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtrace.so.* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwandio.so.* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump.so.* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/libpacketdump
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump/*.so* $(1)/usr/lib/libpacketdump/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump/*.so* $(1)/usr/lib/libpacketdump/
|
||||
endef
|
||||
|
||||
define Package/libtrace-tools/install
|
||||
|
||||
58
libvoice-airoha/Makefile
Normal file
58
libvoice-airoha/Makefile
Normal file
@@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright (C) 2022 IOPSYS Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libvoice-airoha
|
||||
PKG_VERSION:=0.1
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
|
||||
PKG_SOURCE_VERSION:=2a6ef141747ad0f7b32a536b5b5bd174834a7af5
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
# All config variable that are passed to the make invocation, directly or
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
LIBVOICE_PKG_BUILD_DIR := $(PKG_BUILD_DIR)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS += -Wall -Werror
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IOPSYS libvoice for Airoha platform
|
||||
URL:=
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
# 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
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
60
libvoice-broadcom/Makefile
Normal file
60
libvoice-broadcom/Makefile
Normal file
@@ -0,0 +1,60 @@
|
||||
#
|
||||
# Copyright (C) 2022 IOPSYS Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libvoice-broadcom
|
||||
PKG_VERSION:=0.1
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
|
||||
PKG_SOURCE_VERSION:=401a392a72e2933f527eb92466faaf2907c38730
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
# All config variable that are passed to the make invocation, directly or
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
LIBVOICE_PKG_BUILD_DIR := $(PKG_BUILD_DIR)
|
||||
|
||||
export CONFIG_BCM_CHIP_ID
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS += -Wall -Werror
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IOPSYS libvoice for Broadcom
|
||||
URL:=
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
# 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
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
58
libvoice-d2/Makefile
Normal file
58
libvoice-d2/Makefile
Normal file
@@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright (C) 2022 IOPSYS Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libvoice-d2
|
||||
PKG_VERSION:=0.1
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
|
||||
PKG_SOURCE_VERSION:=8a67b666e57836600457167ccadfba8c46461e5c
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
# All config variable that are passed to the make invocation, directly or
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
export D2_VTSP_PLATFORM := $(shell echo $(CONFIG_D2_VTSP_PLATFORM))
|
||||
|
||||
TARGET_CFLAGS += -Wall -Werror
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IOPSYS libvoice for D2 which is software DSP
|
||||
URL:=
|
||||
DEPENDS:=+d2-voice
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
# 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
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@@ -10,5 +10,40 @@ config AGENT_ISLAND_PREVENTION
|
||||
bool "Support Island Prevention"
|
||||
default y if MULTIAP_AGENT_ISLAND_PREVENTION
|
||||
|
||||
config AGENT_EASYMESH_R2_CERT
|
||||
bool "Compile for WFA test bed"
|
||||
|
||||
config AGENT_EASYMESH_VERSION
|
||||
int "Support Easymesh version"
|
||||
default 2
|
||||
|
||||
config AGENT_EASYMESH_VENDOR_EXT
|
||||
bool "Enable extra features through Easymesh vendor extension"
|
||||
default y
|
||||
|
||||
config AGENT_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
string
|
||||
default "\\\\x11\\\\x22\\\\x33"
|
||||
|
||||
config AGENT_EASYMESH_VENDOR_EXT_OUI
|
||||
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
|
||||
default AGENT_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
help
|
||||
Extra features not covered by the base Easymesh specification can be
|
||||
enabled through AGENT_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
|
||||
through which such features would be exposed.
|
||||
|
||||
config AGENT_UNAUTHORIZED_STA_IN_ASSOCLIST
|
||||
bool "Create STA entry before authorization is completed"
|
||||
|
||||
config AGENT_CHANSWITCH_SKIP_DFS_UNAVAILABLE
|
||||
bool "Skip DFS unavailable channels when channel switch"
|
||||
|
||||
config AGENT_LOCAL_ACS_SERVICE
|
||||
bool "Enable loacal ACS daemon usage"
|
||||
|
||||
config AGENT_STRICT_OPER_CHANNEL_REPORT
|
||||
bool "Report operation channel strictly, skip some unsolicited reports"
|
||||
|
||||
endmenu
|
||||
endif
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#
|
||||
# Copyright (C) 2020-21 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-agent
|
||||
PKG_VERSION:=7.1.33
|
||||
PKG_VERSION:=4.2.0.7
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=9d37e0b65571a6e5b9ad05bd79f49dc04d9a1dbb
|
||||
PKG_SOURCE_VERSION:=142314d9a555ce30399d99ae1a44fbf8be8bb247
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_DEV=0
|
||||
@@ -28,7 +28,7 @@ define Package/map-agent
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
|
||||
+map-plugin
|
||||
+map-plugin +ip-bridge
|
||||
endef
|
||||
|
||||
|
||||
@@ -56,8 +56,11 @@ endef
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-Wno-error=deprecated-declarations \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_AGENT_EASYMESH_VERSION)
|
||||
|
||||
ifeq ($(CONFIG_AGENT_SYNC_DYNAMIC_CNTLR_CONFIG),y)
|
||||
TARGET_CFLAGS += -DAGENT_SYNC_DYNAMIC_CNTLR_CONFIG
|
||||
endif
|
||||
@@ -66,6 +69,31 @@ ifeq ($(CONFIG_AGENT_ISLAND_PREVENTION),y)
|
||||
TARGET_CFLAGS += -DAGENT_ISLAND_PREVENTION
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AGENT_EASYMESH_R2_CERT),y)
|
||||
TARGET_CFLAGS += -DEASYMESH_R2_CERT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AGENT_EASYMESH_VENDOR_EXT),y)
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_AGENT_EASYMESH_VENDOR_EXT_OUI)\\\"
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AGENT_UNAUTHORIZED_STA_IN_ASSOCLIST),y)
|
||||
TARGET_CFLAGS += -DUNAUTHORIZED_STA_IN_ASSOCLIST
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AGENT_CHANSWITCH_SKIP_DFS_UNAVAILABLE),y)
|
||||
TARGET_CFLAGS += -DCHANSWITCH_SKIP_DFS_UNAVAILABLE
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AGENT_LOCAL_ACS_SERVICE),y)
|
||||
TARGET_CFLAGS += -DLOCAL_ACS_SERVICE
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AGENT_STRICT_OPER_CHANNEL_REPORT),y)
|
||||
TARGET_CFLAGS += -DSTRICT_OPER_CHANNEL_REPORT
|
||||
endif
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/map-agent/install
|
||||
@@ -73,6 +101,8 @@ define Package/map-agent/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/lib/wifi
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/script/* $(1)/lib/wifi/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapagent $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,34 +1,133 @@
|
||||
config agent 'agent'
|
||||
option enabled '1'
|
||||
option debug '6'
|
||||
option debug '0'
|
||||
option profile '2'
|
||||
option al_bridge 'br-lan'
|
||||
option netdev 'wlan'
|
||||
option island_prevention '0'
|
||||
option eth_onboards_wifi_bhs '0'
|
||||
# option controller_macaddr '0a:1b:2c:3d:4e:50'
|
||||
option scan_on_boot_only '0'
|
||||
|
||||
config dynamic_backhaul
|
||||
option missing_bh_timer '60'
|
||||
option missing_bh_reconfig_timer '1800'
|
||||
|
||||
config controller_select
|
||||
option id 'auto'
|
||||
option probe_int '20'
|
||||
option retry_int '9'
|
||||
option autostart '1'
|
||||
option local '0'
|
||||
|
||||
config radio
|
||||
option device 'phy0'
|
||||
option band '2'
|
||||
# options below are auto-generated during onboarding
|
||||
# option steer_policy '0'
|
||||
# option util_threshold '0'
|
||||
# option rcpi_threshold '70'
|
||||
# option report_rcpi_threshold '80'
|
||||
# option rcpi_hysteresis_margin '0'
|
||||
# option report_util_threshold '0'
|
||||
# option include_sta_stats '1'
|
||||
# option include_sta_metric '1'
|
||||
|
||||
config radio
|
||||
option device 'phy1'
|
||||
option band '5'
|
||||
# options below are auto-generated during onboarding
|
||||
# option steer_policy '0'
|
||||
# option util_threshold '0'
|
||||
# option rcpi_threshold '86'
|
||||
# option report_rcpi_threshold '96'
|
||||
# option rcpi_hysteresis_margin '0'
|
||||
# option report_util_threshold '0'
|
||||
# option include_sta_stats '1'
|
||||
# option include_sta_metric '1'
|
||||
|
||||
config bsta
|
||||
option enabled '1'
|
||||
option ifname 'wlan0'
|
||||
option band '2'
|
||||
option device 'phy0'
|
||||
option priority '2'
|
||||
# options below are auto-generated during onboarding
|
||||
# option ssid 'MAP-BH-2.4GHz'
|
||||
# option encryption 'sae-mixed'
|
||||
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
|
||||
# option onboarded '1'
|
||||
# option bssid '0a:1b:2c:3d:4e:53'
|
||||
# option vid '1'
|
||||
|
||||
config bsta
|
||||
option enabled '1'
|
||||
option ifname 'wlan1'
|
||||
option band '5'
|
||||
option device 'phy1'
|
||||
option priority '0'
|
||||
# options below are auto-generated during onboarding
|
||||
# option ssid 'MAP-BH-5GHz'
|
||||
# option encryption 'sae-mixed'
|
||||
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
|
||||
# option onboarded '1'
|
||||
# option bssid '0a:1b:2c:3d:4e:54'
|
||||
# option vid '1'
|
||||
|
||||
# ap sections and policy section are
|
||||
# auto-generated during onboarding
|
||||
#
|
||||
#config ap
|
||||
# option ifname 'wl0'
|
||||
# option steer 'rssi bssload'
|
||||
# list exclude '00:11:22:33:44:55'
|
||||
# list exclude_btm '00:aa:bb:cc:dd:ee'
|
||||
# list assoc_ctrl '00:10:20:30:40:50'
|
||||
# option btm_retry '3'
|
||||
# option btm_retry_secs '180'
|
||||
# option fallback_legacy '1'
|
||||
# option steer_legacy_reassoc_secs '30'
|
||||
# option steer_legacy_retry_secs '3600'
|
||||
# option assoc_ctrl_secs '30'
|
||||
# option band '2'
|
||||
# option type 'fronthaul'
|
||||
|
||||
#config ap
|
||||
# option ifname 'wl1'
|
||||
# option steer 'rssi bssload'
|
||||
# list exclude '00:11:22:33:44:55'
|
||||
# list exclude_btm '00:aa:bb:cc:dd:ee'
|
||||
# option band '5'
|
||||
# option type 'fronthaul'
|
||||
|
||||
#config bsta
|
||||
# option ifname 'apclii0'
|
||||
# option enabled '1'
|
||||
# option onboarded '0'
|
||||
# option disallow_bsta '1 # bitmap, 1 for disallow p1, 2 to disallow p2, 3 to disallow both (probably never applicable)
|
||||
# option ifname 'wlan0-1'
|
||||
# option band '2'
|
||||
# option device 'phy0'
|
||||
# option type 'fronthaul'
|
||||
# option ssid 'IOWRT-2.4GHz'
|
||||
# option encryption 'sae-mixed+aes'
|
||||
# option key '1234567890'
|
||||
# option vid '1'
|
||||
|
||||
#config ap
|
||||
# option enabled '1'
|
||||
# option ifname 'wlan0-2'
|
||||
# option band '2'
|
||||
# option device 'phy0'
|
||||
# option type 'backhaul'
|
||||
# option ssid 'MAP-BH-2.4GHz'
|
||||
# option encryption 'sae+aes'
|
||||
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
|
||||
# option disallow_bsta '0'
|
||||
# option vid '1'
|
||||
|
||||
#config ap
|
||||
# option enabled '1'
|
||||
# option ifname 'wlan1-1'
|
||||
# option band '5'
|
||||
# option device 'phy1'
|
||||
# option type 'fronthaul'
|
||||
# option ssid 'IOWRT-5GHz'
|
||||
# option encryption 'sae-mixed+aes'
|
||||
# option key '1234567890'
|
||||
# option vid '1'
|
||||
|
||||
#config ap
|
||||
# option enabled '1'
|
||||
# option ifname 'wlan1-2'
|
||||
# option band '5'
|
||||
# option device 'phy1'
|
||||
# option type 'backhaul'
|
||||
# option ssid 'MAP-BH-5GHz'
|
||||
# option encryption 'sae+aes'
|
||||
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
|
||||
# option disallow_bsta '0'
|
||||
# option vid '1'
|
||||
|
||||
#config policy
|
||||
# option report_interval '0'
|
||||
# option pvid '1'
|
||||
# option pcp_default '0'
|
||||
# option report_scan '0'
|
||||
# option report_sta_assocfails '0'
|
||||
# option report_sta_assocfails_rate '0'
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
. /lib/network/utils.sh
|
||||
|
||||
conn_ports_file="/tmp/map.connected.ports"
|
||||
map_bh_file="/tmp/multiap.backhaul"
|
||||
map_bh_file="/var/run/multiap/multiap.backhaul"
|
||||
al_bridge="$(uci -q get mapagent.agent.al_bridge)"
|
||||
[ "${al_bridge:0:3}" = "br-" ] || exit 0
|
||||
al_brnet="${al_bridge:3}"
|
||||
|
||||
@@ -10,56 +10,9 @@ IS_CFG_VALID=1
|
||||
MAP_DEV="map_dev"
|
||||
MAP_IF="map"
|
||||
|
||||
create_map() {
|
||||
ip link add lei type veth peer name lei_map 2>/dev/null
|
||||
ip link add link lei name lei_lan type vlan id 1 2>/dev/null
|
||||
|
||||
uci -q set network.${MAP_DEV}=device
|
||||
uci -q set network.${MAP_DEV}.name=br-map
|
||||
uci -q set network.${MAP_DEV}.type=bridge
|
||||
|
||||
uci -q show network.${MAP_DEV}.ports | grep -q lei_map || {
|
||||
uci -q add_list network.${MAP_DEV}.ports='lei_map'
|
||||
}
|
||||
|
||||
uci -q set network.${MAP_IF}=interface
|
||||
uci -q set network.${MAP_IF}.device=br-map
|
||||
uci -q set network.${MAP_IF}.is_lan=1
|
||||
|
||||
uci -q show network.br_lan.ports | grep -q lei_lan || {
|
||||
uci -q add_list network.br_lan.ports="lei_lan"
|
||||
}
|
||||
|
||||
uci -q set mapagent.agent.al_bridge=br-map
|
||||
|
||||
uci -q commit
|
||||
|
||||
ubus call network reload
|
||||
ubus -t 5 wait_for network.interface.map
|
||||
|
||||
brctl addif br-map lei_map 2>/dev/null
|
||||
brctl addif br-lan lei_lan 2>/dev/null
|
||||
|
||||
ip link set lei up 2>/dev/null
|
||||
ip link set lei_map up 2>/dev/null
|
||||
ip link set lei_lan up 2>/dev/null
|
||||
}
|
||||
|
||||
remove_map() {
|
||||
ip link delete ${MAP_VETH} &>/dev/null
|
||||
|
||||
uci -q delete network.${MAP_DEV}
|
||||
uci -q delete network.${MAP_IF}
|
||||
|
||||
uci -q set mapagent.agent.al_bridge=br-lan
|
||||
|
||||
uci -q commit
|
||||
|
||||
ubus call network reload
|
||||
}
|
||||
|
||||
start_dynbhd_service() {
|
||||
rm -f /tmp/multiap.backhaul
|
||||
rm -f /var/run/multiap/multiap.backhaul
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/dynbhd"
|
||||
procd_set_param respawn
|
||||
@@ -72,7 +25,7 @@ validate_agent_section() {
|
||||
uci_validate_section mapagent agent "agent" \
|
||||
'enabled:bool:true' \
|
||||
'debug:range(0,16)' \
|
||||
'profile:range(1,2):2' \
|
||||
'profile:range(1,4):2' \
|
||||
'brcm_setup:bool:false' \
|
||||
'controller_macaddr:macaddr' \
|
||||
'al_bridge:string' \
|
||||
@@ -80,7 +33,9 @@ validate_agent_section() {
|
||||
'vlan_segregation:bool:false' \
|
||||
'resend_num:uinteger:0' \
|
||||
'dyn_cntlr_sync:bool:true' \
|
||||
'island_prevention:bool:true'
|
||||
'island_prevention:bool:false' \
|
||||
'eth_onboards_wifi_bhs:bool:false' \
|
||||
'scan_on_boot_only:bool:false'
|
||||
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
@@ -115,7 +70,7 @@ validate_ap_section() {
|
||||
uci_validate_section mapagent $section "${1}" \
|
||||
'ifname:string' \
|
||||
'device:string' \
|
||||
'band:or("2", "5")' \
|
||||
'band:or("2", "5", "6")' \
|
||||
'enabled:bool:true' \
|
||||
'onboarded:bool:false' \
|
||||
'ssid:string' \
|
||||
@@ -137,7 +92,7 @@ validate_radio_section() {
|
||||
|
||||
uci_validate_section mapagent $section "${1}" \
|
||||
'device:string' \
|
||||
'band:or("2", "5")' \
|
||||
'band:or("2", "5", "6")' \
|
||||
'configured:bool:false' \
|
||||
'onboarded:bool:false' \
|
||||
'dedicated_backhaul:bool:false' \
|
||||
@@ -148,7 +103,12 @@ validate_radio_section() {
|
||||
'include_sta_stats:bool:false' \
|
||||
'include_sta_metric:bool:false' \
|
||||
'rcpi_hysteresis_margin:range(0,255)' \
|
||||
'report_util_threshold:range(0,255)'
|
||||
'report_util_threshold:range(0,255)' \
|
||||
'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")' \
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
logger -s -t "mapagent" "Validation of radio section failed"
|
||||
@@ -185,6 +145,8 @@ validate_dyn_bh_section() {
|
||||
|
||||
uci_validate_section mapagent $section "${1}" \
|
||||
'missing_bh_timer:range(1,255)'
|
||||
uci_validate_section mapagent $section "${1}" \
|
||||
'missing_bh_reconfig_timer:range(0,65535)'
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
logger -s -t "mapagent" "Validation of dynamic backhaul section failed"
|
||||
@@ -211,6 +173,10 @@ validate_agent_config() {
|
||||
return 0
|
||||
}
|
||||
|
||||
create_dir() {
|
||||
mkdir -p /var/run/multiap
|
||||
}
|
||||
|
||||
start_service() {
|
||||
[ -f /usr/sbin/dynbhd ] && start_dynbhd_service
|
||||
|
||||
@@ -225,11 +191,8 @@ start_service() {
|
||||
config_get_bool enabled agent enabled 1
|
||||
[ "$enabled" -eq 0 ] && return 1
|
||||
|
||||
local ts
|
||||
config_get_bool ts agent vlan_segregation 0
|
||||
[ "$ts" -eq 1 ] && create_map #|| remove_map
|
||||
|
||||
procd_open_instance
|
||||
create_dir
|
||||
procd_set_param command "/usr/sbin/mapagent" "-d"
|
||||
procd_set_param respawn
|
||||
# procd_set_param stdout 1
|
||||
@@ -237,10 +200,6 @@ start_service() {
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
#stop_service() {
|
||||
# remove_map
|
||||
#}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "mapagent"
|
||||
|
||||
13
map-agent/files/etc/uci-defaults/991-map-agent-unset-pvid
Executable file
13
map-agent/files/etc/uci-defaults/991-map-agent-unset-pvid
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
unset_pvid() {
|
||||
local section=$1
|
||||
|
||||
uci -q set mapagent.${section}.pvid="0"
|
||||
}
|
||||
|
||||
config_load mapagent
|
||||
|
||||
config_foreach unset_pvid policy
|
||||
@@ -1,849 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# functions
|
||||
# wireless_teardown - tear down ifaces based on mapagent config
|
||||
# setup_network - prepare /etc/config/network if necessary
|
||||
# setup_wireless - prepare /etc/config/wireless based on mapagent config
|
||||
# write_credentials - write bBSS credentials to fBSS
|
||||
|
||||
. /lib/functions.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/wifi/traffic_separation
|
||||
|
||||
MAPFILE="/tmp/multiap.backhaul"
|
||||
|
||||
diff=0
|
||||
onbrd_bssid=0
|
||||
onbrd_band=0
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $0 [wireless_teardown|setup_network|setup_wireless|write_credentials]
|
||||
Platform specific Multi-AP script to prepare network and wifi subsystem based on
|
||||
mapagent configuration.
|
||||
wireless_teardown - tear down ifaces in /etc/config/wireless
|
||||
setup_network - prepare /etc/config/network
|
||||
setup_wireless - prepare /etc/config/wireless
|
||||
write_credentials - write bBSS credentials to fBSS
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
type_to_multi_ap () {
|
||||
type="$1"
|
||||
|
||||
if [ "$type" = "backhaul" ]; then
|
||||
echo "1"
|
||||
return
|
||||
elif [ "$type" = "fronthaul" ]; then
|
||||
echo "2"
|
||||
return
|
||||
elif [ "$type" = "combined" ]; then
|
||||
echo "3"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "0"
|
||||
}
|
||||
|
||||
get_type_by_section() {
|
||||
section="$1"
|
||||
|
||||
config_get type $section type "0"
|
||||
|
||||
echo "$(type_to_multi_ap $type)"
|
||||
}
|
||||
|
||||
sync_credentials() {
|
||||
bands=""
|
||||
json_init
|
||||
mapagent_process_fh() {
|
||||
local section=$1
|
||||
local dev=$2
|
||||
|
||||
multi_ap=$(get_type_by_section $section)
|
||||
[ "$multi_ap" == "0" ] && return
|
||||
|
||||
config_get device $section device
|
||||
|
||||
[ "$dev" != "$device" ] && return
|
||||
|
||||
config_get band $section band
|
||||
config_get ssid $section ssid
|
||||
config_get encryption $section encryption
|
||||
config_get key $section key
|
||||
|
||||
section=$(uci add ieee1905 ap)
|
||||
[ "$section" == "" ] && return
|
||||
|
||||
uci -q set ieee1905.${section}.band=$band
|
||||
uci -q set ieee1905.${section}.ssid="$ssid"
|
||||
uci -q set ieee1905.${section}.encryption=$encryption
|
||||
uci -q set ieee1905.${section}.key="$key"
|
||||
json_select "$band" > /dev/null
|
||||
if [ "$?" = "0" ]; then
|
||||
json_get_keys keys
|
||||
|
||||
for key in ${keys};
|
||||
do
|
||||
json_get_var val "$key"
|
||||
uci -q set ieee1905.${section}.$key="$val"
|
||||
done
|
||||
json_select ..
|
||||
fi
|
||||
}
|
||||
|
||||
mapagent_process_radio() {
|
||||
local section=$1
|
||||
|
||||
config_get device $section device
|
||||
config_get band $section band
|
||||
config_get dedicated_backhaul $section dedicated_backhaul 0
|
||||
|
||||
[ "$dedicated_backhaul" != "0" ] && return
|
||||
|
||||
for b in $bands; do
|
||||
if [ "$b" == "$band" ]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
config_foreach mapagent_process_fh ap $device
|
||||
bands="$bands $band"
|
||||
}
|
||||
|
||||
ieee1905_del_ap() {
|
||||
append_value() {
|
||||
local section=$1
|
||||
local key=$2
|
||||
shift
|
||||
shift
|
||||
|
||||
while [ "$key" != "" ]; do
|
||||
val=$(uci -q get ieee1905.$section.$key)
|
||||
[ "$val" = "" ] && {
|
||||
key=$1
|
||||
shift
|
||||
continue
|
||||
}
|
||||
json_add_string "$key" ${val}
|
||||
key=$1
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
local section=$1
|
||||
local band
|
||||
|
||||
config_get band $section band
|
||||
json_select "$band" > /dev/null
|
||||
rc=$?
|
||||
[ "$rc" != "0" ] && json_add_object "$band"
|
||||
append_value $section "manufacturer" "model_name" "device_name" "model_number" "serial_number" "device_type" "os_version"
|
||||
if [ "$rc" != "0" ]; then
|
||||
json_close_object
|
||||
else
|
||||
json_select ..
|
||||
fi
|
||||
|
||||
uci -q delete ieee1905.${section}
|
||||
}
|
||||
|
||||
config_load ieee1905
|
||||
config_foreach ieee1905_del_ap ap
|
||||
|
||||
config_load mapagent
|
||||
config_foreach mapagent_process_radio radio
|
||||
|
||||
uci commit ieee1905
|
||||
json_cleanup
|
||||
}
|
||||
|
||||
write_credentials() {
|
||||
config_load mapagent
|
||||
|
||||
mapagent_apply_wireless() {
|
||||
write_wireless() {
|
||||
local section=$1
|
||||
local map_ifname=$2
|
||||
local bk_ssid="$3"
|
||||
local bk_key="$4"
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
#echo found device=$device map=$multi_ap ifname=$ifname mapifname=$map_ifname
|
||||
|
||||
[ "$ifname" != "$map_ifname" ] && return
|
||||
|
||||
#echo applying bk_ssid = "$bk_ssid" bk_key = "$bk_key"
|
||||
|
||||
uci -q set wireless.${section}.multi_ap_backhaul_ssid="$bk_ssid"
|
||||
uci -q set wireless.${section}.multi_ap_backhaul_key="$bk_key"
|
||||
}
|
||||
config_load wireless
|
||||
|
||||
config_foreach write_wireless wifi-iface "$1" "$2" "$3"
|
||||
}
|
||||
|
||||
mapagent_find_fbss() {
|
||||
local section=$1
|
||||
local dev=$2
|
||||
local bk_ssid="$3"
|
||||
local bk_key="$4"
|
||||
|
||||
multi_ap=$(get_type_by_section $section)
|
||||
[ "$multi_ap" == "0" ] && return
|
||||
|
||||
config_get device $section device
|
||||
|
||||
#echo found dev=$dev device=$device map=$multi_ap
|
||||
|
||||
[ "$device" != "$dev" ] && return
|
||||
[ "$multi_ap" != "2" ] && return
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
#echo applying bk_ssid = "$bk_ssid" bk_key = "$bk_key"
|
||||
|
||||
# subshell in hopes to maintain mapagent config loaded
|
||||
echo $(mapagent_apply_wireless $ifname "$bk_ssid" "$bk_key") 2> /dev/null
|
||||
}
|
||||
|
||||
mapagent_find_bbss() {
|
||||
local section=$1
|
||||
local dev=$2
|
||||
|
||||
multi_ap=$(get_type_by_section $section)
|
||||
[ "$multi_ap" == "0" ] && return
|
||||
|
||||
config_get device $section device
|
||||
config_get enabled $section enabled "1"
|
||||
|
||||
#echo found dev=$dev device=$device map=$multi_ap
|
||||
|
||||
[ "$enabled" == "0" ] && return
|
||||
[ "$device" != "$dev" ] && return
|
||||
[ "$multi_ap" != "1" ] && return
|
||||
|
||||
config_get ssid $1 ssid
|
||||
config_get key $1 key
|
||||
|
||||
#echo found ssid="$ssid" key="$key"
|
||||
|
||||
config_foreach mapagent_find_fbss ap $dev "$ssid" "$key"
|
||||
}
|
||||
|
||||
mapagent_process_radio() {
|
||||
local section=$1
|
||||
|
||||
config_get device $section device
|
||||
|
||||
#echo found dev=$dev
|
||||
|
||||
config_foreach mapagent_find_bbss ap $device
|
||||
}
|
||||
|
||||
|
||||
config_foreach mapagent_process_radio radio
|
||||
|
||||
uci commit wireless
|
||||
}
|
||||
|
||||
set_network() {
|
||||
local ifname=$1
|
||||
local num=$2
|
||||
local bssid=$3
|
||||
|
||||
wpa_cli -i $ifname set_n $num bssid $bssid
|
||||
}
|
||||
|
||||
bsta_steer() {
|
||||
local ifname=$1
|
||||
local bssid=$2
|
||||
|
||||
rc=$(wpa_cli -i $ifname set_n 0 bssid $bssid)
|
||||
[ "$rc" == "FAIL" ] && {
|
||||
echo "1"
|
||||
return;
|
||||
}
|
||||
|
||||
rc=$(wpa_cli -i $ifname roam $bssid)
|
||||
[ "$rc" == "FAIL" ] && {
|
||||
echo "1"
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
write_bsta_config() {
|
||||
local ifname=$1
|
||||
|
||||
#echo diff = $diff > /dev/console
|
||||
|
||||
|
||||
config_load mapagent
|
||||
|
||||
mapagent_apply_wl_bsta() {
|
||||
apply_config() {
|
||||
local section=$1
|
||||
local bsta=$2
|
||||
local bssid=$3
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
[ "$bsta" == "$ifname" ] || return
|
||||
#echo setting diff = $diff > /dev/console
|
||||
old_bssid="$(uci -q get wireless.${section}.bssid)"
|
||||
|
||||
[ "$old_bssid" == "$bssid" ] && break
|
||||
|
||||
uci -q set wireless.${section}.bssid=$bssid
|
||||
wpa_cli -i "$bsta" set_n 0 bssid $bssid
|
||||
wpa_cli -i "$bsta" save_config
|
||||
echo 1
|
||||
}
|
||||
config_load wireless
|
||||
|
||||
config_foreach apply_config wifi-iface $1 $2
|
||||
uci commit wireless
|
||||
}
|
||||
|
||||
mapagent_process_bk() {
|
||||
local section=$1
|
||||
local bsta=$2
|
||||
|
||||
|
||||
config_get ifname $section ifname
|
||||
#echo bsta = $bsta > /dev/console
|
||||
|
||||
[ "$bsta" == "$ifname" ] || return
|
||||
#echo found ifname=$ifname > /dev/console
|
||||
|
||||
config_get bssid $section bssid
|
||||
config_get band $section band
|
||||
ret=$(mapagent_apply_wl_bsta $ifname $bssid)
|
||||
[ "$ret" == "1" ] && {
|
||||
diff=1
|
||||
onbrd_bssid=$bssid
|
||||
onbrd_band=$band
|
||||
}
|
||||
}
|
||||
|
||||
mapagent_apply_bssid_same_band() {
|
||||
apply_config() {
|
||||
local section=$1
|
||||
local bsta=$2
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
[ "$bsta" == "$ifname" ] || return
|
||||
uci -q set wireless.${section}.bssid=$bssid
|
||||
}
|
||||
|
||||
config_get band $1 band
|
||||
config_get onboarded $1 onboarded "0"
|
||||
|
||||
[ "$onbrd_band" != "$band" -o "$onboarded" = "1" ] && return
|
||||
|
||||
config_get ifname $1 ifname
|
||||
|
||||
config_load wireless
|
||||
config_foreach apply_config wifi-iface $ifname $onbrd_bssid
|
||||
uci commit wireless
|
||||
}
|
||||
|
||||
config_foreach mapagent_process_bk bsta $ifname
|
||||
|
||||
#echo result diff = $diff > /dev/console
|
||||
[ "$diff" == "1" ] && {
|
||||
config_foreach mapagent_apply_bssid_same_band bsta
|
||||
#ubus call uci commit '{"config":"wireless"}'
|
||||
#echo reloading wireless > /dev/console
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
teardown_iface() {
|
||||
config_load mapagent
|
||||
|
||||
local iface=$1
|
||||
|
||||
mapagent_teardown_wireless() {
|
||||
write_wireless() {
|
||||
local section=$1
|
||||
local map_ifname=$2
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
[ "$ifname" != "$map_ifname" ] && return
|
||||
|
||||
uci -q set wireless.${section}.start_disabled="1"
|
||||
uci -q set wireless.${section}.ssid="DISABLED-SSID"
|
||||
uci -q set wireless.${section}.key="DISABLED-KEY"
|
||||
uci -q delete wireless.${section}.multi_ap_backhaul_ssid
|
||||
uci -q delete wireless.${section}.multi_ap_backhaul_key
|
||||
}
|
||||
|
||||
config_load wireless
|
||||
|
||||
config_foreach write_wireless wifi-iface $1
|
||||
}
|
||||
|
||||
mapagent_teardown_bss() {
|
||||
local section=$1
|
||||
local iface=$2
|
||||
|
||||
multi_ap=$(get_type_by_section $section)
|
||||
[ "$multi_ap" == "0" ] && return
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
[ "$iface" != "$ifname" ] && return
|
||||
|
||||
config_get ifname $section ifname
|
||||
uci -q set mapagent.${section}.enabled="0"
|
||||
uci -q set mapagent.${section}.ssid="DISABLED-SSID"
|
||||
uci -q set mapagent.${section}.key="DISABLED-KEY"
|
||||
|
||||
# subshell in hopes to maintain mapagent config loaded
|
||||
$(mapagent_teardown_wireless $ifname)
|
||||
}
|
||||
|
||||
|
||||
config_foreach mapagent_teardown_bss ap $iface
|
||||
|
||||
uci commit wireless
|
||||
uci commit mapagent
|
||||
}
|
||||
|
||||
bsta_to_wireless() {
|
||||
config_load mapagent
|
||||
|
||||
mapagent_find_lowest_prio_onboarded() {
|
||||
mapagent_process_bk() {
|
||||
config_get priority $1 priority "2"
|
||||
config_get onboarded $1 onboarded "0"
|
||||
|
||||
[ "$onboarded" = "0" ] && return
|
||||
|
||||
if [ -z "$sec" -o "$prio" = "-1" -o "$priority" -lt "$prio" ]; then
|
||||
sec=$1
|
||||
prio=$priority
|
||||
fi
|
||||
}
|
||||
|
||||
local sec=""
|
||||
local prio="-1"
|
||||
|
||||
config_foreach mapagent_process_bk bsta
|
||||
echo $sec
|
||||
}
|
||||
|
||||
mapagent_enable_best() {
|
||||
#echo 1=$1 best=$best > /dev/console
|
||||
if [ "$1" = "$best" ]; then
|
||||
uci -q set mapagent.$1.enabled='1'
|
||||
else
|
||||
uci -q set mapagent.$1.enabled='0'
|
||||
fi
|
||||
}
|
||||
|
||||
mapagent_bsta_to_wireless() {
|
||||
mapagent_apply_wl_bsta() {
|
||||
apply_config() {
|
||||
local section=$1
|
||||
local bsta=$2
|
||||
local ssid="$3"
|
||||
local key="$4"
|
||||
local encryption=$5
|
||||
local enabled=$6
|
||||
local bssid=$7
|
||||
local disabled="0"
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
[ -z "$enabled" -o "$enabled" = "0" ] && disabled="1"
|
||||
|
||||
[ "$bsta" == "$ifname" ] || return
|
||||
|
||||
uci -q set wireless.${section}.ssid="$ssid"
|
||||
uci -q set wireless.${section}.key="$key"
|
||||
uci -q set wireless.${section}.encryption=$encryption
|
||||
uci -q set wireless.${section}.bssid="$bssid"
|
||||
uci -q set wireless.${section}.default_disabled='0'
|
||||
|
||||
[ "$disabled" != "1" ] && return
|
||||
wpa_cli -i "$bsta" disconnect > /dev/null 2>&1
|
||||
wpa_cli -i "$bsta" disable_network 0 > /dev/null 2>&1
|
||||
wpa_cli -i "$bsta" save_config > /dev/null 2>&1
|
||||
|
||||
echo 1
|
||||
}
|
||||
|
||||
config_load wireless
|
||||
|
||||
config_foreach apply_config wifi-iface $@
|
||||
uci commit wireless
|
||||
}
|
||||
|
||||
mapagent_find_other_creds() {
|
||||
#echo "trying to find other creds for $2" > /dev/console
|
||||
config_get band $1 band
|
||||
config_get onboarded $1 onboarded "0"
|
||||
|
||||
[ "$3" != "$band" -o "$onboarded" = "0" ] && return
|
||||
|
||||
config_get ssid $1 ssid
|
||||
config_get key $1 key
|
||||
config_get encryption $1 encryption
|
||||
config_get enabled $1 enabled "0"
|
||||
config_get bssid $1 bssid
|
||||
|
||||
echo $(mapagent_apply_wl_bsta $2 "$ssid" "$key" $encryption $4 "$bssid")
|
||||
}
|
||||
|
||||
config_get band $1 band
|
||||
config_get ifname $1 ifname
|
||||
config_get onboarded $1 onboarded "0"
|
||||
config_get enabled $1 enabled "0"
|
||||
|
||||
if [ "$onboarded" = "0" ]; then
|
||||
config_foreach mapagent_find_other_creds bsta $ifname $band $enabled
|
||||
else
|
||||
config_get ssid $1 ssid
|
||||
config_get key $1 key
|
||||
config_get encryption $1 encryption
|
||||
config_get bssid $1 bssid
|
||||
|
||||
echo $(mapagent_apply_wl_bsta $ifname "$ssid" "$key" $encryption $enabled "$bssid")
|
||||
fi
|
||||
}
|
||||
|
||||
# best=$(mapagent_find_lowest_prio_onboarded)
|
||||
#
|
||||
# [ -z "$best" ] && return
|
||||
#
|
||||
# band=$1
|
||||
# sec=""
|
||||
# prio=""
|
||||
#
|
||||
# config_foreach mapagent_enable_best bsta $best
|
||||
# uci commit mapagent
|
||||
config_load mapagent
|
||||
|
||||
diff=$(config_foreach mapagent_bsta_to_wireless bsta)
|
||||
|
||||
# [ "$diff" != "" ] && {
|
||||
|
||||
ubus call uci commit '{"config":"wireless"}'
|
||||
# }
|
||||
}
|
||||
|
||||
|
||||
sync_mapcontroller_from_wireless() {
|
||||
ubus -t 5 wait_for wifi
|
||||
[ "$?" != "0" ] && return
|
||||
|
||||
[ ! -f "/etc/config/wireless" ] && return
|
||||
|
||||
status=$(ubus -S call wifi status)
|
||||
|
||||
device_to_band() {
|
||||
local ifname=$1
|
||||
json_load "$status"
|
||||
json_select "radios"
|
||||
json_get_keys keys
|
||||
|
||||
for key in $keys; do
|
||||
json_select $key
|
||||
json_get_var name name
|
||||
|
||||
if [ "$name" != "$ifname" ]; then
|
||||
json_select ..
|
||||
continue
|
||||
fi
|
||||
|
||||
json_get_var band band
|
||||
|
||||
if [ "$band" == "5GHz" ]; then
|
||||
echo "5"
|
||||
elif [ "$band" == "2.4GHz" ]; then
|
||||
echo "2"
|
||||
fi
|
||||
|
||||
break
|
||||
done
|
||||
|
||||
json_cleanup
|
||||
}
|
||||
|
||||
wireless_process_iface() {
|
||||
local section=$1
|
||||
local type="ap"
|
||||
local enabled="1"
|
||||
|
||||
config_get multi_ap $section multi_ap 0
|
||||
[ "$multi_ap" != "1" ] && [ "$multi_ap" != "2" ] && return
|
||||
|
||||
config_get mode $section mode "ap"
|
||||
[ "$mode" != "ap" ] && return
|
||||
|
||||
config_get device $section device
|
||||
band=$(device_to_band $device)
|
||||
[ "$band" == "" ] && return
|
||||
|
||||
config_get ssid $section ssid
|
||||
config_get key $section key
|
||||
config_get encryption $section encryption
|
||||
config_get start_disabled $section start_disabled "0"
|
||||
config_get network $section network
|
||||
|
||||
|
||||
cntlr_section=$(uci add mapcontroller ${type})
|
||||
uci -q set mapcontroller.${cntlr_section}.ssid="$ssid"
|
||||
uci -q set mapcontroller.${cntlr_section}.key="$key"
|
||||
uci -q set mapcontroller.${cntlr_section}.encryption="$encryption"
|
||||
uci -q set mapcontroller.${cntlr_section}.band="$band"
|
||||
uci -q set mapcontroller.${cntlr_section}.vid="1"
|
||||
uci -q set mapcontroller.${cntlr_section}.network="$network"
|
||||
|
||||
[ "$multi_ap" == "1" ] && map_type="backhaul" || map_type="fronthaul"
|
||||
uci -q set mapcontroller.${cntlr_section}.type="$map_type"
|
||||
|
||||
[ "$start_disabled" == "1" ] && enabled="0"
|
||||
uci -q set mapcontroller.${cntlr_section}.enabled="$enabled"
|
||||
}
|
||||
|
||||
mapcontroller_teardown() {
|
||||
local section=$1
|
||||
|
||||
uci delete mapcontroller.$1
|
||||
}
|
||||
|
||||
config_load mapcontroller
|
||||
config_foreach mapcontroller_teardown ap
|
||||
|
||||
config_load wireless
|
||||
config_foreach wireless_process_iface wifi-iface
|
||||
uci commit mapcontroller
|
||||
}
|
||||
|
||||
bsta_scan_on_enabled() {
|
||||
local onboarded_bands=""
|
||||
|
||||
mapagent_onboarded_bands() {
|
||||
config_get band $1 band
|
||||
config_get onboarded $1 onboarded "0"
|
||||
|
||||
[ "$onboarded" = "0" ] && return
|
||||
|
||||
onboarded_bands="$onboarded_bands $band"
|
||||
}
|
||||
|
||||
mapagent_enable_bk() {
|
||||
config_get ifname $1 ifname
|
||||
config_get band $1 band
|
||||
config_get enabled $1 enabled
|
||||
|
||||
[ "$enabled" = "0" ] && return
|
||||
|
||||
for onboarded_band in $onboarded_bands
|
||||
do
|
||||
[ "$onboarded_band" != "$band" ] && continue
|
||||
|
||||
logger -t multiap "bsta_scan_on_enabled $ifname $band"
|
||||
wpa_cli -i "$ifname" enable_network 0 > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" reconnect > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
config_load mapagent
|
||||
config_foreach mapagent_onboarded_bands bsta
|
||||
config_foreach mapagent_enable_bk bsta
|
||||
}
|
||||
|
||||
bsta_enable_all() {
|
||||
mapagent_enable_bk() {
|
||||
config_get ifname $1 ifname "2"
|
||||
uci -q set mapagent.$1.enabled="1"
|
||||
}
|
||||
|
||||
config_load mapagent
|
||||
|
||||
config_foreach mapagent_enable_bk bsta
|
||||
uci commit mapagent
|
||||
bsta_scan_on_enabled
|
||||
}
|
||||
|
||||
bsta_disable_lower_priority() {
|
||||
config_load mapagent
|
||||
|
||||
mapagent_get_priority() {
|
||||
config_get ifname $1 ifname
|
||||
|
||||
[ "$ifname" != "$2" ] && return
|
||||
|
||||
config_get priority $1 priority "2"
|
||||
|
||||
echo "$priority"
|
||||
}
|
||||
|
||||
mapagent_disable_lower_bk() {
|
||||
mapagent_apply_wl_bsta() {
|
||||
apply_config() {
|
||||
local section="$1"
|
||||
local bsta="$2"
|
||||
local enabled="$3"
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
[ "$bsta" == "$ifname" ] || return
|
||||
|
||||
[ "$enabled" != "0" ] && return
|
||||
|
||||
wpa_cli -i "$ifname" disconnect > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" disable_network 0 > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
|
||||
}
|
||||
local ifname="$1"
|
||||
local enabled="$2"
|
||||
|
||||
[ "$enabled" != "0" ] && return
|
||||
|
||||
config_load wireless
|
||||
|
||||
config_foreach apply_config wifi-iface $ifname $enabled
|
||||
}
|
||||
|
||||
local enabled="1"
|
||||
|
||||
config_get ifname $1 ifname
|
||||
config_get priority $1 priority
|
||||
|
||||
[ "$ifname" != "$2" -a "$priority" -gt "$3" ] && enabled="0"
|
||||
|
||||
uci -q set mapagent.$1.enabled="$enabled"
|
||||
|
||||
echo $(mapagent_apply_wl_bsta $ifname $enabled) > /dev/null
|
||||
}
|
||||
|
||||
local bsta=$1
|
||||
|
||||
prio=$(config_foreach mapagent_get_priority bsta $bsta)
|
||||
#echo bsta $bsta has prio $prio > /dev/console
|
||||
|
||||
config_foreach mapagent_disable_lower_bk bsta $bsta $prio
|
||||
uci commit mapagent
|
||||
|
||||
# ubus call uci commit '{"config":"wireless"}'
|
||||
}
|
||||
|
||||
|
||||
bsta_use_link() {
|
||||
config_load mapagent
|
||||
|
||||
mapagent_disable_bk() {
|
||||
local bsta="$2"
|
||||
|
||||
config_get ifname $1 ifname
|
||||
config_get enabled $1 enabled
|
||||
|
||||
[ "$bsta" = "$ifname" ] && return
|
||||
|
||||
wpa_cli -i "$ifname" disconnect > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" disable_network 0 > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
|
||||
}
|
||||
|
||||
local bsta=$1
|
||||
|
||||
config_foreach mapagent_disable_bk bsta $bsta
|
||||
}
|
||||
|
||||
bsta_swap_to_link() {
|
||||
bsta_disable_lower_priority $1
|
||||
bsta_use_link $1
|
||||
|
||||
wpa_cli -i "$1" enable_network 0 > /dev/null
|
||||
wpa_cli -i "$1" reconnect > /dev/null
|
||||
wpa_cli -i "$1" save_config > /dev/null
|
||||
}
|
||||
|
||||
set_uplink_backhaul_info() {
|
||||
local ul_1905id=$1
|
||||
local ul_mac=$2
|
||||
|
||||
json_load "$(cat $MAPFILE)"
|
||||
json_add_string "backhaul_device_id" "$ul_1905id"
|
||||
json_add_string "backhaul_macddr" "$ul_mac"
|
||||
json_dump > "$MAPFILE"
|
||||
json_cleanup
|
||||
}
|
||||
|
||||
set_uplink() {
|
||||
local type=$1
|
||||
local ifname=$2
|
||||
local hwaddr
|
||||
|
||||
hwaddr="$(ifconfig $ifname | grep -i hwaddr | awk '{print $5}' | awk '{print tolower($0)}')"
|
||||
|
||||
json_init
|
||||
json_add_string "type" "$type"
|
||||
json_add_string "ifname" "$ifname"
|
||||
json_add_string "macaddr" "$hwaddr"
|
||||
json_dump > "$MAPFILE"
|
||||
json_cleanup
|
||||
|
||||
config_load mapagent
|
||||
|
||||
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
|
||||
|
||||
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
|
||||
ubus call map.agent toggle_fh '{"enable":true, "prevent_island":true, "ifname":"all"}'
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
unset_uplink() {
|
||||
local type=${1:-wifi}
|
||||
|
||||
config_load mapagent
|
||||
|
||||
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
|
||||
|
||||
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
|
||||
ubus call map.agent toggle_fh '{"enable":false, "prevent_island":true, "ifname":"all"}'
|
||||
fi
|
||||
|
||||
rm -f "$MAPFILE" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
func=$1
|
||||
shift
|
||||
|
||||
case "$func" in
|
||||
wireless_teardown) wireless_teardown;;
|
||||
setup_network) setup_network;;
|
||||
setup_wireless) setup_wireless;;
|
||||
write_credentials) write_credentials;;
|
||||
sync_credentials) sync_credentials;;
|
||||
bsta_steer) bsta_steer $@;;
|
||||
set_network) set_network $@;;
|
||||
write_bsta_config) write_bsta_config $@;;
|
||||
teardown_iface) teardown_iface $@;;
|
||||
bsta_to_wireless) bsta_to_wireless $@;;
|
||||
sync_mapcontroller_from_wireless) sync_mapcontroller_from_wireless $@;;
|
||||
ts) ts_sub $@;;
|
||||
bsta_enable_all) bsta_enable_all $@;;
|
||||
bsta_disable_lower_priority) bsta_disable_lower_priority $@;;
|
||||
bsta_scan_on_enabled) bsta_scan_on_enabled $@;;
|
||||
bsta_use_link) bsta_use_link $@;;
|
||||
bsta_swap_to_link) bsta_swap_to_link $@;;
|
||||
set_uplink) set_uplink $@;;
|
||||
set_uplink_backhaul_info) set_uplink_backhaul_info $@;;
|
||||
unset_uplink) unset_uplink $@;;
|
||||
--help|help) usage;;
|
||||
*) usage; exit 1;;
|
||||
esac
|
||||
|
||||
@@ -1,511 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
### Traffic Separation ###
|
||||
|
||||
dbg() {
|
||||
logger -t traffic_separation $@
|
||||
}
|
||||
|
||||
ts_sub() {
|
||||
|
||||
ts_usage() {
|
||||
cat <<EOF
|
||||
Usage: $0 [create|delete|populate|primary|reload]
|
||||
Traffic Separation related functions.
|
||||
create fh <iface> <vid> - create vlan device and rules for wifi fronthaul
|
||||
create bh <iface> <vid> <profile> - create vlan device and rules for wifi backhaul
|
||||
create eth <iface> <vid> <pbits> - create vlan device and rules for logical ethernet interface
|
||||
delete <iface> - delete vlan device
|
||||
populate eth <iface> <vid> - add secondary network rules for logical ethernet interface
|
||||
primary get <iface> - read primary VID for interface from driver (from Association Response frame IE)
|
||||
reload - reload network with new configuration
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
_get_bridge() {
|
||||
local bridge=$(ip link show $1 | grep -o "master [^\s]*" | cut -d ' ' -f 2)
|
||||
echo $bridge
|
||||
}
|
||||
|
||||
set_wireless_bridge() {
|
||||
config_load wireless
|
||||
|
||||
_set_network() {
|
||||
local sec=$1
|
||||
local iface=$2
|
||||
local bridge=$3
|
||||
|
||||
config_get ifname $sec ifname
|
||||
[ "$iface" != "$ifname" ] && continue
|
||||
|
||||
config_get mode $sec mode
|
||||
config_get multi_ap $sec multi_ap "0"
|
||||
[ "$mode" = "sta" -a "$multi_ap" = "1" ] && continue
|
||||
|
||||
config_get network $sec network
|
||||
local new_network=${bridge##br-}
|
||||
if [ "$new_network" != "$network" ] ; then
|
||||
uci -q set wireless.${sec}.network=${new_network}
|
||||
uci commit wireless
|
||||
fi
|
||||
|
||||
brctl addif $bridge $iface &> /dev/null
|
||||
}
|
||||
|
||||
config_foreach _set_network wifi-iface ${1} ${2}
|
||||
}
|
||||
|
||||
ts_create() {
|
||||
|
||||
_create_vlan_dev() {
|
||||
iface=$1 # real iface
|
||||
vid=$2 # Vlan ID
|
||||
bridge=$3 # bridge iface should be connected
|
||||
vlan_dev=$4
|
||||
|
||||
old_bridge="$(_get_bridge $iface)" # bridge iface is connected to
|
||||
|
||||
# remove interface from bridge if it is in one
|
||||
[ -n "$old_bridge" ] && brctl delif $old_bridge $iface &> /dev/null
|
||||
|
||||
# (re)create vlan device
|
||||
ip link show $vlan_dev && vlanctl --if-delete $vlan_dev
|
||||
vlanctl --mcast --if-create-name $iface $vlan_dev --if $iface --set-if-mode-rg
|
||||
|
||||
vlanctl --if $iface --tx --tags 0 --default-miss-drop
|
||||
vlanctl --if $iface --tx --tags 1 --default-miss-drop
|
||||
vlanctl --if $iface --tx --tags 2 --default-miss-drop
|
||||
vlanctl --if $iface --rx --tags 0 --default-miss-drop
|
||||
vlanctl --if $iface --rx --tags 1 --default-miss-drop
|
||||
vlanctl --if $iface --rx --tags 2 --default-miss-drop
|
||||
|
||||
# bring the vlan device up and add back to bridge if it was in one
|
||||
brctl addif $bridge $vlan_dev &> /dev/null
|
||||
}
|
||||
|
||||
ts_create_fh() {
|
||||
iface=$1 # fh iface
|
||||
vid=$2 # SSID specific (secondary) or primary vid
|
||||
bridge=$3
|
||||
|
||||
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$bridge" ] || {
|
||||
cat <<EOF
|
||||
Adding FH device requires IFACE, VID and bridge
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# create vlan device
|
||||
#set_wireless_bridge $iface $bridge
|
||||
|
||||
vlan_dev=${iface}_vlan${vid}
|
||||
ip link set $vlan_dev down
|
||||
_create_vlan_dev $iface $vid $bridge $vlan_dev
|
||||
|
||||
# add rules
|
||||
# vlanctl --if $iface --rx --tags 0 --filter-ethertype 0x886c --set-rxif $vlan_dev --rule-append # incoming brcm
|
||||
|
||||
# EAPOL frames
|
||||
vlanctl --if $iface --rx --tags 0 --filter-ethertype 34958 --set-rxif $vlan_dev --rule-append
|
||||
vlanctl --if $iface --rx --tags 1 --filter-ethertype 34958 --pop-tag --set-rxif $vlan_dev --rule-append
|
||||
vlanctl --if $iface --tx --tags 0 --filter-txif $vlan_dev --filter-ethertype 34958 --rule-append
|
||||
|
||||
# 8021q vlan id TAG/UNTAG
|
||||
vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --rule-append
|
||||
vlanctl --if $iface --tx --tags 1 --filter-txif $vlan_dev --filter-vid $vid 0 --pop-tag --dscp2pbits 0 --rule-append
|
||||
|
||||
ip link set $iface up
|
||||
ip link set $vlan_dev up
|
||||
}
|
||||
|
||||
ts_create_bh() {
|
||||
iface=$1 # bh iface
|
||||
vid=$2 # primary vid
|
||||
profile=$3 # agent profile (1 or 2)
|
||||
bridge=$4 # bridge interface should be connected to
|
||||
|
||||
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$profile" ] || {
|
||||
cat <<EOF
|
||||
Adding BH device requires IFACE, VID and PROFILE (1 or 2).
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
#[ -n "$bridge" ] && set_wireless_bridge $iface $bridge
|
||||
|
||||
old_vid=$(wl -i $1 map_8021q_settings)
|
||||
old_vid=${old_vid##* }
|
||||
old_profile=$(wl -i $1 map_profile | cut -d ' ' -f 3)
|
||||
|
||||
[ "$old_vid" = "$vid" -a "$old_profile" = "$profile" ] && return
|
||||
|
||||
wl vlan_mode 0 &> /dev/null # make sure this is OFF, else driver won't handle vlan
|
||||
wl -i $iface down &> /dev/null
|
||||
wl -i $iface map_profile $profile &> /dev/null # only has effect on profile 2
|
||||
wl -i $iface map_8021q_settings $vid &> /dev/null # can only be set on bBSS (read-only on bSTA)
|
||||
wl -i $iface up &> /dev/null
|
||||
}
|
||||
|
||||
ts_create_lei() {
|
||||
vid=$1 # primary vid
|
||||
pbits=$2 # default pbits to apply
|
||||
vlan_bridge=$3 # name of ts subsystem bridge
|
||||
lan_bridge=$4 # name of node local bridge
|
||||
|
||||
[ -n "$vid" ] && [ -n "$pbits" ] && [ -n "$vlan_bridge" ] && [ -n "$lan_bridge" ] || {
|
||||
cat <<EOF
|
||||
Adding ETH device requires IFACE, VID, PBITS and name of vlan and lan bridges.
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
ip link show lei &> /dev/null || {
|
||||
ip link add link lei name lei_lan type vlan id 1 2>/dev/null
|
||||
}
|
||||
|
||||
old_vid=$(ip -d link show lei_lan | sed -n 's/vlan.*id \([0-9][0-9]*\) .*/\1/p')
|
||||
|
||||
[ "$old_vid" != "$vid" ] && {
|
||||
ip link del lei_lan
|
||||
ip link add link lei name lei_lan type vlan id ${vid}
|
||||
}
|
||||
|
||||
brctl addif ${lan_bridge} lei_lan &>/dev/null
|
||||
brctl addif ${vlan_bridge} lei_map &>/dev/null
|
||||
|
||||
ip link set lei up
|
||||
ip link set lei_map up
|
||||
ip link set lei_lan up
|
||||
}
|
||||
|
||||
_create_eth() {
|
||||
iface=$1 # Multi-AP Logical Ethernet Interface
|
||||
vid=$2 # primary vid
|
||||
bridge=$3 # name of ts subsystem bridge
|
||||
pbits=0
|
||||
|
||||
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$bridge" ] || {
|
||||
cat <<EOF
|
||||
Adding ETH device requires IFACE, VID, PBITS and name of vlan and lan bridges.
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
dbg create $@
|
||||
|
||||
ip link set $iface down
|
||||
|
||||
vlan_dev=${iface}_vlan${vid}
|
||||
ip link set $vlan_dev down
|
||||
_create_vlan_dev $iface $vid $bridge $vlan_dev
|
||||
|
||||
vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --set-pbits $pbits 0 --rule-append
|
||||
vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --pop-tag --rule-append
|
||||
|
||||
[ $# -le 3 ] && exit 0
|
||||
shift 3
|
||||
|
||||
while [ -n "$1" ] ; do
|
||||
vid=$1
|
||||
vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append
|
||||
vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append
|
||||
shift
|
||||
done
|
||||
|
||||
ip link set $iface up
|
||||
ip link set $vlan_dev up
|
||||
}
|
||||
|
||||
ts_create_eths() {
|
||||
pvid=$1 # primary vid
|
||||
bridge=$2 # name of ts subsystem bridge
|
||||
|
||||
shift 2
|
||||
# TODO use ieee1905 bridge
|
||||
for iface in $(uci get network.br_lan.ports) ; do
|
||||
[ "$iface" = "lei_lan" ] && continue
|
||||
_create_eth $iface $pvid $bridge $@
|
||||
ubus call ieee1905 del_interface "{\"ifname\":\"$iface\"}"
|
||||
done
|
||||
}
|
||||
|
||||
ts_create_dhcp() {
|
||||
local diff=""
|
||||
|
||||
_net_setup() {
|
||||
local name=$1
|
||||
local devname=$2
|
||||
local vid=$3
|
||||
|
||||
[ -z "$(uci -q get network.${name})" ] && {
|
||||
uci -q set network.${name}="interface"
|
||||
uci -q set network.${name}.device="$devname"
|
||||
uci -q set network.${name}.is_lan="1"
|
||||
uci -q set network.${name}.proto="static"
|
||||
# TODO vid > 255
|
||||
local ip_addr="192.168.${vid}.1"
|
||||
[ "${vid}" = "1" ] && ip_addr="192.168.${vid}.2"
|
||||
uci -q set network.${name}.ipaddr="${ip_addr}"
|
||||
uci -q set network.${name}.netmask="255.255.255.0"
|
||||
|
||||
diff="1"
|
||||
}
|
||||
|
||||
[ "$diff" = "1" ] && uci -q commit network
|
||||
}
|
||||
|
||||
_br_setup() {
|
||||
local name=$1
|
||||
local sinkname=$2
|
||||
local vid=$3
|
||||
|
||||
[ -z "$(uci -q get network.${name}_dev)" ] && {
|
||||
uci -q set network.${name}_dev="device"
|
||||
uci -q set network.${name}_dev.name="br-${name}"
|
||||
uci -q set network.${name}_dev.type="bridge"
|
||||
uci -q set network.${name}_dev.bridge_empty="1"
|
||||
uci -q add_list network.${name}_dev.ports="${sinkname}"
|
||||
|
||||
diff="1"
|
||||
}
|
||||
|
||||
[ -z "$(uci -q get network.${name})" ] && {
|
||||
uci -q set network.${name}="interface"
|
||||
uci -q set network.${name}.device="br-${name}"
|
||||
uci -q set network.${name}.is_lan="1"
|
||||
uci -q set network.${name}.proto="static"
|
||||
uci -q set network.${name}.ipaddr="192.168.${vid}.1"
|
||||
uci -q set network.${name}.netmask="255.255.255.0"
|
||||
|
||||
diff="1"
|
||||
}
|
||||
|
||||
[ "$diff" = "1" ] && uci -q commit network
|
||||
}
|
||||
|
||||
_dhcp_setup() {
|
||||
local name=$1
|
||||
|
||||
[ -n "$(uci -q get dhcp.${name})" ] && return
|
||||
|
||||
uci -q set dhcp.${name}=dhcp
|
||||
uci -q set dhcp.${name}.interface="${name}"
|
||||
uci -q set dhcp.${name}.start="100"
|
||||
uci -q set dhcp.${name}.limit="150"
|
||||
uci -q set dhcp.${name}.leasetime="1h"
|
||||
uci -q set dhcp.${name}.dhcpv4="server"
|
||||
uci -q set dhcp.${name}.dhcpv6="server"
|
||||
uci -q set dhcp.${name}.ra="server"
|
||||
uci -q set dhcp.${name}.ra_slaac="1"
|
||||
uci -q add_list dhcp.${name}.ra_flags="managed-config"
|
||||
uci -q add_list dhcp.${name}.ra_flags="other-config"
|
||||
|
||||
diff="1"
|
||||
uci -q commit dhcp
|
||||
}
|
||||
|
||||
_firewall_setup() {
|
||||
local name=$1
|
||||
local network=$2
|
||||
local zone_exist=0
|
||||
|
||||
config_load firewall
|
||||
|
||||
_process_zone() {
|
||||
local section=$1
|
||||
local new_name=$2
|
||||
local name
|
||||
|
||||
config_get name $section name
|
||||
|
||||
[ "$name" == "$new_name" ] && zone_exist=1
|
||||
}
|
||||
|
||||
config_foreach _process_zone zone $name
|
||||
|
||||
[ "$zone_exist" != "0" ] && return
|
||||
|
||||
uci -q add firewall zone
|
||||
uci -q set firewall.@zone[-1].name="$name"
|
||||
uci -q add_list firewall.@zone[-1].network="$network"
|
||||
uci -q set firewall.@zone[-1].input='ACCEPT'
|
||||
uci -q set firewall.@zone[-1].output='ACCEPT'
|
||||
uci -q set firewall.@zone[-1].forward='ACCEPT'
|
||||
|
||||
uci -q add firewall forwarding
|
||||
uci -q set firewall.@forwarding[-1].src="$name"
|
||||
uci -q set firewall.@forwarding[-1].dest="wan"
|
||||
|
||||
diff="1"
|
||||
uci -q commit firewall
|
||||
}
|
||||
|
||||
vid=$1 # primary vid
|
||||
|
||||
[ -n "$vid" ] || {
|
||||
cat <<EOF
|
||||
VID required to configure DHCP.
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
ip link show sink${vid} || {
|
||||
ip link add sink${vid} type veth peer name sink${vid}_vlan
|
||||
ip link add link sink${vid} name sink${vid}_peer type vlan id ${vid}
|
||||
}
|
||||
|
||||
ip link set sink${vid} up
|
||||
ip link set sink${vid}_peer up
|
||||
ip link set sink${vid}_vlan up
|
||||
|
||||
diff=""
|
||||
_net_setup sink${vid} sink${vid}_peer ${vid}
|
||||
_dhcp_setup sink${vid}
|
||||
_firewall_setup lan${vid} sink${vid}
|
||||
|
||||
[ "$diff" = "1" ] && {
|
||||
ubus call network reload
|
||||
ubus -t 5 wait_for network.interface.sink${vid}
|
||||
}
|
||||
|
||||
brctl addif br-map sink${vid}_vlan &> /dev/null
|
||||
}
|
||||
|
||||
local type=$1
|
||||
shift
|
||||
|
||||
case "$type" in
|
||||
fh) ts_create_fh $@;;
|
||||
bh) ts_create_bh $@;;
|
||||
lei) ts_create_lei $@;;
|
||||
eths) ts_create_eths $@;;
|
||||
dhcp) ts_create_dhcp $@;;
|
||||
--help|help) ts_usage;;
|
||||
*) ts_usage; exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
ts_delete() {
|
||||
iface=$1
|
||||
|
||||
path=$(ls -d /sys/class/net/${iface}/upper_*)
|
||||
[ -z "$path" ] && exit 0
|
||||
|
||||
vlan_dev=${path##*upper_}
|
||||
bridge="$(_get_bridge $vlan_dev)"
|
||||
|
||||
[ -n "$bridge" ] && {
|
||||
vlanctl --if-delete $vlan_dev # note: also removes rules and removes from bridge
|
||||
brctl addif $bridge $iface &> /dev/null # needed to add again
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ts_populate() {
|
||||
local type=$1
|
||||
shift
|
||||
|
||||
[ "$type" == "eth" ] || {
|
||||
cat <<EOF
|
||||
Populating ETH rules requires IFACE and VID.
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
iface=$1 # Multi-AP Logical Ethernet Interface
|
||||
vid=$2 # secondary vid
|
||||
|
||||
path=$(ls -d /sys/class/net/${iface}/upper_*)
|
||||
[ -z "$path" ] && exit 1
|
||||
vlan_dev=${path##*upper_}
|
||||
|
||||
# add rules
|
||||
#vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append # note: retain secondary vids
|
||||
#vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append # note: already default
|
||||
}
|
||||
|
||||
ts_primary() {
|
||||
local func=$1
|
||||
shift
|
||||
|
||||
case "$func" in
|
||||
get) vid=$(wl -i $1 map_8021q_settings); echo ${vid##* };;
|
||||
*) ts_usage; exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
ts_unicast() {
|
||||
local mac=$1
|
||||
local iface=$2
|
||||
|
||||
# TODO: improve?
|
||||
res=$(ebtables -t broute -L | grep -i "$mac" | grep "$iface")
|
||||
[ -n "$res" ] && return
|
||||
|
||||
ebtables -t broute -D BROUTING -d "$mac" -p 0x893a -j DROP
|
||||
ebtables -t broute -I BROUTING -i "$iface" -d "$mac" -p 0x893a -j DROP
|
||||
}
|
||||
|
||||
ts_multicast() {
|
||||
local iface=$1
|
||||
|
||||
# TODO: improve?
|
||||
res=$(ebtables -t broute -L | grep -i "1:80:C2:00:00:13" | grep "$iface")
|
||||
[ -n "$res" ] && return
|
||||
|
||||
ebtables -t broute -D BROUTING -d 01:80:C2:00:00:13 -p 0x893a -j DROP
|
||||
ebtables -t broute -D BROUTING -i "$iface" -d 01:80:C2:00:00:13 -p 0x893a -j DROP
|
||||
ebtables -t broute -I BROUTING -i "$iface" -d 01:80:C2:00:00:13 -p 0x893a -j DROP
|
||||
}
|
||||
|
||||
ts_reload() {
|
||||
local dhcp_reload=$1
|
||||
|
||||
# workaround for missing backhaul wifi.ap.* ubus obj's:
|
||||
# iterate in config and setup bh
|
||||
config_load wireless
|
||||
|
||||
_setup_bh_iface() {
|
||||
local sec=$1
|
||||
local iface=$2
|
||||
local bridge=$3
|
||||
|
||||
config_get ifname $sec ifname
|
||||
|
||||
config_get mode $sec mode
|
||||
config_get multi_ap $sec multi_ap "0"
|
||||
[ "$mode" = "ap" -a "$multi_ap" = "1" ] && {
|
||||
ts_create bh $ifname 1 2 br-map
|
||||
}
|
||||
}
|
||||
|
||||
config_foreach _setup_bh_iface wifi-iface
|
||||
|
||||
[ -n "dhcp_reload" ] && /etc/init.d/dnsmasq reload
|
||||
|
||||
# another workaround for netif? removed
|
||||
# sink devices for br-map bridge
|
||||
for sink in $(ubus list network.interface.sink*) ; do
|
||||
local sink_vlan=${sink/network.interface./}_vlan
|
||||
brctl addif br-map $sink_vlan &> /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
local func=$1
|
||||
shift
|
||||
|
||||
case "$func" in
|
||||
create) dbg "create $@"; ts_create $@;;
|
||||
delete) dbg "delete $@"; ts_delete $@;;
|
||||
populate) dbg "populate $@"; ts_populate $@;;
|
||||
primary) dbg "primary $@"; ts_primary $@;;
|
||||
unicast) dbg "unicast $@"; ts_unicast $@;;
|
||||
multicast) dbg "multicast $@"; ts_multicast $@;;
|
||||
reload) dbg "reload $@"; ts_reload $@;;
|
||||
--help|help) ts_usage;;
|
||||
*) ts_usage; exit 1;;
|
||||
esac
|
||||
}
|
||||
@@ -6,5 +6,25 @@ config CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
|
||||
bool "Support Dynamic Controller configuration sync"
|
||||
default y if MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
|
||||
|
||||
config CONTROLLER_EASYMESH_VENDOR_EXT
|
||||
bool "Enable extra features through Easymesh vendor extension"
|
||||
default y
|
||||
|
||||
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
string
|
||||
default "\\\\x11\\\\x22\\\\x33"
|
||||
|
||||
config CONTROLLER_EASYMESH_VERSION
|
||||
int "Support Easymesh version"
|
||||
default 2
|
||||
|
||||
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
|
||||
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
|
||||
default CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
help
|
||||
Extra features not covered by the base Easymesh specification can be
|
||||
enabled through CONTROLLER_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
|
||||
through which such features would be exposed.
|
||||
|
||||
endmenu
|
||||
endif
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
#
|
||||
# Copyright (C) 2020 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=6.0.18
|
||||
PKG_VERSION:=4.2.0.3
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=4029fa48a18e3a6c8af3a2478558e74184fd1786
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_SOURCE_VERSION:=a88dea065f40c81d3356d850fe447a9deeb972e4
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
@@ -20,13 +17,16 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/map-controller
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi Multi-AP Controller (EasyMesh R2)
|
||||
DEPENDS:=+libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 +map-plugin
|
||||
DEPENDS:=+libuci +libubox +ubus +libeasy +libwifiutils +libieee1905 +ieee1905 +map-plugin
|
||||
endef
|
||||
|
||||
define Package/map-controller/description
|
||||
@@ -38,21 +38,31 @@ define Package/map-controller/config
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-Wno-error=deprecated-declarations \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_CONTROLLER_EASYMESH_VERSION)
|
||||
|
||||
ifeq ($(CONFIG_CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG),y)
|
||||
TARGET_CFLAGS += -DCONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CONTROLLER_EASYMESH_VENDOR_EXT),y)
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_CONTROLLER_EASYMESH_VENDOR_EXT_OUI)\\\"
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
|
||||
endif
|
||||
|
||||
define Package/map-controller/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapcontroller $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/mapcontroller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/plugins/steer/rcpi/rcpi.so $(1)/usr/lib/mapcontroller/rcpi.so
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
|
||||
@@ -1,67 +1,151 @@
|
||||
config controller 'controller'
|
||||
option enabled '1'
|
||||
option registrar '5 2' #bands on which wps registrar supported
|
||||
option debug '6'
|
||||
option registrar '2 5'
|
||||
option debug '0'
|
||||
option bcn_metrics_max_num '10'
|
||||
option initial_channel_scan '0'
|
||||
option primary_vid '0'
|
||||
option primary_pcp '0'
|
||||
option allow_bgdfs '0'
|
||||
option channel_plan '0'
|
||||
|
||||
config sta_steering
|
||||
option steer_module 'rcpi'
|
||||
option enabled '1'
|
||||
option enable_sta_steer '0'
|
||||
option enable_bsta_steer '0'
|
||||
option primary_vid '1'
|
||||
option primary_pcp '0'
|
||||
|
||||
config interface 'lan'
|
||||
option 'dhcp'
|
||||
|
||||
config ap
|
||||
option band '5'
|
||||
option encryption 'sae-mixed'
|
||||
option key '1234567890'
|
||||
option ssid 'map-net5'
|
||||
option vid '1'
|
||||
option type 'fronthaul'
|
||||
option network 'lan'
|
||||
option use_bcn_metrics '0'
|
||||
option use_usta_metrics '0'
|
||||
option bandsteer '0'
|
||||
option diffsnr '8'
|
||||
|
||||
config ap
|
||||
option band '2'
|
||||
option encryption 'sae-mixed'
|
||||
option key '1234567890'
|
||||
option ssid 'map-net2'
|
||||
option vid '1'
|
||||
option type 'fronthaul'
|
||||
option network 'lan'
|
||||
option ssid 'IOWRT-2.4GHz'
|
||||
option encryption 'sae-mixed'
|
||||
option key '1234567890'
|
||||
|
||||
config ap
|
||||
option band '5'
|
||||
option encryption 'sae'
|
||||
option key '5555555555'
|
||||
option ssid 'map-bkhaul-5'
|
||||
option type 'backhaul'
|
||||
option disallow_bsta '1' # bitmap, 1 for disallow p1, 2 to disallow p2, 3 to disallow both (probably never applicable)
|
||||
option type 'fronthaul'
|
||||
option vid '1'
|
||||
option network 'lan'
|
||||
option ssid 'IOWRT-5GHz'
|
||||
option encryption 'sae-mixed'
|
||||
option key '1234567890'
|
||||
|
||||
config ap
|
||||
option band '2'
|
||||
option encryption 'sae'
|
||||
option key '2222222222'
|
||||
option ssid 'map-bkhaul-2'
|
||||
list disallow_bsta '0' # 0 or 1 profile-1 bSTA
|
||||
option vid '1'
|
||||
option type 'backhaul'
|
||||
option network 'lan'
|
||||
option vid '1'
|
||||
list disallow_bsta '0'
|
||||
option ssid 'MAP-BH-2.4GHz'
|
||||
option encryption 'sae'
|
||||
option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
|
||||
|
||||
config policy 'policy'
|
||||
list steer_exclude '00:11:22:33:44:55'
|
||||
list steer_exclude_btm '00:aa:bb:cc:dd:ee'
|
||||
option steer_policy '2' # 0, 1, 2 - see MultiAP spec
|
||||
option util_threshold '200' # channel-util as in BSS load
|
||||
option rcpi_threshold '30' # 0 - 220 valid range
|
||||
option report_scan '0' # 0 or 1 for independent scans
|
||||
option report_sta_assocfails '1' # 0 or 1 - stas assoc failure
|
||||
option report_sta_assocfails_rate '2' # reporting rate for STA assoc fails (attempts per minute)
|
||||
option report_metric_periodic '0' # 0, or 1 - 255 in secs
|
||||
option report_rcpi_threshold '0' # 0, or 1 - 220
|
||||
option report_util_threshold '0' # 0, or channel-util value
|
||||
option rcpi_hysteresis_margin '0' # 0, or > 0 - hysteresis margin
|
||||
option include_sta_stats '0' # sta stats in AP metric resp
|
||||
option include_sta_metric '0' # sta metric in AP metric resp
|
||||
option disallow_bsta_p1 '0' # 0 or 1 profile-1 bSTA
|
||||
option disallow_bsta_p2 '0' # 0 or 1 profile-2 bSTA
|
||||
config ap
|
||||
option band '5'
|
||||
option type 'backhaul'
|
||||
option vid '1'
|
||||
list disallow_bsta '0'
|
||||
option ssid 'MAP-BH-5GHz'
|
||||
option encryption 'sae'
|
||||
option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
|
||||
|
||||
# node and radio sections (per node) are auto
|
||||
# generated per Multi-AP Agent in the network
|
||||
#
|
||||
#config node 'node_0a1b2c3d4e50'
|
||||
# option agent_id '0a:1b:2c:3d:4e:50'
|
||||
# following values use default values after onboarding if not explicitly set
|
||||
# option backhaul_ul_macaddr '00:00:00:00:00:00'
|
||||
# option backhaul_dl_macaddr '00:00:00:00:00:00'
|
||||
# option backhaul_type 'none'
|
||||
# option primary_vid '1'
|
||||
# option primary_pcp '0'
|
||||
# option report_sta_assocfails '0'
|
||||
# option report_sta_assocfails_rate '0'
|
||||
# option report_metric_periodic '0'
|
||||
# option report_scan '0'
|
||||
# list steer_exclude 'e0:d4:e8:79:c4:ee'
|
||||
# list steer_exclude_btm 'e0:d4:e8:79:c4:11'
|
||||
# option steer_disallow '0'
|
||||
# option coordinated_cac '0'
|
||||
# option traffic_separation '0'
|
||||
# option sta_steer '0'
|
||||
|
||||
#config radio 'radio_0a1b2c3d4e53'
|
||||
# option agent_id '0a:1b:2c:3d:4e:50'
|
||||
# option macaddr '0a:1b:2c:3d:4e:53'
|
||||
# option band '2'
|
||||
# following values use default values after onboarding if not explicitly set
|
||||
# option steer_policy '0'
|
||||
# option util_threshold '0'
|
||||
# option rcpi_threshold '70'
|
||||
# option report_rcpi_threshold '80'
|
||||
# option report_util_threshold '0'
|
||||
# option report_rcpi_hysteresis_margin '0'
|
||||
# option include_sta_stats '1'
|
||||
# option include_sta_metric '1'
|
||||
|
||||
#config radio 'radio_0a1b2c3d4e54'
|
||||
# option agent_id '0a:1b:2c:3d:4e:50'
|
||||
# option macaddr '0a:1b:2c:3d:4e:54'
|
||||
# option band '5'
|
||||
# following values use default values after onboarding if not explicitly set
|
||||
# option steer_policy '0'
|
||||
# option util_threshold '0'
|
||||
# option rcpi_threshold '86'
|
||||
# option report_rcpi_threshold '96'
|
||||
# option report_util_threshold '0'
|
||||
# option report_rcpi_hysteresis_margin '0'
|
||||
# option include_sta_stats '1'
|
||||
# option include_sta_metric '1'
|
||||
|
||||
#config node 'node_3fb1c2d3e460'
|
||||
# option agent_id '3f:b1:c2:d3:e4:60'
|
||||
# following values use default values after onboarding if not explicitly set
|
||||
# option backhaul_ul_macaddr '00:00:00:00:00:00'
|
||||
# option backhaul_dl_macaddr '00:00:00:00:00:00'
|
||||
# option backhaul_type 'none'
|
||||
# option primary_vid '1'
|
||||
# option primary_pcp '0'
|
||||
# option report_sta_assocfails '0'
|
||||
# option report_sta_assocfails_rate '0'
|
||||
# option report_metric_periodic '0'
|
||||
# option report_scan '0'
|
||||
# list steer_exclude 'e0:d4:e8:79:c4:ee'
|
||||
# list steer_exclude_btm 'e0:d4:e8:79:c4:11'
|
||||
# option steer_disallow '0'
|
||||
# option coordinated_cac '0'
|
||||
# option traffic_separation '0'
|
||||
# option sta_steer '0'
|
||||
|
||||
#config radio 'radio_3fb1c2d3e463'
|
||||
# option agent_id '3f:b1:c2:d3:e4:60'
|
||||
# option macaddr '3f:b1:c2:d3:e4:63'
|
||||
# option band '2'
|
||||
# following values use default values after onboarding if not explicitly set
|
||||
# option steer_policy '0'
|
||||
# option util_threshold '0'
|
||||
# option rcpi_threshold '70'
|
||||
# option report_rcpi_threshold '80'
|
||||
# option report_util_threshold '0'
|
||||
# option report_rcpi_hysteresis_margin '0'
|
||||
# option include_sta_stats '1'
|
||||
# option include_sta_metric '1'
|
||||
|
||||
#config radio 'radio_3fb1c2d3e464'
|
||||
# option agent_id '3f:b1:c2:d3:e4:60'
|
||||
# option macaddr '3f:b1:c2:d3:e4:64'
|
||||
# option band '5'
|
||||
# following values use default values after onboarding if not explicitly set
|
||||
# option steer_policy '0'
|
||||
# option util_threshold '0'
|
||||
# option rcpi_threshold '86'
|
||||
# option report_rcpi_threshold '96'
|
||||
# option report_util_threshold '0'
|
||||
# option report_rcpi_hysteresis_margin '0'
|
||||
# option include_sta_stats '1'
|
||||
# option include_sta_metric '1'
|
||||
|
||||
@@ -19,11 +19,12 @@ validate_controller_section() {
|
||||
'enabled:bool:true' \
|
||||
'registrar:string' \
|
||||
'debug:range(0,16)' \
|
||||
'bcn_metrics_max_num:range(1,256)' \
|
||||
'initial_channel_scan:bool:true' \
|
||||
'resend_num:uinteger:0' \
|
||||
'enable_sta_steer:bool:false' \
|
||||
'enable_bsta_steer:bool:false' \
|
||||
'use_bcn_metrics:bool:false' \
|
||||
'use_usta_metrics:bool:false'
|
||||
'allow_bgdfs:range(0,2629744)' \
|
||||
'channel_plan:range(0,2629744)' \
|
||||
'enable_ts:bool:false'
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
logger -s -t "mapcontroller" "Validation of controller section failed"
|
||||
@@ -33,14 +34,44 @@ validate_controller_section() {
|
||||
return 0
|
||||
}
|
||||
|
||||
validate_sta_steering_section() {
|
||||
local section="$1"
|
||||
|
||||
uci_validate_section mapcontroller $section "${1}" \
|
||||
'steer_module:string' \
|
||||
'enabled:bool:true' \
|
||||
'enable_sta_steer:bool:false' \
|
||||
'enable_bsta_steer:bool:false' \
|
||||
'use_bcn_metrics:bool:false' \
|
||||
'use_usta_metrics:bool:false' \
|
||||
'bandsteer:bool:false' \
|
||||
'diffsnr:range(0,100)' \
|
||||
'rcpi_threshold_2g:range(0,220)' \
|
||||
'rcpi_threshold_5g:range(0,220)' \
|
||||
'rcpi_threshold_6g:range(0,220)' \
|
||||
'report_rcpi_threshold_2g:range(0,220)' \
|
||||
'report_rcpi_threshold_5g:range(0,220)' \
|
||||
'report_rcpi_threshold_6g:range(0,220)'
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
logger -s -t "mapcontroller" "Validation of sta_steering section failed"
|
||||
IS_CFG_VALID=0
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
validate_ap_section() {
|
||||
local section="$1"
|
||||
|
||||
uci_validate_section mapcontroller $section "${1}" \
|
||||
'band:or("2", "5")' \
|
||||
'band:or("2", "5", "6")' \
|
||||
'ssid:string' \
|
||||
'encryption:or("sae", "sae+aes", "psk2",
|
||||
"psk2+aes", "sae-mixed", "sae-mixed+aes")' \
|
||||
"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' \
|
||||
'type:or("backhaul", "fronthaul", "combined")' \
|
||||
@@ -90,7 +121,7 @@ validate_radio_section() {
|
||||
uci_validate_section mapcontroller $section "${1}" \
|
||||
'agent_id:macaddr' \
|
||||
'macaddr:macaddr' \
|
||||
'band:or("2", "5")' \
|
||||
'band:or("2", "5", "6")' \
|
||||
'steer_policy:range(0,2)' \
|
||||
'util_threshold:range(0,255)' \
|
||||
'rcpi_threshold:range(0,255)' \
|
||||
@@ -113,6 +144,7 @@ validate_controller_config() {
|
||||
IS_CFG_VALID=1
|
||||
|
||||
validate_controller_section &&
|
||||
config_foreach validate_sta_steering_section sta_steering &&
|
||||
config_foreach validate_ap_section ap &&
|
||||
config_foreach validate_node_section node &&
|
||||
config_foreach validate_radio_section radio
|
||||
@@ -167,7 +199,7 @@ reload_service() {
|
||||
return
|
||||
fi
|
||||
|
||||
pidof "mapcontroller" > /dev/null
|
||||
pidof "/usr/sbin/mapcontroller" > /dev/null
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
start
|
||||
return
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user