Compare commits

..

117 Commits

Author SHA1 Message Date
Sukru Senli
3693878957 questd: use same Makefile for both Broadcom and Mediatek targets 2017-03-23 09:04:28 +01:00
Sukru Senli
03aba6e45d Merge remote-tracking branch 'origin/devel' into mediatek 2017-03-22 11:13:49 +01:00
Sukru Senli
a3ad3065cb iop: select ice-client by default 2017-03-22 10:14:53 +01:00
Jonas Höglund
96bbcc5bf9 Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* 08fb2b8 If image can not be booted from uboot reboot.
-------------------------------------------------------------------------------
commit 08fb2b839326c3bc2a2a0472b5dae6ee0288e483
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2017-03-21 17:30:56 +0100

    If image can not be booted from uboot reboot.

    Only allow 10 reboots to prevent infinite reboot and write to flash.

Base directory -> /
 board/inteno/ex400/iboot.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2017-03-21 17:33:40 +01:00
Jonas Höglund
437597ef22 Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* 1fbe8f5 Revert "Set baudrate to 57600"
-------------------------------------------------------------------------------
commit 1fbe8f5bf3702285049273005c16071326fb75fa
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2017-03-21 17:22:49 +0100

    Revert "Set baudrate to 57600"

    This reverts commit 6f962f2c27eef98a16cc3236a0f28c422a0628c4.

Base directory -> /
 include/configs/ex400.h |   2 +-
 mt7621_stage_L2.bin     | Bin 19896 -> 19896 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-03-21 17:23:43 +01:00
Jonas Höglund
58a25668bd Revert "iop: select ice-client by default"
This reverts commit 8411fa328c.
2017-03-21 10:33:55 +01:00
Sukru Senli
8411fa328c iop: select ice-client by default 2017-03-20 12:54:44 +01:00
Reidar Cederqvist
f4ac8264e0 moved 01-close-ports-repeater hotplug script to correct folder 2017-03-17 17:18:21 +01:00
Sukru Senli
df10c1b4d5 iop: select juci realtime graphs by default 2017-03-17 15:19:39 +01:00
Reidar Cederqvist
6fe71973ff added script to close ports w public ip on wan 2017-03-17 15:18:22 +01:00
Sukru Senli
220ad9826b questd: graphd installed 2017-03-17 15:08:14 +01:00
Sukru Senli
5df533cb66 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 2217e77 gpio_set_state: add delay argument
-------------------------------------------------------------------------------
commit 2217e777ce56b53878ca467a06025db935c235eb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-03-17 15:00:41 +0100

    gpio_set_state: add delay argument

Base directory -> /
 src/gpio_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-03-17 15:00:58 +01:00
Sukru Senli
fefd065a98 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* c809a57 add graphd to gitignore
* 6c0ab55 graphd: define PTHREAD_MUTEX_INITIALIZER if not defined
-------------------------------------------------------------------------------
commit c809a57e7bf0afae617d17ea12a5d322eba35b8f
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-03-17 14:37:40 +0100

    add graphd to gitignore

Base directory -> /
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 6c0ab5551da9316b41a4fd330e98e91f9363db3a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-03-17 14:37:19 +0100

    graphd: define PTHREAD_MUTEX_INITIALIZER if not defined

Base directory -> /
 graphd.c | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
2017-03-17 14:38:18 +01:00
Sukru Senli
a483516258 Merge remote-tracking branch 'origin/devel' into mediatek 2017-03-17 14:28:33 +01:00
Reidar Cederqvist
b06f188e01 netmodes: net hotplug script checks ping on switch event refs #11362 2017-03-17 11:55:22 +01:00
Sukru Senli
98a289e7b3 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 7e2deb9 mtk: calculate bandwidth from rate
* c547b76 port.c: added a check if input is valid in port status call
* cb4f134 port.c: fixed bug in port status for bridge
* 3094b92 fixed an error in tools.c and fixed warnings in port.c
* 24b09bb wireless: support 160MHz support
-------------------------------------------------------------------------------
commit 7e2deb9eb8a76d4b711a39bcfb9d42593bcb2d01
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-03-08 17:32:21 +0100

    mtk: calculate bandwidth from rate

Base directory -> /
 mediatek.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit c547b76a0995930ae4681c976189642ba1a248d2
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-03-06 10:28:19 +0100

    port.c: added a check if input is valid in port status call

Base directory -> /
 port.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
-------------------------------------------------------------------------------
commit cb4f13460c6f0c4e562ca7952aee98ed2bb4b81c
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-03-06 10:27:33 +0100

    port.c: fixed bug in port status for bridge

Base directory -> /
 port.c | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit 3094b92365d860360934c0656ad51439eacac3ad
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-03-03 12:04:10 +0100

    fixed an error in tools.c and fixed warnings in port.c

Base directory -> /
 port.c  | 4 ++--
 tools.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 24b09bb6996838721859d0ad220f73497f3f0a4d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-03-02 13:43:33 +0100

    wireless: support 160MHz support

Base directory -> /
 wireless.c | 18 +++++++++++++++---
 wireless.h |  2 +-
 2 files changed, 16 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2017-03-08 17:34:00 +01:00
Reidar Cederqvist
9eb7bb51a7 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* e7a3968 wireless: added autochannel call
-------------------------------------------------------------------------------
commit e7a39684b7960e3c4b99958ae3fea7d918290753
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-03-01 13:53:37 +0100

    wireless: added autochannel call

Base directory -> /
 broadcom.c | 10 ++++++++++
 broadcom.h |  1 +
 mediatek.c |  4 ++++
 mediatek.h |  1 +
 wireless.c | 39 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 55 insertions(+)
-------------------------------------------------------------------------------
2017-03-01 13:54:05 +01:00
Sukru Senli
ca36fd6b40 netmodes: renew udhcpc only when switching to public network 2017-02-28 11:24:53 +01:00
Sukru Senli
b04c80c91d Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 514517e wificontrol: internet led notice in repeater/extender mode
-------------------------------------------------------------------------------
commit 514517e44fe90e6861a233b45a7a9f248753807b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-28 10:49:40 +0100

    wificontrol: internet led notice in repeater/extender mode

Base directory -> /
 wificontrol.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
2017-02-28 11:04:26 +01:00
Sukru Senli
9959a935cf Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* dd1cf88 wificontrol: write online status to tmp
* b7ae898 port.c: added support for bridges in port status call
-------------------------------------------------------------------------------
commit dd1cf8830760bfea503fc049a1928a2119bd9e4c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-27 17:22:04 +0100

    wificontrol: write online status to tmp

Base directory -> /
 wificontrol.c | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit b7ae898c21dd9a8866f997551e16ca982ed0a4e9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-02-27 15:19:33 +0100

    port.c: added support for bridges in port status call

Base directory -> /
 port.c | 48 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
2017-02-27 17:24:47 +01:00
Sukru Senli
39ca886781 inteno-netmodes: disable igmp_snooping on wan bridge 2017-02-21 14:33:40 +01:00
Sukru Senli
bbf7671f24 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* faf36c7 wificontrol: connect to clients which are on lan side
-------------------------------------------------------------------------------
commit faf36c70a7b775b80eafb6070d403aae06552870
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-15 14:12:01 +0100

    wificontrol: connect to clients which are on lan side

Base directory -> /
 wificontrol.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-15 14:12:20 +01:00
Sukru Senli
34a57801ab netmode: mtk: disable multicast snooping in repeater mode 2017-02-14 16:24:18 +01:00
Sukru Senli
1d68d1c016 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 47c5d67 wificontrol: go through arp table only
-------------------------------------------------------------------------------
commit 47c5d67522c792f2fca8a46bdcc719db8bef766e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-14 13:37:05 +0100

    wificontrol: go through arp table only

Base directory -> /
 wificontrol.c | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)
-------------------------------------------------------------------------------
2017-02-14 13:38:41 +01:00
Sukru Senli
4125627f13 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 7d93bc2 mtk: almost bullet proof autoconnect function
* 7dfa71b mtk: apcli reconnect
-------------------------------------------------------------------------------
commit 7d93bc2c057d004f1f90e6f85c76f650f74765d5
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-12 14:33:37 +0100

    mtk: almost bullet proof autoconnect function

Base directory -> /
 wificontrol.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 7dfa71b9e8aff739c14f748ed725fe9c1daa594c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-12 14:21:40 +0100

    mtk: apcli reconnect

Base directory -> /
 wificontrol.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-12 14:35:06 +01:00
Sukru Senli
e2895754ae inteno-netmodes update 2017-02-10 18:25:12 +01:00
Sukru Senli
a044568c7c Merge branch 'devel' into mediatek 2017-02-10 17:50:33 +01:00
Sukru Senli
aab44ece60 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 9a7864e add new mac to inteno macaddr
* 5f529c2 use is_inteno_macaddr function in more places
-------------------------------------------------------------------------------
commit 9a7864ea9625429d67e54fafda2105f855806c5e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-10 10:47:01 +0100

    add new mac to inteno macaddr

Base directory -> /
 tools.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 5f529c2aa8bd8865dd6d705470d565a142dbcb29
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-07 11:56:16 +0100

    use is_inteno_macaddr function in more places

Base directory -> /
 network.c | 2 +-
 tools.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2017-02-10 11:57:29 +01:00
Sukru Senli
2c9ec5831d netmodes: if cannot ping defroute, renew dhcp on wan 2017-02-10 11:56:27 +01:00
Sukru Senli
cce5db9c40 netmodes: prevent possible loop for extender/repeater mode switch 2017-02-10 11:39:37 +01:00
Sukru Senli
15d56bab50 inteno-netmodes: for repeaters mode reload only if credentials are given 2017-02-04 23:50:16 +01:00
Sukru Senli
916d1cf25d Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* ccafa12 wificontrol: allow router.wireless call
-------------------------------------------------------------------------------
commit ccafa127bceba86d5168252ff71e818fa2893f28
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-04 18:25:18 +0100

    wificontrol: allow router.wireless call

Base directory -> /
 wificontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-04 18:25:45 +01:00
Sukru Senli
01ce47c3e5 inteno-netmodes: relaod network services if not rebooting 2017-02-04 18:01:44 +01:00
Sukru Senli
b5df201087 inteno-netmodes: populate repeaters for mtk 2017-02-04 16:53:43 +01:00
Sukru Senli
b9ee4a838a inteno-netmodes: mtk: use the network name label as hostname 2017-02-04 14:19:02 +01:00
Sukru Senli
6f69e83387 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 2a5340f wificontrol: fast and ugly way to get assoclist of repeater
-------------------------------------------------------------------------------
commit 2a5340fc5cc501c6d57e127c5533c65e8eeb6018
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-04 13:48:13 +0100

    wificontrol: fast and ugly way to get assoclist of repeater

Base directory -> /
 wificontrol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Sukru Senli
e35343c69f inteno-netmodes: mtk: if wan link is down do not switch to extender mode 2017-02-04 14:01:27 +01:00
Sukru Senli
f2a0ee7b68 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 7188d87 wificontrol: reassoc if connection is lost to master
* 81ef342 wificontrol: no need to run ifup wan
-------------------------------------------------------------------------------
commit 7188d877a5f8448c28f2c206b5c7afe2f4bb353b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-30 17:50:53 +0100

    wificontrol: reassoc if connection is lost to master

Base directory -> /
 wificontrol.c | 9 +++++++++
 1 file changed, 9 insertions(+)
-------------------------------------------------------------------------------
commit 81ef342488265fb245cf2998b2bb45acdb5d092c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-27 11:15:55 +0100

    wificontrol: no need to run ifup wan

Base directory -> /
 wificontrol.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Sukru Senli
2ce4100804 mtk: use common ssid for 2.4GHz and 5GHz in all modes 2017-02-04 14:01:27 +01:00
Sukru Senli
407a79a036 Update feed [ feed_inteno_packages ] package [ inbd ]
-------------------------------------------------------------------------------
* 2d474e9 wifi import new credentials when event is received
-------------------------------------------------------------------------------
commit 2d474e9ff37b9cfcffd4b9ac8eba8db03eb38a21
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-03 16:56:33 +0100

    wifi import new credentials when event is received

Base directory -> /
 src/inbd.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Sukru Senli
c69be6954d inteno-netmodes: mtk: exit if there is a button hotplug script running 2017-02-04 14:01:27 +01:00
Sukru Senli
4e8083083c mtk: faster extender to repeater mode switching 2017-02-04 14:01:27 +01:00
Jonas Höglund
2103ae0b26 Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* 6f962f2 Set baudrate to 57600
-------------------------------------------------------------------------------
commit 6f962f2c27eef98a16cc3236a0f28c422a0628c4
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2017-02-02 17:56:27 +0100

    Set baudrate to 57600

Base directory -> /
 include/configs/ex400.h |   2 +-
 mt7621_stage_L2.bin     | Bin 19896 -> 19896 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Sukru Senli
ad308808df inteno-netmodes: mtk support for switching between extender and repeater modes 2017-02-04 14:01:27 +01:00
Sukru Senli
57dd647159 Update feed [ feed_inteno_packages ] package [ inbd ]
-------------------------------------------------------------------------------
* f6f1d60 handle leds and switch here for now
* da054c1 minimilastic inbd init script for now
-------------------------------------------------------------------------------
commit f6f1d60abc493f1caf0a8bbe301ff790bfba193d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-02 16:30:29 +0100

    handle leds and switch here for now

Base directory -> /
 Makefile.am |   2 +-
 src/inbd.c  | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 116 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit da054c1159fc24334eb234cdc6c080297a6258b3
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-02-02 13:50:45 +0100

    minimilastic inbd init script for now

Base directory -> /
 files/etc/init.d/inbd | 24 ------------------------
 1 file changed, 24 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Sukru Senli
7a5b923e4a mtk: netmodes do not overwrite macaddr for wan and lan dev 2017-02-04 14:01:27 +01:00
Jonas Höglund
1446765f17 Update feed [ feed_inteno_packages ] package [ inbd ]
-------------------------------------------------------------------------------
* 5b30e9d Remove unused arg
-------------------------------------------------------------------------------
commit 5b30e9dbd4bf8ca13ed846478aa62135a4f94653
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2017-01-27 17:35:07 +0100

    Remove unused arg

Base directory -> /
 files/etc/init.d/inbd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Jonas Höglund
0e249baf81 Fix copy startscript for inbd 2017-02-04 14:01:27 +01:00
Jonas Höglund
1b6b57bf90 Update feed [ feed_inteno_packages ] package [ inbd ]
-------------------------------------------------------------------------------
* 366039b Add startup script for inbd
* 33dc81f Send ubus event on netlink event
-------------------------------------------------------------------------------
commit 366039bdfc80418f7089cb08230fe1b74de4edec
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2017-01-27 16:56:40 +0100

    Add startup script for inbd

Base directory -> /
 files/etc/init.d/inbd | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
-------------------------------------------------------------------------------
commit 33dc81f50b9c2039c3726b5a7bc250dcfe806803
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2017-01-27 16:28:17 +0100

    Send ubus event on netlink event

Base directory -> /
 src/inbd.c | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Reidar Cederqvist
bef4c0ff3a Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* ca6338b created get_port_status insted of get_ports_speed and get_port_type
-------------------------------------------------------------------------------
commit ca6338b417026ebe5931f946aa4f40ca7771c7c5
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-25 15:34:20 +0100

    created get_port_status insted of get_ports_speed and get_port_type

Base directory -> /
 broadcom.c |  14 ++++++
 network.c  |   4 +-
 port.c     | 166 ++++++++++++++++++++++++++++++++-----------------------------
 port.h     |   2 +-
 4 files changed, 105 insertions(+), 81 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Jonas Höglund
f1778bbe77 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 93cae17 Fix reading keys on mediatek
-------------------------------------------------------------------------------
commit 93cae172d7f1350f46209984a0f890d1f5d5d57e
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2017-01-25 15:29:38 +0100

    Fix reading keys on mediatek

Base directory -> /
 dumper.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Reidar Cederqvist
75952a96b3 update_package.sh: fixed so version is asked for only when -v is set 2017-02-04 14:01:27 +01:00
Reidar Cederqvist
c2c6858212 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* cb64fb0 mediatek.c: fixed parsing for wifi_scan_results
* 265b2c2 mediatek.c: added frequency to scanresults
* 44b9a8a wireless: added the radio to parse_scanresults function
* 2d1fea1 broadcom.c: scanresults changed rssi and noice to be ints and added snr
* ca74c0d mediatek: fix channel reading
* 95dca63 rename scanresult functions to scanresults
* 9a42c34 fix not severe bug in trim function
* 55d6ea2 wireless.c: fixed bug in scanresults
* c0fd80a scanresults: put all scanresults in array called access_points
-------------------------------------------------------------------------------
commit cb64fb08a83bcf09e5f10322cf0726592572310d
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-23 17:49:41 +0100

    mediatek.c: fixed parsing for wifi_scan_results

Base directory -> /
 mediatek.c | 72 ++++++++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 51 insertions(+), 21 deletions(-)
-------------------------------------------------------------------------------
commit 265b2c29c918b6079d26b964427d94dbeb5c86d6
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-23 15:44:13 +0100

    mediatek.c: added frequency to scanresults

Base directory -> /
 mediatek.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
-------------------------------------------------------------------------------
commit 44b9a8a0e6a21557f8f825b1942448351b595a8a
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-23 15:26:22 +0100

    wireless: added the radio to parse_scanresults function

    for broadcom: used for getting local noise for mediatec: used for getting
    frequency

Base directory -> /
 broadcom.c | 23 ++++++++++++++---------
 broadcom.h |  2 +-
 mediatek.c |  2 +-
 mediatek.h |  2 +-
 wireless.c |  2 +-
 5 files changed, 18 insertions(+), 13 deletions(-)
-------------------------------------------------------------------------------
commit 2d1fea19413d4351fc90b495ab92a4d044c849b9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-23 13:47:34 +0100

    broadcom.c: scanresults changed rssi and noice to be ints and added snr

Base directory -> /
 broadcom.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit ca74c0d4d93c7751cac728d2d04641a9ac8e3542
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2017-01-20 18:35:41 +0100

    mediatek: fix channel reading

Base directory -> /
 mediatek.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 95dca6369255e39f25fa012c3f887819d46828c9
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2017-01-20 18:09:59 +0100

    rename scanresult functions to scanresults

Base directory -> /
 broadcom.c | 4 ++--
 broadcom.h | 4 ++--
 mediatek.c | 4 ++--
 mediatek.h | 4 ++--
 wireless.c | 8 ++++----
 5 files changed, 12 insertions(+), 12 deletions(-)
-------------------------------------------------------------------------------
commit 9a42c347959d4a4af5114301a8c39e08ca178e84
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2017-01-20 15:21:17 +0100

    fix not severe bug in trim function

Base directory -> /
 tools.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 55d6ea233dff357e155e2e617ebd9411d6af3466
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-20 17:47:24 +0100

    wireless.c: fixed bug in scanresults

Base directory -> /
 wireless.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit c0fd80a59279e5b7541b027c42e257046169125a
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2017-01-18 17:12:45 +0100

    scanresults: put all scanresults in array called access_points

    broadcom: display scanresults as an array named access_points

    mediatek: display scanresults as an array named access_points

Base directory -> /
 wireless.c | 3 +++
 1 file changed, 3 insertions(+)
-------------------------------------------------------------------------------
2017-02-04 14:01:27 +01:00
Sukru Senli
b87623091b mtk: user 'user' can access repeater modes 2017-02-04 14:01:27 +01:00
Sukru Senli
8aff1448db mtk: repeater mode has no lan 2017-02-04 14:01:27 +01:00
Sukru Senli
10b5ac3fd6 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 7716541 mtk: for now enable wps via hotplug
* 3a240ee network: do not show invalid arp clients
* 44105d2 directory.c: removed unwanted printouts and moved the level-check
* c90a65c directory.c: added a max_recursion_level to folder_tree
-------------------------------------------------------------------------------
commit 77165419b3ae3d6a2ff1739d06f47902ddcd2394
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-16 15:57:13 +0100

    mtk: for now enable wps via hotplug

Base directory -> /
 wps.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 3a240ee06193c9f39f1525b0cd203116fe5532f0
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-11 21:11:25 +0100

    network: do not show invalid arp clients

Base directory -> /
 network.c | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 44105d2003ad530b8ba4e85fd6ac06850aec1f4c
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 13:48:13 +0100

    directory.c: removed unwanted printouts and moved the level-check

Base directory -> /
 directory.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit c90a65c91092b50bd5166b655db0c52466f760c9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 13:42:46 +0100

    directory.c: added a max_recursion_level to folder_tree

Base directory -> /
 directory.c | 14 ++++++++++----
 directory.h |  2 +-
 2 files changed, 11 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Sukru Senli
4090e15492 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* efe54ef mtk: do not create dsl object
-------------------------------------------------------------------------------
commit efe54ef99677c9a5e0c7c3b10f04defa0944f5de
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-11 13:31:41 +0100

    mtk: do not create dsl object

Base directory -> /
 questd.c | 2 +-
 questd.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Sukru Senli
d85272b6ca questd updated 2017-02-04 14:00:02 +01:00
Sukru Senli
9cdde23e62 questd updated 2017-02-04 14:00:02 +01:00
Sukru Senli
84a9155495 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 40380dd wificontrol: do ifup wan for Broadcom only
* 532a9dc trim some strings to remove the newline
* 5d9a809 tools: add trim function
* 4308884 broadcom: retrieve the encryption, key management and cipher for the scanned networks
-------------------------------------------------------------------------------
commit 40380ddb3c46688ef96d79ded230f6daee97c13a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-10 15:59:53 +0100

    wificontrol: do ifup wan for Broadcom only

Base directory -> /
 wificontrol.c | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit 532a9dccec285a114429369c62158dc48a179447
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-22 19:27:02 +0100

    trim some strings to remove the newline

Base directory -> /
 network.c | 4 ++--
 system.c  | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 5d9a809d01f9ebbc12bce2e67fe86fbdb1f4a9e6
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-22 19:20:28 +0100

    tools: add trim function

Base directory -> /
 tools.c | 23 +++++++++++++++++++++++
 tools.h |  1 +
 2 files changed, 24 insertions(+)
-------------------------------------------------------------------------------
commit 4308884317d93139e8e63f19372b4894d8cf604a
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-21 18:58:51 +0100

    broadcom: retrieve the encryption, key management and cipher for the scanned
    networks

Base directory -> /
 broadcom.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 183 insertions(+)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Sukru Senli
96a6967dbe inteno-netmodes: set juci default page to overview after netmode is selected 2017-02-04 14:00:02 +01:00
Kenneth Johansson
ccb4edd492 Add bash debugger. 2017-02-04 14:00:02 +01:00
Jonas Höglund
61cb650c49 Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* 65ae089 Set led to red when executing from internal SRAM.
* 5909d1e jtag: script for starting debug from nand.
-------------------------------------------------------------------------------
commit 65ae089853ddd9652103b4052af4b351d66f2374
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-12-28 16:56:21 +0100

    Set led to red when executing from internal SRAM.

    then set it to yellow/orange when executing from DRAM.

Base directory -> /
 Makefile                              |  14 ++++++++--
 board/inteno/ex400/jtag/ex400_led.cmm |  15 ++++++++++
 board/inteno/ex400/led.c              |   2 +-
 inteno_led.S                          |  50 ++++++++++++++++++++++++++++++++++
 mt7621_stage_L2.bin                   | Bin 19896 -> 19896 bytes
 5 files changed, 78 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 5909d1e8240a7935d0005e88b2d4a1d35da50305
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-12-27 20:40:06 +0100

    jtag: script for starting debug from nand.

Base directory -> /
 board/inteno/ex400/jtag/ex400_quitck.cmm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Jonas Höglund
2921b0d53e Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* ee39c85 new default baudrate set to 115200.
-------------------------------------------------------------------------------
commit ee39c856a0162336ec53e76e330b19992a2b1b5a
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-12-23 13:45:35 +0100

    new default baudrate set to 115200.

Base directory -> /
 include/configs/ex400.h |   2 +-
 mt7621_stage_L2.bin     | Bin 19896 -> 19896 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Sukru Senli
ce7c569c3c inteno-netmodes: mtk 2017-02-04 14:00:02 +01:00
Jonas Höglund
0101afa6ca Fix -u option for update_package 2017-02-04 14:00:02 +01:00
Jonas Höglund
35988e24cb Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* 1c053dc Add example ex400_setup script
-------------------------------------------------------------------------------
commit 1c053dc6060f344b755f2e9cdf500114c83a747f
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-12-22 17:26:23 +0100

    Add example ex400_setup script

Base directory -> /
 board/inteno/ex400/production/ex400_setup | 76 +++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Kenneth Johansson
3f731c5f21 Update feed [ feed_inteno_packages ] package [ inbd ]
-------------------------------------------------------------------------------
* 51f7502 print link info on std out.
-------------------------------------------------------------------------------
commit 51f7502ad1ce347af8a09531a782b87e94484599
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-12-22 16:57:03 +0100

    print link info on std out.

Base directory -> /
 configure.ac |  4 +--
 src/inbd.c   | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 91 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Jonas Höglund
196e7dacf8 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 83dc4c8 Read mediatek values from db
* e3178f9 rename scanresult to scanresults
* fcea2d7 broadcom: fix scaning results for 5 GHz
* bd0a351 fixed some warnings
* ecb79f2 fix eswap defines parantheses
* 0b0ec77 changed the naming in output from scanresults for mediatek
* 897b27f commented out unused functions
* 28e1391 broadcom: wireless scanning, first version
* 4c407eb move the blob_buf_init function
* c809af4 broadcom: add wl_scan
* ee22b1c add header files include guards
* 90abc30 added ubus call router.wireless scan and scanresult functions
* 72f9ce9 wl_get_noise: try to use ioctl, but this is not yet implemented in the kernel
* bb14118 wl_get_isup: use ioctl call
* ba7704a fixed so that sizeof is used with correct array
* df1ff8b fixes to be able to build on broadcom after merge
*   5c256ae Merge branch 'mtk' into master
|\
| * 34ca936 check for pointer for not being null
* 241b3ac fix some warnings reported by valgrind
* c934201 memory fixes
* 8c330bc questd: change the chrCmd and runCmd functions so that they are threadsafe. refs #10618
* a53d9b9 removed support for dss keys in dropbear
* e59f0ba show encryption correctly
* 0c67997 usb: show filesystem as well
-------------------------------------------------------------------------------
commit 83dc4c8f358aa5ef8c28b5040a37b394f79189ce
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-12-22 14:57:39 +0100

    Read mediatek values from db

Base directory -> /
 dumper.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
commit e3178f9d17f3d0a9f672a0fc283883048ed57839
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-21 16:59:47 +0100

    rename scanresult to scanresults

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit fcea2d719ab7bbed57d964cddddb6a12a2af9d6b
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-21 16:54:31 +0100

    broadcom: fix scaning results for 5 GHz

Base directory -> /
 broadcom.c | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)
-------------------------------------------------------------------------------
commit bd0a35195709386737011c83179da00a272d9610
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-21 11:41:45 +0100

    fixed some warnings

Base directory -> /
 broadcom.c | 4 +++-
 broadcom.h | 2 +-
 port.c     | 3 +--
 wireless.c | 4 ++--
 4 files changed, 7 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit ecb79f2cbce1e2999737484752d05f31f2ccd043
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-21 16:39:15 +0100

    fix eswap defines parantheses

Base directory -> /
 broadcom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 0b0ec77bf5a8bb84d60d4b5824e3559aa2f941cd
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-20 10:21:28 +0100

    changed the naming in output from scanresults for mediatek

Base directory -> /
 mediatek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 897b27f25975fa53a8adec6483259a42d4724f31
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-20 10:20:45 +0100

    commented out unused functions

Base directory -> /
 broadcom.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 28e13912cda35db2be13b40217a4893c4a450b9c
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-19 19:38:06 +0100

    broadcom: wireless scanning, first version

Base directory -> /
 broadcom.c | 79 +++++++++++++++++++++++++++++++++++++++++++-------------------
 broadcom.h |  9 +++++++
 2 files changed, 64 insertions(+), 24 deletions(-)
-------------------------------------------------------------------------------
commit 4c407eb4ed7c4ab585aa370a2c3d5eb29e85fd1b
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-19 19:37:15 +0100

    move the blob_buf_init function

Base directory -> /
 mediatek.c | 1 -
 wireless.c | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit c809af46ebe384a37968ccf85acdaf2e50a7821e
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-16 16:06:23 +0100

    broadcom: add wl_scan

Base directory -> /
 broadcom.c | 33 +++++++++++++++++++++++++++++++++
 broadcom.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)
-------------------------------------------------------------------------------
commit ee22b1cf1a8ef963a135d347690c7b9481b4909e
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-16 16:05:35 +0100

    add header files include guards

Base directory -> /
 broadcom.h | 5 +++++
 mediatek.h | 4 ++++
 2 files changed, 9 insertions(+)
-------------------------------------------------------------------------------
commit 90abc30ac624b817d1ad337659e07d168bdedff2
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-16 15:19:12 +0100

    added ubus call router.wireless scan and scanresult functions

Base directory -> /
 mediatek.c | 39 ++++++++++++++++++++++++++++
 mediatek.h |  4 +++
 wireless.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 129 insertions(+)
-------------------------------------------------------------------------------
commit 72f9ce97bac743492f5764b38439e704aabd64e0
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-16 14:54:26 +0100

    wl_get_noise: try to use ioctl, but this is not yet implemented in the
    kernel

Base directory -> /
 mediatek.c | 40 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 35 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit bb141183cc5795b2e5e3addd15ccd9e7bfa54887
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-15 16:54:03 +0100

    wl_get_isup: use ioctl call

Base directory -> /
 mediatek.c | 48 +++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 39 insertions(+), 9 deletions(-)
-------------------------------------------------------------------------------
commit ba7704ac8d2ee990fe345414d39cc54a65a2a010
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-11-04 12:17:36 +0100

    fixed so that sizeof is used with correct array

Base directory -> /
 network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit df1ff8b9f5dbc3f6dc79c012c215dcc48ebe8fa7
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-15 14:41:01 +0100

    fixes to be able to build on broadcom after merge

Base directory -> /
 port.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 5c256ae5f316fd771059feeec54d811bcfb127b0
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-15 12:22:27 +0100

    Merge branch 'mtk' into master

Base directory -> /
 Makefile           |  27 ++--
 broadcom.c         |   8 +-
 broadcom.h         |   5 -
 dumper.c           |  42 +++++-
 mediatek.c         | 360 ++++++++++++++++++++++++++++++++++++++++++++++++
 mediatek.h         | 241 ++++++++++++++++++++++++++++++++
 mtkwifi_channels.h | 393 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 network.c          | 162 +++++++++-------------
 network.h          |  15 +-
 port.c             | 265 ++++++++++++++++++++++++++++++++++--
 questd.c           |   6 +-
 questd.h           |   2 -
 system.c           |   4 +-
 tools.c            |  31 ++++-
 tools.h            |   4 +
 uboot_env.c        |   2 +-
 wireless.c         | 125 +++++++++--------
 wireless.h         |  17 ++-
 wps.c              |  14 +-
 19 files changed, 1495 insertions(+), 228 deletions(-)
-------------------------------------------------------------------------------
commit 34ca9365313c6d56f2c6322f4ea545932364bdc1
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-15 11:56:10 +0100

    check for pointer for not being null

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 241b3ac17e07d96d2167df50f16c8735961dbca3
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-09 19:30:59 +0100

    fix some warnings reported by valgrind

Base directory -> /
 broadcom.c |  1 +
 network.c  | 19 ++++++++++++++-----
 port.c     |  8 ++++----
 wireless.c |  6 ++++--
 4 files changed, 23 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit c9342010cc4e286cb7efa041f62be0c3cb55b453
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-09 14:07:52 +0100

    memory fixes

Base directory -> /
 broadcom.c | 3 ++-
 network.c  | 4 ++++
 wireless.c | 6 ++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 8c330bcf6f75c91129f100645c8b448828b736b5
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-07 14:06:17 +0100

    questd: change the chrCmd and runCmd functions so that they are threadsafe.
    refs #10618

Base directory -> /
 network.c     |  20 ++++---
 port.c        |  11 ++--
 system.c      |   7 ++-
 tools.c       | 182 ++++++++++++++++++++++++++++++++++++++++------------------
 tools.h       |  17 +++++-
 usb.c         |   5 +-
 wificontrol.c |  13 +++--
 wireless.c    |   3 +-
 wps.c         |   3 +-
 9 files changed, 176 insertions(+), 85 deletions(-)
-------------------------------------------------------------------------------
commit a53d9b949da052a6fb3ad49bff422821853ed0bc
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-01 15:07:42 +0100

    removed support for dss keys in dropbear

Base directory -> /
 dropbear.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit e59f0baafb9f8941e0ecd5cebc953d640ec0525b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-22 10:52:58 +0100

    show encryption correctly

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 0c67997d43ede911bafc7648cb828cc9c4807e3a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-21 19:53:46 +0100

    usb: show filesystem as well

Base directory -> /
 usb.c | 16 ++++++++--------
 usb.h |  1 +
 2 files changed, 9 insertions(+), 8 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Reidar Cederqvist
bb4fb4840c fixed the ramips specific dependencies 2017-02-04 14:00:02 +01:00
Kenneth Johansson
8d857cccd4 update inbd. 2017-02-04 14:00:02 +01:00
Kenneth Johansson
dc38bd51fb Add inteno netlink bridge daemon. 2017-02-04 14:00:02 +01:00
Reidar Cederqvist
4e18be4ae2 added uplink_band to all repeater netmodes 2017-02-04 14:00:02 +01:00
Reidar Cederqvist
7c26d7f9a2 moved a dependency to mediatek only 2017-02-04 14:00:02 +01:00
Reidar Cederqvist
d2f9c5843d Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 24e3785 added a comment for why hwmodes is const char
* 4ad1a15 fixed some warnings and made Wireless and Radio struct have static memory
-------------------------------------------------------------------------------
commit 24e3785a3c0746e5043c118bac905c124256741f
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-15 09:54:08 +0100

    added a comment for why hwmodes is const char

Base directory -> /
 wireless.h | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 4ad1a15016c4a95d6336ede037d8c2df11bc8159
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-15 09:43:14 +0100

    fixed some warnings and made Wireless and Radio struct have static memory

Base directory -> /
 network.c  |  2 --
 wireless.c | 47 ++++++++++++++++++-----------------------------
 wireless.h | 16 ++++++++++------
 3 files changed, 28 insertions(+), 37 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Alex Oprea
f852243ffc Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 56afabd wl_get_bitrate: use ioctl call to get the bitrate
* 9c90f0b use correct socket fd
* 5f461a7 wl_get_bssid: use ioctl call
* 3cd9ff3 fixed a argument-order misstake
* 37deb94 close the rectory after usage
* ea2ff12 wl_get_ssid: use ioctl call to get the essid
* 8bf841b memory fixes
* 9e3f8e4 made it so that wl_ioctl is ucing the last input as length
* 0a8a3f5 fixed some warnings in network.c and mediatek.c
-------------------------------------------------------------------------------
commit 56afabdabe18053aa1870ab6c0ca8336058cb5b5
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 18:26:45 +0100

    wl_get_bitrate: use ioctl call to get the bitrate

Base directory -> /
 mediatek.c | 14 +++++++++-----
 mediatek.h |  2 +-
 wireless.c | 13 +++++++------
 3 files changed, 17 insertions(+), 12 deletions(-)
-------------------------------------------------------------------------------
commit 9c90f0b86cc688bd7a0c9c76abe473760e64bd55
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 16:36:09 +0100

    use correct socket fd

Base directory -> /
 mediatek.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 5f461a796524240a1b124c3894d2311027cc33c9
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 15:34:00 +0100

    wl_get_bssid: use ioctl call

Base directory -> /
 mediatek.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 3cd9ff38665e964c693c89b14f76909e710f5fac
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-14 14:40:26 +0100

    fixed a argument-order misstake

Base directory -> /
 port.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 37deb94113f5e0103ecfd475c09a604c6d890384
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 14:01:54 +0100

    close the rectory after usage

Base directory -> /
 port.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit ea2ff12e5e66045294c93a42641e5da28eded6a9
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 13:08:47 +0100

    wl_get_ssid: use ioctl call to get the essid

Base directory -> /
 mediatek.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 8bf841b1aff24b17a5a12339b97e24887e294897
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-09 14:07:52 +0100

    memory fixes

Base directory -> /
 broadcom.c | 3 ++-
 network.c  | 4 ++++
 wireless.c | 6 ++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 9e3f8e4db73d614b8b63fc8978bc444dadb23e70
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-14 12:02:36 +0100

    made it so that wl_ioctl is ucing the last input as length

    WARNING: make sure that you send in a valid length wen calling this function

Base directory -> /
 mediatek.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 0a8a3f51e98a7e592b4e3237dbf2894ad966abbd
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-14 11:50:54 +0100

    fixed some warnings in network.c and mediatek.c

Base directory -> /
 mediatek.c | 4 +---
 network.c  | 6 ++----
 2 files changed, 3 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 14:00:02 +01:00
Reidar Cederqvist
b4ad60bd17 changed libnl to libnl-tiny and changed one of the includes 2017-02-04 14:00:02 +01:00
Reidar Cederqvist
8e06d4985d questd: fixed spelling error and renamed clfags to target in Makefile 2017-02-04 14:00:02 +01:00
Reidar Cederqvist
619942a9c7 questd: added target-specific dependencies variable 2017-02-04 13:59:42 +01:00
Sukru Senli
6823207180 inteno-netmodes: default uplink is 5G for ex400 2017-02-04 13:59:09 +01:00
Sukru Senli
c676eaf06e Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 580a681 call hotplug script for wps client pbc
-------------------------------------------------------------------------------
commit 580a681cde22008df33e59d30afb7065d1a95fb8
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-12-01 11:01:53 +0100

    call hotplug script for wps client pbc

Base directory -> /
 wps.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:59:09 +01:00
Sukru Senli
1c7f7806ef mtk: inteno netmodes adjustment 2017-02-04 13:59:09 +01:00
Sukru Senli
645931608e updated questd 2017-02-04 13:58:20 +01:00
Kenneth Johansson
d59eb48921 Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* cee4778 Add iboot command.
-------------------------------------------------------------------------------
commit cee4778f767e8770a2ac7bf6ea819370bb7628ea
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-11-24 18:47:05 +0100

    Add iboot command.

    This is inteno boot that support automatic switch over to alternate system
    image if something prevent boot on primary system.

Base directory -> /
 board/inteno/ex400/Makefile |   1 +
 board/inteno/ex400/iboot.c  | 162 ++++++++++++++++++++++++++++++++++++++++++++
 board/inteno/ex400/wget.c   |   2 +-
 3 files changed, 164 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Kenneth Johansson
587f4b4e6b perf_manager: turn off all leds when turning off.
we need this so that when we do a reset the leds is known to be off.
2017-02-04 13:58:20 +01:00
Kenneth Johansson
888c684bff Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 0434260 Add missed interrupt handler for touch panel.
-------------------------------------------------------------------------------
commit 04342602acb00420c5e5cb4e83807d55ccc4b42f
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-11-18 19:17:24 +0100

    Add missed interrupt handler for touch panel.

    missed this file from last commit.

Base directory -> /
 src/touch_sx9512.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Kenneth Johansson
aca85883a0 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 3008d04 add support for gpio buttons using linux gpio interface.
* d57bb3f Add support for leds using linux gpio interface.
* 70137e9 Include touch driver sx9512 on all platforms.
-------------------------------------------------------------------------------
commit 3008d04ed46d82f98fc2078333d1c76b6c03de1b
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-11-18 18:51:02 +0100

    add support for gpio buttons using linux gpio interface.

Base directory -> /
 Makefile.am       |  2 +-
 src/button.c      | 10 ++++++----
 src/gpio.h        |  4 ++++
 src/gpio_button.c | 32 +++++++++++++++++++++++++++++++-
 src/gpio_led.c    |  2 +-
 src/gpio_linux.c  | 34 ++++++++++++++++++++++++++++++++--
 6 files changed, 75 insertions(+), 9 deletions(-)
-------------------------------------------------------------------------------
commit d57bb3f171a1c4383dbc9d6cff7a104b310a61fe
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-11-17 20:41:18 +0100

    Add support for leds using linux gpio interface.

Base directory -> /
 Makefile.am       |  9 ++++----
 src/gpio.h        | 14 +++++++++++++
 src/gpio_button.c |  1 -
 src/gpio_led.c    | 16 +++++++++-----
 src/gpio_linux.c  | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/server.c      |  6 +++---
 6 files changed, 96 insertions(+), 13 deletions(-)
-------------------------------------------------------------------------------
commit 70137e9ef89f43e71b455c8445dd33ae03b06bf6
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-11-17 17:18:07 +0100

    Include touch driver sx9512 on all platforms.

    Was only compiled in on broadcom based platform. But is now also needed for
    mediatek SOC (ex400).

Base directory -> /
 Makefile.am        |  8 ++++----
 src/gpio.h         |  5 ++++-
 src/server.c       |  2 +-
 src/sx9512.c       |  6 ++++--
 src/sx9512.h       |  4 ++++
 src/touch_sx9512.c | 12 ++++++++----
 6 files changed, 25 insertions(+), 12 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Sukru Senli
5606f4f962 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* a0f68ef mtk: zero tx and rx bytes until we get them correctly
* 82c7532 put endif to correct line
* b6e9bc2 mtk: cleanup
* 8cb0982 mtk: show speed correctly
* d189fc1 mtk: fix some warnings
* 79b9c39 mtk: get rssi value correctly
* f6fa9a4 mtk: get wireless clients from assoclist
* 40de979 mtk: more cleanup
* c1d5e78 mtk: header file cleanup
* f080435 mtk: ioctl working
* 42bc58a mediatek code cleanup
* 46925b2 use same get port name method for brcm and mtk
* 312e1e9 for mtk read encryption from config for now
* 34b081c show real speed for mtk
* 8cc2316 zero device char array first
* 8c2b25b calculate wdev correctly for mtk
* c9d0f85 mediatek updates
* 9c2c69b use brctl showbr for all profiels
* a3b5126 mediatek: hardcode sta info until we know how to get it
* 2909034 mediatek: network topology almost working
* 786064d imitate led.internet object
* e90e958 initial mediatek wireless code
* bb0088a mediatek
* 889e317 show client as wireless only if it is associated
* 5b3d4db add is_inteno_macaddr function
* c9074d8 adapt to new Inteno mac address range
* 994ebba router.network ports do not show the bridge without member
* 91ac13d show number of active connections per client
* d1079f3 find usb netdevice for both arm and mips
* 52ee23c populate ports only for bridged networks that are not dhcp
* 70d2897 prevent memory corruption for "client-100" and higher
* eea1ad8 improve short-circuit logic
* 70ad526 set to 0 all the members of the port array, not only the first one
* cbb8798 use the thread-safe version of strtok: strtok_r refs #10515
* a852440 reduce number of processes
* b8f176b wireless: make sure antenna number does not exceed WL_STA_ANT_MAX
-------------------------------------------------------------------------------
commit a0f68effd8f8567d14d9f3437d4090988a03b479
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 18:43:37 +0100

    mtk: zero tx and rx bytes until we get them correctly

Base directory -> /
 mediatek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 82c7532edc7599f83388a850066667f629d6a4b7
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 18:37:21 +0100

    put endif to correct line

Base directory -> /
 network.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit b6e9bc278df37414dafbddb57a7c6033b9cbab91
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 18:28:49 +0100

    mtk: cleanup

Base directory -> /
 mediatek.c | 6 ++++--
 mediatek.h | 2 +-
 network.c  | 2 +-
 port.c     | 2 +-
 wireless.c | 4 ++--
 5 files changed, 9 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 8cb09827ea08c2dd121c192a9c0b7ffd82f0bfa2
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 18:03:31 +0100

    mtk: show speed correctly

Base directory -> /
 mediatek.c | 31 ++++++++++++++++++++-----------
 network.c  |  4 ++--
 2 files changed, 22 insertions(+), 13 deletions(-)
-------------------------------------------------------------------------------
commit d189fc1b9d26fc4bf52b3711717a347ec8560b82
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 10:04:08 +0100

    mtk: fix some warnings

Base directory -> /
 mediatek.c | 2 ++
 wireless.c | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 79b9c3934eca18455961c0e1ad24a72ffc9d2d50
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 10:02:01 +0100

    mtk: get rssi value correctly

Base directory -> /
 mediatek.c | 46 +++++++++++++++++++++++++++++++++++++---------
 wireless.c |  9 +++++++--
 2 files changed, 44 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit f6fa9a4e32b4760a2c5c8920e3b07d4aa25fb4de
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 09:23:22 +0100

    mtk: get wireless clients from assoclist

Base directory -> /
 network.c | 44 +++++++++-----------------------------------
 1 file changed, 9 insertions(+), 35 deletions(-)
-------------------------------------------------------------------------------
commit 40de97953b8491e5d196cd564fe28deee548d63c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-17 16:46:12 +0100

    mtk: more cleanup

Base directory -> /
 broadcom.c      |   8 ++---
 led.internet.sh |  19 -----------
 mediatek.c      | 100 +++++++++++++++++++++++++++++++-------------------------
 mediatek.h      |  12 -------
 wireless.c      |   2 ++
 5 files changed, 61 insertions(+), 80 deletions(-)
-------------------------------------------------------------------------------
commit c1d5e7885e0394557bd0f898d6374781ee0b9e91
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-17 15:22:46 +0100

    mtk: header file cleanup

Base directory -> /
 broadcom.h |    2 -
 mediatek.c |   63 ++-
 mediatek.h | 1249 +++++-------------------------------------------------------
 3 files changed, 151 insertions(+), 1163 deletions(-)
-------------------------------------------------------------------------------
commit f080435d9eb830126f342935976bd5ae5a5df681
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-17 11:08:32 +0100

    mtk: ioctl working

Base directory -> /
 mediatek.c | 11 +++++++----
 mediatek.h |  5 ++++-
 2 files changed, 11 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 42bc58a6590fac10cde96e01a55560c7b09e4260
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-15 15:37:13 +0100

    mediatek code cleanup

Base directory -> /
 mediatek.c |  259 +--------
 mediatek.h | 1798 ++++++++++++++++++++++++++++++++++++++++--------------------
 network.c  |    4 +-
 3 files changed, 1232 insertions(+), 829 deletions(-)
-------------------------------------------------------------------------------
commit 46925b2e65e6388dd994b435b6484dd7fae1cc6c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 14:24:09 +0200

    use same get port name method for brcm and mtk

Base directory -> /
 port.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
-------------------------------------------------------------------------------
commit 312e1e95cf4bf6201f20eb63011905f03d4e3819
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:37:00 +0200

    for mtk read encryption from config for now

Base directory -> /
 mediatek.c | 39 ++++-----------------------------------
 1 file changed, 4 insertions(+), 35 deletions(-)
-------------------------------------------------------------------------------
commit 34b081c02f874d1fbca26431e96cfe988b8551d0
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:27:16 +0200

    show real speed for mtk

Base directory -> /
 wireless.c | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 8cc23161c192ddab01175ee32d73f49aacd49b41
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:23:42 +0200

    zero device char array first

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 8c2b25b79dbc696a1397697b78f4ec129a7211f8
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:23:18 +0200

    calculate wdev correctly for mtk

Base directory -> /
 wireless.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit c9d0f8505f5ba2bb5228cab58234b2749d1f317b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 10:58:46 +0200

    mediatek updates

Base directory -> /
 mediatek.c | 64 --------------------------------------------------------------
 port.c     |  4 ----
 system.c   |  6 +++---
 3 files changed, 3 insertions(+), 71 deletions(-)
-------------------------------------------------------------------------------
commit 9c2c69b374c9cd0e6ac164ce7cc8f30bf1f6847f
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-17 13:59:37 +0200

    use brctl showbr for all profiels

Base directory -> /
 network.c | 14 --------------
 1 file changed, 14 deletions(-)
-------------------------------------------------------------------------------
commit a3b512670de96cafd96340498de4276e6c388711
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-14 17:15:58 +0200

    mediatek: hardcode sta info until we know how to get it

Base directory -> /
 mediatek.c | 59 ++++++-----------------------------------------------------
 1 file changed, 6 insertions(+), 53 deletions(-)
-------------------------------------------------------------------------------
commit 290903450e61b27fc4f16dbcbe35f4bbe0170cbd
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-14 15:44:17 +0200

    mediatek: network topology almost working

Base directory -> /
 mediatek.c | 15 +--------------
 network.c  | 29 ++++++++++++++++++++++-------
 port.c     | 16 ++++++++++++----
 3 files changed, 35 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit 786064dedb8e404ca0817422cc4e795f606a1b72
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 19:55:10 +0200

    imitate led.internet object

Base directory -> /
 led.internet.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
-------------------------------------------------------------------------------
commit e90e95899b79ca870c5f909bd268cac220765937
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 19:49:43 +0200

    initial mediatek wireless code

Base directory -> /
 mediatek.c | 203 ++++++++++++++++++++++++++++---------------------------------
 network.c  |   2 -
 port.c     |   5 ++
 questd.c   |   4 --
 wireless.c |  23 ++++++-
 wps.c      |   6 +-
 6 files changed, 123 insertions(+), 120 deletions(-)
-------------------------------------------------------------------------------
commit bb0088a8c3f65b4997445b81ca24ce38511ca9bb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 17:58:13 +0200

    mediatek

Base directory -> /
 Makefile           |   6 +-
 dumper.c           |  32 +++
 mediatek.c         | 611 ++++++++++++++++++++++++++++++++++++++++++++++
 mediatek.h         | 691 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 mtkwifi_channels.h | 393 ++++++++++++++++++++++++++++++
 network.c          |  25 +-
 network.h          |   5 +-
 port.c             |  14 +-
 questd.c           |   4 +-
 questd.h           |   2 -
 uboot_env.c        |   2 +-
 wireless.c         |   4 -
 12 files changed, 1770 insertions(+), 19 deletions(-)
-------------------------------------------------------------------------------
commit 889e317f0de3917a4f46de94c3d66d0819e6b9a3
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-08 15:11:46 +0100

    show client as wireless only if it is associated

Base directory -> /
 broadcom.c | 6 +++++-
 broadcom.h | 2 +-
 network.c  | 5 ++++-
 wireless.c | 4 +++-
 4 files changed, 13 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 5b3d4dbb769965367c1a578490c3b71b4d39770e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-08 13:54:03 +0100

    add is_inteno_macaddr function

Base directory -> /
 Makefile      |  4 ++--
 network.c     | 12 ++++++------
 tools.c       | 10 ++++++++++
 tools.h       |  2 ++
 wificontrol.c | 38 ++++++--------------------------------
 5 files changed, 26 insertions(+), 40 deletions(-)
-------------------------------------------------------------------------------
commit c9074d8b3a7de736c6745d5dee1a8bed666b36fa
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-08 13:34:44 +0100

    adapt to new Inteno mac address range

Base directory -> /
 network.c     | 13 ++++++++-----
 wificontrol.c |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 994ebbaa5897c5b27aca9dbe188f3a257e02691e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-08 12:38:40 +0100

    router.network ports do not show the bridge without member

Base directory -> /
 network.c | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 91ac13d040e397a47149d721c594736ad490f3da
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-07 17:21:03 +0100

    show number of active connections per client

Base directory -> /
 network.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit d1079f32b14282cdc1ce2da736684bc505ed293b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-07 15:38:44 +0100

    find usb netdevice for both arm and mips

Base directory -> /
 usb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 52ee23cb217321c92537d116eebba79c3c8966b8
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-02 11:30:37 +0100

    populate ports only for bridged networks that are not dhcp

Base directory -> /
 network.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 70d289767aa38483c375b4913f9aff58e71978c4
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-11-01 13:44:05 +0100

    prevent memory corruption for "client-100" and higher

Base directory -> /
 network.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit eea1ad881ad50d69869dd292bb95b24547ae1ab3
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-11-01 13:55:49 +0100

    improve short-circuit logic

Base directory -> /
 network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 70ad526e6f44a98f03944f535add1712295dd3ec
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-10-26 15:47:03 +0200

    set to 0 all the members of the port array, not only the first one

Base directory -> /
 network.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit cbb87980fea66dbcd182bd0881f6ce3bc420a0f4
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-10-26 14:51:52 +0200

    use the thread-safe version of strtok: strtok_r refs #10515

    	several calls of strtok were overwritting each other's
    parsing buffer. This resulted in questd sometimes not
    reporting all the ports of the router.

Base directory -> /
 netcheck.c |  5 +++--
 network.c  | 26 +++++++++++++++-----------
 2 files changed, 18 insertions(+), 13 deletions(-)
-------------------------------------------------------------------------------
commit a852440c1fb4d498ed979b19e6c08ce5f7c161cb
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-10-25 13:33:22 +0200

    reduce number of processes

Base directory -> /
 port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit b8f176b0bb7dbe62b15eb96af9b712d97d7ca6c2
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-21 15:24:30 +0200

    wireless: make sure antenna number does not exceed WL_STA_ANT_MAX

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Sukru Senli
ad9c8b0eed updated questd 2017-02-04 13:58:20 +01:00
Jonas Höglund
cb2f2683f6 Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* 20ef6d6 Don't write dirty as version
* 3545594 Save uboot version in env.
-------------------------------------------------------------------------------
commit 20ef6d6e6933ca7430390001532181a6e0353a2a
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-11-15 15:05:22 +0100

    Don't write dirty as version

Base directory -> /
 scripts/setlocalversion | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 354559453d0b6728dc96c9f7bbb4dbcaeba61242
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-11-15 14:09:51 +0100

    Save uboot version in env.

    Do this so that the linux system can check what u-boot version is used.

Base directory -> /
 board/inteno/ex400/board.c   | 22 ++++++++++++++++++++--
 board/inteno/ex400/factory.c |  1 -
 include/configs/ex400.h      |  2 ++
 3 files changed, 22 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Kenneth Johansson
28b050b60a Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* d907f86 print on serial port when rescue mode is active.
* b326684 Add led command.
-------------------------------------------------------------------------------
commit d907f8696346609080d0cf134d40acdc2c3f6ae6
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-11-14 19:30:04 +0100

    print on serial port when rescue mode is active.

Base directory -> /
 board/inteno/ex400/board.c | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit b326684d8c3a4083114a9981249d2c6c0792a0ab
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-11-14 19:26:49 +0100

    Add led command.

Base directory -> /
 board/inteno/ex400/Makefile |  1 +
 board/inteno/ex400/board.c  | 45 ++++++++++++++++++---------
 board/inteno/ex400/led.c    | 74 +++++++++++++++++++++++++++++++++++++++++++++
 board/inteno/ex400/led.h    | 14 +++++++++
 4 files changed, 119 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Jonas Höglund
0b212fa52d Update feed [ feed_inteno_packages ] package [ ated ]
-------------------------------------------------------------------------------
* f614cba Disable failing ethernet ioctl
-------------------------------------------------------------------------------
commit f614cba983d827d5185c60a6a5a35530621d44d2
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-11-11 15:24:14 +0100

    Disable failing ethernet ioctl

Base directory -> /
 cmd_io/eth.c | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Kenneth Johansson
cc9d4932b9 update. 2017-02-04 13:58:20 +01:00
Kenneth Johansson
d53bfa681f fix v variable. 2017-02-04 13:58:20 +01:00
Kenneth Johansson
05f4f46391 it builds. 2017-02-04 13:58:20 +01:00
Kenneth Johansson
4def83dac0 add ated. 2017-02-04 13:58:20 +01:00
Kenneth Johansson
e59ec80d85 update. 2017-02-04 13:58:20 +01:00
Kenneth Johansson
4d30ca004f remove extra space. 2017-02-04 13:58:20 +01:00
Kenneth Johansson
e45d03c225 new version and put u-boot into release file.
we need u-boot in the release file so that we can install a new version
if that is needed.
2017-02-04 13:58:20 +01:00
Sukru Senli
4fdb1de5a0 layer2interface: quick fix to install files 2017-02-04 13:58:20 +01:00
Sukru Senli
1b10303d35 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* bb73784 use same get port name method for brcm and mtk
* b94d73c for mtk read encryption from config for now
* ffe4f65 show real speed for mtk
* 1fae87c zero device char array first
* c77208a calculate wdev correctly for mtk
* fb9cab5 mediatek updates
-------------------------------------------------------------------------------
commit bb7378478269e825e29503a4971843c142ca4e03
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 14:24:09 +0200

    use same get port name method for brcm and mtk

Base directory -> /
 port.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
-------------------------------------------------------------------------------
commit b94d73cabd4d5b09ab5f4801cb477f5805e16e78
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:37:00 +0200

    for mtk read encryption from config for now

Base directory -> /
 mediatek.c | 39 ++++-----------------------------------
 1 file changed, 4 insertions(+), 35 deletions(-)
-------------------------------------------------------------------------------
commit ffe4f65b0dcf4a31315b27c9656b336e2a297963
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:27:16 +0200

    show real speed for mtk

Base directory -> /
 wireless.c | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 1fae87c1de98293f26ba32eb23e73e5497feef7d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:23:42 +0200

    zero device char array first

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit c77208a405db1550db0acc67292f6e7a99746f2c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:23:18 +0200

    calculate wdev correctly for mtk

Base directory -> /
 wireless.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit fb9cab57505de2af92d15a913bb9cb4657c571e9
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 10:58:46 +0200

    mediatek updates

Base directory -> /
 mediatek.c | 64 --------------------------------------------------------------
 port.c     |  4 ----
 system.c   |  6 +++---
 3 files changed, 3 insertions(+), 71 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Sukru Senli
3d28c5f61d layer2interface: copy broadcom dir for broadcom targets only 2017-02-04 13:58:20 +01:00
Sukru Senli
829619ff91 port_management: configure only if the necessary tools exist 2017-02-04 13:58:20 +01:00
Sukru Senli
4be8168d86 inteno-netmodes: do not show bridged modes for EX400 2017-02-04 13:58:20 +01:00
Sukru Senli
e71adc6ac5 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 66d96ab use brctl showbr for all profiels
-------------------------------------------------------------------------------
commit 66d96ab3c40c9fd16ebf46a73bb2daf70f255eb1
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-17 13:59:37 +0200

    use brctl showbr for all profiels

Base directory -> /
 network.c | 14 --------------
 1 file changed, 14 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Sukru Senli
6e49bf489d Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 37c1feb mediatek: hardcode sta info until we know how to get it
* 59d3ebc mediatek: network topology almost working
* f7112ed imitate led.internet object
* 8daafa6 initial mediatek wireless code
* ad43d1e mediatek
* 0a8dbd0 compare first three chars of wl
* 69bbcfd set eswap per radio instead of per interface
* b4d3b9e netcheck: use only needed functions
* 7f66c23 show ssid in network topology even if it is only one characther
-------------------------------------------------------------------------------
commit 37c1feb3df9bf35f76adccaa7da5f575afcfd7ac
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-14 17:15:58 +0200

    mediatek: hardcode sta info until we know how to get it

Base directory -> /
 mediatek.c | 59 ++++++-----------------------------------------------------
 1 file changed, 6 insertions(+), 53 deletions(-)
-------------------------------------------------------------------------------
commit 59d3ebce59e4e759d1296e510cbdfc10e33077f6
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-14 15:44:17 +0200

    mediatek: network topology almost working

Base directory -> /
 mediatek.c | 15 +--------------
 network.c  | 29 ++++++++++++++++++++++-------
 port.c     | 16 ++++++++++++----
 3 files changed, 35 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit f7112ed499891ffcaebec2085f910d6286ed1428
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 19:55:10 +0200

    imitate led.internet object

Base directory -> /
 led.internet.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
-------------------------------------------------------------------------------
commit 8daafa64087f628882192c7e1872a94d8c28aead
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 19:49:43 +0200

    initial mediatek wireless code

Base directory -> /
 mediatek.c | 203 ++++++++++++++++++++++++++++---------------------------------
 network.c  |   2 -
 port.c     |   5 ++
 questd.c   |   4 --
 wireless.c |  23 ++++++-
 wps.c      |   6 +-
 6 files changed, 123 insertions(+), 120 deletions(-)
-------------------------------------------------------------------------------
commit ad43d1eb3855de9ca3cadcd7e68051b68d7229d2
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 17:58:13 +0200

    mediatek

Base directory -> /
 Makefile           |   6 +-
 dumper.c           |  32 +++
 mediatek.c         | 611 ++++++++++++++++++++++++++++++++++++++++++++++
 mediatek.h         | 691 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 mtkwifi_channels.h | 393 ++++++++++++++++++++++++++++++
 network.c          |  21 +-
 network.h          |   5 +-
 port.c             |  12 +
 questd.c           |   4 +-
 questd.h           |   2 -
 uboot_env.c        |   2 +-
 wireless.c         |   4 -
 12 files changed, 1767 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
commit 0a8dbd0c6598f22760b04605a4dbe07f772fb1a7
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-17 12:15:48 +0200

    compare first three chars of wl

Base directory -> /
 broadcom.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 69bbcfd3f2f181529d7898bbe937e37116ee96da
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-16 15:17:00 +0200

    set eswap per radio instead of per interface

Base directory -> /
 broadcom.c | 30 +++++++-----------------------
 1 file changed, 7 insertions(+), 23 deletions(-)
-------------------------------------------------------------------------------
commit b4d3b9e788c529861961dc416edc5c57e3938e10
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-16 14:44:52 +0200

    netcheck: use only needed functions

Base directory -> /
 net.c      |   3 +-
 netcheck.c | 796 ++++++++++++++++++++++++++++++-------------------------------
 2 files changed, 400 insertions(+), 399 deletions(-)
-------------------------------------------------------------------------------
commit 7f66c232c107281038ae9e92b6e50ddb282206ce
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-16 13:40:53 +0200

    show ssid in network topology even if it is only one characther

Base directory -> /
 network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-04 13:58:20 +01:00
Sukru Senli
e93fdd699d questd: 4.0.0 2017-02-04 13:58:20 +01:00
Jonas Höglund
63da9fc1ba Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* 8cd9e36 Add format nand commands to default uboot env
-------------------------------------------------------------------------------
commit 8cd9e3642b5e6be5630385aa2e7eb7666ed0d4fb
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-09-28 11:54:46 +0200

    Add format nand commands to default uboot env

Base directory -> /
 include/configs/ex400.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2017-02-04 13:57:37 +01:00
Kenneth Johansson
265543047e Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* c92bd59 make it work on UBI again.
-------------------------------------------------------------------------------
commit c92bd591777c9fb1e7c55e3e9da0e078a8be00b1
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-09-27 19:30:19 +0200

    make it work on UBI again.

Base directory -> /
 tools/env/fw_env.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:57:37 +01:00
Jonas Höglund
d7a50840a5 No overrides on mediatek branch for now 2017-02-04 13:57:37 +01:00
Jonas Höglund
f7680d6ec9 Update feed [ feed_inteno_packages ] package [ tptest ]
-------------------------------------------------------------------------------
* 5778690 Fix format string error
-------------------------------------------------------------------------------
commit 57786908e7a0c790f303417b459c562887582384
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-09-26 15:00:00 +0200

    Fix format string error

Base directory -> /
 client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2017-02-04 13:57:37 +01:00
Jonas Höglund
40c101d0a4 Fix config error 2017-02-04 13:57:37 +01:00
Jonas Höglund
636e1e7dff Remove samba 2017-02-04 13:57:37 +01:00
Jonas Höglund
bfde71e089 Use openwrt mtd-utils for now 2017-02-04 13:57:37 +01:00
Jonas Höglund
c83c269436 libcgroup does not seem compatible with mussle.
We are missing the fts.h header file.
2017-02-04 13:57:37 +01:00
Jonas Höglund
698ca0279d Disable ice-client for now as it has several issues for mediatek 2017-02-04 13:57:37 +01:00
Jonas Höglund
7e9e39c674 samba2 does not compile for mediatek 2017-02-04 13:57:37 +01:00
448 changed files with 19787 additions and 20045 deletions

31
4g-support/Makefile Normal file
View File

@@ -0,0 +1,31 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=4g-support
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/4g-support
CATEGORY:=Network
TITLE:=4G Network Setup Tools
endef
define Package/4g-support/description
4g-support contains necessary tools to setup 4G WAN connection
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/4g-support/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,4g-support))

View File

@@ -0,0 +1,62 @@
opengt
set com 115200n81
set comecho off
set senddelay 0.05
waitquiet 1 0.2
:start
if $env("USE_DISCONNECT")="1" goto disconnect
send "AT^^NDISDUP=1,1,\""
send $env("USE_APN")
if $env("USE_AUTHTYPE")="-1" goto noauth
else goto auth
:noauth
send "\"^m"
goto result
:auth
send "\",\""
send $env("USE_USERID")
send "\",\""
send $env("USE_PASSWORD")
send "\","
send $env("USE_AUTHTYPE")
send "^m"
goto result
:result
waitfor 5 "OK","ERR","ERROR"
if % = 0 goto connok
if % = 1 goto connerr
if % = 2 goto connerr
:connok
print "WWAN connection established.\r\n"
goto done
:connerr
print "WWAN error. Connection failed.\r\n"
exit 1
:disconnect
send "AT^^NDISDUP=1,0,\""
send $env("USE_APN")
send "\"^m"
waitfor 5 "OK","ERR","ERROR"
if % = 0 goto disconnok
if % = 1 goto disconnerr
if % = 2 goto disconnerr
:disconnok
print "WWAN connection disconnected.\r\n"
goto done
:disconnerr
print "WWAN disconnection error.\r\n"
exit 1
:done
exit 0

View File

@@ -0,0 +1,35 @@
. /lib/network/config.sh
. /usr/share/libubox/jshn.sh
iface_status() {
local iface=$1
local up
json_load "$(ifstatus $iface)"
json_get_var up up
json_close_object
return $up
}
case "$ACTION" in
add|register)
if [ "${INTERFACE:0:4}" == "wwan" ]; then
netname=$(get_network_of "$INTERFACE")
for net in $netname; do
local service=$(uci -q get network.$net.service)
local cnt=0
while $(iface_status $net); do
ifup $net
if [ "$service" == "qmi" ]; then
cnt=$(($cnt+1))
# quit trying if still not online after three times
[ $cnt -eq 3 ] && break
sleep 5
else
break
fi
done
done
fi
;;
esac

View File

@@ -0,0 +1,74 @@
#!/bin/sh
local usb_dir uVid uPid uMa uPr uSe bConf bNumConfs vendor product mdmtyp netdev comdev cdcdev ttydev interface usbno usbbr
sanitize() {
sed -e 's/[[:space:]]\+$//; s/[[:space:]]\+/_/g' "$@"
}
find_usb_attrs() {
usb_dir="/sys/$DEVPATH"
[ -f "$usb_dir/idVendor" ] || usb_dir="${usb_dir%/*}"
uVid=$(cat "$usb_dir/idVendor")
uPid=$(cat "$usb_dir/idProduct")
uMa=$(sanitize "$usb_dir/manufacturer")
uPr=$(sanitize "$usb_dir/product")
uSe=$(sanitize "$usb_dir/serial")
bNumConfs=$(cat "$usb_dir/bNumConfigurations")
bConf=$(cat "$usb_dir/bConfigurationValue")
netdev=$(find $usb_dir -name wwan* | awk -F'/' '{print$NF}' | head -2 | tail -1)
cdcdev=$(find $usb_dir -name cdc-wdm* | awk -F'/' '{print$NF}' | head -2 | tail -1)
ttydev=$(ls $(find $usb_dir -name tty | head -2 | tail -1) | tail -1)
interface=$(cat $usb_dir/interface)
if [ -n "$cdcdev" ]; then
comdev=$cdcdev
mdmtyp=$(grep $uVid:$uPid /etc/modemdb | grep 'qmi\|mbim' | awk '{print$2}' | head -1)
vendor=$(grep $uVid:$uPid /etc/modemdb | grep 'qmi\|mbim' | awk '{print$3}' | head -1)
product=$(grep $uVid:$uPid /etc/modemdb | grep 'qmi\|mbim' | awk '{print$4}' | head -1)
else
comdev=$ttydev
mdmtyp=$(grep $uVid:$uPid /etc/modemdb | grep 'ncm' | awk '{print$2}' | head -1)
vendor=$(grep $uVid:$uPid /etc/modemdb | grep 'ncm' | awk '{print$3}' | head -1)
product=$(grep $uVid:$uPid /etc/modemdb | grep 'ncm' | awk '{print$4}' | head -1)
fi
[ -n "$mdmtyp" ] || mdmtyp=$(grep $uVid:$uPid /etc/modemdb | awk '{print$2}' | head -1)
[ -n "$vendor" ] || vendor=$(grep $uVid:$uPid /etc/modemdb | awk '{print$3}' | head -1)
[ -n "$product" ] || product=$(grep $uVid:$uPid /etc/modemdb | awk '{print$4}' | head -1)
}
convert_to_mbim() {
if [ "$mdmtyp" == "mbim" ] && [ "$bNumConfs" == "2" ]; then
[ "$bConf" == "2" ] || echo 2 > $usb_dir/bConfigurationValue
fi
}
usbno=$(echo $DEVPATH | cut -d'/' -f5)
usbbr=$(echo $DEVPATH | cut -d'/' -f7)
case "$usbbr" in
*:*) usbbr=$(echo $DEVPATH | cut -d'/' -f6) ;;
esac
#devno=$(basename $DEVPATH)
find_usb_attrs
if [ "$ACTION" = add ]; then
convert_to_mbim "$uVid:$uPid"
if [ -n "$uVid" ] && [ -n "$uPid" ] && [ -n "$mdmtyp" ] && [ -n "$netdev" ] && [ -n "$comdev" ]; then
if [ -n "$usbno" ] && [ -n "$usbbr" ]; then
sed -i "/$usbno:$usbbr/ d" /var/usbnets
echo $usbno:$usbbr $uVid:$uPid $uMa $uPr $netdev $comdev $mdmtyp $vendor $product >> /var/usbnets
ubus send hotplug.usb "{'action': 'add', 'devpath': '$DEVPATH', 'manufacturer': '$uMa', 'product': '$uPr', 'serial': '$uSe', 'vendor_id': '$uVid', \
'product_id': '$uPid', 'driver_interface': '$interface', 'driver': '$DRIVER', 'devtype': '$DEVTYPE'}"
fi
fi
fi
if [ "$ACTION" = remove ]; then
if [ -n "$usbno" ] && [ -n "$usbbr" ]; then
sed -i "/$usbno:$usbbr/ d" /var/usbnets
ubus send hotplug.usb "{'action': 'remove', 'devpath': '$DEVPATH', 'manufacturer': '$uMa', 'product': '$uPr', 'serial': '$uSe', 'vendor_id': '$uVid', \
'product_id': '$uPid', 'driver_interface': '$interface', 'driver': '$DRIVER', 'devtype': '$DEVTYPE'}"
fi
fi

View File

@@ -0,0 +1,100 @@
1bbb:011e qmi
1a8d:1001 ecm
1a8d:100c ecm
1a8d:100d ecm
16d8:6280 qmi
16d8:6803 qmi
16d8:6804 qmi
16d8:7003 qmi
16d8:700a qmi
2001:7d01 mbim
2001:7d02 mbim
2001:7d03 mbim
12d1:14ac qmi
12d1:140c qmi
12d1:1506 qmi Huawei E367/392/398
12d1:1506 ncm Huawei E3276
12d1:14d2 qmi
12d1:1c07 ncm
12d1:1436 ecm
12d1:14c9 qmi
12d1:14db ecm
12d1:151d mbim
12d1:151e qmi Huawei E353
12d1:1c1e ncm
12d1:150c qmi
12d1:150f qmi
12d1:151b qmi
12d1:142d ecm
12d1:1432 ecm
12d1:1c1f ncm
12d1:1433 qmi
12d1:1465 ecm
12d1:14ca qmi
12d1:14cf ncm
12d1:14bc ecm
12d1:14ae ecm
12d1:1576 mbim
12d1:1577 mbim
12d1:1400 mbim
12d1:14f7 mbim
12d1:1464 qmi
12d1:14cb qmi
12d1:14cc qmi
12d1:14c6 qmi
12d1:14fa mbim
12d1:1578 mbim
12d1:14c8 qmi
12d1:14f8 mbim
12d1:1575 mbim
12d1:1579 mbim
12d1:157a mbim
12d1:157b mbim
12d1:157f mbim
12d1:1f16 mbim Vodafone K5150
12d1:1404 qmi
19f2:1700 ecm
1410:b001 qmi
1527:1000 ecm
0b3c:c005 qmi
0f3d:68a2 qmi
1199:68a2 qmi SierraWireless M7710
1199:68c0 qmi SierraWireless M7304
1349:1100 qmi
1349:1200 qmi
1199:683c qmi
2360:2100 qmi
2360:2200 qmi
2360:2300 qmi
2507:0000 qmi
19d2:0055 qmi
19d2:0052 qmi
19d2:0063 qmi
19d2:1008 qmi
19d2:1010 qmi
19d2:2002 qmi
19d2:1176 qmi
19d2:1023 mbim
19d2:0104 qmi
19d2:1018 qmi
19d2:1032 mbim
19d2:1402 qmi
19d2:1405 ecm
19d2:1426 qmi
19d2:0031 qmi
19d2:0124 qmi
19d2:1254 qmi
19d2:0017 qmi
19d2:0002 qmi
19d2:0121 qmi
19d2:1252 qmi
19d2:0157 qmi
19d2:0167 qmi
19d2:0199 qmi
19d2:0257 qmi
19d2:0326 qmi
19d2:0349 ecm
19d2:1408 ecm
19d2:0284 qmi
19d2:0019 qmi
19d2:0265 qmi

View File

@@ -0,0 +1,159 @@
#!/bin/sh
INCLUDE_ONLY=1
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
proto_4g_init_config() {
proto_config_add_string "modem"
proto_config_add_string "service"
proto_config_add_string "comdev"
proto_config_add_string "ipaddr"
proto_config_add_string "netmask"
proto_config_add_string "hostname"
proto_config_add_string "clientid"
proto_config_add_string "vendorid"
proto_config_add_boolean "broadcast"
proto_config_add_string "reqopts"
proto_config_add_string "apn"
proto_config_add_string "username"
proto_config_add_string "password"
proto_config_add_boolean "lte_apn_use"
proto_config_add_string "lte_apn"
proto_config_add_string "lte_username"
proto_config_add_string "lte_password"
proto_config_add_string "pincode"
proto_config_add_string "technology"
proto_config_add_string "auto"
}
proto_4g_setup() {
local config="$1"
local iface="$2"
local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone
json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone
local opt dhcpopts
for opt in $reqopts; do
append dhcpopts "-O $opt"
done
for opt in $sendopts; do
append dhcpopts "-x $opt"
done
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
[ "$iface6rd" != 0 -a -f /lib/netifd/proto/6rd.sh ] && append dhcpopts "-O 212"
[ -n "$zone6rd" ] && proto_export "ZONE6RD=$zone6rd"
[ -n "$zone" ] && proto_export "ZONE=$zone"
[ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
json_get_var comdev comdev
json_get_var apn apn
json_get_var service service
json_get_var pincode pincode
# if [ -n "$modem" ]; then
# service=$(echo $modem | cut -d':' -f1)
# comdev=$(echo $modem | cut -d':' -f2)
# iface=$(echo $modem | cut -d':' -f3)
# fi
case "$service" in
ecm)
;;
eem)
;;
mbim)
local mbimdev=/dev/$(basename $(ls /sys/class/net/${iface}/device/usb/cdc-wdm* -d))
local comdev="${comdev:-$mbimdev}"
[ -n "$pincode" ] && {
if ! mbimcli -d $comdev --query-pin-state 2>&1 | grep -q "unlocked"; then
set -o pipefail
if ! mbimcli -d $comdev --enter-pin="${pincode}" 2>&1; then
mbimcli -d $comdev --query-pin-state
proto_notify_error "$config" PIN_FAILED
proto_block_restart "$interface"
return 1
fi
fi
}
APN="$apn" mbim-network $comdev start
;;
ncm)
[ -n "$pincode" ] && echo $pincode | gcom -d $comdev
USE_APN="$apn" gcom -d $comdev -s /etc/gcom/ncmconnection.gcom
;;
qmi)
local qmidev=/dev/$(basename $(ls /sys/class/net/${iface}/device/usb/cdc-wdm* -d))
local comdev="${comdev:-$qmidev}"
[ -n "$pincode" ] && {
if ! qmicli -d $comdev --dms-uim-get-pin-status 2>&1 | grep -q "enabled-verified\|disabled" >/dev/null; then
set -o pipefail
if ! qmicli -d $comdev --dms-uim-verify-pin="PIN,${pincode}" 2>&1; then
qmicli -d $comdev --dms-uim-get-pin-status
proto_notify_error "$config" PIN_FAILED
proto_block_restart "$interface"
return 1
fi
fi
}
APN="$apn" qmi-network $comdev start
;;
esac
proto_export "INTERFACE=$config"
proto_run_command "$config" udhcpc -R \
-p /var/run/udhcpc-$iface.pid \
-s /lib/netifd/dhcp.script \
-f -t 0 -i "$iface" \
${ipaddr:+-r $ipaddr} \
${hostname:+-H $hostname} \
${vendorid:+-V $vendorid} \
$clientid $broadcast $dhcpopts
}
proto_4g_teardown() {
local interface="$1"
local iface="$2"
local modem service comdev
config_load network
config_get service $interface service
config_get comdev $interface comdev
# config_get modem $interface modem
# if [ -n "$modem" ]; then
# service=$(echo $modem | cut -d':' -f1)
# comdev=$(echo $modem | cut -d':' -f2)
# iface=$(echo $modem | cut -d':' -f3)
# fi
case "$service" in
ecm)
;;
eem)
;;
mbim)
local mbimdev=/dev/$(basename $(ls /sys/class/net/${iface}/device/usb/cdc-wdm* -d))
local comdev="${comdev:-$mbimdev}"
mbim-network $comdev stop
;;
ncm)
USE_DISCONNECT=1 gcom -d $comdev -s /etc/gcom/ncmconnection.gcom
;;
qmi)
local qmidev=/dev/$(basename $(ls /sys/class/net/${iface}/device/usb/cdc-wdm* -d))
local comdev="${comdev:-$qmidev}"
qmi-network $comdev stop
;;
esac
proto_kill_command "$interface"
}
add_protocol 4g

773
asterisk-1.8.x-mod/Makefile Normal file
View File

@@ -0,0 +1,773 @@
#
# Copyright (C) 2008-2012 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:=asterisk18-mod
PKG_VERSION:=1.8.10.1
PKG_SOURCE_VERSION:=fd55c5dc4865142b7955ead96fe93b1ce888c37c
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/asterisk-1.8.x
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)-$(PKG_RELEASE).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-include $(INCLUDE_DIR)/ltqtapi.mk
include $(INCLUDE_DIR)/package.mk
define Package/asterisk18-mod/Default
SUBMENU:=Telephony
SECTION:=net
CATEGORY:=Network
URL:=http://www.asterisk.org/
endef
define Package/asterisk18-mod/Default/description
Asterisk is a complete PBX in software. It provides all of the features
you would expect from a PBX and more. Asterisk does voice over IP in three
protocols, and can interoperate with almost all standards-based telephony
equipment using relatively inexpensive hardware.
endef
define Package/asterisk18-mod
$(call Package/asterisk18-mod/Default)
TITLE:=Complete open source PBX, v1.8x
MENU:=1
DEPENDS:= +natalie-dect-h +PACKAGE_bcmkernel:bcmkernel +PACKAGE_bcmopen:bcmopen +libopenssl +libncurses +libpopt +libpthread +uci +ubus +zlib @!TARGET_avr32
endef
define Package/asterisk18-mod/description
$(call Package/asterisk18-mod/Default/description)
endef
define Package/asterisk18-mod-sounds
$(call Package/asterisk18-mod/Default)
TITLE:=Sound files
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-sounds/description
$(call Package/asterisk18-mod/Default/description)
This package contains sound files for Asterisk.
endef
define Package/asterisk18-mod-voicemail
$(call Package/asterisk18-mod/Default)
TITLE:=Voicemail support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-voicemail/description
$(call Package/asterisk18-mod/Default/description)
This package contains voicemail related modules for Asterisk.
endef
define Package/asterisk18-mod-app-transfer
$(call Package/asterisk18-mod/Default)
TITLE:=Call transfer support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-app-transfer/description
$(call Package/asterisk18-mod/Default/description)
This package contains the call transfer support module for Asterisk.
endef
define Package/asterisk18-mod-app-softhangup
$(call Package/asterisk18-mod/Default)
TITLE:=SoftHangup application
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-app-softhangup/description
$(call Package/asterisk18-mod/Default/description)
This package contains the SoftHangup support module for Asterisk.
endef
define Package/asterisk18-mod-app-meetme
$(call Package/asterisk18-mod/Default)
TITLE:=conferencing support
DEPENDS:= asterisk18-mod +dahdi-tools-libtonezone +dahdi
endef
define Package/asterisk18-mod-app-meetme/description
$(call Package/asterisk18-mod/Default/description)
This package provides the MeetMe application driver Conferencing support to
Asterisk.
endef
define Package/asterisk18-mod-chan-iax2
$(call Package/asterisk18-mod/Default)
TITLE:=IAX support
DEPENDS:= asterisk18-mod +asterisk18-res-crypto
endef
define Package/asterisk18-mod-chan-iax2/description
$(call Package/asterisk18-mod/Default/description)
This package provides IAX support to
Asterisk.
endef
define Package/asterisk18-mod-cdr
$(call Package/asterisk18-mod/Default)
TITLE:=CDR support
DEPENDS:= asterisk18-mod +libsqlite3
endef
define Package/asterisk18-mod-cdr/description
$(call Package/asterisk18-mod/Default/description)
This package provides Call Detail Record support to
Asterisk.
endef
define Package/asterisk18-mod-res-musiconhold
$(call Package/asterisk18-mod/Default)
TITLE:=MOH support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-res-musiconhold/description
$(call Package/asterisk18-mod/Default/description)
This package provides Music On Hold support to
Asterisk.
endef
define Package/asterisk18-mod-res-voice
$(call Package/asterisk18-mod/Default)
TITLE:=Voice client/pbx support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-res-voice/description
$(call Package/asterisk18-mod/Default/description)
This package provides Voice Client/pbx support to
Asterisk.
endef
define Package/asterisk18-mod-res-srtp
$(call Package/asterisk18-mod/Default)
TITLE:=SRTP support
DEPENDS:= asterisk18-mod libsrtp +asterisk18-mod-res-crypto
endef
define Package/asterisk18-mod-res-srtp/description
$(call Package/asterisk18-mod/Default/description)
This package provides SRTP support to
Asterisk.
endef
define Package/asterisk18-mod-res-stun
$(call Package/asterisk18-mod/Default)
TITLE:=STUN support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-app-queue
$(call Package/asterisk18-mod/Default)
TITLE:=Queue support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-chan-gtalk
$(call Package/asterisk18-mod/Default)
TITLE:=GTalk support
DEPENDS:= asterisk18-mod +libiksemel
endef
define Package/asterisk18-mod-chan-gtalk/description
$(call Package/asterisk18-mod/Default/description)
This package provides the channel chan_gtalk and res_jabber for GTalk
support to Asterisk.
endef
define Package/asterisk18-mod-res-timing-timerfd
$(call Package/asterisk18-mod/Default)
TITLE:= Timerfd Timing Interface
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-res-timing-pthread
$(call Package/asterisk18-mod/Default)
TITLE:= pthread Timing Interface
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-res-fax
$(call Package/asterisk18-mod/Default)
TITLE:=Generic FAX Resource for FAX technology resource modules
DEPENDS:= asterisk18-mod +asterisk18-mod-res-timing-pthread
endef
define Package/asterisk18-mod-res-fax-spandsp
$(call Package/asterisk18-mod/Default)
TITLE:=Spandsp T.38 and G.711 FAX Resource
DEPENDS:= asterisk18-mod +asterisk18-mod-res-fax +libspandsp
endef
define Package/asterisk18-mod-chan-mgcp
$(call Package/asterisk18-mod/Default)
TITLE:=MGCP channel support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-chan-mgcp/description
$(call Package/asterisk18-mod/Default/description)
This package provides the channel chan_mgcp support to Asterisk.
endef
define Package/asterisk18-mod-chan-skinny
$(call Package/asterisk18-mod/Default)
TITLE:=Skinny channel support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-chan-skinny/description
$(call Package/asterisk18-mod/Default/description)
This package provides the channel chan_skinny support to Asterisk.
endef
define Package/asterisk18-mod-chan-brcm
$(call Package/asterisk18-mod/Default)
TITLE:=Broadcom channel support
DEPENDS:= asterisk18-mod
endef
define Package/asterisk18-mod-chan-brcm/description
$(call Package/asterisk18-mod/Default/description)
This package provides the channel chan_brcm support to Asterisk.
endef
define Package/asterisk18-mod-curl
$(call Package/asterisk18-mod/Default)
TITLE:=CURL support
DEPENDS:= asterisk18-mod +libcurl
endef
define Package/asterisk18-mod-curl/description
$(call Package/asterisk18-mod/Default/description)
This package provides CURL
support to Asterisk.
endef
define Package/asterisk18-mod-mysql
$(call Package/asterisk18-mod/Default)
TITLE:=MySQL support
DEPENDS:= asterisk18-mod +PACKAGE_asterisk18-mysql:libmysqlclient
endef
define Package/asterisk18-mod-mysql/description
$(call Package/asterisk18-mod/Default/description)
This package provides MySQL
support to Asterisk.
endef
define Package/asterisk18-mod-chan-lantiq
$(call Package/asterisk18-mod/Default)
TITLE:=Lantiq TAPI support
DEPENDS:= asterisk18-mod $(LTQ_TAPI_DEPENDS)
URL:=http://git.nanl.de/?p=asterisk_channel_lantiq.git
MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
endef
define Package/asterisk18-mod-chan-lantiq/description
$(call Package/asterisk18-mod/Default/description)
This package provides the channel chan_lantiq support to Asterisk.
endef
CONFIGURE_ARGS+= \
--without-inotify
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-app-meetme),)
CONFIGURE_ARGS+= \
--with-dahdi="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= \
--without-dahdi
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-chan-gtalk),)
CONFIGURE_ARGS+= \
--with-gnutls="$(STAGING_DIR)/usr" \
--with-iksemel="$(STAGING_DIR)/usr"
SITE_VARS+= \
ac_cv_lib_iksemel_iks_start_sasl=yes \
ac_cv_lib_gnutls_gnutls_bye=yes
else
CONFIGURE_ARGS+= \
--without-gnutls \
--without-iksemel
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-curl),)
CONFIGURE_ARGS+= \
--with-curl="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= \
--without-curl
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-mysql),)
CONFIGURE_ARGS+= \
--with-mysqlclient="$(STAGING_DIR)/usr/bin"
else
CONFIGURE_ARGS+= \
--without-mysqlclient
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-res-fax-spandsp),)
CONFIGURE_ARGS+= \
--with-spandsp="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= \
--without-spandsp
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-res-srtp),)
CONFIGURE_ARGS+= \
--with-srtp="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= \
--without-srtp
endif
ifeq ($(CONFIG_TARGET_IBOARDID),"D301")
EXTRA_CFLAGS += -DNTR_SUPPORT
endif
CONFIGURE_ARGS+= \
--without-curses \
--with-gsm=internal \
--without-cap \
--without-gtk \
--without-gtk2 \
--without-isdnnet \
--without-kde \
--without-misdn \
--without-nbs \
--with-ncurses="$(STAGING_DIR)/usr" \
--without-netsnmp \
--without-newt \
--without-odbc \
--without-ogg \
--without-osptk \
--with-popt="$(STAGING_DIR)/usr" \
--without-pri \
--without-qt \
--without-radius \
--without-sdl \
--without-suppserv \
--without-tds \
--without-termcap \
--without-tinfo \
--without-vorbis \
--without-vpb \
--with-z="$(STAGING_DIR)/usr" \
--with-sounds-cache="$(DL_DIR)" \
--disable-xmldoc
# I've had strange errors with -fno-caller-saves
# in global CFLAGS so revert it. /Ronny
EXTRA_CFLAGS+= -O2 -fcaller-saves
EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
define Build/Prepare
$(call Build/Prepare/Default)
ifneq ($(CONFIG_TARGET_lantiq),)
$(CP) ./src-lantiq/* $(PKG_BUILD_DIR)/
endif
endef
define Build/Configure
-rm $(PKG_BUILD_DIR)/menuselect.makeopts
$(call Build/Configure/Default,,$(SITE_VARS))
endef
define Build/Compile
$(MAKE) -C "$(PKG_BUILD_DIR)" \
include/asterisk/version.h \
include/asterisk/buildopts.h defaults.h \
makeopts.embed_rules
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
$(MAKE) -C "$(PKG_BUILD_DIR)" \
ASTVARLIBDIR="/usr/lib/asterisk" \
ASTDATADIR="/usr/lib/asterisk" \
ASTKEYDIR="/usr/lib/asterisk" \
ASTDBDIR="/usr/lib/asterisk" \
NOISY_BUILD="1" \
DEBUG="" \
OPTIMIZE="" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install samples
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/asterisk-1.8/include/asterisk/
$(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-1.8/include/asterisk/
$(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-1.8/include/
endef
define Package/asterisk18-mod/conffiles
/etc/asterisk/asterisk.conf
/etc/asterisk/modules.conf
/etc/asterisk/extensions.conf
/etc/asterisk/sip.conf
/etc/asterisk/sip_notify.conf
/etc/asterisk/features.conf
/etc/asterisk/indications.conf
/etc/asterisk/logger.conf
/etc/asterisk/manager.conf
/etc/asterisk/rtp.conf
/etc/default/asterisk
/etc/init.d/asterisk
endef
define Package/asterisk18-mod/install
$(INSTALL_DIR) $(1)/etc/asterisk/ssl
for f in asterisk extensions features \
indications logger manager modules \
sip sip_notify rtp; do \
$(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
done
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
for f in app_dial app_echo app_playback app_macro \
chan_sip res_rtp_asterisk res_rtp_multicast \
codec_ulaw codec_gsm \
format_gsm format_pcm format_wav format_wav_gsm \
pbx_config \
func_strings func_timeout func_callerid func_logic; do \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
done
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/default
$(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/asterisk.hotplug $(1)/etc/hotplug.d/iface/80-asterisk
endef
define Package/asterisk18-mod-sounds/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
rm -f $(1)/usr/lib/asterisk/sounds/vm-*
rm -f $(1)/usr/lib/asterisk/sounds/conf-*
endef
define Package/asterisk18-mod-voicemail/conffiles
/etc/asterisk/voicemail.conf
endef
define Package/asterisk18-mod-voicemail/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_smdi.so $(1)/usr/lib/asterisk/modules/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
endef
define Package/asterisk18-mod-app-meetme/conffiles
/etc/asterisk/meetme.conf
endef
define Package/asterisk18-mod-app-meetme/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/conf-*.gsm $(1)/usr/lib/asterisk/sounds/
endef
define Package/asterisk18-mod-chan-iax2/conffiles
/etc/asterisk/iax.conf
/etc/asterisk/iaxprov.conf
endef
define Package/asterisk18-mod-cdr/conffiles
/etc/asterisk/cdr.conf
/etc/asterisk/cdr_custom.conf
/etc/asterisk/cdr_manager.conf
/etc/asterisk/cdr_odbc.conf
/etc/asterisk/cdr_pgsql.conf
/etc/asterisk/cdr_tds.conf
endef
define Package/asterisk18-mod-res-musiconhold/conffiles
/etc/asterisk/musiconhold.conf
endef
define Package/asterisk18-mod-chan-iax2/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iax.conf $(1)/etc/asterisk/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iaxprov.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_iax2.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-cdr/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr*.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*cdr*.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-musiconhold/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_musiconhold.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-voice/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_voice.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-chan-gtalk/conffiles
/etc/asterisk/gtalk.conf
/etc/asterisk/jabber.conf
endef
define Package/asterisk18-mod-chan-gtalk/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-timing-timerfd/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_timing_timerfd.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-timing-pthread/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_timing_pthread.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-fax/conffiles
/etc/asterisk/res_fax.conf
endef
define Package/asterisk18-mod-res-fax/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/res_fax.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_fax.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-fax-spandsp/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_fax_spandsp.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-chan-mgcp/conffiles
/etc/asterisk/mgcp.conf
endef
define Package/asterisk18-mod-chan-mgcp/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/mgcp.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mgcp.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-chan-skinny/conffiles
/etc/asterisk/skinny.conf
endef
define Package/asterisk18-mod-chan-skinny/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/skinny.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_skinny.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-chan-brcm/conffiles
/etc/asterisk/brcm.conf
endef
define Package/asterisk18-mod-chan-brcm/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/brcm.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_brcm.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-curl/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/func_curl.so $(1)/usr/lib/asterisk/modules/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_curl.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-app-transfer/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_transfer.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-app-softhangup/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_softhangup.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-mysql/conffiles
/etc/asterisk/app_mysql.conf
/etc/asterisk/res_config_mysql.conf
/etc/asterisk/cdr_mysql.conf
endef
define Package/asterisk18-mod-mysql/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/app_mysql.conf $(1)/etc/asterisk/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/res_config_mysql.conf $(1)/etc/asterisk/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr_mysql.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_mysql.so $(1)/usr/lib/asterisk/modules/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_mysql.so $(1)/usr/lib/asterisk/modules/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_config_mysql.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-chan-lantiq/conffiles
/etc/asterisk/lantiq.conf
endef
define Package/asterisk18-mod-chan-lantiq/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/lantiq.conf $(1)/etc/asterisk/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_lantiq.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-srtp/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_srtp.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-stun/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_stun_monitor.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-app-queue/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_queue.so $(1)/usr/lib/asterisk/modules/
endef
define Buildasterisk18-modModuleTemplate
define Package/asterisk18-mod-$(subst _,-,$(1))
$$(call Package/asterisk18-mod/Default)
TITLE:=$(2) support
DEPENDS:= asterisk18-mod $(4)
endef
define Package/asterisk18-mod-$(subst _,-,$(1))/description
$$(call Package/asterisk18-mod/Default/description)
This package provides support $(3) in Asterisk.
endef
define Package/asterisk18-mod-$(subst _,-,$(1))/install
$(INSTALL_DIR) $$(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$(1).so $$(1)/usr/lib/asterisk/modules/
endef
$$(eval $$(call BuildPackage,asterisk18-mod-$(subst _,-,$(1))))
endef
$(eval $(call BuildPackage,asterisk18-mod))
$(eval $(call BuildPackage,asterisk18-mod-voicemail))
$(eval $(call BuildPackage,asterisk18-mod-sounds))
$(eval $(call BuildPackage,asterisk18-mod-app-meetme))
$(eval $(call BuildPackage,asterisk18-mod-app-transfer))
$(eval $(call BuildPackage,asterisk18-mod-app-softhangup))
$(eval $(call BuildPackage,asterisk18-mod-chan-iax2))
$(eval $(call BuildPackage,asterisk18-mod-cdr))
$(eval $(call BuildPackage,asterisk18-mod-res-musiconhold))
$(eval $(call BuildPackage,asterisk18-mod-res-voice))
$(eval $(call BuildPackage,asterisk18-mod-chan-gtalk))
$(eval $(call BuildPackage,asterisk18-mod-res-fax))
$(eval $(call BuildPackage,asterisk18-mod-res-fax-spandsp))
$(eval $(call BuildPackage,asterisk18-mod-res-timing-timerfd))
$(eval $(call BuildPackage,asterisk18-mod-res-timing-pthread))
$(eval $(call BuildPackage,asterisk18-mod-chan-mgcp))
$(eval $(call BuildPackage,asterisk18-mod-chan-skinny))
$(eval $(call BuildPackage,asterisk18-mod-chan-brcm))
$(eval $(call BuildPackage,asterisk18-mod-curl))
$(eval $(call BuildPackage,asterisk18-mod-mysql))
$(eval $(call BuildPackage,asterisk18-mod-chan-lantiq))
$(eval $(call BuildPackage,asterisk18-mod-res-srtp))
$(eval $(call BuildPackage,asterisk18-mod-res-stun))
$(eval $(call BuildPackage,asterisk18-mod-app-queue))
$(eval $(call Buildasterisk18-modModuleTemplate,app_authenticate,Authenticate,support for executing arbitrary authenticate commands))
$(eval $(call Buildasterisk18-modModuleTemplate,app_chanisavail,Channel availability check,support for checking if a channel is available))
$(eval $(call Buildasterisk18-modModuleTemplate,app_chanspy,Channel listen in,support for listening in on any channel))
$(eval $(call Buildasterisk18-modModuleTemplate,app_directed_pickup,Directed call pickup,support for directed call pickup))
$(eval $(call Buildasterisk18-modModuleTemplate,app_exec,Exec application,support for application execution))
$(eval $(call Buildasterisk18-modModuleTemplate,app_minivm,Minimal voicemail system,a voicemail system in small building blocks working together based on the Comedian Mail voicemail system))
$(eval $(call Buildasterisk18-modModuleTemplate,app_readexten,Extension to variable,a trivial application to read an extension into a variable))
$(eval $(call Buildasterisk18-modModuleTemplate,app_read,Variable read,a trivial application to read a variable))
$(eval $(call Buildasterisk18-modModuleTemplate,app_sayunixtime,Say Unix time,an application to say Unix time))
$(eval $(call Buildasterisk18-modModuleTemplate,app_sms,SMS,SMS support (ETSI ES 201 912 protocol 1)))
$(eval $(call Buildasterisk18-modModuleTemplate,app_stack,Stack applications, stack applications Gosub Return etc., +asterisk18-res-agi))
$(eval $(call Buildasterisk18-modModuleTemplate,app_system,System exec,support for executing system commands))
$(eval $(call Buildasterisk18-modModuleTemplate,app_talkdetect,File playback with audio detect,for file playback with audio detect))
$(eval $(call Buildasterisk18-modModuleTemplate,app_waituntil,Sleep,support sleeping until the given epoch))
$(eval $(call Buildasterisk18-modModuleTemplate,app_while,While loop,a while loop implementation))
$(eval $(call Buildasterisk18-modModuleTemplate,chan_agent,Agents proxy channel, an implementation of agents proxy channel))
$(eval $(call Buildasterisk18-modModuleTemplate,chan_local,Local proxy channel, an implementation of local proxy channel))
$(eval $(call Buildasterisk18-modModuleTemplate,codec_alaw,Signed linear to alaw translation,translation between signed linear and alaw codecs))
$(eval $(call Buildasterisk18-modModuleTemplate,codec_ulaw,Signed linear to ulaw translation,translation between signed linear and ulaw codecs))
$(eval $(call Buildasterisk18-modModuleTemplate,codec_a_mu,Alaw to ulaw translation,translation between alaw and ulaw codecs))
$(eval $(call Buildasterisk18-modModuleTemplate,codec_g722,G.722,a high bit rate 48/56/64Kbps ITU standard codec))
$(eval $(call Buildasterisk18-modModuleTemplate,codec_g726,Signed linear to G.726 translation,translation between signed linear and ITU G.726-32kbps codecs))
$(eval $(call Buildasterisk18-modModuleTemplate,codec_ilbc,iLBC,internet Low Bitrate Codec))
$(eval $(call Buildasterisk18-modModuleTemplate,codec_gsm,GSM,GSM codec))
$(eval $(call Buildasterisk18-modModuleTemplate,format_g726,G.726,support for headerless G.726 16/24/32/40kbps data format))
$(eval $(call Buildasterisk18-modModuleTemplate,format_g729,G.729,support for raw headerless G729 data))
$(eval $(call Buildasterisk18-modModuleTemplate,format_sln,Raw slinear format,support for raw slinear format))
$(eval $(call Buildasterisk18-modModuleTemplate,format_sln16,Raw slinear 16 format,support for Raw slinear 16 format))
$(eval $(call Buildasterisk18-modModuleTemplate,func_db,Database interaction,functions for interaction with the database))
$(eval $(call Buildasterisk18-modModuleTemplate,func_devstate,Blinky lights control,functions for manually controlled blinky lights))
$(eval $(call Buildasterisk18-modModuleTemplate,func_vmcount,vmcount dialplan,a vmcount dialplan function))
$(eval $(call Buildasterisk18-modModuleTemplate,func_extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control))
$(eval $(call Buildasterisk18-modModuleTemplate,func_global,Global variable,global variable dialplan functions))
$(eval $(call Buildasterisk18-modModuleTemplate,func_shell,Shell,support for shell execution))
$(eval $(call Buildasterisk18-modModuleTemplate,pbx_ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic))
$(eval $(call Buildasterisk18-modModuleTemplate,res_ael_share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules))
$(eval $(call Buildasterisk18-modModuleTemplate,pbx_spool,Call Spool,outgoing call spool support))
$(eval $(call Buildasterisk18-modModuleTemplate,res_agi,Asterisk Gateway Interface,support for the Asterisk Gateway Interface extension))
$(eval $(call Buildasterisk18-modModuleTemplate,res_crypto,Provide Crypto,Cryptographic Signature capability))
$(eval $(call Buildasterisk18-modModuleTemplate,app_alarmreceiver,Alarm receiver,Central Station Alarm receiver for Ademco Contact ID))
$(eval $(call Buildasterisk18-modModuleTemplate,app_setcallerid,Set callerid,support for setting callerid))
$(eval $(call Buildasterisk18-modModuleTemplate,app_verbose,Verbose logging,Verbose logging application))
$(eval $(call Buildasterisk18-modModuleTemplate,func_channel,Channel info,Channel info dialplan function))
$(eval $(call Buildasterisk18-modModuleTemplate,func_blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted))
$(eval $(call Buildasterisk18-modModuleTemplate,app_originate,Originate a call,originating an outbound call and connecting it to a specified extension or application))
$(eval $(call Buildasterisk18-modModuleTemplate,func_uri,URI encoding and decoding,Encodes and decodes URI-safe strings))
$(eval $(call Buildasterisk18-modModuleTemplate,app_disa,Direct Inward System Access,Direct Inward System Access))
$(eval $(call Buildasterisk18-modModuleTemplate,app_senddtmf,Send DTMF digits,Sends arbitrary DTMF digits))
$(eval $(call Buildasterisk18-modModuleTemplate,func_cut,CUT function,CUT function))
$(eval $(call Buildasterisk18-modModuleTemplate,res_clioriginate,Calls via CLI,Originate calls via the CLI))
$(eval $(call Buildasterisk18-modModuleTemplate,app_mixmonitor,Record a call and mix the audio,record a call and mix the audio during the recording))
$(eval $(call Buildasterisk18-modModuleTemplate,app_playtones,Playtones application,play a tone list))
$(eval $(call Buildasterisk18-modModuleTemplate,app_record,Record sound file,to record a sound file))

View File

@@ -0,0 +1,4 @@
## startup options for /etc/init.d/asterisk
ENABLE_ASTERISK="yes"
OPTIONS=""

View File

@@ -0,0 +1,18 @@
#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
config_load voice_client
config_get bindintf SIP bindintf
[ "$INTERFACE" == "$bindintf" ] || exit 0
. /lib/functions/network.sh
if [ -n "$bindintf" ]; then
network_get_ipaddr bindaddr "$bindintf"
bindaddr="${bindaddr:-0.0.0.0}"
sed -i "s/bindaddr=.*/bindaddr=$bindaddr/g" /etc/asterisk/sip.conf
[ -e /var/run/asterisk/asterisk.ctl ] && /etc/init.d/asterisk reload
fi

View File

@@ -0,0 +1,56 @@
#!/bin/sh /etc/rc.common
START=98
STOP=10
. /usr/share/libubox/jshn.sh
. /lib/functions/network.sh
USE_PROCD=1
NAME=asterisk
PROG=/usr/sbin/asterisk
DEFAULT=/etc/default/asterisk
CONFDIR=/etc/asterisk
init_asterisk() {
[ -f $DEFAULT ] && . $DEFAULT
[ -d /var/run/asterisk ] || mkdir -p /var/run/asterisk
[ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
[ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
# does the board have a fxs relay?
local fxsRelayGpio=$(db -q get hw.board.fxsRelayGpio)
if [ "$fxsRelayGpio" != "" ]; then
/sbin/brcm_fw_tool set -x $fxsRelayGpio -p 1
fi
}
service_triggers() {
procd_add_reload_trigger voice_client
}
start_service() {
init_asterisk
procd_open_instance
procd_set_param command "$PROG" -f
procd_set_param respawn
procd_close_instance
# service_start /usr/sbin/asterisk
}
reload_service() {
asterisk -rx "config reload $CONFDIR/sip.conf"
sleep 1
asterisk -rx "core reload"
asterisk -rx "dialplan reload"
asterisk -rx "brcm reload"
}
restart() {
reload
}
stop_service() {
service_stop /usr/sbin/asterisk
}

View File

@@ -1,15 +1,8 @@
#
# Copyright (C) 2019 iopsys Software Solutions AB. All rights reserved.
# Copyright (C) 2016 inteno
#
#
# 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.
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
@@ -21,16 +14,12 @@ PKG_RELEASE:=1
PKG_SOURCE_VERSION:=f614cba983d827d5185c60a6a5a35530621d44d2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/mediatek/ated.git
PKG_SOURCE_URL:=git@private.inteno.se:ated
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

View File

@@ -13,9 +13,6 @@ PKG_MD5SUM:=b72c17870bfab2fd791b1f6de4d79f9e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)

View File

@@ -1,27 +0,0 @@
config BBF_VENDOR_EXTENSION
bool "Enable Vendor Extension"
default y
config BBF_VENDOR_LIST
string "Vendor List"
default "iopsys"
config BBF_VENDOR_PREFIX
string "Vendor Prefix"
default "X_IOPSYS_EU_"
config BBF_TR104
bool "Enable TR-104 Data Model Support"
default y
config BBF_TR143
bool "Enable TR-143 Data Model Support"
default y
config BBFDM_ENABLE_JSON_PLUGIN
bool "Enable json plugin to extend datamodel"
default y
config BBFDM_ENABLE_DOTSO_PLUGIN
bool "Enable shared library plugin to extend datamodel"
default y

View File

@@ -1,185 +0,0 @@
#
# Copyright (C) 2022 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=6.6.35
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_VERSION:=0159ecf5d84805d76dff8cb80831334e200989c7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/libbbf_api
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for libbbfdm API
endef
define Package/libbbfdm/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libcurl
endef
define Package/libbbfdm
$(Package/libbbfdm/default)
TITLE += (internal)
VARIANT:=internal
endef
define Package/libbbfdm-mbedtls
$(Package/libbbfdm/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_libbbfdm-mbedtls:libmbedtls
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
endef
define Package/libbbfdm-openssl
$(Package/libbbfdm/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
CONFLICTS := libbbfdm-mbedtls
VARIANT:=openssl
endef
define Package/libbbfdm-wolfssl
$(Package/libbbfdm/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_libbbfdm-wolfssl:libwolfssl
CONFLICTS := libbbfdm-mbedtls libbbfdm-openssl
VARIANT:=wolfssl
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
define Package/libbbf_api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
define Package/libbbfdm/description
Library contains the data model tree. It includes TR181, TR104 and TR143 data models
endef
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wall -Werror \
CONFIGURE_ARGS += \
--enable-tr181
ifeq ($(CONFIG_BBF_TR104),y)
CONFIGURE_ARGS += \
--enable-tr104
endif
ifeq ($(CONFIG_BBF_TR143),y)
CONFIGURE_ARGS += \
--enable-tr143
endif
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
CONFIGURE_ARGS += \
--enable-vendor-extension
CONFIGURE_ARGS += \
BBF_VENDOR_LIST="$(CONFIG_BBF_VENDOR_LIST)" \
BBF_VENDOR_PREFIX="$(CONFIG_BBF_VENDOR_PREFIX)"
endif ##CONFIG_BBF_VENDOR_EXTENSION
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
CONFIGURE_ARGS += \
--enable-json-plugin
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
CONFIGURE_ARGS += \
--enable-shared-library
endif
ifeq ($(BUILD_VARIANT),openssl)
CONFIGURE_ARGS += --enable-libopenssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CONFIGURE_ARGS += --enable-libwolfssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += --enable-libmbedtls
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
endif
define Package/libbbf_api/install
$(INSTALL_DIR) $(1)/lib
endef
define Package/libbbfdm/default/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/usr/share/bbfdm
endef
define Package/libbbfdm/default/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
endef
Package/libbbfdm-openssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-wolfssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-mbedtls/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-openssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-wolfssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-mbedtls/install = $(Package/libbbfdm/default/install)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
touch $(1)/usr/lib/libbbf_api.so
endef
$(eval $(call BuildPackage,libbbf_api))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,libbbfdm-openssl))
$(eval $(call BuildPackage,libbbfdm-wolfssl))
$(eval $(call BuildPackage,libbbfdm-mbedtls))

View File

@@ -1,42 +0,0 @@
#
# Copright (C) 2018 The Internet Foundation In Sweden
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bbk_cli
PKG_SOURCE_VERSION:=7b810a696c78b746185c11282bdbe3fb7f8c5d4b
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/dotse/bbk.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/bbk_cli
CATEGORY:=Utilities
DEPENDS:=+libpthread +libstdcpp
TITLE:=Bredbandskollen CLI - A bandwidth measurement tool
endef
define Package/bbk_cli/description
To measure connection speed in an environment that is missing a web browser,
for example, in a server, you can use our command line interface bbk_cli,
which is available for some of the most common operating systems.
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/src/cli CROSS_COMPILE="$(TARGET_CROSS)"
endef
define Package/bbk_cli/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cli/cli $(1)/sbin/bbk_cli
endef
$(eval $(call BuildPackage,bbk_cli))

View File

@@ -1,25 +0,0 @@
diff --git a/src/framework/engine.h b/src/framework/engine.h
index 57a48ad..9e1bc36 100644
--- a/src/framework/engine.h
+++ b/src/framework/engine.h
@@ -10,6 +10,7 @@
#include <map>
#include <vector>
#include <string>
+#include <sys/select.h>
#include "logger.h"
diff --git a/src/framework/mk.inc b/src/framework/mk.inc
index 793e211..13275be 100644
--- a/src/framework/mk.inc
+++ b/src/framework/mk.inc
@@ -7,7 +7,7 @@ OS:=$(shell uname)
CXXFLAGS += -O2 -W -Wall -I$(DIRLEVEL)
ifeq ($(OS),Linux)
-CXX = g++
+CXX = $(CROSS_COMPILE)g++
endif
ifeq ($(OS),Darwin)

View File

@@ -18,9 +18,6 @@ PKG_SOURCE_VERSION:=3ab81137cafe25c2ca4bc3a5f322a63646f9ce8d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/bootchart2

View File

@@ -1,58 +0,0 @@
#
# Copyright (C) 2022 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.0.3
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
PKG_SOURCE_VERSION:=85d7486a21a9eb0e0f345b587b3ac506edcb72fe
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
PKG_BUILD_DEPENDS:=bbf
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json
endef
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wall -Werror
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/bulkdata/* $(PKG_BUILD_DIR)/
endef
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)/bbf_plugin/*.so $(1)/usr/lib/bbfdm
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,6 +0,0 @@
config bulkdata 'bulkdata'
option enable '0'
#Log levels: Error=1, Warning=2, Info=3, Debug=4
option log_level '3'

View File

@@ -1,34 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
STOP=10
USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
start_service() {
local enable=$(uci -q get bulkdata.bulkdata.enable)
[ "$enable" != "1" ] && {
return 0
}
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
procd_close_instance
}
boot() {
start
}
reload_service() {
stop
start
}
service_triggers()
{
procd_add_reload_trigger bulkdata
}

View File

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

View File

@@ -1,38 +0,0 @@
#
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bulut
PKG_VERSION:=0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bulut/bulut-gw-client.git
PKG_SOURCE_VERSION:=227700c44817afa2c392fa08bf4cf70fa6177f01
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)
include $(INCLUDE_DIR)/package.mk
define Package/bulut
CATEGORY:=Utilities
DEPENDS:=
TITLE:=bulut
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include
define Package/bulut/description
obuspa keys
endef
define Package/bulut/install
$(CP) $(PKG_BUILD_DIR)/files/* $(1)/
endef
$(eval $(call BuildPackage,bulut))

View File

@@ -1,19 +1,9 @@
#
# Copyright (C) 2018 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=catv
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/catv

Binary file not shown.

View File

@@ -1,4 +1,7 @@
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2015 inteno.org
#
START=71
USE_PROCD=1

31
crashlog/Makefile Normal file
View File

@@ -0,0 +1,31 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=crashlog
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/crashlog
CATEGORY:=Utilities
TITLE:=Handling kernel crash logs
endef
define Package/crashlog/description
Handling kernel crash logs.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/crashlog/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,crashlog))

Binary file not shown.

View File

@@ -0,0 +1,11 @@
#!/bin/sh /etc/rc.common
START=01
start()
{
if [ -e /proc/sys/kernel/core_pattern ]
then
echo "|/sbin/logcore %e %s" > /proc/sys/kernel/core_pattern
fi
}

View File

@@ -0,0 +1,56 @@
#!/bin/sh /etc/rc.common
START=99
send_log()
{
nr=$(db get hw.board.serialNumber)
hw=$(db get hw.board.hardware)
hwv=$(db get hw.board.hardwareVersion)
bid=$(db get hw.board.boardId)
sw=$(db get hw.board.iopVersion)
server=$(/sbin/uci get system.crashlog.server)
while true
do
scp -S /usr/sbin/logssh /proc/last_kmsg log@${server}:log/${bid}_${hwv}_${hw}_${sw}_${nr}
if [ $? == 0 ]
then
break;
fi
# wait for another minute then try again
sleep 60
done
}
fill_in_default()
{
/sbin/uci add system log
/sbin/uci rename system.@log[-1]=crashlog
/sbin/uci set system.crashlog.enable=no
/sbin/uci set system.crashlog.server="crash.inteno.se"
/sbin/uci commit
}
boot()
{
# is crashlog enabled ?
enable=$(/sbin/uci get system.crashlog.enable)
case $enable in
0|no|NO|false|FALSE)
exit 0
;;
"")
fill_in_default
exit 0
;;
esac
# is this boot a result from a crash ?
reason=$(cat /etc/boot_reason)
case $reason in
HW|WD)
send_log&
;;
esac
}

61
crashlog/files/sbin/logcore Executable file
View File

@@ -0,0 +1,61 @@
#! /bin/sh
TMP_CORE=/tmp/new_core
# first test if we can contact the log server.
# if not abort directly the core file takes up memory
alive()
{
ping -c1 $server
if [ $? != 0 ]
then
# drain core file from kernel
cat >/dev/null
exit 0
fi
}
fill_in_default()
{
/sbin/uci add system log
/sbin/uci rename system.@log[-1]=corelog
/sbin/uci set system.corelog.enable=no
/sbin/uci set system.corelog.server="crash.inteno.se"
/sbin/uci commit
}
# is corelog enabled ?
enable=$(/sbin/uci get system.corelog.enable)
case $enable in
0|no|NO|false|FALSE)
# drain core file from kernel
cat >/dev/null
exit 0
;;
"")
fill_in_default
exit 0
;;
esac
server=$(/sbin/uci get system.corelog.server)
alive
# dump out the core to disk we need this as scp needs a size before we send data
# and this is the only way to know how much data there is
cat >$TMP_CORE
# in case filesystem/memory is full at least kill the core in the kernel memory should give us some
# more memory to work with. normally this would do nothing.
cat >/dev/null
nr=$(db get hw.board.serialNumber)
hw=$(db get hw.board.hardware)
hwv=$(db get hw.board.hardwareVersion)
bid=$(db get hw.board.boardId)
sw=$(db get hw.board.iopVersion)
scp -S /usr/sbin/logssh $TMP_CORE log@${server}:log/core_${1}_${2}_${bid}_${hwv}_${hw}_${sw}_${nr}
rm $TMP_CORE

6
crashlog/files/usr/sbin/logssh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
# we need to have the -y option to dropbear to not halt the scp when
# transfering the log file to a new server for the first time.
# since we already need this also put in the keyfile
ssh -y -i /etc/dropbear/logid $@

42
crashlog/readme Normal file
View File

@@ -0,0 +1,42 @@
Install scp server.
Create a user account on a server and make sure it's possible to login to it
using ssh.
For now the user has to be called "log"
USER is the user name of the account
HOME is the user home directory.
Both should be changed to the correct value in all following example commands.
create HOME/bin
Put scp_upload in HOME/bin
make it executable "chmod a+x HOME/bin/scp_upload"
create home/.ssh (observer the dot .shh)
create an empty file HOME/.ssh/authorized_keys
-------------------------------
Now everyhting is setup for use but we have not added any clients.
What we need is the public key for the clients.
For dropbear "dropbearkey -y -f files/etc/dropbear/logid" will generate the public key.
----------
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwn9RaDAzxW1dTmIhXgFBnpi1lhj8xhYpCVQiPxxdk9IEmH8zjo4y9j3sPkqKOlRnkwjpZIpLEKBnpQTwVIMCU/AG7nDJX3OH9RfS9mLJQLfFL8HyGCyqDezFWldbyovhJZvdUeK4tAXJWv2W3OVHiz2L8IlncBgP/E9DJElsyhhQHsM96UE6tBkXsvXkoDbMSYXFcLbgiUwBKfmM2BF/aPDL45iznGur7/2j9v95PwJ0gtMu9jjNRq+pXCXhTh3bsnczm0MpZC1aiRc9nJAeGIMmhrf15E4jBKgTnrstzJxGVAdajKeR954KcNsS33cS2Wmui2YjmPbBXjqf1frzJ log@inteno
----------
The public key should be just one line. Add that line to the
HOME/.ssh/authorized_keys file on the scp server. Then add the follwoing as
the first text on the same line. that is insert before the key data.
command="HOME/bin/scp_upload",no-port-forwarding,no-agent-forwarding,no-X11-forwarding
Do not forget to change HOME to the correct value for the server and there
should be one space separating the key data and the above text.
---------------------------------
Now test to make sure that you can upload new files, not download files
and not overwrite files from the client.

53
crashlog/scp_upload Normal file
View File

@@ -0,0 +1,53 @@
#! /bin/bash
# authorized_keys command="/home/boxi/my_scp",no-port-forwarding,no-agent-forwarding,no-X11-forwarding
val=`expr match "$SSH_ORIGINAL_COMMAND" "scp"`
if [ $val != 3 ]
then
echo "only scp is allowed for this rsa key"
exit 1
fi
#strip out "scp" as getopts barf on anything not an option
args=${SSH_ORIGINAL_COMMAND:3}
# we must set args to positional paramters otherwise it's next to impossible
# to get to the rest of the line that is not arguments.
set -- $args
while getopts "rftdvpq" Option
do
case $Option in
r ) echo "recursive not allowed";exit 1;;
f ) echo "reading files not allowed";exit 1;;
t ) ;;
d ) ;;
v ) ;;
p ) ;;
q ) ;;
* ) ;; # Default.
esac
done
shift $(($OPTIND - 1))
file="$*"
dir=$(dirname "$file")
if [ "$dir" != "log" ]
then
echo "only allowed to write to log/"
exit 1
fi
# try to create uniq files
EXTRA=$((0))
while [ -e "${file}_${EXTRA}" ]
do
EXTRA=$((EXTRA +1))
done
logger -t scp_upload "${SSH_ORIGINAL_COMMAND}_${EXTRA}"
exec ${SSH_ORIGINAL_COMMAND}_${EXTRA}

View File

@@ -1,11 +0,0 @@
if PACKAGE_dectmngr
menu "Configuration"
config ENABLE_LINE_SETTINGS_EXTENSION
bool "Enable Line Settings List extension "
default y
endmenu
endif

View File

@@ -1,25 +1,23 @@
#
# Copyright (C) 2021 IOPSYS Software Solutions AB
# 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_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.5.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_RELEASE:=1
PKG_VERSION:=1.0.23
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8c94908eb230dc453dd2f5575be6c06b086b2e7d
PKG_MIRROR_HASH:=skip
endif
PKG_SOURCE_VERSION:=90aff0da98c626d58201c14c34b3b3a64878ceee
PKG_NAME:=dectmngr
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
RSTRIP:=true
export BUILD_DIR
@@ -27,48 +25,42 @@ export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=DECT Manager
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c
define Package/dectmngr
CATEGORY:=Utilities
TITLE:=Broadcom endpoint test application
URL:=
DEPENDS:= +libevent2 +libjson +natalie-dect-h bcmkernel
endef
define Package/$(PKG_NAME)/description
DECT manager is a daemon that provides UBUS RPC objects and sends UBUS events for communication with the DECT chip.
define Package/dectmngr/description
Dect proxy, manager and tools
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
define Package/dectmngr/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/etc/hotplug.d/
$(INSTALL_DIR) $(1)/etc/hotplug.d/dect
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_DIR) $(1)/etc/dect/
$(INSTALL_DIR) $(1)/etc/config/
cp $(PKG_BUILD_DIR)/dectmngr $(1)/usr/bin/
cp $(PKG_BUILD_DIR)/atohx $(1)/usr/bin/
cp $(PKG_BUILD_DIR)/dectproxy $(1)/usr/bin/
cp $(PKG_BUILD_DIR)/dectdbgd $(1)/usr/bin/
cp $(PKG_BUILD_DIR)/dect $(1)/usr/bin/
cp $(PKG_BUILD_DIR)/dectcalib $(1)/usr/bin/
cp $(PKG_BUILD_DIR)/dect_testmode $(1)/usr/bin/
cp files/etc/init.d/* $(1)/etc/init.d/
cp files/etc/hotplug.d/dect/* $(1)/etc/hotplug.d/dect/
cp files/etc/dect/* $(1)/etc/dect/
cp files/etc/config/* $(1)/etc/config/
cp files/sbin/dectreg $(1)/sbin/
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* ~/git/voip/dectmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-Wall \
-Werror \
-I$(STAGING_DIR)/usr/include/libxml2
ifeq ($(CONFIG_ENABLE_LINE_SETTINGS_EXTENSION),y)
TARGET_CFLAGS += -DENABLE_LINE_SETTINGS_EXTENSION
endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/app/dectmngr $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/dectmngr
$(CP) ./files/etc/* $(1)/etc/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/dect $(1)/lib/upgrade/keep.d/dect
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,dectmngr))

6
dectmngr/files/etc/config/dect Normal file → Executable file
View File

@@ -1,3 +1,3 @@
config dect 'global'
option log_dect_cmbs 'syslog'
option log_level 'realtime,warning,error'
config dect 'dect'
option 'radio' 'auto'

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,15 @@
#!/bin/sh
if [ "$ACTION" == "led_blink" ]; then
ubus call led.dect set '{"state":"notice"}'
fi
if [ "$ACTION" == "led_on" ]; then
ubus call led.dect set '{"state":"ok"}'
fi
if [ "$ACTION" == "led_off" ]; then
ubus call led.dect set '{"state":"off"}'
fi

60
dectmngr/files/etc/init.d/dect Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/sh /etc/rc.common
START=97
STOP=10
USE_PROCD=1
DEST=
DEFAULT=
OPTIONS=""
start_service() {
# avoid fp timing problem
echo 1 > /proc/sys/kernel/printk_with_interrupt_enabled
# setup board specific dect parameters
cat /proc/nvram/rfpi | tr -d ' ' | atohx > /tmp/rfpi
cat /proc/nvram/fixed_emc | tr -d ' ' | atohx > /tmp/fixed_emc
cat /proc/nvram/bcm_def_freq | tr -d ' ' | atohx > /tmp/bcm_def_freq
DECTANTDIV=`db get hw.board.DectAntennaDiversity`
case "$DECTANTDIV" in
1|off) echo -ne "\x01" > /tmp/dect_antenna_diversity ;;
2) echo -ne "\x02" > /tmp/dect_antenna_diversity ;;
*) echo -ne "\x00" > /tmp/dect_antenna_diversity ;;
esac
if [ ! -f /etc/dect/nvs ]; then
cp /etc/dect/nvs_default /etc/dect/nvs
dd of=/etc/dect/nvs if=/tmp/rfpi conv=notrunc bs=1 seek=0
dd of=/etc/dect/nvs if=/tmp/fixed_emc conv=notrunc bs=1 seek=10
dd of=/etc/dect/nvs if=/tmp/bcm_def_freq conv=notrunc bs=1 seek=6
dd of=/etc/dect/nvs if=/tmp/dect_antenna_diversity conv=notrunc bs=1 seek=32
fsync /etc/dect/nvs
fi
# init dectproxy
dectproxy > /dev/null 2>&1 &
dectmngr > /tmp/dectmngr 2>&1 &
}
stop_service() {
killall -9 dectproxy
killall -9 dectmngr
}
restart_service() {
echo "restarting dect"
killall dectmngr
dectmngr > /tmp/dectmngr 2>&1 &
}
reload_service() {
# reload config
dect -c
}
service_triggers() {
procd_add_reload_trigger dect
}

View File

@@ -1,96 +0,0 @@
#!/bin/sh /etc/rc.common
source /lib/functions/uci-defaults.sh
START=70
STOP=12
USE_PROCD=1
NAME=dectmngr
PROG=/usr/sbin/dectmngr
LOG_PATH=/var/log/dectmngr
DB_PATH=/etc/dect
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
stop_and_wait_dectmngr() {
pidof $NAME && killall -q $NAME
pidof $NAME && sleep 2 # wait for the process to stop gracefully
while pidof $NAME; do
killall -q -9 $NAME
sleep 1
done
}
start_service() {
local opt_ext=
local rfpi=
local model_id=
local rxtun=
test $(db get hw.board.hasDect) = "0" && return
echo 1 > /sys/class/gpio/gpio14/value
rfpi=$(db -q get hw.board.dect_rfpi)
[ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi"
model_id=$(db -q get hw.board.dect_model_id)
[ -n "$model_id" -a ${#model_id} -eq 8 ] || {
echo "Invalid hw.board.dect_model_id:$model_id. Set to 30.3B.06"
model_id="30.3B.06"
}
opt_ext="$opt_ext -model $model_id"
rxtun=$(db -q get hw.board.dect_rxtun)
[ -n "$rxtun" -a ${#rxtun} -eq 2 ] && opt_ext="$opt_ext -rxtun $rxtun"
config_load dect
config_get log_dect_cmbs global log_dect_cmbs syslog
procd_open_instance
if [ "$log_dect_cmbs" = "none" ]; then
echo "Starting dectmngr with cmbs logging disabled"
procd_set_param command $PROG -comname ttyH0 $opt_ext
rm -f $LOG_PATH/*
elif [ "$log_dect_cmbs" = "file" ]; then
echo "Starting dectmngr with cmbs logging enabled to file"
procd_set_param command $PROG -comname ttyH0 -log $LOG_PATH/dect-cmbs.log $opt_ext
else
echo "Starting dectmngr with cmbs logging enabled to syslog"
procd_set_param command $PROG -comname ttyH0 -syslog $opt_ext
rm -f $LOG_PATH/*
fi
procd_set_param respawn 6 2 3
procd_set_param term_timeout 20
procd_set_param triggers asterisk
procd_close_instance
}
stop_service() {
test $(db get hw.board.hasDect) = "0" && return
echo 0 > /sys/class/gpio/gpio14/value
stop_and_wait_dectmngr
}
reload_service() {
ubus call dect reload
}
service_triggers()
{
procd_add_config_trigger "config.change" "asterisk" /etc/init.d/dectmngr restart
procd_add_config_trigger "config.change" "dect" /etc/init.d/dectmngr reload
}
boot() {
echo 14 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio14/direction
[ ! -d $LOG_PATH ] && mkdir -p $LOG_PATH
[ ! -d $DB_PATH ] && mkdir -p $DB_PATH
start
}

View File

@@ -1 +0,0 @@
/etc/dect/LA_DB

17
dectmngr/files/sbin/dectreg Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# This script is likely not used. Just exit with
# an error and see if someone screems... If not,
# we can delete this file.
exit 1
[ -f /var/dectisregistering ] || {
touch /var/dectisregistering 2>/dev/null
/usr/bin/dectmngr -r
ubus call led.dect set '{"state" : "notice"}'
sleep 20
rm /var/dectisregistering 2>/dev/null
/usr/bin/dectmngr -s
ubus call led.dect set '{"state" : "ok"}'
}

53
dectmngr2/Makefile Normal file
View File

@@ -0,0 +1,53 @@
#
# 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:=1.1.0
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=17aa3b1d8d372ebcf4d37379f7cc4fb59c461d4b
PKG_NAME:=dectmngr2
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
define Package/dectmngr2
CATEGORY:=Utilities
TITLE:=Dectmngr2
URL:=
DEPENDS:= +natalie-dect-h bcmkernel +libubox +ubus
endef
define Package/dectmngr2/description
Dectmngr2
endef
define Package/dectmngr2/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/dect/
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/nvs_default $(1)/etc/dect/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
$(CP) ./files/dect.config $(1)/etc/config/dect
endef
$(eval $(call BuildPackage,dectmngr2))

View File

@@ -0,0 +1,4 @@
config dect 'dect'
option radio 'auto'

View File

@@ -1,75 +0,0 @@
#
# Copyright (C) 2018 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.1.2
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=bb754ae620a9fc66fd6fc0745f0fead0708c7a17
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
TARGET_PLATFORM=BROADCOM
else
$(info Unexpected CONFIG_TARGET)
endif
export TARGET_PLATFORM
define Package/dslmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=XDSL status and configration utility
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
endef
define Package/dslmngr/description
This package can be used to configure and provide status about
the XDSL subsystem through UBUS.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-I$(STAGING_DIR)/usr/include/xdsl \
-D_GNU_SOURCE
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)"
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/dslmngr/ $(PKG_BUILD_DIR)/
endef
endif
define Build/Compile
+$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
endef
define Package/dslmngr/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
endef
$(eval $(call BuildPackage,dslmngr))

View File

@@ -1,47 +0,0 @@
#
# Copyright (C) 2019 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-qos
PKG_VERSION:=1.1
PKG_RELEASE:=0
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/easy-qos
SECTION:=net
CATEGORY:=Network
TITLE:=Easy QoS
DEPENDS:=@TARGET_iopsys_brcm63xx_arm
endef
define Package/easy-qos/description
This package contains Easy QoS utility
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/easy-qos/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(CP) ./files/etc/config/easy_qos $(1)/etc/config/
$(CP) ./files/etc/init.d/easy_qos.iptables $(1)/etc/init.d/easy_qos
$(CP) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
$(CP) ./files/etc/firewall.easyqos $(1)/etc/firewall.easyqos
endef
$(eval $(call BuildPackage,easy-qos))

View File

@@ -1 +0,0 @@
/etc/init.d/easy_qos reload

View File

@@ -1,140 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
log() {
echo "${@}"|logger -t easy_qos.ebtable -p debug
}
exec_log() {
${@}
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
fi
}
get_priority() {
local prio=$(echo $1|tr 'A-Z' 'a-z');
case "${prio}" in
"lowest")
echo 0;;
"low")
echo 1;;
"besteffort")
echo 2;;
"normal")
echo 3;;
"video")
echo 4;;
"medium")
echo 5;;
"high")
echo 6;;
"highest")
echo 7;;
esac
}
validate_rule_section()
{
uci_validate_section easy_qos rule "${1}" \
'priority:string' \
'macaddr:string' \
'proto:string:none' \
'port:list(uinteger)' \
'comment:string:none'
}
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(ebtables -t broute -L BROUTING|grep -m 1 mark)
while [ -n "${rule}" ]; do
exec_log ebtables -t broute -D BROUTING ${rule}
rule=$(ebtables -t broute -L BROUTING|grep -m 1 mark)
done
}
create_rule() {
local protocol=$1; shift
local mac=$1; shift
local mark="0x$1"; shift
local forward_port=$1;
local cmd="";
local protocol_number
cmd="-j mark --mark-or ${mark}";
if [ -n "${forward_port}" ]; then
cmd="--ip-destination-port ${forward_port} ${cmd}";
fi
case "${protocol}" in
"tcp")
protocol_number=6;;
"udp")
protocol_number=17;;
"dccp")
protocol_number=33;;
"sctp")
protocol_number=132;;
*)
log "Protocol ${protocol} not supported in ebtables"
return;;
esac
cmd="--ip-proto ${protocol_number} $cmd"
cmd="-p ip $cmd"
cmd="-s ${mac} $cmd"
exec_log ebtables -t broute -A BROUTING ${cmd}
}
manage_rule() {
local cfg="$1"
local priority macaddr proto port comment prio_num protocol
validate_rule_section "${1}" || {
log "Validation of section failed"
return 1;
}
protocol=$(echo ${proto}|tr 'A-Z' 'a-z')
prio_num=$(get_priority ${priority})
if [ -n "${macaddr}" -a -n "${prio_num}" ]; then
for p in ${port}; do
if [ "${protocol}" == "none" -o "${protocol}" == "tcpudp" ]; then
create_rule tcp ${macaddr} ${prio_num} ${p}
create_rule udp ${macaddr} ${prio_num} ${p}
else
create_rule ${protocol} ${macaddr} ${prio_num} ${p}
fi
done
# Create rule for all ports if port is not mentioned in uci
if [ -z "${port}" ]; then
if [ "${protocol}" == "none" -o "${protocol}" == "tcpudp" ]; then
create_rule tcp ${macaddr} ${prio_num}
create_rule udp ${macaddr} ${prio_num}
else
create_rule ${protocol} ${macaddr} ${prio_num}
fi
fi
fi
}
reload_service() {
# Do not apply rules if ebtables is not present in system
[ -x /usr/sbin/ebtables ] || return;
clear_existing_rules
config_load easy_qos
config_foreach manage_rule rule
}
start_service() {
reload_service
}
service_triggers() {
procd_add_reload_trigger "easy_qos"
}

View File

@@ -1,186 +0,0 @@
#!/bin/sh /etc/rc.common
. /usr/share/libubox/jshn.sh
START=99
USE_PROCD=1
CLIENT_LIST="/tmp/easy_qos_client.list"
log() {
echo "${@}"|logger -t easy_qos -p debug
}
exec_log() {
${@}
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
fi
}
get_priority() {
local prio=$(echo $1|tr 'A-Z' 'a-z');
case "${prio}" in
"lowest")
echo 0;;
"low")
echo 1;;
"besteffort")
echo 2;;
"normal")
echo 3;;
"video")
echo 4;;
"medium")
echo 5;;
"high")
echo 6;;
"highest")
echo 7;;
esac
}
clean_client_entries() {
[ -f ${CLIENT_LIST} ] && rm ${CLIENT_LIST}
}
map_client_entries() {
local clients ip mac host
json_load "$(ubus call router.network 'clients')"
json_get_keys keys
for key in ${keys};
do
json_select ${key}
json_get_vars ipaddr macaddr hostname
clients="${macaddr} ${ipaddr} ${hostname};${clients}"
json_select ..
done
json_init
# json_add_array "clients"
IFS=";"
for client in ${clients};
do
macaddr=$(echo ${client} | cut -d" " -f1)
json_add_object "${macaddr//:/_}"
json_add_string "ip" "$(echo ${client} | cut -d" " -f2)"
json_add_string "macaddr" "$(echo ${client} | cut -d" " -f1)"
json_add_string "host" "$(echo ${client} | cut -d" " -f3)"
json_close_object
done
IFS=' '
echo `json_dump` > ${CLIENT_LIST}
json_cleanup
}
# Find the IP of a corresponding mac from arp table
get_ipaddress() {
local clients ip mac host
json_load "$(cat ${CLIENT_LIST})"
json_get_keys keys
# jshn seems a bit iffy on having : in key, replace by _
json_select "${1//:/_}" 2 > /dev/null
json_get_var ip ip
echo "$ip"
}
validate_rule_section()
{
uci_validate_section easy_qos rule "${1}" \
'priority:string' \
'macaddr:string' \
'proto:string:none' \
'port:list(uinteger)' \
'comment:string:none'
}
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
while [ -n "${rule}" ]; do
exec_log iptables -t mangle ${rule}
rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
done
}
check_and_create() {
iptables -t mangle -C PREROUTING ${@} 2>/dev/null
# Create rule if not exists
if [ ${?} -ne 0 ]; then
exec_log iptables -t mangle -A PREROUTING ${@}
else
log "Rule exists for ${@}"
fi
}
create_rule() {
local proto=$1; shift
local src_ip=$1; shift
local mark="0x$1/0x$1"; shift
local ports=$1;
local cmd="";
cmd="-j MARK --set-xmark ${mark}";
if [ -n "${ports}" ]; then
cmd="--match multiport --dports ${ports} ${cmd}";
fi
if [ "${proto}" == "icmp" ]; then
cmd="-p icmp -m icmp --icmp-type 8 $cmd"
elif [ "${proto}" == "all" ]; then
cmd="-p all $cmd"
else
cmd="-p ${proto} -m ${proto} $cmd"
fi
cmd="-s ${src_ip} $cmd"
check_and_create ${cmd}
}
manage_rule() {
local cfg="$1"
local priority macaddr proto port comment prio_num ip port_list
validate_rule_section "${1}" || {
log "Validation of section failed"
return 1;
}
prio_num=$(get_priority ${priority})
ip=$(get_ipaddress ${macaddr})
port_list=$(echo ${port}|sed 's/ /,/g')
if [ -n "${ip}" -a -n "${prio_num}" ]; then
if [ "${proto}" == "none" -o "${proto}" == "tcpudp" ]; then
create_rule tcp ${ip} ${prio_num} ${port_list}
create_rule udp ${ip} ${prio_num} ${port_list}
else
create_rule ${proto} ${ip} ${prio_num} ${port_list}
fi
fi
}
reload_service() {
clear_existing_rules
map_client_entries
config_load easy_qos
config_foreach manage_rule rule
clean_client_entries
}
start_service() {
reload_service
echo "Easy QoS installed">/dev/console;
}
service_triggers() {
procd_add_reload_trigger "easy_qos"
}

View File

@@ -1,8 +0,0 @@
# Add firewall include
uci -q batch <<-EOT
delete firewall.easyqos
set firewall.easyqos=include
set firewall.easyqos.path=/etc/firewall.easyqos
set firewall.easyqos.reload=1
commit firewall
EOT

View File

@@ -1,110 +0,0 @@
# All rights reserved.
# See LICENSE for more information.
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=easy-soc-events
PKG_VERSION:=1.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/easy-soc-events.git
PKG_SOURCE_VERSION:=5c582b0165b574dc94e4865f82e0bb91fa561754
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/easy-soc-events-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/.config
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
LINUX_DIR=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.1
LINUX_VERSION := 4.1.52
LINUXINCLUDE=-Iarch/$(LINUX_KARCH)/mach-bcm963xx/include
BCM_BS_PROFILE := $(patsubst "%",%,$(CONFIG_BCM_KERNEL_PROFILE))
FS_DIR := $(BUILD_DIR)/bcmkernel/bcm963xx/targets/$(BCM_BS_PROFILE)/fs
MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)/extra
TARGET_MODULES_DIR:=/$(MODULES_SUBDIR)
endif
define KernelPackage/easy-soc-events/default
SUBMENU:=Other modules
endef
define KernelPackage/easy-soc-events
$(KernelPackage/easy-soc-events/default)
TITLE:=Helper module for netlink event notification
FILES:=$(PKG_BUILD_DIR)/easyevent.ko
AUTOLOAD:=$(call AutoLoad,11,easyevent)
endef
define KernelPackage/easy-soc-events-test
$(KernelPackage/easy-soc-events/default)
TITLE:=Test module for event notification through easyevent
DEPENDS+=+kmod-easy-soc-events
FILES+=$(PKG_BUILD_DIR)/test/testevent.ko
endef
define KernelPackage/easy-soc-events/description
This is a helper module to generate and pass netlink events from
kernel to user applications.
endef
#NOSTDINC_FLAGS :=
ifdef CONFIG_PACKAGE_kmod-easy-soc-events
PKG_MAKE_FLAGS += CONFIG_EASYEVENT=y
endif
LINUXINCLUDE += \
-I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/$(LINUX_UAPI_DIR) \
-Iarch/$(LINUX_KARCH)/include \
-Iarch/$(LINUX_KARCH)/include/generated \
-Iarch/$(LINUX_KARCH)/include/generated/$(LINUX_UAPI_DIR) \
-I$(LINUX_DIR)/include/generated/uapi \
-Iarch/$(LINUX_KARCH)/include/$(LINUX_UAPI_DIR) \
-include ./include/linux/kconfig.h
define Build/Prepare
$(call Build/Prepare/Default)
endef
define Build/Compile
$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) V=1 \
$(PKG_MAKE_FLAGS) \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
LINUXINCLUDE="$(LINUXINCLUDE)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
modules
endef
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
define KernelPackage/easy-soc-events/install-extra
cp $(PKG_BUILD_DIR)/easyevent.ko $(FS_DIR)/lib/modules/$(LINUX_VERSION)/extra
endef
endif
define KernelPackage/easy-soc-events/install
$(call KernelPackage/easy-soc-events/install-extra)
endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
#$(INSTALL_DIR) $(STAGING_DIR)/usr/include/linux
#$(CP) $(PKG_BUILD_DIR)/easysoc-event.h $(STAGING_DIR)/usr/include/linux/
#$(CP) $(PKG_BUILD_DIR)/easysoc-event.h $(LINUX_DIR)/include/linux/
$(CP) $(PKG_BUILD_DIR)/easyevent.h $(STAGING_DIR)/usr/include/
$(CP) $(PKG_BUILD_DIR)/wifievent.h $(STAGING_DIR)/usr/include/
$(CP) $(PKG_BUILD_DIR)/easyevent.h $(LINUX_DIR)/include/generated/uapi
$(CP) $(PKG_BUILD_DIR)/wifievent.h $(LINUX_DIR)/include/generated/uapi
endef
$(eval $(call KernelPackage,easy-soc-events-test))
$(eval $(call KernelPackage,easy-soc-events))

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,29 +0,0 @@
define Package/libwifi
$(call Package/easy-soc-libs)
TITLE:= WiFi library (libwifi)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_iopsys_brcm63xx_arm:bcmkernel
endef
define Package/libwifi/config
if PACKAGE_libdsl
config LIBWIFI_DEBUG
depends on PACKAGE_libwifi
bool "Enable wifi debugging"
default n
endif
endef
define Build/InstallDev/libwifi
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/wifi.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
endef
define Package/libwifi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
endef

0
endptmngr/Config.in → endptcfg/Config.in Executable file → Normal file
View File

92
endptcfg/Makefile Normal file
View File

@@ -0,0 +1,92 @@
#
# 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_NAME:=endptcfg
PKG_VERSION:=0.2
PKG_SOURCE_VERSION:=1194b05278bd0945ca5c76436e56617b86871a65
ifeq ($(CONFIG_ENDPT_OPEN),y)
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
PKG_NAME:=endptcfg-open
else
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=git@private.inteno.se:endptcfg
PKG_SOURCE_PROTO:=git
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
BCMKERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
export BCMKERNEL_DIR
TARGET_LDFLAGS += $(BCMKERNEL_DIR)/userspace/private/apps/vodsl/telephonyProfiles/telephonyProfiles.o \
$(BCMKERNEL_DIR)/userspace/private/apps/vodsl/voip/util/log/vodslLog.o \
$(BCMKERNEL_DIR)/userspace/private/apps/vodsl/endpoint/endpoint_user.o \
$(BCMKERNEL_DIR)/userspace/private/apps/vodsl/bos/bos.o \
-lpthread
TARGET_CFLAGS += -DFAKE_SSP
RSTRIP:=true
export BUILD_DIR
include $(INCLUDE_DIR)/package.mk
define Package/endptcfg
CATEGORY:=Utilities
TITLE:=Broadcom endpoint driver configuration application
URL:=
DEPENDS:=+libpthread bcmkernel
endef
define Package/endptcfg/description
Broadcom endpoint driver configuration application
endef
define Package/endptcfg/config
source "$(SOURCE)/Config.in"
endef
ifneq ($(CONFIG_ENDPT_OPEN),y)
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) LINUX_DIR=$(LINUX_DIR) LDFLAGS="$(TARGET_LDFLAGS)" CFLAGS="$(TARGET_CFLAGS) \
-I$(LINUX_DIR)/include \
-I$(STAGING_DIR)/usr/include \
-DRS_ENDIAN_TYPE=RS_BIG_ENDIAN \
-DBOS_OS_LINUXUSER -DBOS_CFG_TIME \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc \
-I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc \
-I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec \
-I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc \
-I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc \
-I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc \
-I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser"
endef
else
define Build/Compile
endef
endif
define Package/endptcfg/install
$(INSTALL_DIR) $(1)/usr/bin
cp $(PKG_BUILD_DIR)/endptcfg $(1)/usr/bin/
endef
$(eval $(call BuildPackage,endptcfg))

View File

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

View File

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

View File

@@ -1,46 +0,0 @@
#
# Copyright (C) 2020 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=2.0.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5a0ff3bc7c49dcb05129f423ef8e0c4929f6aa03
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/ethmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ethernet status and configration utility
DEPENDS:=+libethernet +libuci +libubox +ubus +libpthread +libnl-genl
endef
define Package/ethmngr/description
This package can be used to configure and provide status about
the ethernet interfaces and ports through UBUS.
It uses APIs from the libethernet.so library.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
define Package/ethmngr/install
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
$(INSTALL_BIN) ./files/ethmngr.init $(1)/etc/init.d/ethmngr
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,ethmngr))

View File

@@ -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
}

49
eventlog/Makefile Normal file
View File

@@ -0,0 +1,49 @@
#
# Copyright (C) 2009-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_NAME:=eventlog
PKG_VERSION:=0.2.9
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/eventlog/0.2/
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_MD5SUM:=76e3d7a0b8f335c12099e9b91191fbf1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libeventlog
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A new API to format and send structured log messages.
endef
define Package/eventlog/description
A new API to format and send structured log messages. It supports multiple message
representations (plain, XML attributes and XML tags) and multiple output methods
(local syslogd).
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libeventlog/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libeventlog))

View File

@@ -1,75 +0,0 @@
#
# Copyright (C) 2022 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=evoice
PKG_VERSION:=0.2.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/evoice.git
PKG_SOURCE_VERSION:=f2477946f9e142d01820b38e32ce98a781e0310e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
#PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Network
SUBMENU:=Telephony
TITLE:=Ensemble Voice
URL:=
DEPENDS:= +libubox +libubus +libpicoevent +libuci +libstdcpp +TARGET_iopsys_brcm63xx_arm:bcmkernel +TARGET_iopsys_econet:kmod-voip_driver
endef
define Package/$(PKG_NAME)/description
Ensemble Voice. A stand alone SIP VoIP application.
endef
ifeq ($(LOCAL_DEV),1)
# If you want to build the code from your own local repositiory enable
# LOCAL_DEV and change the path below to your own git repository.
define Build/Prepare
rsync -av /swdev/bide/evoice_clean/* $(PKG_BUILD_DIR)/
endef
endif
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
TARGET_PLATFORM=BROADCOM
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
else ifeq ($(CONFIG_TARGET_iopsys_econet),y)
TARGET_PLATFORM=ECONET
endif
export TARGET_PLATFORM
define Build/Compile
@echo "TARGET_PLATFORM=${TARGET_PLATFORM}"
+$(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
+$(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=libvoiceservice LIF=cerder DBG=dbg
endef
define Package/evoice/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/evoice $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/libvoiceservice.so $(1)/usr/lib/bbfdm/
endef
$(eval $(call BuildPackage,evoice))

View File

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

View File

@@ -1,38 +0,0 @@
# Capabilties are platform dependent. Keep these separated from customer configuration
config capabilities_prm 'limits'
option MaxCallLogCount '100'
config capabilities_prm 'features'
option QIModelsSupported 'G.107'
config CapabilitiesCodec 'Codec1'
option Codec 'G.711ALaw'
option BitRate '64000'
option PacketizationPeriod '20,30'
option SilenceSupression '1'
config CapabilitiesCodec 'Codec2'
option Codec 'G.711MuLaw'
option BitRate '64000'
option PacketizationPeriod '20,30'
option SilenceSupression '1'
config CapabilitiesCodec 'Codec3'
option Codec 'G.726'
option BitRate '32000'
option PacketizationPeriod '20,30'
option SilenceSupression '0'
config CapabilitiesCodec 'Codec4'
option Codec 'G.722'
option BitRate '64000'
option PacketizationPeriod '20,30'
option SilenceSupression '0'
config CapabilitiesCodec 'Codec4'
option Codec 'G.729'
option BitRate '8000'
option PacketizationPeriod '20,30'
option SilenceSupression '0'

View File

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

View File

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

View File

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

View File

@@ -1,61 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=fatrace
PKG_VERSION:=0.12
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=98af6019a4a1b478a6fa35f74528cb3cd404ae40
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.launchpad.net/fatrace
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-3.0
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
PKG_CONFIG_DEPENDS := CONFIG_KERNEL_FANOTIFY
include $(INCLUDE_DIR)/package.mk
define Package/fatrace
CATEGORY:=Utilities
TITLE:=Report system wide file access events
URL:=
DEPENDS := +@KERNEL_FANOTIFY
endef
define Package/fatrace/description
Report system wide file access events.
endef
MAKE_INSTALL_FLAGS += PREFIX="/"
define Package/fatrace/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/fatrace $(1)/sbin/
# $(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fatrace))

View File

@@ -1,14 +0,0 @@
diff --git a/fatrace.c b/fatrace.c
index 1c0899a..b7d1560 100644
--- a/fatrace.c
+++ b/fatrace.c
@@ -44,7 +44,8 @@
* http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1e2ee49f7
* O_LARGEFILE is usually 0, so hardcode it here
*/
-#define KERNEL_O_LARGEFILE 00100000
+//#define KERNEL_O_LARGEFILE 00100000
+#define KERNEL_O_LARGEFILE O_LARGEFILE
/* command line options */
static char* option_output = NULL;

View File

@@ -1,12 +0,0 @@
diff --git a/fatrace.c b/fatrace.c
index b7d1560..6179272 100644
--- a/fatrace.c
+++ b/fatrace.c
@@ -149,6 +149,7 @@ print_event(const struct fanotify_event_metadata *data,
printf ("%li.%06li ", event_time->tv_sec, event_time->tv_usec);
}
printf ("%s(%i): %s %s\n", procname, data->pid, mask2str (data->mask), pathname);
+ fflush(stdout);
}
/**

View File

@@ -1,48 +0,0 @@
#
# Copyright (C) 2021 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fdtextract
PKG_RELEASE:=1
PKG_VERSION:=1.0
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/fdtextract.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=0ebaf1e7d1f09318ae75d0f475a25280742b790e
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=fdtextract
DEPENDS:= +libfdt
endef
define Package/$(PKG_NAME)/description
Command to extract sub images from FIT images.
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fdtextract $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/fdtextract
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

3
gigaset-elements/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
git-src

65
gigaset-elements/Makefile Normal file
View File

@@ -0,0 +1,65 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gigaset-elements
PKG_VERSION:=2.4.2
# PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_GIGASET_ELEMENTS_SRC_URL ?= git@public.inteno.se:gigaset-elements.git
PKG_GIGASET_ELEMENTS_VERSION ?= v$(PKG_VERSION)
PKG_SOURCE_URL:=$(PKG_GIGASET_ELEMENTS_SRC_URL)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=aa906b37062b6d7937a9c0f8e7b62b32afe4bdeb
PKG_MAINTAINER:=Magier Marcin, Figlarek Piotr
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
######################################################
define Package/gigaset-elements
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libjson-c +libcurl +libpthread
TITLE:=Gigaset elements
endef
######################################################
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) all
endef
define Package/gigaset-elements/install
$(CP) -r $(PKG_BUILD_DIR)/sysroot_common/* $(1)/
$(CP) -r $(PKG_BUILD_DIR)/sysroot_$(CONFIG_ARCH)/* $(1)/
endef
define Package/gigaset-elements/preinst
#!/bin/sh
mkdir -p $${IPKG_INSTROOT}/usr/gigaset/data/cert
mkdir -p $${IPKG_INSTROOT}/usr/gigaset/data/fw
endef
define Package/gigaset-elements/postrm
#!/bin/sh
rm -rf $${IPKG_INSTROOT}/usr/gigaset/data
rm -rf /usr/share/gigaset
endef
######################################################
$(eval $(call BuildPackage,gigaset-elements))

View File

@@ -1,78 +0,0 @@
# Copyright (c) 2017 Genexis B.V.
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=gryphon-led-kernel-module
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define KernelPackage/$(PKG_NAME)
SUBMENU:=LED modules
TITLE:=LED driver for Gryphon
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
PKG_LICENSE:=GPLv2
PKG_LICENSE_URL:=
endef
define KernelPackage/$(PKG_NAME)/description
This package contains the LED driver for Gryphon devices.
endef
EXTRA_KCONFIG:= CONFIG_RGB_LED=m
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
LINUX_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.19
MODULES_SUBDIR:=lib/modules/4.19.183
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_PREFIX)-
ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"63158" "6856" "6858"))
# These targets use a 64-bit kernel
LINUX_KARCH:=arm64
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_PREFIX)-
endif
# For some reason, Broadcom's kernel does not set the include paths correctly when compiling out-of-tree modules
EXTRA_KCPPFLAGS:="-I $(LINUX_DIR)/../bcmkernel/include -I $(LINUX_DIR)/arch/arm/mach-bcm963xx/include"
endif
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)/kdevlinks/
$(CP) -s `pwd`/src/* $(PKG_BUILD_DIR)/kdevlinks/
$(CP) src/* $(PKG_BUILD_DIR)
endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="-DKERNEL_MODULE $(BUILDFLAGS) -I$(LINUX_DIR)/include -include generated/autoconf.h $(MODULE_INCLUDE)" \
modules
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
endef
$(eval $(call KernelPackage,$(PKG_NAME)))

View File

@@ -1,26 +0,0 @@
# Copyright (c) 2017 Genexis B.V.
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
MODULE_NAME = gryphon-led-kernel-module
obj-m := $(MODULE_NAME).o
GENEXIS_FILES= \
main.o \
sk9822.o \
sk9822_bitbang.o
$(MODULE_NAME)-objs := $(GENEXIS_FILES)

View File

@@ -1,334 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#define DEBUG 1
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/printk.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/gpio/consumer.h>
#include <linux/of.h>
#include <linux/version.h>
#include "sk9822.h"
#define DRIVER_NAME "canyon_led"
#define DRIVER_AUTHOR "Genexis B.V."
#define DRIVER_DESC "Canyon LED driver for SK9822"
#define DRIVER_VERSION "1"
/**
* sysfs interfaces
*/
static ssize_t get_led_color(struct device *dev,
struct device_attribute *attr, char *buf)
{
int len;
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
if (IS_ERR(sk9822)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -EIO;
}
len = scnprintf(buf, PAGE_SIZE, "%02x%02x%02x\n", sk9822->led_colors[0].r, sk9822->led_colors[0].g, sk9822->led_colors[0].b);
if (len <= 0) {
dev_err(dev, "sk9822: Invalid sprintf len: %d\n", len);
return -EIO;
}
return len;
}
/**
* @brief Set complete LED strip to a specific color
* @retval count number of bytes written
* @retval -EMSGSIZE if the message is too big
* @retval -EIO for all other errors (e.g. leds cannot be configured)
*/
static ssize_t set_led_color(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
size_t buflen = count;
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
if (IS_ERR(sk9822)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -EIO;
}
/* strip newline */
if ((count > 0) && (buf[count-1] == '\n')) {
buflen--;
}
if (buflen != 6) { // RRGGBB\0
return -EMSGSIZE;
}
// Update the LED array here
ret = sk9822_set_color_str(sk9822, buf);
if (ret != 0) {
printk(KERN_ERR "Failed to set led color\n");
return -EIO;
}
// Now push to the HW
ret = sk9822_update(sk9822);
if (ret != 0) {
printk(KERN_ERR "Failed to update led\n");
return -EIO;
}
return count;
}
static DEVICE_ATTR(led_color, S_IRUGO | S_IWUSR, get_led_color, set_led_color);
static ssize_t get_led_brightness(struct device *dev,
struct device_attribute *attr, char *buf)
{
int len;
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
if (IS_ERR(sk9822)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -EIO;
}
len = scnprintf(buf, PAGE_SIZE, "%x\n", sk9822->led_brightness);
if (len <= 0) {
dev_err(dev, "sk9822: Invalid sprintf len: %d\n", len);
return -EIO;
}
return len;
}
/**
* @brief Set LED brightness
* @retval count number of bytes written
* @retval -EINVAL if the message is not a valid hexadecimal number
* @retval -EIO for all other errors (e.g. leds cannot be configured)
*/
static ssize_t set_led_brightness(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
unsigned long val = SK9822_DEFAULT_BRIGHTNESS;
if (IS_ERR(sk9822)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -EIO;
}
if (kstrtoul(buf, 16, &val)) {
return -EINVAL;
}
if(val > SK9822_DEFAULT_BRIGHTNESS) {
val = SK9822_DEFAULT_BRIGHTNESS;
}
sk9822->led_brightness = (uint8_t)val;
// Now push to the HW
ret = sk9822_update(sk9822);
if (ret != 0) {
printk(KERN_ERR "Failed to update led\n");
return -EIO;
}
return count;
}
static DEVICE_ATTR(led_brightness, S_IRUGO | S_IWUSR, get_led_brightness, set_led_brightness);
static struct attribute *sk9822_dev_attrs[] = {
&dev_attr_led_color.attr,
&dev_attr_led_brightness.attr,
NULL
};
static struct attribute_group sk9822_dev_attr_group = {
.name = "sk9822",
.attrs = sk9822_dev_attrs,
};
/**
* device prope and removal
*/
static int canyon_led_probe(struct platform_device *pdev)
{
int ret;
struct sk9822_leds *leds;
leds = devm_kzalloc(&pdev->dev, sizeof(*leds), GFP_KERNEL);
if (!leds) {
return -ENOMEM;
}
leds->dev = &pdev->dev;
leds->led_brightness = SK9822_DEFAULT_BRIGHTNESS;
ret = of_property_read_u16(pdev->dev.of_node, "led-count", &leds->led_count);
if (ret < 0) {
dev_warn(&pdev->dev, "Could not read led-count property\n");
leds->led_count = SK9822_DEFAULT_NUM_LEDS;
} else {
printk(KERN_INFO "Got led count: %u\n", leds->led_count);
}
leds->led_colors = devm_kzalloc(&pdev->dev,
(sizeof(cRGB) * leds->led_count), GFP_KERNEL);
if (!leds->led_colors) {
return -ENOMEM;
}
platform_set_drvdata(pdev, leds);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
leds->clock_gpio = gpiod_get_index(&pdev->dev, "led", 0);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
leds->clock_gpio = gpiod_get_index(&pdev->dev, "led", 0, GPIOD_OUT_HIGH);
#else
dev_warn(&pdev->dev, "Kernel version Not supported\n");
exit(1);
#endif
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);
}
gpiod_direction_output(leds->clock_gpio, 1);
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");
gpiod_set_value(leds->clock_gpio, 0);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
leds->data_gpio = gpiod_get_index(&pdev->dev, "led", 1);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
leds->data_gpio = gpiod_get_index(&pdev->dev, "led", 1, GPIOD_OUT_HIGH);
#else
dev_warn(&pdev->dev, "Kernel version Not supported\n");
exit(1);
#endif
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);
}
gpiod_direction_output(leds->data_gpio, 1);
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");
gpiod_set_value(leds->data_gpio, 0);
}
printk(KERN_INFO "Attempt to set filefs stuff\n");
ret = sysfs_create_group(&pdev->dev.kobj, &sk9822_dev_attr_group);
if (ret) {
dev_err(&pdev->dev, "sysfs creation failed\n");
return ret;
}
#if 0
printk(KERN_INFO "Flash LEDs to verify they work\n");
sk9822_set_color_str(leds, "00FF00");
sk9822_update(leds);
msleep(200);
sk9822_set_color_str(leds, "000000");
sk9822_update(leds);
#endif
printk(KERN_INFO "canyon led successfully probed\n");
return 0;
}
static int canyon_led_remove(struct platform_device *pdev)
{
struct sk9822_leds *leds;
sysfs_remove_group(&pdev->dev.kobj, &sk9822_dev_attr_group);
leds = platform_get_drvdata(pdev);
if (IS_ERR(leds)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -1;
}
if (leds->clock_gpio) {
gpiod_put(leds->clock_gpio);
}
if (leds->data_gpio) {
gpiod_put(leds->data_gpio);
}
printk(KERN_NOTICE "Bye, bye\n");
return 0;
}
/**
* platform driver metadata
*/
static const struct of_device_id canyon_led_of_ids[] = {
{ .compatible = "canyon,led" },
{ }
};
static struct platform_driver canyon_led = {
.probe = &canyon_led_probe,
.remove = &canyon_led_remove,
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
.of_match_table = canyon_led_of_ids,
},
};
MODULE_DEVICE_TABLE(of, canyon_led_of_ids);
module_platform_driver(canyon_led);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_VERSION(DRIVER_VERSION);
MODULE_LICENSE("GPL");

View File

@@ -1,82 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include "sk9822.h"
#include "sk9822_bitbang.h"
cRGB __hexs_to_rgb(const char *hex)
{
cRGB rgb;
int r, g, b;
sscanf(hex, "%02x%02x%02x", &r, &g, &b);
// This needs sanity checking
rgb.r = r;
rgb.g = g;
rgb.b = b;
return rgb;
}
/**
* @brief update the color over the given device struct to the provided HEX color
*/
int sk9822_set_color_str(struct sk9822_leds *sk9822, const char *hex)
{
int i;
cRGB color = __hexs_to_rgb(hex);
for (i = 0; i < sk9822->led_count; i++) {
sk9822->led_colors[i] = color;
}
return 0;
}
/**
* @brief write device struct to the device
*/
int sk9822_update(struct sk9822_leds *sk9822)
{
uint16_t i;
uint16_t led_count = sk9822->led_count;
// Start Frame
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
for (i = 0; i < led_count; i++) {
cRGB *p = &sk9822->led_colors[i];
sk9822_bb_write(sk9822, 0xe0+sk9822->led_brightness); // Maximum global brightness
sk9822_bb_write(sk9822, p->b);
sk9822_bb_write(sk9822, p->g);
sk9822_bb_write(sk9822, p->r);
}
// End frame
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
return 0;
}

View File

@@ -1,46 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef SK9822_H_
#define SK9822_H_
#include <linux/types.h>
#define SK9822_DEFAULT_NUM_LEDS 32 // U16, used if DT param fails
#define SK9822_DEFAULT_BRIGHTNESS 15 // 5-bit brightness, 0-31
typedef struct {
uint8_t b;
uint8_t g;
uint8_t r;
} cRGB; // BGR (SK9822 Standard)
struct sk9822_leds {
struct device *dev;
struct gpio_desc *clock_gpio;
struct gpio_desc *data_gpio;
cRGB *led_colors;
uint8_t led_brightness;
uint16_t led_count;
};
int sk9822_set_color_str(struct sk9822_leds *sk9822, const char *hex);
int sk9822_update(struct sk9822_leds *sk9822);
#endif /* SK9822_H_ */

View File

@@ -1,48 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/types.h>
#include "sk9822.h"
/**
* @brief Bitbang write operation CLOCK+DATA
*
* Assumed state before call: CLOCK- Low, DATA- High
*/
void sk9822_bb_write(struct sk9822_leds *sk9822, uint8_t c)
{
uint8_t i;
for (i = 0; i < 8 ; i++) {
if (!(c&0x80)) {
gpiod_set_value(sk9822->data_gpio, 0); // set data low
} else {
gpiod_set_value(sk9822->data_gpio, 1); // set data high
}
gpiod_set_value(sk9822->clock_gpio, 1); // set clock high, data sampled here
c <<= 1;
udelay(1); // stretch clock
gpiod_set_value(sk9822->clock_gpio, 0); // set clock low
}
// State after call: SCK Low, Data high
}

View File

@@ -1,28 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef _SK9822_BB_H_
#define _SK9822_BB_H_
#include <linux/types.h>
#include "sk9822.h"
void sk9822_bb_write(struct sk9822_leds *sk9822, uint8_t c);
#endif /* _SK9822_BB_H_ */

4
ice-client/Config.in Normal file
View File

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

1044
ice-client/Makefile Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,63 @@
#!/bin/sh
grep -rq "^ice:" /etc/passwd || {
local password="$(db get hw.board.wpaKey)"
if [ -n "$password" ]; then
adduser -D -H -s /bin/false ice
(echo $password; sleep 1; echo $password) | passwd ice >/dev/null 2>&1
fi
}
uci show rpcd | grep username=.*ice.* >/dev/null || {
cat >> /etc/config/rpcd << EOF
config login
option username 'ice'
option password '\$p\$ice'
list _access_r 'none'
list write 'user-user'
list write 'juci-broadcom-dsl'
list write 'juci-broadcom-dsl-admin'
list write 'juci-broadcom-ethernet'
list write 'juci-broadcom-iptv'
list write 'juci-broadcom-vlan'
list write 'juci-broadcom-vlan-admin'
list write 'juci-wireless'
list write 'juci-wireless-admin'
list write 'juci-catv'
list write 'juci-ddns'
list write 'juci-diagnostics'
list write 'juci-dnsmasq-dhcp'
list write 'juci-dropbear'
list write 'juci-ethernet'
list write 'juci-event'
list write 'juci-firewall-fw3'
list write 'juci-iconnect'
list write 'juci-igmpinfo'
list write 'juci-inteno-backup'
list write 'juci-inteno-multiwan'
list write 'juci-inteno-provisioning'
list write 'juci-inteno-qos'
list write 'juci-inteno-voice-client'
list write 'juci-minidlna'
list write 'juci-mod-status'
list write 'juci-mod-system'
list write 'juci-natalie-dect'
list write 'juci-netmode'
list write 'juci-network-netifd'
list write 'juci-owsd'
list write 'juci-printer'
list write 'juci-samba'
list write 'juci-sfp'
list write 'juci-snmpd'
list write 'juci-sysupgrade'
list write 'juci-uhttpd'
list write 'juci-upnp'
list write 'juci-usb'
list write 'core'
list write 'unauthenticated'
EOF
}
exit 0

46
icgroupd/Makefile Normal file
View File

@@ -0,0 +1,46 @@
#
# Copyright (C) 2016 Inteno Broadband AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=icgroupd
PKG_VERSION:=1.0
PKG_RELEASE:=0
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
PKG_MAINTAINER:=Inteno Broadband AB
include $(INCLUDE_DIR)/package.mk
define Package/icgroupd
SECTION:=base
CATEGORY:=Base system
TITLE:=Inteno cgroup daemon
DEPENDS:=+uci +busybox
endef
define Package/icgroupd/description
This package contains Intenos cgroup daemon and associated
configuration and startup scripts.
endef
define Build/Compile
true
endef
define Package/icgroupd/install
$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d $(1)/etc/config
$(INSTALL_CONF) ./files/cgroups.config $(1)/etc/config/cgroups
$(INSTALL_BIN) ./files/cgroups.init $(1)/etc/init.d/cgroups
$(INSTALL_BIN) ./files/cgroupd $(1)/sbin/
endef
$(eval $(call BuildPackage,icgroupd))

76
icgroupd/files/cgroupd Executable file
View File

@@ -0,0 +1,76 @@
#!/bin/sh
CGBASEDIR=$1
CGCONFIG=$2
[ -n "$CGBASEDIR" -a -n "$CGCONFIG" ] || exit 1
[ -r /lib/functions.sh ] || exit 1
. /lib/functions.sh
CGPROCMAP=/tmp/cgprocmap
CGPERIOD=3s
DBGLOG=/tmp/cgroupd.log
DEBUG=0
add_to_procmap () {
local name_grp=$1
local name grp
name=$(echo $name_grp |awk -F= '{print $1}')
grp=$(echo $name_grp |awk -F= '{print $2}')
echo "($name) $grp" >> $CGPROCMAP
}
# Read configuration file and create process:group look-up table
# in /tmp file
read_config () {
local enab
config_load $CGCONFIG
config_get enab cgroups enabled "1"
[ $enab -eq 0 ] && exit 1
config_get CGDEFGROUP cgroups defgroup "_undef_"
[ "$CGDEFGROUP" == "_undef_" ] && exit 1
[ "$DEBUG" == "1" ] && echo "default $CGDEFGROUP" >> $DBGLOG
echo -n '' > $CGPROCMAP
config_list_foreach procmap procmap add_to_procmap
[ "$DEBUG" == "1" ] && cat $CGPROCMAP >> $DBGLOG
}
# Move all process except init from cgroup root to cgroups according
# to /tmp look-up table
move_wild_procs () {
local wild_procs=$(cat $CGBASEDIR/cgroup.procs)
local pid name grp
for pid in $wild_procs; do
[ $pid -eq 1 ] && continue
if [ -d /proc/$pid ]; then
name=$(awk '{print $2}' /proc/$pid/stat)
grp=$(awk "\$1==\"$name\" {print \$2}" $CGPROCMAP)
[ "$grp" == "." ] && continue
[ -n "$grp" ] || grp=$CGDEFGROUP
[ "$DEBUG" == "1" ] && \
echo "Moving proc $pid $name to $grp" >> $DBGLOG
echo $pid > $CGBASEDIR/$grp/cgroup.procs
fi
done
}
[ "$DEBUG" == "1" ] && echo "$0 started $(date)" >> $DBGLOG
read_config
while true; do
move_wild_procs
sleep $CGPERIOD
done

View File

@@ -0,0 +1,48 @@
config cgroups cgroups
option enabled 1
option defgroup iopsys/normal
config cgroup _root_
# list option cpu.rt_runtime_us=50000
list option memory.move_charge_at_immigrate=1
config cgroup iopsys
list option cpu.shares=4096
# list option cpu.rt_runtime_us=40000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_normal
list option cpu.shares=1024
# list option cpu.rt_runtime_us=10000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_high
list option cpu.shares=4096
# list option cpu.rt_runtime_us=30000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup 3prt
list option cpu.shares=1024
# list option cpu.rt_runtime_us=10000
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_normal
list option cpu.shares=1024
# list option cpu.rt_runtime_us=2500
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_high
list option cpu.shares=4096
# list option cpu.rt_runtime_us=7500
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config procmap procmap
list procmap kthreadd=.
list procmap minidlna=3prt/normal

93
icgroupd/files/cgroups.init Executable file
View File

@@ -0,0 +1,93 @@
#!/bin/sh /etc/rc.common
START=01
USE_PROCD=1
PROCD_DEBUG=1
NAME=cgroupd
CGBASEDIR=/sys/fs/cgroup
CGCONFIG="cgroups"
DBGLOG=/tmp/cginit.log
DEBUG=0
cgroupinit_set_knob_value () {
local knob_val=$1
local dir=$2
local knob val
knob=$(echo $knob_val |awk -F= '{print $1}')
val=$(echo $knob_val |awk -F= '{print $2}')
/bin/echo $val > $CGBASEDIR/$dir/$knob
[ "$DEBUG" == "1" ] && \
echo "/bin/echo $val > $CGBASEDIR/$dir/$knob (ret=$?)" >> $DBGLOG
}
cgroupinit_create_group () {
local cgrp=$1
local dir
[ "$DEBUG" == "1" ] && echo "Create group $cgrp:" >> $DBGLOG
if [ "$cgrp" == "_root_" ]; then
dir=.
else
dir=$(echo $cgrp |tr '_' '/')
if [ ! -d $CGBASEDIR/$dir ]; then
mkdir $CGBASEDIR/$dir
[ "$DEBUG" == "1" ] && \
echo "mkdir $CGBASEDIR/$dir (ret=$?)" >> $DBGLOG
fi
fi
config_list_foreach $cgrp option cgroupinit_set_knob_value $dir
}
cgroupinit_configure_cgroups () {
local enab defgrp
[ "$DEBUG" == "1" ] && echo "$0 started $(date)" >> $DBGLOG
config_load $CGCONFIG
config_get enab cgroups enabled "1"
[ $enab -eq 0 ] && return 1
config_get defgrp cgroups defgroup "_undef_"
[ "$defgrp" == "_undef_" ] && return 1
if ! grep -q " $CGBASEDIR cgroup " /proc/mounts; then
mount -t cgroup -o nodev,noexec,nosuid cgroup $CGBASEDIR
[ $? -eq 0 ] || return 1
fi
config_foreach cgroupinit_create_group cgroup
return 0
}
start_service () {
cgroupinit_configure_cgroups
[ $? -eq 0 ] || return
procd_open_instance
procd_set_param command /sbin/cgroupd $CGBASEDIR $CGCONFIG
procd_set_param respawn
procd_close_instance
}
stop_service () {
local cgdir procs prc
for cgdir in $(find $CGBASEDIR -type d -mindepth 1 -depth); do
procs=$(cat $cgdir/cgroup.procs)
for prc in $procs; do
echo $prc > $CGBASEDIR/cgroup.procs
done
rmdir $cgdir
done
}
service_triggers() {
procd_add_reload_trigger $CGCONFIG
}

47
icwmp/Config.in Normal file
View File

@@ -0,0 +1,47 @@
if PACKAGE_icwmp-curl || PACKAGE_icwmp-zstream
config CWMP_SCRIPTS_FULL
bool "Install all icwmp scripts"
default y
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
choice
prompt "Select Data Model"
default tr098
config DATAMODEL_TR098
bool "TR-098"
config DATAMODEL_TR181
bool "TR-181"
endchoice
config CWMP_DEBUG
bool "Compile with debug options"
default y
choice
prompt "enable xmpp feature"
default disable
config XMPP_DISABLE
bool "disable"
config XMPP_ENABLE
bool "enable"
endchoice
config CWMP_DEVEL_DEBUG
bool "Compile with development debug options"
default n
endif

View File

@@ -1,30 +0,0 @@
choice
prompt "Select ACS sever"
default CWMP_ACS_MULTI
depends on PACKAGE_icwmp || \
PACKAGE_icwmp-openssl || \
PACKAGE_icwmp-wolfssl || \
PACKAGE_icwmp-mbedtls
config CWMP_ACS_MULTI
bool "No specific ACS, follow standard"
config CWMP_ACS_HDM
bool "Select HDM as ACS server"
endchoice
config CWMP_DEBUG
bool "Compile with debug options"
depends on PACKAGE_icwmp || \
PACKAGE_icwmp-openssl || \
PACKAGE_icwmp-wolfssl || \
PACKAGE_icwmp-mbedtls
default y
config CWMP_DEVEL_DEBUG
bool "Compile with development debug options (deprecated)"
depends on PACKAGE_icwmp || \
PACKAGE_icwmp-openssl || \
PACKAGE_icwmp-wolfssl || \
PACKAGE_icwmp-mbedtls
default n

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2020-2022 IOPSYS Software Solutions AB
# Copyright (C) 2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,90 +8,96 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=8.4.8
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_VERSION:=00d037ce851495aca6365f2189849c6030f305df
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
PKG_VERSION:=3.0-2017-03-17
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ff91f29aef6aa366db9bfaad20783fef853509e4
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_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)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
CWMP_REVISION=$(shell svnversion ./src/ -n|cut -f2 -d:)
include $(INCLUDE_DIR)/package.mk
define Package/icwmp/default
define Package/icwmp/Default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=TR069 CWMP client
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml
TITLE:=CWMP client
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +libstrophe +curl +libtrace
endef
define Package/icwmp/config
source "$(SOURCE)/Config_cwmp.in"
define Package/icwmp/description
A free client implementation of CWMP (TR-069) protocol
endef
define Package/icwmp-curl
$(call Package/icwmp/Default)
TITLE+= (using libcurl)
DEPENDS+= +libcurl
VARIANT:=curl
endef
define Package/icwmp-zstream
$(call Package/icwmp/Default)
TITLE+= (using libzstream)
DEPENDS+= +libzstream
VARIANT:=zstream
endef
define Package/icwmp-zstream/config
source "$(SOURCE)/Config.in"
endef
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE \
"-DCWMP_REVISION=\\\"$(PKG_SOURCE_VERSION)\\\""
-D_GNU_SOURCE -D_AADJ
define Package/icwmp
$(Package/icwmp/default)
TITLE += (internal)
VARIANT:=internal
endef
define Package/icwmp-openssl
$(Package/icwmp/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
VARIANT:=openssl
endef
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)
CONFIGURE_ARGS += --enable-libopenssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
TARGET_LDFLAGS += "-lssl"
ifneq ($(CWMP_REVISION)_,_)
ifneq ($(CWMP_REVISION),exported)
ifneq ($(CWMP_REVISION),Unversioned directory)
TARGET_CFLAGS += "-DCWMP_REVISION=\\\"$(CWMP_REVISION)\\\""
TARGET_LDFLAGS += "-DCWMP_REVISION=\\\"$(CWMP_REVISION)\\\""
endif
endif
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CONFIGURE_ARGS += --enable-libwolfssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
TARGET_LDFLAGS += "-lwolfssl"
TARGET_LDFLAGS += \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
CONFIGURE_ARGS += \
--with-uci-include-path=$(STAGING_DIR)/usr/include \
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
--with-libubus-include-path=$(STAGING_DIR)/usr/include
CONFIGURE_ARGS += $(if $(CONFIG_DATAMODEL_TR181),--enable-datamodel=tr181,--enable-datamodel=tr098)
CONFIGURE_ARGS += $(if $(CONFIG_XMPP_ENABLE),--enable-xmpp=enable,--enable-xmpp=disable)
ifeq ($(BUILD_VARIANT),zstream)
CONFIGURE_ARGS += \
--enable-http=zstream \
--with-zstream-include-path=$(STAGING_DIR)/usr/include
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += --enable-libmbedtls
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
TARGET_LDFLAGS += "-lmbedtls"
ifeq ($(BUILD_VARIANT),curl)
CONFIGURE_ARGS += \
--enable-http=curl
endif
ifeq ($(CONFIG_CWMP_ACS_MULTI),y)
@@ -114,36 +120,47 @@ CONFIGURE_ARGS += \
--enable-devel
endif
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
define Package/icwmp/default/install
define Package/icwmp-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/etc/icwmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/bin/icwmpd $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/firewall.cwmp $(1)/etc/firewall.cwmp
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(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_BIN) $(PKG_BUILD_DIR)/init/icwmpd.init $(1)/etc/init.d/icwmpd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/90-cwmpfirewall
ifeq ($(CONFIG_CWMP_SCRIPTS_FULL),y)
$(INSTALL_DIR) $(1)/usr/share/icwmp
$(CP) $(PKG_BUILD_DIR)/scripts/defaults $(1)/usr/share/icwmp
$(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/icwmp
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/icwmp.sh $(1)/usr/sbin/icwmp
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/iwepkeygen $(1)/usr/sbin/iwepkeygen
endif
endef
Package/icwmp-openssl/install = $(Package/icwmp/default/install)
Package/icwmp-wolfssl/install = $(Package/icwmp/default/install)
Package/icwmp-mbedtls/install = $(Package/icwmp/default/install)
define Package/icwmp-$(BUILD_VARIANT)/postinst
#!/bin/sh
echo "$(CWMP_BKP_FILE)" >> $${IPKG_INSTROOT}/etc/sysupgrade.conf
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Enabling rc.d symlink for icwmpd"
/etc/init.d/icwmpd enable
fi
exit 0
endef
$(eval $(call BuildPackage,icwmp))
$(eval $(call BuildPackage,icwmp-openssl))
$(eval $(call BuildPackage,icwmp-wolfssl))
$(eval $(call BuildPackage,icwmp-mbedtls))
define Package/icwmp-$(BUILD_VARIANT)/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Disabling rc.d symlink for icwmpd"
/etc/init.d/icwmpd disable
fi
exit 0
endef
$(eval $(call BuildPackage,icwmp-curl))
$(eval $(call BuildPackage,icwmp-zstream))

136
icwmp/README Normal file
View File

@@ -0,0 +1,136 @@
1)Build
Requirements<74>:
librairies:
- libuci.so
- libexpat.so
- libcurl.so
- libpthread.so
- libopenssl.so
- libz.so
- libcrypto.so
the librairies should be present in the "staging_dir/target-i386_uClibc-0.9.30.1/usr/lib/" or "staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib"
header files and folders:
- expat.h
- expat_external.h
- uci.h
- uci_config.h
- zlib.h
- curl folder
- openssl folder
the header files and folders should be present in the staging_dir/target-i386_uClibc-0.9.30.1/usr/include/ or staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.30.1/usr/include/
if a librairie doesn't exist:
a- run make menuconfig and select the librarie
b- build the librarie package
2) Build
this software is composed of 3 packages:
- icwmp package: contains icwmpd daemon
- cwmp lib package: contains cwmplib and contains cwmp_value_change binary. They could be used by other user space applications in order to notify the icwmp daemon when paramter changes
- cwmp kernel package: contains cwmp kernel module. This module could be used by other kernel modules to notify the icwmpd daemon when kernel parameter changes
The three packages should be selected in the make menu config in order to get the three packages compiled.
To compile the three packages: $ make package/cwmpd/compile
3) OpenWRT settings
in the OpenWRT, Add the following lines in the /usr/share/udhcpc/default.script file:
uci_set_state provisioning iup tr069url "$url"
uci_set_state provisioning iup provisioningcode "$provisioningcode"
4) Run
Requirements:
- libuci package should be installed
- libexpat package should be installed
- libcurl package should be installed
- libpthread package should be installed
- libopenssl package should be installed
- libz package should be installed
- libcrypto package should be installed
Configure the acs url in the /etc/config/icwmp
and then start the cwmpd service: /etc/init.d/icwmpd start
for the help: /etc/init.d/icwmpd
5) Value Change
5.1) value change for user space applications (using the libcwmp)
Before using the libcwmp, we should check that the libcwmp package is selected in "make menu config". and we should check that the package is compiled.
The libcwmp should be installed uin the OpenWRT firmware
example of using libcwmp
in myapplication.c
#...
#include <cwmp_lib.h>
#...
int anyfunction ()
{
.....
/* parameter change here */
/* so we inform the icwmp: */
lib_api_cwmp_value_change_call (3, "InternetGatewayDevice.LANDevice.{i}.LANHostConfigManagement.IPInterface.{i}.IPInterfaceIPAddress","lan2","3");
.....
/*
Description of lib_api_cwmp_value_change_call input parameters
parameter 1 : is the number of input string in the function lib_api_cwmp_value_change_call
parameter 2 : is the parameter path
parameter 3 : is the first correspondence related to the first indice
parameter 4 : is the second correspondence related to the second indice
.
.
.
parameter n : is the (n-2) correspondence related to the (n-2) indice
*/
}
5.2) value change for user space applications (using the cwmp_value_change CLI)
Before using the libcwmp, we should check that the libcwmp package is selected in "make menu config". and we should check that the package is compiled.
The libcwmp should be installed uin the OpenWRT firmware
in OpenWRT:
root@OpenWrt:~# cwmp_value_change InternetGatewayDevice.LANDevice.{i}.LANHostConfigManagement.IPInterface.{i}.IPInterfaceIPAddress "lan2" "3"
in this case the command will force cwmp client to send a notification to the ACS (if and only if the parameter path as configured as active or as passive parameter using the setAttributeParameter method)
5.3) value change for kernel space modules
Before using the cwmp kernel module for value change, we should check that the kernel module package is selected in "make menu config". and we should check that the package is compiled.
The kernel module should be installed uin the OpenWRT firmware and should be insert before all other kernel modules
example of using cwmp kernel module
in mykernelmodule.c
#...
#include <linux/cwmp_kernel.h>
#...
int anykernelfunction ()
{
.....
/* parameter change here */
/* so we inform the cwmp: */
kernel_api_cwmp_value_change_call (3, "InternetGatewayDevice.LANDevice.{i}.LANHostConfigManagement.IPInterface.{i}.IPInterfaceIPAddress","lan2","3");
.....
/*
Description of lib_api_cwmp_value_change_call input parameters
parameter 1 : is the number of input string in the function lib_api_cwmp_value_change_call
parameter 2 : is the parameter path
parameter 3 : is the first correspondence related to the first indice
parameter 4 : is the second correspondence related to the second indice
.
.
.
parameter n : is the (n-2) correspondence related to the (n-2) indice
*/
}

View File

@@ -1,43 +0,0 @@
config acs 'acs'
option userid '' #$OUI-$SER
option passwd 'iopsys'
option periodic_inform_enable 'true'
option periodic_inform_interval '1800'
option periodic_inform_time '0001-01-01T00:00:00Z'
option dhcp_discovery 'enable'
# compression possible configs: GZIP, Deflate, Disabled
option compression 'Disabled'
#­ possible configs interval :[1:65535]
option retry_min_wait_interval '5'
#­ possible configs interval :[1000:65535]
option retry_interval_multiplier '2000'
option ipv6_enable '0'
option ip_version '4'
config cpe 'cpe'
option default_wan_interface 'wan'
option log_to_console 'disable'
option log_to_file 'disable'
# log_severity: INFO (Default)
# log_severity possible configs: EMERG, ALERT, CRITIC ,ERROR, WARNING, NOTICE, INFO, DEBUG
option log_severity 'INFO'
option log_file_name '/var/log/icwmpd.log'
option log_max_size '102400'
option userid '' #$OUI-$SER
option passwd 'iopsys'
option port '7547'
option provisioning_code ''
option amd_version '5'
# compression possible configs: InstanceNumber, InstanceAlias
option instance_mode 'InstanceNumber'
option session_timeout '60'
option notification '1'
option exec_download '0'
option periodic_notify_enable '1'
option periodic_notify_interval '10'
option incoming_rule 'Port_Only'
config lwn 'lwn'
option enable '1'
option hostname ''
option port '0'

View File

@@ -1,80 +0,0 @@
#!/bin/sh
#created by the icwmp package
log() {
echo "${@}"|logger -t firewall.cwmp -p info
}
if [ ! -f "/var/state/cwmp" ]; then
exit 0;
fi
zone_name=$(uci -c /var/state -q get cwmp.acs.zonename)
port=$(uci -q get cwmp.cpe.port)
ipaddr=$(uci -c /var/state -q get cwmp.acs.ip)
ip6addr=$(uci -c /var/state -q get cwmp.acs.ip6)
incoming_rule=$(uci -q get cwmp.cpe.incoming_rule|tr 'A-Z' 'a-z')
if [ -z "${zone_name}" ]; then
log "empty firewall zone name"
exit 0
elif [ "$zone_name" = "icwmp" ]; then
iptables -nL zone_icwmp_input 2> /dev/null
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
else
iptables -w 1 -F zone_icwmp_input
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
iptables -w 1 -t filter -D INPUT -j zone_icwmp_input 2> /dev/null
iptables -w 1 -X zone_icwmp_input 2> /dev/null
fi
cmd="iptables -w 1 -I zone_${zone_name}_input -p tcp"
cmd6="ip6tables -w 1 -I zone_${zone_name}_input -p tcp"
# default incoming rule is Port only
if [ -z "${incoming_rule}" ]; then
incoming_rule="port_only"
fi
if [ "${incoming_rule}" = "ip_only" ]; then
if [ -n "${ipaddr}" ]; then
cmd="${cmd} -s ${ipaddr}"
cmd6="${cmd6} -s ${ip6addr}"
fi
elif [ "${incoming_rule}" = "port_only" ]; then
if [ -n "${port}" ]; then
cmd="${cmd} --dport ${port}"
cmd6="${cmd6} --dport ${port}"
fi
else
if [ -n "${ipaddr}" ]; then
cmd="${cmd} -s ${ipaddr}"
cmd6="${cmd6} -s ${ip6addr}"
fi
if [ -n "${port}" ]; then
cmd="${cmd} --dport ${port}"
cmd6="${cmd6} --dport ${port}"
fi
fi
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 "
if [ "$?" -eq 0 ]; then
cmd6="${cmd6} -j ACCEPT -m comment --comment=Open_ACS_port"
${cmd6}
fi
uci -c /var/state -q set cwmp.cpe.firewall_restart="init"
uci -c /var/state -q commit cwmp

View File

@@ -1,100 +0,0 @@
#!/bin/sh
log() {
echo "$@" |logger -t cwmp.update -p info
}
handle_icwmp_update() {
local defwan vendorspecinf update
local fallback_restart
fallback_restart="${1:-0}"
update="0"
defwan="$(uci -q get cwmp.cpe.default_wan_interface)"
vendorspecinf="$(ifstatus "${defwan}" | jsonfilter -e "@.data.vendorspecinf")"
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
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
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
}
# In case of update restart icwmp
if [ "${update}" -eq "1" ]; then
log "CWMP uci changes, reload cwmp with uci commit"
ubus call uci commit '{"config":"cwmp"}'
else
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.status')"
if [ "$status" = "failure" ]; then
log "Trigger out of bound inform, since last inform status was failure"
ubus -t 10 call tr069 inform >/dev/null 2>&1
# Handle timeout
if [ "$?" -eq 7 ]; then
log "Restarting icwmp tr069 object"
/etc/init.d/icwmpd restart
fi
fi
fi
}
handle_icwmp_update $@

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