Compare commits

...

427 Commits

Author SHA1 Message Date
Fredrik Åsberg
c78a961168 uci-diff: update 2016-07-29 17:49:35 +02:00
Fredrik Åsberg
47f57dd721 uci-diff: update 2016-07-08 16:26:36 +02:00
Fredrik Åsberg
82c830c563 uci-diff: added 2016-07-01 14:28:50 +02:00
Sukru Senli
f76e919f45 icwmp-3.0-2016-07-01 2016-07-01 13:16:18 +02:00
Sukru Senli
8dbb05a6c1 iop: select inteno-netmodes package by default 2016-06-30 15:44:49 +02:00
Sukru Senli
41574ab1f9 inteno-netmodes: exclude CG300 and CG301 from bridged netmodes 2016-06-30 15:42:41 +02:00
Sukru Senli
e9d0e4559e inteno-netmodes package 2016-06-30 15:17:47 +02:00
Mats Karrman
eb19a91087 peripheral_manager: Update source version, refs #9413 2016-06-29 16:11:02 +02:00
Ronny Nilsson
103964b2d1 Update feed [ feed_inteno_packages ] package [ dectmngr2 ]
-------------------------------------------------------------------------------
* 07c8a16 Before dectmngr2 does a fast exit (in case of an error), try to send a failure response to any ubus quierier (or might block in a timeout).
* c5619c2 - Only shuttdown ubus receiver if the radio is configured for auto off and is about to become off soon. - Comments
* a4898c8 - Extend timeout error message to ubus querier due to deleting a handset may be very slow sometimes. - When shutting down ubus receiver, also send an error to any active querier (to avoid blocking timeouts). - Only enable ubus receiver once if needed.
-------------------------------------------------------------------------------
commit 07c8a1665dc1f767c8ae2da92e41f482956f8959
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-06-28 15:43:12 +0200

    Before dectmngr2 does a fast exit (in case of an error), try to send a
    failure response to any ubus quierier (or might block in a timeout).

Base directory -> /
 src/error.c | 5 +++++
 src/ubus.c  | 1 +
 2 files changed, 6 insertions(+)
-------------------------------------------------------------------------------
commit c5619c257a199eb331f41798a01d5d608ce149b5
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-06-28 13:35:02 +0200

    - Only shuttdown ubus receiver if the radio is configured for auto off and
    is about to become off soon. - Comments

Base directory -> /
 src/handset.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit a4898c88a49b94bccb5c9a60cab3f6bdff94cffc
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-06-28 13:33:08 +0200

    - Extend timeout error message to ubus querier due to deleting a handset may
    be very slow sometimes. - When shutting down ubus receiver, also send an
    error to any active querier (to avoid blocking timeouts). - Only enable ubus
    receiver once if needed.

Base directory -> /
 src/ubus.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-06-28 17:14:50 +02:00
Ronny Nilsson
cb19eafc50 Update feed [ feed_inteno_packages ] package [ dectmngr2 ]
-------------------------------------------------------------------------------
* 61a08e5 - After last handset has been deleted we need to block incomming ubus messages due to we will be busy for a long time. - Cleanups
-------------------------------------------------------------------------------
commit 61a08e5de748ab2e317a1f0384f97087b25728cd
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-06-27 15:11:10 +0200

    - After last handset has been deleted we need to block incomming ubus
    messages due to we will be busy for a long time.
    - Cleanups
    - refs #9633

Base directory -> /
 src/connection_init.c |  6 +++-
 src/handset.c         |  5 ++++
 src/ubus.c            | 78 +++++++++++++++++++++++++++++++++++++++------------
 src/ubus.h            |  2 ++
 4 files changed, 72 insertions(+), 19 deletions(-)
-------------------------------------------------------------------------------
2016-06-27 16:03:21 +02:00
Sukru Senli
bdef362e9e icwmp-3.0-2016-06-27: depend on libstrophe instead of bcmkernel 2016-06-27 15:56:11 +02:00
Sukru Senli
a2fcc88238 libstrophe-0.8.8 2016-06-27 15:54:11 +02:00
Strhuan Blomquist
0df441879e layer2interface: adding icmp to QoS to prevent red intrenet on high uplink load refs #9647 2016-06-21 15:05:25 +02:00
Sukru Senli
6a34f36cbd iop: select comgt-directip package 2016-06-20 19:49:17 +02:00
Sukru Senli
f371d1fb1a questd-3.1.8 2016-06-18 15:37:27 +02:00
Sukru Senli
c39744a030 voice-client: turn of voice led and let asterisk handle it 2016-06-16 15:43:08 +02:00
Sukru Senli
55c0ab8163 3.0-2016-06-16 2016-06-16 14:46:32 +02:00
Sukru Senli
f7deb35e16 asterisk updated 2016-06-15 17:55:58 +02:00
Sukru Senli
379c5677a4 iop: deselect nonexisting juci plugin 2016-06-15 11:12:31 +02:00
Ronny Nilsson
52f8ff2b5d Fix for dect unpair and re-pair with voice. refs #9463 2016-06-14 16:37:15 +02:00
Sukru Senli
57f9214964 asterisk: cdr module depends on libsqlite3 2016-06-14 16:20:43 +02:00
Ronny Nilsson
c41ccdaf89 Update feed [ feed_inteno_packages ] package [ asterisk18-mod ]
Debug printouts

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
2016-06-14 15:24:53 +02:00
Ronny Nilsson
5566c4b885 New wrapper script for dectmngr2 which reloads kernel module when necessary 2016-06-14 15:24:49 +02:00
Sukru Senli
e484e5ba8d iop: select ntfs-3g by default 2016-06-14 15:23:11 +02:00
Reidar Cederqvist
27959db5d6 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 6ad4d1e made enough space for the time to fixe logs in arm
-------------------------------------------------------------------------------
commit 6ad4d1ec64e17889ef5be674329234f948137837
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-06-14 12:05:14 +0200

    made enough space for the time to fixe logs in arm

Base directory -> /
 questd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-06-14 12:16:58 +02:00
Sukru Senli
0379fefdd5 iop: for now do not select ntfs-3g package 2016-06-13 17:57:28 +02:00
Reidar Cederqvist
a016f2f4ba Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* df6cbd5 added linkspeed call to router object
-------------------------------------------------------------------------------
commit df6cbd5cfc7fd324b98ec557f80d506a3220638e
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-06-13 14:41:42 +0200

    added linkspeed call to router object

Base directory -> /
 port.c   |  7 +++++--
 questd.c | 32 ++++++++++++++++++++++++++++++++
 questd.h |  2 +-
 tools.c  |  1 +
 4 files changed, 39 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2016-06-13 16:47:35 +02:00
Sukru Senli
42650be9ea icwmp: no need to depend on openssl; already depending on libopenssl 2016-06-13 16:44:21 +02:00
Sukru Senli
07292dd5cf iup: merget iup224 into iup script 2016-06-13 16:39:05 +02:00
Kenneth Johansson
b6d5ff232d icwmp: fix dependency. 2016-06-13 15:52:02 +02:00
Sukru Senli
33498543d8 iop: select mobiel support related packages 2016-06-13 13:42:22 +02:00
Sukru Senli
3bcfcdaa1e questd: do not install ueventd 2016-06-13 12:56:17 +02:00
Sukru Senli
523682006f 4g-support: send hotplug.usb events with dongle details 2016-06-10 17:30:34 +02:00
Reidar Cederqvist
cd640462c1 updated questd to have more client information in ports call and
set the device as the object name insted of name
2016-06-10 17:27:30 +02:00
Sukru Senli
97201fc0b9 iop: do not select luci-app-catv by default in luci.diff profile 2016-06-09 17:38:31 +02:00
Sukru Senli
5251859485 icwmp: depends on curl 2016-06-09 17:28:55 +02:00
Sukru Senli
9ddba9536f iop: remove uhttpd if profile is luci 2016-06-09 17:23:06 +02:00
Sukru Senli
23dea02d7b iop: genconfig applies luci profile correctly 2016-06-09 16:02:51 +02:00
Sukru Senli
ee521f9609 iop: select icwmp package 2016-06-09 11:58:01 +02:00
Sukru Senli
f788ac8368 icwmp: depend on openssl and bcmkernel to get required libraries 2016-06-09 11:56:05 +02:00
Mats Karrman
adcd3bca40 libcgroup: Reenable package in master config 2016-06-08 16:05:24 +02:00
Mats Karrman
315e29d78f libcgroup: Add missing dependency on librt 2016-06-08 15:49:44 +02:00
Sukru Senli
9ac0c35f4f layer2interface: set xtm qos weight to 1 2016-06-08 15:13:29 +02:00
Sukru Senli
fc74862f11 samba3: add mising files 2016-06-08 14:27:35 +02:00
Jonas Höglund
085d43c3a4 Add samba3 to feed_inteno_packages 2016-06-08 13:14:51 +02:00
Sukru Senli
72738752d9 install libwebsockets from feed_inteno_juci 2016-06-08 10:13:47 +02:00
Kenneth Johansson
6ed8c8527b Move setup_host to iop.
it needs to be present early.
2016-06-07 17:45:19 +02:00
Kenneth Johansson
b5003a80e1 setup_host: silence check for gcc5. 2016-06-07 16:06:24 +02:00
Kenneth Johansson
58bd42f827 Allow gcc5 to be used. 2016-06-07 15:54:51 +02:00
Sukru Senli
a2b9e5d674 specificly select iptables and some used modules 2016-06-07 15:04:36 +02:00
Mats Karrman
b5be4d7dd6 setup_host: Fix bugs in iop completion install, refs #9457 2016-06-07 11:53:36 +02:00
Mats Karrman
5a46f910df setup_host: Install bash completion for iop utility, refs #9457 2016-06-07 11:40:40 +02:00
Mats Karrman
5da8017639 Add bash completion script for iop utility, refs #9457 2016-06-07 11:36:00 +02:00
Jonas Höglund
bf2b51bd82 Remove unused tmpdir 2016-06-07 11:04:54 +02:00
Sukru Senli
adc94ff3a5 3.0-2016-06-02 2016-06-02 16:05:22 +02:00
Jonas Höglund
b1ce1a9b13 Added extract_core to iop 2016-06-02 09:40:34 +02:00
Kenneth Johansson
7bb3854889 setup_host: prep for restoring distro default gcc.
can activate this yet as build still fails with gcc-5.
2016-06-01 20:48:58 +02:00
Sukru Senli
adad2c8a75 updated questd 2016-06-01 17:30:05 +02:00
Sukru Senli
47b1d90487 questd-3.1.6 2016-06-01 17:02:07 +02:00
Kenneth Johansson
1bd79f9e7e setup_host: gcc check did not actually work.
check was not testing for current gcc version at all only that 4.8
was installed but that is not enough.
2016-06-01 16:32:04 +02:00
Kenneth Johansson
4fa973ad54 setup_host: Add sudo to commands that needs root. 2016-06-01 15:49:55 +02:00
Kenneth Johansson
1967f8895e setup_host: only install things that is not already installed. 2016-06-01 15:35:55 +02:00
Jonas Höglund
3c674b984c New defconfig syntax in customer configs 2016-06-01 14:37:24 +02:00
Jonas Höglund
aef3f9421e icwmp-curl does not build on cc 2016-06-01 13:21:05 +02:00
Sukru Senli
c103a267ff add mtd-utils-deubunize to config 2016-06-01 11:57:29 +02:00
Jonas Höglund
9be82ab295 Disable signed packages 2016-06-01 11:57:29 +02:00
Jonas Höglund
fb3ac14e5f Remove libcgroup due to missing depencency 2016-06-01 11:57:29 +02:00
Jonas Höglund
edf1d929d0 Allow Broadcom to override taskset 2016-06-01 11:56:30 +02:00
Jonas Höglund
fc3e9d0418 Remove packages provided by ubi-utils 2016-06-01 11:56:30 +02:00
Jonas Höglund
c39aca40fa Deselect ppp since we are selecting ppp-multilink 2016-06-01 11:56:30 +02:00
Jonas Höglund
a32f730626 Don't build jffs2 fs for NOR 2016-06-01 11:56:30 +02:00
Jonas Höglund
e498e91cde Disable ffmpeg due to broken flac package 2016-06-01 11:56:30 +02:00
Jonas Höglund
d5d0f963fb Delete chan-mobile to remove bluez dependency 2016-06-01 11:56:30 +02:00
Jonas Höglund
32d10209da Remove btle_alarm 2016-06-01 11:56:30 +02:00
Jonas Höglund
be6737b028 Delete bluez from inteno packages 2016-06-01 11:56:30 +02:00
Sukru Senli
09e4e7cde2 update icwmp version 2016-06-01 11:35:48 +02:00
Sukru Senli
b334565e90 icwmp-3.0-2016-05-31 2016-05-31 17:20:13 +02:00
imen.bhiri
eb07e8868f Add libjson-c and libexpact dependencies 2016-05-31 17:19:15 +02:00
imen.bhiri
728da91a8f Add option to enable/disable XMPP feature 2016-05-31 17:19:09 +02:00
Sukru Senli
26a44ab3e5 select busybox deluser by default 2016-05-31 11:18:01 +02:00
Sukru Senli
b1ba9c1826 select ipv6 packages 2016-05-31 10:15:49 +02:00
Kenneth Johansson
eadb49e55c Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 2a16b98 gpio_button remove unneeded state variable.
* 35b628c Print if button press is from ubus call.
* d415e87 typo.
-------------------------------------------------------------------------------
commit 2a16b98543580d376d5862a34415f24d8be15b27
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-26 19:42:01 +0200

    gpio_button remove unneeded state variable.

Base directory -> /
 src/gpio_button.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 35b628c468000cf91a56cc7c2ef3564b56896f55
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-26 19:40:49 +0200

    Print if button press is from ubus call.

Base directory -> /
 src/button.c | 3 +++
 1 file changed, 3 insertions(+)
-------------------------------------------------------------------------------
commit d415e87b9e61cf5a2c607efd3272a17eca857ce3
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-23 15:27:27 +0200

    typo.

Base directory -> /
 src/catv_monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-05-30 16:48:01 +02:00
Christopher Nagy
68a39be532 added juci-snmpd to juci config 2016-05-30 13:49:24 +02:00
Christopher Nagy
333fbe25b1 selected juci-printer by default 2016-05-30 12:30:54 +02:00
Sukru Senli
c83a88ceb6 select juci-simple-gui 2016-05-30 11:25:59 +02:00
Sukru Senli
ae3d22ab45 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* d9a0a35 show duplex correctly
-------------------------------------------------------------------------------
commit d9a0a35d7fd75aae01e915c43e40ea3e08c477bc
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-28 12:45:44 +0200

    show duplex correctly

Base directory -> /
 questd.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
2016-05-28 12:46:14 +02:00
Sukru Senli
59285541e3 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 493f757 get fixed speed correctly
* 60f50e4 get correct device from brctl showbr output
-------------------------------------------------------------------------------
commit 493f757ad00fcea0255a680ff43be99750b8324f
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-28 11:34:33 +0200

    get fixed speed correctly

Base directory -> /
 questd.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 60f50e4d176c92898aeb66cb9f2b51033fee8c94
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-28 11:21:51 +0200

    get correct device from brctl showbr output

Base directory -> /
 questd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-05-28 11:42:15 +02:00
Ronny Nilsson
2f312659d8 Update feed [ feed_inteno_packages ] package [ asterisk18-mod ]
-------------------------------------------------------------------------------
* 6c098c4 It wasn't enough to just check of failed open
* aaf6936 - Kernel internal dect procesing in endpoint MUST only be started when it's available, or a crash occur. - Debug prints
-------------------------------------------------------------------------------
commit 6c098c4b82bf3ce4cf3e25b398198914c16c05ad
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-05-27 17:25:35 +0200

    It wasn't enough to just check of failed open

Base directory -> /
 channels/chan_brcm_dect.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit aaf6936820de345c05e60e3c2226e49223227402
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-05-27 15:03:16 +0200

    - Kernel internal dect procesing in endpoint MUST only be started when it's
    available, or a crash occur. - Debug prints

Base directory -> /
 channels/chan_brcm_dect.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2016-05-27 17:35:42 +02:00
Sukru Senli
659a36547b Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 82d7dbb show port speed for wired clients
-------------------------------------------------------------------------------
commit 82d7dbb928054f5e8dd834eecca2bd8dd7a0ce4d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-27 15:24:47 +0200

    show port speed for wired clients

Base directory -> /
 questd.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
-------------------------------------------------------------------------------
2016-05-27 16:51:46 +02:00
Ronny Nilsson
24700f6162 - We need modifed CFLAGS for pthreads to work on MIPS.
- Upstream update of Asterisk
2016-05-26 14:56:28 +02:00
Ronny Nilsson
17d2905283 - Upstream update of Dectmngr2
- Clenups, remove unused flags
2016-05-26 14:20:50 +02:00
Jonas Höglund
93e9c0e4cb Force rebuild of base-files on new profile selection 2016-05-26 12:46:13 +02:00
Kenneth Johansson
df039df5b3 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 7199297 Detect if touch panel is covered.
* 866b2c6 remove some whitespace.
* 77184fe Filter all button on proximity.
-------------------------------------------------------------------------------
commit 7199297d1c051782cf0d140253b325a3fa8d7eae
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-23 14:33:24 +0200

    Detect if touch panel is covered.

    If we have proximity event for more than 30 seconds assume that something
    covers the panel or box is put upside down.

Base directory -> /
 src/button.c       |  6 ++++-
 src/touch_sx9512.c | 77 ++++++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 68 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
commit 866b2c6deb38439496e2d60265533d4d314c9a69
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-23 11:26:32 +0200

    remove some whitespace.

Base directory -> /
 src/touch_sx9512.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 77184fe0b43c82564a49dd03a9b0e048a3fb6861
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-20 18:54:32 +0200

    Filter all button on proximity.

    Only report button presses if we also have a proximity near state active.
    This is to make it a little harder to get ghost presses.

Base directory -> /
 src/led.c          |  2 +-
 src/touch_sx9512.c | 77 ++++++++++++++++++++++++++++++++++++------------------
 2 files changed, 52 insertions(+), 27 deletions(-)
-------------------------------------------------------------------------------
2016-05-23 15:20:32 +02:00
Sukru Senli
3a30ea8209 select juci-broadcom-xdsl by default 2016-05-21 11:20:07 +02:00
Sukru Senli
0e22871a96 iup: set dhcp options individually for each management interface 2016-05-20 10:28:07 +02:00
Sukru Senli
650f941dfc dectmngr2: copy over dect config 2016-05-19 18:47:30 +02:00
Sukru Senli
d563bfa099 remove juci-full-inteno from config 2016-05-19 17:39:55 +02:00
Sukru Senli
840670bf80 disable cgroups for now 2016-05-19 16:33:38 +02:00
Sukru Senli
645a9d919f dectmngr2: add dect.config file 2016-05-19 16:32:23 +02:00
Sukru Senli
aea3f66f51 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 41c19e8 give ssid and encryption via router object wl method
-------------------------------------------------------------------------------
commit 41c19e88f72c88bd84f843beb4eccaa227f3fae2
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-16 18:09:48 +0200

    give ssid and encryption via router object wl method

Base directory -> /
 broadcom.c | 20 ++++++++++++++++++++
 broadcom.h | 15 +++++++++++++++
 questd.c   |  9 ++++++++-
 3 files changed, 43 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-05-16 18:14:53 +02:00
Sukru Senli
650957082a iop: setup_host installs necessary perl modules 2016-05-13 12:54:46 +02:00
Sukru Senli
d893622fb3 peripheral_manager: wait for ubus button object to be created before exiting init script 2016-05-12 19:24:22 +02:00
Alex Oprea
82d4fef6a6 iup: option 224 fix ciclying reboot refs #9077 2016-05-12 18:19:33 +02:00
Jonas Höglund
92a6b78786 Fix ice-client consumer package generation 2016-05-11 17:36:56 +02:00
Alex Oprea
c32ced2cfe iup: delay iup224 untill dns is reacheable refs #9073 2016-05-10 18:55:18 +02:00
Alex Oprea
e0be33b76a config: add bind-host package refs #9073 2016-05-10 18:55:18 +02:00
Nabeel Sowan
117c5224cc Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* c819e97 sx9512: change block write to 31 bytes to fix constant NVM updates when starting up peripheral_manager
* 937f2c5 Restore timeout function.
-------------------------------------------------------------------------------
commit c819e97d219b7d11c1b78cbd130f7d7d2443cf39
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2016-05-10 15:02:56 +0200

    sx9512: change block write to 31 bytes to fix constant NVM updates when
    starting up peripheral_manager

Base directory -> /
 src/sx9512.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
-------------------------------------------------------------------------------
commit 937f2c58211e6f94f771585f83caea436b1cd517
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-10 12:01:44 +0200

    Restore timeout function.

Base directory -> /
 src/led.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
2016-05-10 15:04:44 +02:00
Nabeel Sowan
3917419263 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 02edcda fix ubus button press and status read
-------------------------------------------------------------------------------
commit 02edcdaa628c4595a68bcc1da5dc5e398e851e87
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2016-05-09 16:55:06 +0200

    fix ubus button press and status read

Base directory -> /
 src/button.c | 18 ++++++++++++------
 src/button.h |  2 +-
 2 files changed, 13 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2016-05-09 17:15:01 +02:00
Sukru Senli
a6047dadbf voice-client: ringing schedule is off by default 2016-05-09 10:40:33 +02:00
Sukru Senli
906307df05 voice-client: call_filter0 is default call_filter 2016-05-09 10:40:30 +02:00
Sukru Senli
e8a6ff899b peripheral_manager: wait fir led.status ubus object to be created 2016-05-09 10:40:27 +02:00
Jonas Höglund
1d5ca37f1e Fix config path 2016-05-06 15:56:58 +02:00
Jonas Höglund
98170bdb79 Moved configs to iop package 2016-05-06 15:51:00 +02:00
Alex Oprea
97306df0a9 iup224: fix cicling reboot 2016-05-04 17:08:53 +02:00
Sukru Senli
a6abec5787 questd-3.1.5 2016-05-04 17:04:13 +02:00
Sukru Senli
88cf2ea0c2 iup: option 224 follows standard 2016-05-04 17:02:10 +02:00
Nabeel Sowan
103bbebad0 iop: fix cfe_upgrade script, wrong image type 2016-05-04 16:46:38 +02:00
Sukru Senli
c7b88666d8 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* e130cb0 Add enable for leds.
-------------------------------------------------------------------------------
commit e130cb0369b750d97cf2d4af081149cad7f6bb38
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-04-27 12:54:13 +0200

    Add enable for leds.

    when enable set to 0 the led function will internally be set to state OFF.
    it will still record any updates to state and when enable is set to 1 again
    will show whatever state has been set to during the time it was disabled.

Base directory -> /
 src/led.c | 37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2016-05-04 13:22:44 +02:00
Sukru Senli
22e014b587 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* ff58bac questd: add missing _ to parameters
* 0866c35 wificontrol: check arp list too
-------------------------------------------------------------------------------
commit ff58bac2696667ecab36afa2d93e7595fe9a992e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-04 13:21:39 +0200

    questd: add missing _ to parameters

Base directory -> /
 questd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 0866c3584e4ff0295b6b30afa30105fe3076a1bb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-04 13:13:08 +0200

    wificontrol: check arp list too

Base directory -> /
 wificontrol.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2016-05-04 13:22:32 +02:00
Sukru Senli
ce9ac288ff questd: install wificontrol 2016-05-03 12:37:00 +02:00
Sukru Senli
87df5f9117 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 9467625 add some more wireless info to clients
-------------------------------------------------------------------------------
commit 9467625ceb2636ca1487e400ef119f374946beb0
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-03 12:05:37 +0200

    add some more wireless info to clients

Base directory -> /
 questd.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-05-03 12:06:18 +02:00
Anis Ellouze
9073b24182 Add zlib to suuport http compression Add config choose to seltect daata model (TR098/TR181)
Signed-off-by: Sukru Senli <sukru.senli@inteno.se>
2016-05-02 18:39:23 +02:00
Sukru Senli
82d37cefd5 questd-3.1.3 2016-05-02 11:35:29 +02:00
Jonas Höglund
93eaaa0aa9 Fixed open config values in genconfig 2016-04-29 13:44:29 +02:00
Sukru Senli
b5db57ba45 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 36c8dc0 arping: use mempcpy in send_pack
-------------------------------------------------------------------------------
commit 36c8dc05fc27577c9ae8acf8ba6ab8e10b7ac2fd
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-27 17:39:57 +0200

    arping: use mempcpy in send_pack

Base directory -> /
 arping.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-04-27 17:45:39 +02:00
Nabeel Sowan
3db08a8ec8 add developer / fw update scripts to ./iop command 2016-04-27 17:24:39 +02:00
Alex Oprea
75ec580e89 iup224 file permissions 2016-04-27 16:16:32 +02:00
Jonas Höglund
12a7183a32 Fix ice-client download method 2016-04-27 14:30:28 +02:00
Sukru Senli
73e4a225bb Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 108befe questd: password_set: give permission denied if curpass is not given
-------------------------------------------------------------------------------
commit 108befec0fe83dbff15deddc0b4c015e0a7173da
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-27 10:51:02 +0200

    questd: password_set: give permission denied if curpass is not given

Base directory -> /
 questd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-04-27 10:51:50 +02:00
Sukru Senli
3a9685332d questd-3.1.2 2016-04-27 10:32:49 +02:00
Sukru Senli
12609ec471 Fix ice-client Makefile 2016-04-26 17:34:36 +02:00
Sukru Senli
c2788f796d questd-3.1.1 2016-04-26 15:11:25 +02:00
Erik Horemans
0144ce9606 new ice-client R3/4/1-RC11 2016-04-25 13:03:06 +02:00
Fredrik Åsberg
63ee5d4091 ice-client: added back support for CONFIG_ICE_OPEN 2016-04-22 17:00:06 +02:00
Fredrik Åsberg
0ab812d222 nevermind 2016-04-22 16:24:10 +02:00
Fredrik Åsberg
06679bd124 questd: update 2016-04-22 16:18:38 +02:00
Fredrik Åsberg
141b0c32e7 Added ifeq CONFIG_TARGET to EXTRA_CPPFLAGS 2016-04-22 16:15:32 +02:00
Fredrik Åsberg
9abc466d79 Makefile: fixed default ice-client settings 2016-04-22 15:11:50 +02:00
Fredrik Åsberg
93064cadd4 Fixed missed merge PKG_SOURCE_VERSION 2016-04-22 15:08:54 +02:00
Fredrik Åsberg
fc82c65364 Merge branch 'fredrik_lantiq' of public.inteno.se:feed-inteno-packages into devel
Conflicts:
	ice-client/Makefile
	questd/Makefile
2016-04-22 15:00:33 +02:00
Jonas Höglund
150b9bd694 Install feeds_inteno_openwrt 2016-04-21 12:47:49 +02:00
Mats Karrman
5ccec170d9 Add new package libcgroup 2016-04-20 16:55:00 +02:00
Mats Karrman
86cc70f753 icgroupd: Disable RT-scheduling control due to mips malfunction 2016-04-20 10:24:12 +02:00
Fredrik Åsberg
3a7e94e956 correct repo 2016-04-19 15:39:17 +02:00
Sukru Senli
a2220489b3 port_management: populate ports config if it has invalid config 2016-04-19 15:29:34 +02:00
Fredrik Åsberg
c1363317ba questd: lantiq 2016-04-19 15:20:31 +02:00
Fredrik Åsberg
667e0b1073 questd: lantiq 2016-04-19 15:16:00 +02:00
Jonas Höglund
39733b6227 Update feed [ feed_inteno_packages ] package [ asterisk18-mod ]
-------------------------------------------------------------------------------
* 2239c2d Update to new json-c include path
-------------------------------------------------------------------------------
commit 2239c2d0e790abfce7ac0684dbbac1cf9c0aff40
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-04-19 14:20:33 +0200

    Update to new json-c include path

Base directory -> /
 res/res_voice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-04-19 14:25:01 +02:00
Jonas Höglund
789d2e2a42 Conditional include for cc branch 2016-04-19 13:54:45 +02:00
Jonas Höglund
353b048596 Fix libjson-c dependency for cc branch 2016-04-19 13:54:06 +02:00
Jonas Höglund
5e50e59c46 Update feed [ feed_inteno_packages ] package [ icwmp ]
-------------------------------------------------------------------------------
* 5de2405 Don't link against old libname
* 88d5361 libjson renamed to libjson-c
-------------------------------------------------------------------------------
commit 5de240514b73aff51301df4d41b88f762bca89df
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2015-10-27 13:46:54 +0100

    Don't link against old libname

Base directory -> /
 configure.ac | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 88d53614f3e698484d8052795eac3ead4f9fc951
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2015-10-27 13:34:13 +0100

    libjson renamed to libjson-c

Base directory -> /
 dm/dmcommon.h                | 2 +-
 dm/dmtree/landevice.h        | 2 +-
 dm/dmtree/layer_2_bridging.c | 2 +-
 dm/dmtree/wandevice.h        | 4 ++--
 dm/dmubus.c                  | 2 +-
 dm/dmubus.h                  | 2 +-
 external.c                   | 2 +-
 jshn.c                       | 4 ----
 8 files changed, 8 insertions(+), 12 deletions(-)
-------------------------------------------------------------------------------
2016-04-18 11:24:10 +02:00
Jonas Höglund
fa134b86f8 Added libpthread to ice-client depends 2016-04-18 10:26:48 +02:00
Jonas Höglund
1258a086bc Fixed download method for cc branch 2016-04-18 10:15:17 +02:00
Sukru Senli
a9d22d5e6b Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* f7e856e add logs method to router object
-------------------------------------------------------------------------------
commit f7e856ec68627842c1e79eadb5b856ec629bb637
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-18 10:00:40 +0200

    add logs method to router object

Base directory -> /
 questd.c | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
-------------------------------------------------------------------------------
2016-04-18 10:01:39 +02:00
Jonas Höglund
b3af9d3695 Updated help message 2016-04-15 15:01:18 +02:00
Kenneth Johansson
e83748b3e4 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* bc5b822 add allflash state.
-------------------------------------------------------------------------------
commit bc5b8227410dac75d2525ef1946b842766982830
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-04-15 14:45:17 +0200

    add allflash state.

Base directory -> /
 src/led.c | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-04-15 14:52:30 +02:00
Jonas Höglund
fea6fc95a0 Luci sed not needed anymore as dependency is fixed 2016-04-15 14:12:57 +02:00
Jonas Höglund
ba1337720e Fixed NATALIE_OPEN 2016-04-15 12:33:17 +02:00
Jonas Höglund
1d9619dfd9 Don't remove all luci config parameters 2016-04-15 12:04:47 +02:00
Mats Karrman
8f63a74197 Added new package icgroupd, refs #2521
The icgroupd contains a simple shell script daemon and an procd enabled init script
for configuring cgroups according to uci configuration and launching the daemon.

The daemon will periodically look for new processes in the root cgroup and move
them to sub-groups according to configuration.
2016-04-15 11:53:44 +02:00
Erik Horemans
482a88a65b new ice-client 3.4.1-RC9 2016-04-15 11:50:27 +02:00
Jonas Höglund
351ca030d4 Add OPEN config parameters to the kconfig system 2016-04-15 11:39:13 +02:00
Sukru Senli
b306dffa63 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 13f6e7f add support for activating wps client mode
-------------------------------------------------------------------------------
commit 13f6e7f89f1b0a86820a8239f739a5e8797f95ca
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-14 14:24:15 +0200

    add support for activating wps client mode

Base directory -> /
 questd.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
-------------------------------------------------------------------------------
2016-04-14 19:39:15 +02:00
Jonas Höglund
baeaa7cc4c Revert "new ice-client 3.4.1-RC9"
This reverts commit 378310828c.
2016-04-14 17:51:20 +02:00
Jonas Höglund
df9e651719 Remove wip from genconfig 2016-04-14 14:00:18 +02:00
Jonas Höglund
f8e7362648 Fixed help message 2016-04-14 13:53:43 +02:00
Erik Horemans
378310828c new ice-client 3.4.1-RC9 2016-04-14 09:44:34 +02:00
Sukru Senli
1fa651ddd2 questd 3.1.0 2016-04-13 17:33:58 +02:00
Jonas Höglund
b5b88e6335 Added install_key to iop 2016-04-13 15:27:09 +02:00
Fredrik Åsberg
f59e3fa4bf ice-client: missing pthread 2016-04-13 14:37:21 +02:00
Fredrik Åsberg
6fdf16fc81 Makefile: update 2016-04-13 14:31:31 +02:00
Fredrik Åsberg
905423d589 Makefile: update questd 2016-04-13 13:03:38 +02:00
Fredrik Åsberg
a2cf8beaed lantiq's build system does not like "tmp" directory name. 2016-04-13 12:58:14 +02:00
Jonas Höglund
d3bf187a66 Fixed spelling error 2016-04-13 11:47:27 +02:00
Jonas Höglund
0afa6e264c Updated description of feeds_update 2016-04-13 11:33:58 +02:00
Jonas Höglund
45e33d565a Added generate_tarballs to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
e6bc413a9b Added genconfig to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
b3c28656a7 Added setup host 2016-04-13 11:33:58 +02:00
Jonas Höglund
7e70ce6c5d Added status command to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
92fafa4245 Renamed script to match command name 2016-04-13 11:33:58 +02:00
Jonas Höglund
50c3c52edd Export feeds_update to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
01fd665c51 Added iop_feeds_update to iop/scripts 2016-04-13 11:33:58 +02:00
Jonas Höglund
3409632353 Fix iop package 2016-04-13 11:33:58 +02:00
Jonas Höglund
0e4cf8941d Add iop package 2016-04-13 11:33:58 +02:00
Jonas Höglund
7d5d9f4fd2 Export update_package to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
6445cba038 Add update_package to iop/scripts 2016-04-13 11:33:58 +02:00
Sukru Senli
595de81dff layer2interface: for now populate network config ifnames along with layer2 configs 2016-04-12 18:24:03 +02:00
Sukru Senli
67e42d5efd auto populate layer2 configs 2016-04-12 17:50:21 +02:00
Sukru Senli
12000972d7 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 9022b06 handle endianness
* 42dae95 have to use wlctl command for sta_info
* 26eef94 collect sta info
* 4a12062 no more wlctl call
* fad40f0 use broadcom ioctl to get wireless parameters
* 3068e11 make sure dumping ports do not do memory leak
* 1ee4b5c new way of getting usb devices
* d8c7e6c give localtime in integer
* 07ed16a move remove_space function to tools.c
* bf907b0 remove unnecessary strdup calls
-------------------------------------------------------------------------------
commit 9022b06ecd73e1515b499a04894205fa95188deb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-12 13:47:34 +0200

    handle endianness

Base directory -> /
 broadcom.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
 broadcom.h | 24 +++++++++++++++++++++
 questd.c   |  1 -
 3 files changed, 81 insertions(+), 17 deletions(-)
-------------------------------------------------------------------------------
commit 42dae959983cd079e074947328c7dbc4b10f5848
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-11 12:45:36 +0200

    have to use wlctl command for sta_info

Base directory -> /
 broadcom.c |  52 +++++++++++-----
 broadcom.h |  14 +++++
 questd.c   | 197 ++++++++++++++++++++++++++++++-------------------------------
 questd.h   |   4 +-
 4 files changed, 149 insertions(+), 118 deletions(-)
-------------------------------------------------------------------------------
commit 26eef94febd6db3b0ad157a63fca4fe26aa397dc
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-10 14:29:25 +0200

    collect sta info

Base directory -> /
 broadcom.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 broadcom.h |   2 ++
 questd.c   |  35 +++++++------------
 questd.h   |   6 ++--
 4 files changed, 122 insertions(+), 32 deletions(-)
-------------------------------------------------------------------------------
commit 4a120629f22044d3bf5d07c8c47e0832ff513abe
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-09 23:51:22 +0200

    no more wlctl call

Base directory -> /
 broadcom.c |  85 ++++++++++++++++++++++++++++--------
 broadcom.h | 136 ++++++++++++++++++++++++++++++++++++++++++++--------------
 questd.c   | 142 ++++++++++++++++++++-----------------------------------------
 questd.h   |  13 +++---
 4 files changed, 224 insertions(+), 152 deletions(-)
-------------------------------------------------------------------------------
commit fad40f0ca3a9a6fc9e30af376a0fcaa87d3b213a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-09 19:20:35 +0200

    use broadcom ioctl to get wireless parameters

Base directory -> /
 Makefile           |  12 +-
 bcmwifi_channels.h | 393 +++++++++++++++++++++++++++++++++++++++++++
 broadcom.c         | 254 ++++++++++++++++++++++++++++
 broadcom.h         | 485 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 questd.c           |  72 +++++---
 typedefs.h         |  18 ++
 6 files changed, 1209 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit 3068e11a19e37de37f18ef74659193e9b8d2772d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 15:22:44 +0200

    make sure dumping ports do not do memory leak

Base directory -> /
 port.c   | 18 ++++++++++--------
 questd.c |  4 ++--
 questd.h |  2 +-
 3 files changed, 13 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit 1ee4b5c59361b6ad2515e41bbb6b0b64b021760d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 14:42:11 +0200

    new way of getting usb devices

Base directory -> /
 questd.c | 30 +++++++++++++++++-----------
 questd.h | 14 ++++++-------
 usb.c    | 69 ++++++++++++++++++++++++++++++++--------------------------------
 3 files changed, 61 insertions(+), 52 deletions(-)
-------------------------------------------------------------------------------
commit d8c7e6cc402cb7166082545e21a374c477296218
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 13:23:04 +0200

    give localtime in integer

Base directory -> /
 dumper.c | 5 +++--
 questd.c | 3 ++-
 questd.h | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 07ed16ac80df81fbc13191781ca6f083543ffc4d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 09:57:39 +0200

    move remove_space function to tools.c

Base directory -> /
 questd.h |  1 +
 tools.c  | 17 +++++++++++++++++
 usb.c    | 18 ------------------
 3 files changed, 18 insertions(+), 18 deletions(-)
-------------------------------------------------------------------------------
commit bf907b0089e720d4a9c9680e0321982a105e6906
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 20:49:40 +0200

    remove unnecessary strdup calls

Base directory -> /
 questd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-04-12 13:49:36 +02:00
Sukru Senli
e83347616c Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* fad40f0 use broadcom ioctl to get wireless parameters
* 3068e11 make sure dumping ports do not do memory leak
* 1ee4b5c new way of getting usb devices
* d8c7e6c give localtime in integer
* 07ed16a move remove_space function to tools.c
* bf907b0 remove unnecessary strdup calls
-------------------------------------------------------------------------------
commit fad40f0ca3a9a6fc9e30af376a0fcaa87d3b213a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-09 19:20:35 +0200

    use broadcom ioctl to get wireless parameters

Base directory -> /
 Makefile           |  12 +-
 bcmwifi_channels.h | 393 +++++++++++++++++++++++++++++++++++++++++++
 broadcom.c         | 254 ++++++++++++++++++++++++++++
 broadcom.h         | 485 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 questd.c           |  72 +++++---
 typedefs.h         |  18 ++
 6 files changed, 1209 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit 3068e11a19e37de37f18ef74659193e9b8d2772d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 15:22:44 +0200

    make sure dumping ports do not do memory leak

Base directory -> /
 port.c   | 18 ++++++++++--------
 questd.c |  4 ++--
 questd.h |  2 +-
 3 files changed, 13 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit 1ee4b5c59361b6ad2515e41bbb6b0b64b021760d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 14:42:11 +0200

    new way of getting usb devices

Base directory -> /
 questd.c | 30 +++++++++++++++++-----------
 questd.h | 14 ++++++-------
 usb.c    | 69 ++++++++++++++++++++++++++++++++--------------------------------
 3 files changed, 61 insertions(+), 52 deletions(-)
-------------------------------------------------------------------------------
commit d8c7e6cc402cb7166082545e21a374c477296218
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 13:23:04 +0200

    give localtime in integer

Base directory -> /
 dumper.c | 5 +++--
 questd.c | 3 ++-
 questd.h | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 07ed16ac80df81fbc13191781ca6f083543ffc4d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 09:57:39 +0200

    move remove_space function to tools.c

Base directory -> /
 questd.h |  1 +
 tools.c  | 17 +++++++++++++++++
 usb.c    | 18 ------------------
 3 files changed, 18 insertions(+), 18 deletions(-)
-------------------------------------------------------------------------------
commit bf907b0089e720d4a9c9680e0321982a105e6906
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 20:49:40 +0200

    remove unnecessary strdup calls

Base directory -> /
 questd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-04-09 19:24:28 +02:00
Sukru Senli
8d2bdd90fd Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 9eb8f97 show radio isup status
* b18afa1 remove boardinfo method
* b863e0f populate clients every 10 seconds
* 070ceb5 mutex lock whiel populating network
-------------------------------------------------------------------------------
commit 9eb8f9759f74378d9b2617809cd757ca742ec364
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 17:54:31 +0200

    show radio isup status

Base directory -> /
 questd.c | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit b18afa13382f4271882e01d9ea7aa97d26fde63e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 17:42:43 +0200

    remove boardinfo method

Base directory -> /
 questd.c | 81 +++++++---------------------------------------------------------
 1 file changed, 8 insertions(+), 73 deletions(-)
-------------------------------------------------------------------------------
commit b863e0f87fdf0f5366c85e2a675d86b4e1ca1f7d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 16:57:14 +0200

    populate clients every 10 seconds

Base directory -> /
 questd.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit 070ceb5cd4ac6e7f8fb8a87c3a74c1c029b9b569
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 13:30:39 +0200

    mutex lock whiel populating network

Base directory -> /
 questd.c | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
2016-04-07 17:55:25 +02:00
Sukru Senli
fef609fb46 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* c93a68d use strncpy to be safe
* 39ca14b show localtime
* dbd1ea5 show filesysem
-------------------------------------------------------------------------------
commit c93a68d9d45fde7a242a57776c0e11327da1d6c4
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 11:30:55 +0200

    use strncpy to be safe

Base directory -> /
 dumper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 39ca14b8ca0397000e402e5c63df50131c3c3841
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 11:20:24 +0200

    show localtime

Base directory -> /
 dumper.c | 5 +++++
 questd.c | 4 +++-
 questd.h | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit dbd1ea580bf442ab971760fecfeecfe83bd44eda
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 10:41:04 +0200

    show filesysem

Base directory -> /
 questd.c | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
-------------------------------------------------------------------------------
2016-04-07 11:41:44 +02:00
Sukru Senli
169c157cbd update package dependencies for ice-client and wifimngr 2016-04-06 13:36:07 +02:00
Sukru Senli
048546b175 set iup dhcp opts on all management interfaces 2016-04-06 11:29:15 +02:00
Sukru Senli
a17f3718af questd: install ueventd and uscriptd 2016-04-05 16:54:47 +02:00
Sukru Senli
70855e0a4f Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 5de4432 do not share object
-------------------------------------------------------------------------------
commit 5de4432d19b043677b9c729701057ae8c0c37589
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-05 15:47:48 +0200

    do not share object

Base directory -> /
 Makefile  |  4 ++--
 scriptd.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 tools.c   |  2 +-
 3 files changed, 53 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
2016-04-05 15:48:23 +02:00
Sukru Senli
9c4ede538b questd hosts uscriptd and ueventd as well 2016-04-05 15:06:50 +02:00
Sukru Senli
e16d6d9b5b icwmp-3.0-2016-03-30 2016-04-04 18:31:23 +02:00
Sukru Senli
f656693f25 updated asterisk 2016-04-04 16:23:35 +02:00
Ronny Nilsson
d065eef18c Merge branch 'ronny_dg400_dect' into devel 2016-04-04 14:45:22 +02:00
Ronny Nilsson
d2511509ef Upstream merge of Asterisk branch dect-ubus 2016-04-04 14:35:47 +02:00
Ronny Nilsson
85fcb1f033 - Install default NVS data
- Upstream merge to master branch
2016-04-04 14:26:00 +02:00
Kenneth Johansson
074f459bea Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 8be3060 Don't allow setting filter on model 302.
* d341ac8 add debug program for eco ghost press.
-------------------------------------------------------------------------------
commit 8be3060315f010fbf1bde723e0674e4a65fa9ccb
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-04-01 15:40:24 +0200

    Don't allow setting filter on model 302.

Base directory -> /
 src/catv.c | 32 +++++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit d341ac83376fb3714a6b1401d4a3e7c199bc76f7
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-03-15 15:53:30 +0100

    add debug program for eco ghost press.

Base directory -> /
 Makefile.am   |  7 ++++++-
 src/eco_bug.c | 25 +++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-04-01 15:44:08 +02:00
Sukru Senli
abe069dc3c Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 4ec2f7e remove extra slash
* 8ec937c increase buffer size
* ffdcd02 create multiple juci objects
* 1414c53 added juci object
* 337b4fd router wl object gives noise as well
-------------------------------------------------------------------------------
commit 4ec2f7e451941fbfbb990113b82c82bc8d906f57
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-31 17:56:38 +0200

    remove extra slash

Base directory -> /
 questd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 8ec937c6dcc7c82cc437256ed2eeacf5384e5f13
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-31 16:51:42 +0200

    increase buffer size

Base directory -> /
 tools.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit ffdcd02700a3bc33c59d006c6ed367b205f98922
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-30 22:19:24 +0200

    create multiple juci objects

Base directory -> /
 questd.c | 42 ++++++++++++++++++++++++++++++++++++------
 1 file changed, 36 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 1414c53c20af2293f24c9c0d57ed5cc38455f5fb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-30 21:02:16 +0200

    added juci object

Base directory -> /
 questd.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 tools.c  |  2 +-
 2 files changed, 60 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 337b4fd6e47e18f4033e594ae9de5c14acfa0cb4
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-29 14:17:15 +0200

    router wl object gives noise as well

Base directory -> /
 questd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-03-31 18:42:09 +02:00
Sukru Senli
1342f71b77 wifimngr-2016-03-29 2016-03-29 14:01:31 +02:00
Sukru Senli
c617d393ee Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 903d8ae now we specifically now which client is connected from client event
-------------------------------------------------------------------------------
commit 903d8ae119805d2b05d0b6fe6b0124d3e7ae1a16
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-27 14:26:00 +0200

    now we specifically now which client is connected from client event

Base directory -> /
 questd.c | 67 +++++++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 41 insertions(+), 26 deletions(-)
-------------------------------------------------------------------------------
2016-03-28 10:28:03 +02:00
Sukru Senli
c293e680dc Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 61d0ce1 set ran variable in correct place
-------------------------------------------------------------------------------
commit 61d0ce1337571f208d3ca12d8540a2abb921be31
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-25 10:26:46 +0100

    set ran variable in correct place

Base directory -> /
 questd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
2016-03-25 10:27:27 +01:00
Sukru Senli
4f20ba679e questd-3.0.0 2016-03-24 20:25:46 +01:00
Sukru Senli
b926cf4c34 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* e4c8f56 output event data in format of json object
* 65328e3 add .gitignore
* 152c964 show rssi for wireless clients
-------------------------------------------------------------------------------
commit e4c8f5691c3458edf10fa13b56bcb8432f659d8f
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-24 15:26:22 +0100

    output event data in format of json object

Base directory -> /
 questd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 65328e386e2a4a5e4f834a273870b191096c3e04
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-24 13:51:04 +0100

    add .gitignore

Base directory -> /
 .gitignore | 10 ++++++++++
 1 file changed, 10 insertions(+)
-------------------------------------------------------------------------------
commit 152c964291b78045075238a3d039885289eff055
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-24 13:48:53 +0100

    show rssi for wireless clients

Base directory -> /
 questd.c | 11 ++++++++++-
 questd.h |  2 ++
 2 files changed, 12 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-03-24 15:26:48 +01:00
Mats Karrman
d7030c4785 endptcfg: All supported Brcm SDKs require FAKE_SSP 2016-03-24 15:13:57 +01:00
Sukru Senli
f33296afa9 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 6439900 questd: show last 10 seconds of router events
-------------------------------------------------------------------------------
commit 643990006220f520725e99def72d7bfcecc8a4d4
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-03-24 11:29:54 +0100

    questd: show last 10 seconds of router events

Base directory -> /
 Makefile |  2 +-
 questd.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 questd.h |  7 +++++++
 3 files changed, 78 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-03-24 12:03:08 +01:00
Sukru Senli
be2de2f1c3 new way of handling private repos 2016-03-23 09:26:50 +01:00
Sukru Senli
211525095b layer2interface: treat option 1 as option Enabled in layer2_interface script 2016-03-17 10:26:10 +01:00
Sukru Senli
fc9e3e34e6 icwmp-3.0-2016-03-14 2016-03-16 18:05:30 +01:00
Ronny Nilsson
0650265216 Beta branch for Dect support in DG400 2016-03-15 13:37:29 +01:00
Sukru Senli
1fe72d82aa iup: set defaults iup options 2016-03-15 13:00:45 +01:00
Kenneth Johansson
5771b3bde6 Add bootchart2. 2016-03-11 20:59:14 +01:00
Sukru Senli
1ce684c01e icwmp-3.0-2016-03-11 2016-03-11 12:45:20 +01:00
Jonas Höglund
7e5ff6567a Don't set ice-client default=y in package makefile 2016-03-10 17:12:08 +01:00
Sukru Senli
d2713b3bbd Revert "new source url for open packages"
This reverts commit 991eeff106.
2016-03-10 14:58:37 +01:00
Sukru Senli
991eeff106 new source url for open packages 2016-03-10 14:41:23 +01:00
Sukru Senli
93cd4c477d iup: default iup enabled value is on 2016-03-10 09:28:27 +01:00
Sukru Senli
c208c12ef3 put natalie-dect back 2016-03-10 09:22:17 +01:00
Fredrik Åsberg
7bfdea5ff3 iopsys -> private 2016-03-09 16:28:31 +01:00
Fredrik Åsberg
ab88b8e133 ice-client: update comment 2016-03-09 16:13:35 +01:00
Fredrik Åsberg
2d7baa91e2 anyfi & wl-anyfi: removed 2016-03-09 16:13:35 +01:00
Fredrik Åsberg
66ad2e3158 natalie-dect: removed (moved to feed-inteno-broadcom) 2016-03-09 16:13:34 +01:00
Fredrik Åsberg
0981bc9ccd extra: removed 2016-03-09 16:13:34 +01:00
Fredrik Åsberg
c9601eb4aa dahdi: removed 2016-03-09 16:13:34 +01:00
Fredrik Åsberg
2f6fed6d92 dect-prog: removed (unused) 2016-03-09 16:13:34 +01:00
Fredrik Åsberg
6fbf823167 endptctl: removed (unused) 2016-03-09 16:13:34 +01:00
Fredrik Åsberg
7833470f7a teliasafety-misc: removed 2016-03-09 16:13:34 +01:00
Fredrik Åsberg
0ff160345d replaced ihgsp and iopsys urls 2016-03-09 16:13:34 +01:00
Fredrik Åsberg
a63d88c100 replaced git url iopsys.inteno.se with private.inteno.se 2016-03-09 16:13:34 +01:00
Sukru Senli
169ebea761 ice-client: ice-client open support 2016-03-09 12:04:09 +01:00
Sukru Senli
069de32121 layer2interface: vlanctl use correct syntax while creating vlans 2016-03-09 11:43:31 +01:00
Sukru Senli
6eecfcd238 ice-client-3.4.1RC8 2016-03-09 11:01:40 +01:00
Sukru Senli
e49d908f94 layer2interface: use vlanctl --dhcp-bridged option for vlan ifaces that belong to a managed bridge 2016-03-08 16:40:16 +01:00
Vlatko Dimic
24b6106ddd IUP is now logging to syslog, ref #8665 2016-03-08 11:34:28 +01:00
Sukru Senli
8cd62ff81f do not start asterisk until the router receives a default route 2016-03-04 16:27:11 +01:00
Sukru Senli
0d3466445c natalie-dect-h: remove PKG_RELEASE to align with natalie-dect package 2016-03-02 13:08:28 +01:00
Sukru Senli
cde3056c2f endptcfg: merge endptcfg-open into endptcfg 2016-03-01 12:13:34 +01:00
Sukru Senli
5ffec072d5 natalie-dect-open is removed 2016-03-01 11:44:47 +01:00
Sukru Senli
6e9f0fafa3 natalie-dect: compile natalie-dect and natalie-dect-open in same Makefile 2016-03-01 11:44:03 +01:00
Nabeel Sowan
0feb577f1a add picolisp-3.1.10 2016-02-29 21:39:17 +01:00
Vlatko Dimic
d4d189bd1e Added handling of option 224 to udhcp 2016-02-29 15:39:31 +01:00
Sukru Senli
8143b29d38 power-management: replace unexisting pwrctl command with correct one 2016-02-29 10:07:06 +01:00
Kenneth Johansson
78863e3174 iup: add fsync in init file after crontab been altered. 2016-02-26 19:02:04 +01:00
Kenneth Johansson
3324bd6c94 dectmngr: sync file in initscript.
make sure the new file is flushed to flash. Else if power is pulled the
file might end up as zero bytes large.
2016-02-26 16:00:07 +01:00
Sukru Senli
a1a8e179d8 ice-client-3.4.1-RC6 2016-02-26 12:42:19 +01:00
Kenneth Johansson
3e6ce7dd21 Add inotify-tools, iop_write_monitor. 2016-02-25 18:19:22 +01:00
Sukru Senli
74e087814d remove obselete packages: alleato-base and freecwmp 2016-02-25 17:23:13 +01:00
Sukru Senli
3069b113f2 questd-2.0.6 2016-02-25 17:19:10 +01:00
Sukru Senli
ae4bd347d0 icwmp-3.0-2016-02-24 2016-02-25 17:08:36 +01:00
Fredrik Åsberg
b534f1f164 icwmp: updated 2016-02-25 16:56:21 +01:00
Mats Karrman
b0a857c7c9 Update feed [ feed_inteno_packages ] package [ mtd-utils ]
-------------------------------------------------------------------------------
* dd9f464 imagewrite: Avoid double error messages
* eee1e57 imagewrite: Fix bug with not failing if last EB does not fit
* 9681f16 imagewrite: Add trail-ff option, refs #8626
* f0fc7c5 Revert "testing"
-------------------------------------------------------------------------------
commit dd9f464eced6af7d5e6a4a920b727421229310f4
Author: Mats Karrman <mats@southpole.se>
Date: 2016-02-19 14:32:16 +0100

    imagewrite: Avoid double error messages

Base directory -> /
 imagewrite.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit eee1e578789c309151eb2c58af57b7df9024612a
Author: Mats Karrman <mats@southpole.se>
Date: 2016-02-18 17:31:38 +0100

    imagewrite: Fix bug with not failing if last EB does not fit

Base directory -> /
 imagewrite.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 9681f16d36bdc660434fb7fad85897c62e8ab858
Author: Mats Karrman <mats@southpole.se>
Date: 2016-02-18 17:12:13 +0100

    imagewrite: Add trail-ff option, refs #8626

Base directory -> /
 imagewrite.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit f0fc7c5d6a8dda8ffa6509f8e79dee73fc757870
Author: Mats Karrman <mats@southpole.se>
Date: 2016-02-18 15:47:35 +0100

    Revert "testing"

    This reverts commit fb18f98c0eb82568b94808b7ab662937624b393d.

Base directory -> /
 hej.txt | 1 -
 1 file changed, 1 deletion(-)
-------------------------------------------------------------------------------
2016-02-25 16:47:39 +01:00
Ronny Nilsson
106982c69a Dependencies for dectmngr2 2016-02-25 16:09:48 +01:00
Sukru Senli
b24cb6f4d4 remove mosquitto from inteno packages feed 2016-02-25 16:09:38 +01:00
Sukru Senli
ed2f0381a0 remove juci-full-inteno 2016-02-25 16:09:29 +01:00
Sukru Senli
bbede82173 voice_client: add default call filter if it does not already exist 2016-02-25 16:08:41 +01:00
Sukru Senli
256948792c voice_client: add default call filter 2016-02-25 16:08:36 +01:00
Fredrik Åsberg
b173df6ff5 questd: update version 2016-02-22 11:39:01 +01:00
Fredrik Åsberg
31361b2bfb moved 2016-02-22 11:30:39 +01:00
Fredrik Åsberg
fb2181f279 added git proto 2016-02-22 11:27:48 +01:00
Fredrik Åsberg
2ef80243bf questd: update 2016-02-19 17:50:26 +01:00
Fredrik Åsberg
5811d46d56 Changed Makefiles to use HTTP URLs. 2016-02-19 11:24:32 +01:00
Sukru Senli
e0d7cb9caa allocate new macaddr for vlan interface if it is in dhcp bridge 2016-02-15 14:45:56 +01:00
Kenneth Johansson
5b22a2dce6 Update feed [ intenopackages ] package [ mtd-utils ]
-------------------------------------------------------------------------------
* fb18f98 testing
-------------------------------------------------------------------------------
commit fb18f98c0eb82568b94808b7ab662937624b393d
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-02-15 13:50:14 +0100

    testing

Base directory -> /
 hej.txt | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
2016-02-15 14:08:24 +01:00
Sukru Senli
dd481c8bfe Update feed [ intenopackages ] package [ questd ]
-------------------------------------------------------------------------------
* b1946c0 ubus call router clients gives bytes/rate details for wireless clients
-------------------------------------------------------------------------------
commit b1946c0c6bd45a9ea271afdebda86bfd4d264abb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-02-11 16:48:37 +0100

    ubus call router clients gives bytes/rate details for wireless clients

Base directory -> /
 questd.c | 119 ++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 57 insertions(+), 62 deletions(-)
-------------------------------------------------------------------------------
2016-02-12 18:48:07 +01:00
Mats Karrman
fa760967a1 Update feed [ intenopackages ] package [ mtd-utils ]
-------------------------------------------------------------------------------
* cc390d8 deubinize: Add skip/length option and output to stdout, refs #8625
-------------------------------------------------------------------------------
commit cc390d8aaf8911fa4bae3a150488c9e7a783eb86
Author: Mats Karrman <mats@southpole.se>
Date: 2016-02-04 16:54:32 +0100

    deubinize: Add skip/length option and output to stdout, refs #8625

Base directory -> /
 ubi-utils/deubinize.c | 95 ++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 68 insertions(+), 27 deletions(-)
-------------------------------------------------------------------------------
2016-02-11 09:41:18 +01:00
Fredrik Åsberg
ce8bf2872c btle_alarm: Makefile fix 2016-02-10 18:27:00 +01:00
Fredrik Åsberg
faa17d8679 Merge iopsys-attitude-adjustment into devel 2016-02-10 18:16:37 +01:00
Fredrik Åsberg
ceca1c1a53 btle_alarm: moved into subdirectory 2016-02-10 18:15:29 +01:00
Jonas Höglund
7862c07454 Added readline dep. 2016-02-10 18:11:15 +01:00
Kenneth Johansson
22129691d0 Add bluez 5.28.
Userspace tools and libs only.
Update of cg301 target
2016-02-10 18:11:15 +01:00
Fredrik Åsberg
9625c3b81c btle_alarm: breakup src into repo 2016-02-10 18:00:50 +01:00
Sukru Senli
a1d6b02a20 voice_client: delete non-existing lines from config 2016-02-10 11:53:45 +01:00
buildserver2
d6ab9d1a12 mtd-utils: Make directory name same as package name 2016-02-08 11:46:55 +01:00
Sukru Senli
97ad605a1c iup: prevent possible sh warning 2016-02-07 11:44:34 +01:00
Sukru Senli
3e66393c7b iup: prevent network reloading if dhcp options are not changed 2016-02-04 15:37:26 +01:00
Sukru Senli
9b02ee98d2 icwmpd-3.0-2016-02-04 2016-02-04 15:36:31 +01:00
Sukru Senli
8a2939ddde ask for dhcp options 66 67 128 only if iup is enabled 2016-02-04 14:30:25 +01:00
Sukru Senli
a17530309f icwmp-3.0-2016-02-03 2016-02-03 17:06:13 +01:00
Sukru Senli
d6f0f38524 asterisk: enable video support 2016-01-29 14:06:33 +01:00
Sukru Senli
4c99a2fb98 add extra qos for atm/ptm interfaces 2016-01-28 18:02:16 +01:00
Sukru Senli
701cc69a03 ice-client: remove torrent package 2016-01-27 15:14:58 +01:00
Erik Horemans
da5615d50a new ice-client R3.4.1-RC1 2016-01-27 14:46:19 +01:00
Reidar Cederqvist
6ea1aa0a2b removed ssh-keys: it has been moved to ssh page 2016-01-27 14:12:57 +01:00
Kenneth Johansson
09e49e54eb Remove QOS 2016-01-27 11:02:06 +01:00
Fredrik Åsberg
e92bc0ea7d Moved the following packages to inteno-packages-openwrt:v3.5
and moved luci out of webgui.

alljoyn
block-mount-old
dbus
ddns-scripts
glib2
haproxy
hotplug2
libffi
libipfix
libmbim
libmicroxml
libpcre
libqmi
luci
minidlna
multiwan
net-snmp
samba2
samba3
shflags
syslog-ng3
usb-modeswitch
2016-01-26 15:06:55 +01:00
Fredrik Åsberg
a1e4de11f0 Moved the following packages to inteno-packages-broadcom:v3.5
bcmhotproxy
bcmkernel
brcm-h
broadcom-diag
broadcom-nvram
broadcom-utils
mcpd
2016-01-26 15:02:13 +01:00
Fredrik Åsberg
750d5ff091 Removed unused packages:
6relayd
ami_tool
bridge-utils
ltq-dsl
ltq-dsl-app
ltq-kpi2udp
ltq-tapidemo
siit
sqlite3
statd
uboot-omap35xx
uboot-omap4
2016-01-26 11:48:20 +01:00
Fredrik Åsberg
1f5c527959 Separate "extra" folder.
Added packages that we are unsure whether they can be deleted or are needed to a separate "extra" folder.
2016-01-26 11:38:06 +01:00
Mats Karrman
4dba945466 Update source version to tip of 4.16L.04 branch 2016-01-26 09:12:07 +01:00
Kenneth Johansson
ce942da01f Update feed [ inteno ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 6a89f70 Do not trigger pressindicator unless button is enabled.
-------------------------------------------------------------------------------
commit 6a89f70edec94286a790cbb7c76debec6bb1c873
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-01-25 14:06:08 +0100

    Do not trigger pressindicator unless button is enabled.

Base directory -> /
 src/button.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-01-25 14:54:49 +01:00
Mats Karrman
a6139059a3 Update source version to tip of 4.16L.04 branch, refs #8173 2016-01-25 13:01:30 +01:00
Mats Karrman
a58ac037fd Update source version to tip of 4.16L.04 branch, refs #8173 2016-01-22 17:13:04 +01:00
Mats Karrman
5ec0992e1d Add support for new products: DG150V2 and DG150ALV2, refs #8173 2016-01-22 17:13:04 +01:00
Sukru Senli
71c459b27d make sure questd reload works 2016-01-22 15:49:56 +01:00
Martin Schröder
4021526a61 add juci-simple-gui 2016-01-22 14:08:19 +01:00
Martin Schröder
009d2b613c Merge remote-tracking branch 'origin/from-iop-3.4' into v3.5
Conflicts:
	brcm_fw_tool/Makefile
	brcminfo/Makefile
	peripheral_manager/Makefile
	questd/src/questd.c
	wifimngr/Makefile
2016-01-21 15:28:48 +01:00
Fredrik Åsberg
cee25ad753 rename: speedtest.config speedtest 2016-01-21 14:05:06 +01:00
Fredrik Åsberg
221020162e Makefile: Update
Copy files in the files folder for the following projects:

bcmhotproxy (done)
broadcom-nvram (already did that)
peripheral_manager (changed)
questd (done)
statd (already did that)
tptest (done, changed file structure)

The following does not have any files to be copied:

broadcom-utils
qrencode
wifimngr
2016-01-21 13:45:47 +01:00
Sukru Senli
6e7e03544a peripheral manager: install init.d script 2016-01-21 13:10:56 +01:00
Sukru Senli
65dd02c8ad install speedtest config from tptest package 2016-01-21 12:40:35 +01:00
Fredrik Åsberg
4b193200ed broadcom-utils: build problem fixed
broadcom-utils build directory was not being created correctly,
the solution was to remove the kernel.mk include.

 - include $(INCLUDE_DIR)/kernel.mk
2016-01-21 11:36:08 +01:00
Fredrik Åsberg
64c89e3778 perfmngr: merge kenneth devel 2016-01-20 17:33:27 +01:00
Fredrik Åsberg
46bbd6e198 broadcom-utils: added
Moved brcminfo and brcm_fw_tool to broadcom-utils.
2016-01-20 14:23:30 +01:00
Martin Schröder
351814d4eb juci-full-inteno: fix the uci-defaults script 2016-01-19 13:56:11 +01:00
Martin Schröder
bc7260e31f fix typo in juci inteno config 2016-01-19 10:56:00 +01:00
Fredrik Åsberg
a88e8ca92a Moved inteno projects that should be public to their own repos.
The repos are now available from public.inteno.se

This does not include broadcom-utils.
2016-01-18 17:53:26 +01:00
Martin Schröder
fac97aafc4 juci: configure menus based on whether we have voice, dect and adsl/vdsl 2016-01-18 17:18:12 +01:00
Martin Schröder
67bf9c7cc6 Merge remote-tracking branch 'origin/from-iop-3.4' into v3.5 2016-01-18 11:06:09 +01:00
Mats Karrman
416807ec6d bcmkernel-4.16L.04: Update source version to tip of 4.16L.04, cfe ver change 2016-01-15 16:33:25 +01:00
Kenneth Johansson
bf68e19da1 bcmkernel-4.16L.04: Update source version to tip of 4.16L.04. 2016-01-14 15:20:35 +01:00
Martin Schröder
f668805565 update juci config 2016-01-13 16:31:21 +01:00
Kasper Ingelvide
09595f0343 Show time as local time in call log, refs #7537 2016-01-13 12:14:01 +01:00
Reidar Cederqvist
0a221ad2a2 allways overwrite rpcd config 2016-01-13 11:06:58 +01:00
Reidar Cederqvist
47a918ff4d added user acls to menu items and added filters etc 2016-01-13 11:02:58 +01:00
Reidar Cederqvist
4ae7bdd609 changed juci-inteno-config 2016-01-12 17:11:40 +01:00
Strhuan Blomquist
cae2808318 Fixes So that we dont get double iup process refs #8437 2016-01-12 16:25:51 +01:00
Strhuan Blomquist
6f600d6f37 accidently removed a character creating an error message refs #8307 2016-01-12 09:36:50 +01:00
Strhuan Blomquist
fdb3f55a35 iup can now handle UBIFS and JFFS2 with same version and do a upgrade refs #8307 2016-01-11 16:38:28 +01:00
Sukru Senli
486b1a854c disable ipv6 on wan base device 2016-01-11 16:06:01 +01:00
Mats Karrman
5fb7c59fb3 bcmkernel-4.16L.04: Update source version to tip of 4.16L.04, refs #8458 2016-01-11 15:20:48 +01:00
Mats Karrman
86bca8523b bcmkernel-4.16L.04: Updated source to tip of 4.16L.04 branch, DG400 DDR, refs #8414 2016-01-08 18:19:07 +01:00
Sukru Senli
af1516bf6c luci-inteno-1.1.31 2016-01-08 16:40:09 +01:00
Kenneth Johansson
b167e072ac minidlna: force fixup of autotools.
Since we know we update the makefile.am do a manual autoreconf
instead of allowing this to be detected during make.

If its detected the make tries to use the original version of automake
and not the version installed on the HOST.

this is so we can build on ubuntu 15.10 without downgrading automake.
2016-01-08 15:35:36 +01:00
Mats Karrman
e11fef0a1d imagewrite: use correct JFFS2 clean marker on little-endian systems, refs #8452 2016-01-08 15:28:28 +01:00
Sukru Senli
70597bb8de icwmp-3.0-2016-01-07 2016-01-08 13:25:57 +01:00
Martin Schröder
fa4e426d33 fix voice client in default config 2016-01-08 12:07:50 +01:00
Sukru Senli
ca2d6ac266 libmicroxml: avoid new lines in attributes patch 2016-01-07 13:07:35 +01:00
Sukru Senli
201d3e9b69 iup: stop/start iup if reloaded 2016-01-05 10:44:03 +01:00
Sukru Senli
27173c0d40 updated bcmkernel 2016-01-04 17:42:26 +01:00
Sukru Senli
a0749cd0cf luci-inteno-1.1.30 2016-01-04 13:20:47 +01:00
Sukru Senli
02e15998da updated bcmkernel 2015-12-29 22:39:33 +01:00
Sukru Senli
178b836aff luci-inteno-1.1.29 2015-12-29 17:58:13 +01:00
Sukru Senli
b2184b2b45 icwmp-3.0-2015-12-29 2015-12-29 17:50:44 +01:00
Martin Schröder
bba5a9e3d6 juci: add new inteno pages to the juci config 2015-12-23 13:16:34 +01:00
Kenneth Johansson
a350812bfd bcmkernel: eg300: wan phy 0x01 should have gtxclk delay on. 2015-12-21 15:12:13 +01:00
Sukru Senli
5eccb99fce luci-inteno-1.1.28 2015-12-18 17:44:39 +01:00
Sukru Senli
ae92433819 updated bcmkernel 2015-12-18 15:56:22 +01:00
Sukru Senli
dd91c8823b add sipcalc package 2015-12-18 11:18:47 +01:00
Sukru Senli
ab0294c188 minidlna-1.1.4 2015-12-14 14:18:57 +01:00
Martin Schröder
c0fe19f4d7 update juci configuration file 2015-12-14 13:35:42 +01:00
Kenneth Johansson
803bfdd345 permngr: do not do ioctl when open already failed.
every fail was put in the systemlog, very noisy.
2015-12-10 17:42:22 +01:00
Sukru Senli
7a31cda783 luci-inteno-1.1.27 2015-12-10 15:39:57 +01:00
Sukru Senli
361f3404d1 icwmp-3.0-2015-12-10 2015-12-10 15:00:46 +01:00
Sukru Senli
35427c3ad2 fix samba not reloaded via webgui issue 2015-12-10 14:02:29 +01:00
Reidar Cederqvist
2d569ff935 fixed igmp over pppoe 2015-12-10 12:38:42 +01:00
Sukru Senli
b76d2ee06a icwmp-3.0-2015-12-09 2015-12-09 16:22:39 +01:00
Kenneth Johansson
207c769970 permngr: Add longpress indicator.
If the board has press indicator configured and a longpress option
the press indicator leds will stop flashing once the longpress time is
reached.

refs #7959
2015-12-09 11:35:19 +01:00
Sukru Senli
4940ba3428 bcmkernel: remove smbd and smbdpasswd 2015-12-08 16:31:12 +01:00
Sukru Senli
4c377f65b5 samba3 fixed 2015-12-08 16:31:10 +01:00
Nabeel Sowan
9a0dcfd895 fix boardfiles with longpress option and set default minpress, refs #8318 2015-12-08 15:56:11 +01:00
Ronny Nilsson
fbcf382a64 Voice ports have wrong order (switched) in some products so
we need a per-board-config of how to enumerate the FSX voice ports.
The voice_client script has been updated to read that per-board-conf
at the very first boot and then store it UCI as usual, where
the GUI reads it.
2015-12-08 15:07:54 +01:00
Sukru Senli
09413abb61 luci-inteno-1.1.26 2015-12-08 13:39:54 +01:00
Sukru Senli
f29c51e68c move port and power management to utilities 2015-12-08 13:39:15 +01:00
Sukru Senli
8cce20ecb6 add catv package 2015-12-08 13:38:52 +01:00
Sukru Senli
3f77b219b9 luci-inteno-1.1.25 2015-12-08 13:23:49 +01:00
Sukru Senli
8bae398da7 add power management package 2015-12-08 13:23:25 +01:00
Mats Karrman
1576532e0e bcmkernel-4.16L.04: Update source version to tip of 4.16L.04: DG150 support 2015-12-07 18:07:24 +01:00
Sukru Senli
8f4fdc0f7d luci-inteno-1.1.24 2015-12-03 18:03:52 +01:00
Sukru Senli
7f34e8b807 updated bcmkernel 2015-12-03 17:58:06 +01:00
Kenneth Johansson
cb0d37c698 bcmkernel-4.16L.04: resurrected Bluetooth.
From the long forgotten realm of 4.16L.03 the rotten corps of a hacky
backport was dragged out in the open with powerful magical spells
constructed by the church of gitology.

The reanimation took place during many hours of hard manual labor where
whole body parts was replaced and rearranged according to ancient
manuscripts written in a long forgotten language.

While this has not been blessed with holy penguin pee by our Lord the
mighty Torvalds the complicator of gnu has compiled it to ELF ingots
that has been forged to a coherent whole by the blacksmith of ld.

what could possible go wrong?
2015-12-03 16:12:34 +01:00
Martin Schröder
5aee44ba2c juci-full-inteno: add qos under network 2015-12-03 15:09:41 +01:00
Erik Horemans
17c2361a90 ice-client version 3.4.0-RC6 2015-12-03 10:44:30 +01:00
Martin Schröder
00555a7a2e Merge remote-tracking branch 'origin/from-iop-3.4' into v3.5 2015-12-02 16:35:58 +01:00
Martin Schröder
de7cf6298c juci-full-inteno: add juci-iconnect to selected packages. 2015-12-02 15:33:43 +01:00
Strhuan Blomquist
f9ac50cf4f fix for iup to be able to handel UBIFS files #8267 2015-12-02 13:00:00 +01:00
Erik Horemans
be791726a4 package/inteno/ice-client/Makefile 2015-12-01 16:20:34 +01:00
Ronny Nilsson
0879221d1a Upstream Asterisk bugfix 2015-12-01 11:45:20 +01:00
Martin Schröder
ab80d8a243 questd: add support for specifying ubus socket on command line 2015-12-01 10:53:55 +01:00
Martin Schröder
8e5d63d7d3 juci-full-inteno: add qos page 2015-12-01 10:15:25 +01:00
Martin Schröder
5e7bfbd977 juci-full-inteno: add broadcom iptv page to network -> services menu 2015-12-01 09:37:44 +01:00
Martin Schröder
75e6c3f089 juci-full-inteno: add broadcom-iptv plugin 2015-12-01 09:36:02 +01:00
Sukru Senli
4b1dbd91cd questd: display tx/rx rate and stats for wireless clients 2015-11-30 18:27:59 +01:00
Kenneth Johansson
52321de1ca perfmngr: add timout state to led. 2015-11-30 14:52:24 +01:00
Kenneth Johansson
97d6f8604e permngr: fix compile warnings. 2015-11-30 14:50:21 +01:00
Mats Karrman
7b9db30978 bcmkernel-4.16L.04: Load dect and dectshim driver only when necessary, refs #8284 2015-11-30 14:28:01 +01:00
Martin Schröder
eb6dc4b927 juci-full-inteno: update makefile 2015-11-30 14:03:27 +01:00
Kenneth Johansson
e628a79588 permngr: compare the whole string not just the 4 first chars. 2015-11-30 13:21:23 +01:00
Kenneth Johansson
c5d25fdfad permngr: Dont send out internal events on ubus.
We should not send the button pressed event as that is an internal thing.
we send button pressed when the button is actually released and we
never send button released.

To the reset of the system the only thing that can happen is button pressed.
2015-11-30 13:02:44 +01:00
Martin Schröder
b207009cb4 rename juci-config-inteno to juci-full-inteno package 2015-11-30 12:54:39 +01:00
Erik Horemans
1b94f625ea added new ice-client R3.4.0-RC4 2015-11-30 12:52:18 +01:00
Sukru Senli
5c5c9d53a4 Merge branch 'from-iop-3.4' into v3.5 2015-11-30 11:49:02 +01:00
Martin Schröder
6403153076 add metapackage for configuring juci for inteno full juci config 2015-11-27 17:16:05 +01:00
Vlatko Dimic
17b0fcba98 bcmkernel: don't fail if .config does not exist 2015-11-27 17:08:11 +01:00
Mats Karrman
4339dcddbe Voice: Match brcm line-index to port name in board files, refs #8271 2015-11-27 15:06:57 +01:00
Sukru Senli
1f6143cdeb luci-inteno-1.1.23 2015-11-27 12:57:05 +01:00
Mats Karrman
4cf9d8a93d libmicroxml: Add mirror MD5 sum from OpenWrt mirror 2015-11-27 11:05:21 +01:00
Kenneth Johansson
10bdb7a8dc bcmkernel: more SIOCGMIIREG. 2015-11-25 17:01:08 +01:00
Kenneth Johansson
659ec81047 bcmkernel: more SIOCGMIIREG stuff. 2015-11-25 14:50:09 +01:00
Mats Karrman
0513a124dc bcmkernel-4.16L.04: Update to tip of 4.16L.04 (cfe password fix) 2015-11-25 10:59:05 +01:00
Kenneth Johansson
330f79b31f bcmkernel: fix SIOCGMIIREG. 2015-11-24 17:57:56 +01:00
Sukru Senli
43be9fd282 updated bcmkernel 2015-11-24 12:38:01 +01:00
Sukru Senli
1e3195e1ee luci update source version 2015-11-23 18:05:48 +01:00
Vlatko Dimic
9dea956039 luci-inteno-1.1.22 2015-11-23 16:53:24 +01:00
Sukru Senli
7e60791000 icwmp-3.0-2015-11-23 2015-11-23 16:17:21 +01:00
Martin Schröder
e8bdb6bc24 Merge remote-tracking branch 'origin/from-iop-3.4' into v3.5
Conflicts:
	icwmp/Makefile
2015-11-22 21:18:04 +01:00
Sukru Senli
3400265f13 luci-intneo-1.1.21 2015-11-20 17:29:27 +01:00
Nabeel Sowan
5e797bf457 bcmkernel bump: mtd map IOP2 partitions correctly, needed for copying old config 2015-11-20 17:01:26 +01:00
Ronny Nilsson
58f1084714 New upstream version for dect_testing 2015-11-20 15:06:04 +01:00
Strhuan Blomquist
69a79e6b3e fixes for #7869 software upgrade was broken 2015-11-20 13:55:48 +01:00
Sukru Senli
8f48ff9e83 voice_client: add ringing_status section if it is missing 2015-11-19 15:56:55 +01:00
Ronny Nilsson
794223e29e Fix typo, invalid hash for dectmngr 2015-11-18 15:44:38 +01:00
Ronny Nilsson
7ed295b977 Attempt to increase dect testing successrate. Refs #7574 2015-11-18 15:10:40 +01:00
Ronny Nilsson
9599e9fad5 Attempt to increase dect testing successrate. Refs #7574 2015-11-18 15:02:02 +01:00
Ronny Nilsson
96c9277e1a Fixed a bug with dect antenna diversity. Binary data got wrong.
refs #5990
2015-11-18 15:02:02 +01:00
Sukru Senli
a1b0964e0a icwmp: do not install watchicwmpd 2015-11-18 11:13:03 +01:00
Sukru Senli
807f7c520f icwmp-3.0-2015-11-16: procdified icwmp init script 2015-11-17 16:19:37 +01:00
Mats Karrman
94b3e0b975 bcmkernel-4.16L.04: Update source version to tip of 4.16L.04 2015-11-17 09:57:52 +01:00
Nabeel Sowan
5345917eaa usbnet & co. loaded as modules, refs #7806 2015-11-16 16:00:59 +01:00
Martin Schröder
1f5d3f2eed Merge iopsys-3.4 changes from main repo branch 'origin/inteno-packages' 2015-11-16 10:16:45 +01:00
Sukru Senli
be1d548163 questd: clear wireless stas memory 2015-11-14 15:06:15 +01:00
Sukru Senli
05489b127a luci-inteno-1.1.20 2015-11-13 16:35:35 +01:00
Mats Karrman
c525acc002 bcmkernel-4.16L.04: Removed some unused binaries and libs, refs #8109 2015-11-11 16:26:23 +01:00
Stefan Nygren
65f799faa0 Revert "Fix error where pid file is move as call and clean"
This reverts commit f54df850d2d38ac80a2f9f67ea29eda7659d309d.
2015-04-01 10:41:56 +02:00
Stefan Nygren
8cabb87357 Fix error where pid file is move as call and clean 2015-04-01 10:41:56 +02:00
Stefan Nygren
c19546bbdd Correct spelling of utilities 2015-04-01 10:41:56 +02:00
Stefan Nygren
6699e1a741 Add new init routine for btle_alarm 2015-04-01 10:41:04 +02:00
Stefan Nygren
d20174daed Add new format to btle_alarm uci 2015-04-01 10:41:04 +02:00
Stefan Nygren
b08557465f add missing config folder to ipkg structure 2015-04-01 10:41:01 +02:00
Stefan Nygren
e46fa1b3ae fix spelling error of filename btle_alarm.conf 2015-04-01 10:41:01 +02:00
Stefan Nygren
e4258501a9 Add uci configuration to package
Config file to be able to use UCI to store bluetooth mac of device
refs #6142
2015-04-01 10:36:11 +02:00
Stefan Nygren
3dc434eb24 Add autostart routine for btle_alarm 2015-04-01 10:36:11 +02:00
Stefan Nygren
aa9d058747 Add Proof of concept Bluetooth agent 2015-04-01 10:36:11 +02:00
691 changed files with 8021 additions and 109533 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
local usb_dir uVid uPid uMa uPr uSe bConf bNumConfs vendor product mdmtyp netdev comdev cdcdev ttydev usbno usbbr
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' "$@"
@@ -20,6 +20,7 @@ find_usb_attrs() {
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)
@@ -48,6 +49,8 @@ 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"
@@ -55,6 +58,9 @@ if [ "$ACTION" = add ]; 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
@@ -62,5 +68,7 @@ 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

@@ -1,8 +0,0 @@
config server 'default'
list network 'lan'
option rd 'server'
option dhcpv6 'server'
option management_level '1'
option compat_ula '1'

View File

@@ -1,57 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_RELEASE:=1
PKG_VERSION:=1
PKG_SOURCE_URL:=git://git.carnivore.it/users/common/af_alg.git
PKG_SOURCE_VERSION:=1851bbb010c38878c83729be844f168192059189
PKG_NAME:=af_alg
PKG_VERSION:=0.1
DEPENDS:=libopenssl
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
TARGET_LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
MAKE_FLAGS += TARGET="$(target)"
TARGET_CFLAGS += -Dtarget_$(target)=1 -Wall
include $(INCLUDE_DIR)/package.mk
define Package/af_alg
CATEGORY:=Libraries
TITLE:=Openssl af_alg engine
URL:=
endef
define Package/af_alg/description
Openssl af_alg engine
endef
define Build/Compile
$(MAKE_VARS) \
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
$(MAKE_FLAGS)
endef
define Package/af_alg/install
$(INSTALL_DIR) $(1)/usr
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/engines
cp $(PKG_BUILD_DIR)/libaf_alg.so $(1)/usr/lib/engines/
endef
$(eval $(call BuildPackage,af_alg))

View File

@@ -1,11 +0,0 @@
--- a/Makefile 2014-02-17 13:00:44.161670649 +0100
+++ b/Makefile 2014-02-17 13:00:51.633670316 +0100
@@ -24,7 +24,7 @@
LDFLAGS =
SPEC_LDFLAGS = \
- -lcrypto
+ -lcrypt
CC = cc
LD = $(CC)

View File

@@ -1,188 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=alleato-base
PKG_VERSION:=14.49.2
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_URL:=git@iopsys.inteno.se:alleato_base.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8314aed451255410a2cd4fa43ac3235504e8f018
PKG_MAINTAINER:=Martin Assarsson, ALLEATO
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/alleato3
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+python
TITLE:=Alleato python libraries
endef
define Package/zwaved
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+jansson
TITLE:=Alleato zwave daemon
endef
define Package/zwave-mgr
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3
TITLE:=Alleato zwave manager
endef
define Package/zwave-profiler
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3
TITLE:=Alleato zwave profiler
endef
define Package/alleato-scheduler
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3
TITLE:=Alleato scheduler
endef
define Package/alleato-boxconfig
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3
TITLE:=Alleato boxconfig
endef
define Package/all-omc
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3 +screen
TITLE:=Alleato remote tunnel
endef
define Package/ubus-kicker
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=
TITLE:=Alleato ubus-kicker
endef
define Package/mqttnagios
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=
TITLE:=Alleato mqttnagios
endef
define Package/all4-alleato-tools
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=
TITLE:=Alleato tools
endef
######################################################
define Package/alleato3/install
$(INSTALL_DIR) $(1)/usr/lib/python2.7/
$(CP) -r $(PKG_BUILD_DIR)/python-2.7/* $(1)/usr/lib/python2.7/
endef
define Package/zwaved/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/zwaved $(1)/etc/init.d/zwaved
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/zwaved $(1)/usr/sbin/zwaved
endef
define Package/zwave-mgr/install
$(INSTALL_DIR) $(1)/usr/mqttrules $(1)/etc/init.d $(1)/etc/alleato/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/zwave-mgr $(1)/etc/init.d/zwave-mgr
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/zwave_mgr $(1)/usr/mqttrules/zwave_mgr
endef
define Package/zwave-profiler/install
$(INSTALL_DIR) $(1)/usr/mqttrules $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/zwave-profiler $(1)/etc/init.d/zwave-profiler
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/zwave-profiler $(1)/usr/mqttrules/zwave-profiler
endef
define Package/alleato-scheduler/install
$(INSTALL_DIR) $(1)/usr/mqttrules $(1)/etc/init.d $(1)/etc/crontabs/sched
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/scheduler $(1)/etc/init.d/scheduler
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/scheduler $(1)/usr/mqttrules/scheduler
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/schedule $(1)/etc/crontabs/sched/schedule
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/schedule $(1)/etc/crontabs/schedule
endef
define Package/alleato-boxconfig/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/bin $(1)/etc/init.d $(1)/etc/alleato $(1)/home/mosquitto
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/boxconfig $(1)/etc/init.d/boxconfig
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/boxconfig $(1)/usr/bin/boxconfig
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/genmosquittoconf $(1)/usr/bin/genmosquittoconf
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/check_client_id $(1)/usr/sbin/check_client_id
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/boxconfig.conf $(1)/etc/boxconfig.conf
endef
define Package/all-omc/install
$(INSTALL_DIR) $(1)/root $(1)/etc/init.d $(1)/etc/config $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/omc $(1)/etc/init.d/omc
$(INSTALL_BIN) $(PKG_BUILD_DIR)/root/ssh_key $(1)/root/ssh_key
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/alleato.config $(1)/etc/config/alleato
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/omc $(1)/usr/bin/omc
endef
define Package/ubus-kicker/install
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/ubus-kicker $(1)/etc/init.d/ubus-kicker
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/ubus-kicker $(1)/usr/sbin/ubus-kicker
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/akick $(1)/usr/sbin/akick
endef
define Package/mqttnagios/install
$(INSTALL_DIR) $(1)/etc/nagios.d $(1)/usr/bin $(1)/etc/crontabs $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/mqttnagios $(1)/etc/init.d/mqttnagios
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/send_mqtt_nag $(1)/usr/bin/send_mqtt_nag
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nagios.d/dropbear $(1)/etc/nagios.d/dropbear.nag
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nagios.d/mosquitto $(1)/etc/nagios.d/mosquitto.nag
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nagios.d/ssh $(1)/etc/nagios.d/ssh.nag
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nagios.d/zwaved $(1)/etc/nagios.d/zwaved.nag
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/mqttnagios $(1)/etc/crontabs/mqttnagios
echo '/5 * * * * /usr/sbin/check_client_id' >> $(1)/etc/crontabs/root
endef
define Package/all4-alleato-tools/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/opt/alleato
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/house $(1)/etc/init.d/house
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/rulesd $(1)/etc/init.d/rulesd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/alleato_tools $(1)/usr/bin/alleato_tools
endef
######################################################
$(eval $(call BuildPackage,alleato3))
$(eval $(call BuildPackage,zwaved))
$(eval $(call BuildPackage,zwave-mgr))
$(eval $(call BuildPackage,zwave-profiler))
$(eval $(call BuildPackage,alleato-scheduler))
$(eval $(call BuildPackage,alleato-boxconfig))
$(eval $(call BuildPackage,all-omc))
$(eval $(call BuildPackage,ubus-kicker))
$(eval $(call BuildPackage,mqttnagios))
$(eval $(call BuildPackage,all4-alleato-tools))

View File

@@ -1,135 +0,0 @@
AJ_SERVICE:=config
AJ_SERVICE_NAME:=Config
include $(TOPDIR)/rules.mk
PKG_NAME:=alljoyn-$(AJ_SERVICE)
PKG_BASE_VERSION:=14.12
PKG_PATCHLEVEL:=.00
PKG_RELEASE:=1
PKG_MD5SUM:=389c2623619281e6849da25cee7e1bb7
PKG_VERSION:=$(PKG_BASE_VERSION)$(PKG_PATCHLEVEL)
PKG_TARBALL_VERSION:=$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/alljoyn-services-$(PKG_TARBALL_VERSION)-src
PKG_SOURCE:=alljoyn-services-$(PKG_TARBALL_VERSION)-src.tar.gz
PKG_SOURCE_URL:=https://allseenalliance.org/releases/alljoyn/$(PKG_BASE_VERSION)/
# SCons supports parallel builds but does not support make's jobserver
PKG_BUILD_PARALLEL:=$(if $(CONFIG_PKG_BUILD_USE_JOBSERVER),0,1)
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)-samples
include $(INCLUDE_DIR)/package.mk
ifneq ($(CONFIG_CCACHE),)
TARGET_CC=$(TARGET_CC_NOCACHE)
TARGET_CXX=$(TARGET_CXX_NOCACHE)
endif
ALLJOYN_BINDINGS:=cpp,
ALLJOYN_BUILD_SERVICES_SAMPLES:=off
define Package/$(PKG_NAME)
TITLE:=AllJoyn $(AJ_SERVICE_NAME) service library
SECTION:=net
CATEGORY:=Network
DEPENDS:=alljoyn \
+alljoyn-about
URL:=http://www.allseenalliance.org
MAINTAINER:=AllSeen Alliance <allseen-core@lists.allseenalliance.org>
MENU:=1
endef
define Package/$(PKG_NAME)/description
AllJoyn $(AJ_SERVICE_NAME) service library.
endef
define Package/$(PKG_NAME)-samples
$(call Package/$(PKG_NAME))
TITLE+=- testing samples
DEPENDS:=$(PKG_NAME) \
+alljoyn-services_common
MENU:=0
endef
define Package/$(PKG_NAME)-samples/description
Alljoyn $(AJ_SERVICE_NAME) service library samples. (This is primarily for testing.
The contents of this package vary according which other alljoyn packages
are selected.)
endef
ifeq ($(CONFIG_DEBUG),y)
ALLJOYN_BUILD_VARIANT:=debug
else
ALLJOYN_BUILD_VARIANT:=release
endif
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE)/build/openwrt/openwrt/$(ALLJOYN_BUILD_VARIANT)/dist/$(AJ_SERVICE)
TARGET_CFLAGS+=-fPIC
TARGET_CPPFLAGS+=-fPIC
ifdef CONFIG_PACKAGE_$(PKG_NAME)-samples
ifdef CONFIG_PACKAGE_alljoyn-about
ALLJOYN_BUILD_SERVICES_SAMPLES:=on
endif
endif
define Build/Configure/Default
# Override default to do nothing
endef
define Build/Compile
scons -C $(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE) \
$(PKG_JOBS) \
WS=off \
CPU=openwrt \
OS=openwrt \
"BINDINGS=$(ALLJOYN_BINDINGS)" \
"BUILD_SERVICES_SAMPLES=$(ALLJOYN_BUILD_SERVICES_SAMPLES)" \
"VARIANT=$(ALLJOYN_BUILD_VARIANT)" \
BR=off \
BT=off \
ICE=off \
"TARGET_CC=$$(TARGET_CC)" \
"TARGET_CXX=$$(TARGET_CXX)" \
"TARGET_CFLAGS=$$(TARGET_CFLAGS)" \
"TARGET_CPPFLAGS=$$(TARGET_CPPFLAGS)" \
"TARGET_PATH=$$(TARGET_PATH)" \
"TARGET_LINKFLAGS=$$(TARGET_LDFLAGS)" \
"TARGET_LINK=$$(TARGET_CC)" \
"TARGET_AR=$$(TARGET_AR)" \
"TARGET_RANLIB=$$(TARGET_RANLIB)" \
"STAGING_DIR=$$(STAGING_DIR)"
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(CP) $(PKG_INSTALL_DIR)/inc/alljoyn/$(AJ_SERVICE)/*.h $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
define Package/$(PKG_NAME)-samples/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/* $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/alljoyn-config
$(CP) $(PKG_BUILD_DIR)/services/base/config/cpp/samples/ConfigServiceSample/ConfigService.conf $(1)/etc/alljoyn-config/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)-samples))

View File

@@ -1,133 +0,0 @@
AJ_SERVICE:=controlpanel
AJ_SERVICE_NAME:=ControlPanel
include $(TOPDIR)/rules.mk
PKG_NAME:=alljoyn-$(AJ_SERVICE)
PKG_BASE_VERSION:=14.12
PKG_PATCHLEVEL:=.00
PKG_RELEASE:=1
PKG_MD5SUM:=389c2623619281e6849da25cee7e1bb7
PKG_VERSION:=$(PKG_BASE_VERSION)$(PKG_PATCHLEVEL)
PKG_TARBALL_VERSION:=$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/alljoyn-services-$(PKG_TARBALL_VERSION)-src
PKG_SOURCE:=alljoyn-services-$(PKG_TARBALL_VERSION)-src.tar.gz
PKG_SOURCE_URL:=https://allseenalliance.org/releases/alljoyn/$(PKG_BASE_VERSION)/
# SCons supports parallel builds but does not support make's jobserver
PKG_BUILD_PARALLEL:=$(if $(CONFIG_PKG_BUILD_USE_JOBSERVER),0,1)
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)-samples
include $(INCLUDE_DIR)/package.mk
ifneq ($(CONFIG_CCACHE),)
TARGET_CC=$(TARGET_CC_NOCACHE)
TARGET_CXX=$(TARGET_CXX_NOCACHE)
endif
ALLJOYN_BINDINGS:=cpp,
ALLJOYN_BUILD_SERVICES_SAMPLES:=off
define Package/$(PKG_NAME)
TITLE:=AllJoyn $(AJ_SERVICE_NAME) service library
SECTION:=net
CATEGORY:=Network
DEPENDS:=alljoyn
URL:=http://www.allseenalliance.org
MAINTAINER:=AllSeen Alliance <allseen-core@lists.allseenalliance.org>
MENU:=1
endef
define Package/$(PKG_NAME)/description
AllJoyn $(AJ_SERVICE_NAME) service library.
endef
define Package/$(PKG_NAME)-samples
$(call Package/$(PKG_NAME))
TITLE+=- testing samples
DEPENDS:=$(PKG_NAME) \
+alljoyn-about \
+alljoyn-notification \
+alljoyn-services_common
MENU:=0
endef
define Package/$(PKG_NAME)-samples/description
Alljoyn $(AJ_SERVICE_NAME) service library samples. (This is primarily for testing.
The contents of this package vary according which other alljoyn packages
are selected.)
endef
ifeq ($(CONFIG_DEBUG),y)
ALLJOYN_BUILD_VARIANT:=debug
else
ALLJOYN_BUILD_VARIANT:=release
endif
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE)/build/openwrt/openwrt/$(ALLJOYN_BUILD_VARIANT)/dist/$(AJ_SERVICE)
TARGET_CFLAGS+=-fPIC
TARGET_CPPFLAGS+=-fPIC
ifdef CONFIG_PACKAGE_$(PKG_NAME)-samples
ifdef CONFIG_PACKAGE_alljoyn-about
ALLJOYN_BUILD_SERVICES_SAMPLES:=on
endif
endif
define Build/Configure/Default
# Override default to do nothing
endef
define Build/Compile
scons -C $(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE) \
$(PKG_JOBS) \
WS=off \
CPU=openwrt \
OS=openwrt \
"BINDINGS=$(ALLJOYN_BINDINGS)" \
"BUILD_SERVICES_SAMPLES=$(ALLJOYN_BUILD_SERVICES_SAMPLES)" \
"VARIANT=$(ALLJOYN_BUILD_VARIANT)" \
BR=off \
BT=off \
ICE=off \
"TARGET_CC=$$(TARGET_CC)" \
"TARGET_CXX=$$(TARGET_CXX)" \
"TARGET_CFLAGS=$$(TARGET_CFLAGS)" \
"TARGET_CPPFLAGS=$$(TARGET_CPPFLAGS)" \
"TARGET_PATH=$$(TARGET_PATH)" \
"TARGET_LINKFLAGS=$$(TARGET_LDFLAGS)" \
"TARGET_LINK=$$(TARGET_CC)" \
"TARGET_AR=$$(TARGET_AR)" \
"TARGET_RANLIB=$$(TARGET_RANLIB)" \
"STAGING_DIR=$$(STAGING_DIR)"
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(CP) $(PKG_INSTALL_DIR)/inc/alljoyn/$(AJ_SERVICE)/*.h $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
define Package/$(PKG_NAME)-samples/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/* $(1)/usr/bin/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)-samples))

View File

@@ -1,132 +0,0 @@
AJ_SERVICE:=notification
AJ_SERVICE_NAME:=Notification
include $(TOPDIR)/rules.mk
PKG_NAME:=alljoyn-$(AJ_SERVICE)
PKG_BASE_VERSION:=14.12
PKG_PATCHLEVEL:=.00
PKG_RELEASE:=1
PKG_MD5SUM:=389c2623619281e6849da25cee7e1bb7
PKG_VERSION:=$(PKG_BASE_VERSION)$(PKG_PATCHLEVEL)
PKG_TARBALL_VERSION:=$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/alljoyn-services-$(PKG_TARBALL_VERSION)-src
PKG_SOURCE:=alljoyn-services-$(PKG_TARBALL_VERSION)-src.tar.gz
PKG_SOURCE_URL:=https://allseenalliance.org/releases/alljoyn/$(PKG_BASE_VERSION)/
# SCons supports parallel builds but does not support make's jobserver
PKG_BUILD_PARALLEL:=$(if $(CONFIG_PKG_BUILD_USE_JOBSERVER),0,1)
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)-samples
include $(INCLUDE_DIR)/package.mk
ifneq ($(CONFIG_CCACHE),)
TARGET_CC=$(TARGET_CC_NOCACHE)
TARGET_CXX=$(TARGET_CXX_NOCACHE)
endif
ALLJOYN_BINDINGS:=cpp,
ALLJOYN_BUILD_SERVICES_SAMPLES:=off
define Package/$(PKG_NAME)
TITLE:=AllJoyn $(AJ_SERVICE_NAME) service library
SECTION:=net
CATEGORY:=Network
DEPENDS:=alljoyn \
+alljoyn-about
URL:=http://www.allseenalliance.org
MAINTAINER:=AllSeen Alliance <allseen-core@lists.allseenalliance.org>
MENU:=1
endef
define Package/$(PKG_NAME)/description
AllJoyn $(AJ_SERVICE_NAME) service library.
endef
define Package/$(PKG_NAME)-samples
$(call Package/$(PKG_NAME))
TITLE+=- testing samples
DEPENDS:=$(PKG_NAME) \
+alljoyn-services_common
MENU:=0
endef
define Package/$(PKG_NAME)-samples/description
Alljoyn $(AJ_SERVICE_NAME) service library samples. (This is primarily for testing.
The contents of this package vary according which other alljoyn packages
are selected.)
endef
ifeq ($(CONFIG_DEBUG),y)
ALLJOYN_BUILD_VARIANT:=debug
else
ALLJOYN_BUILD_VARIANT:=release
endif
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE)/build/openwrt/openwrt/$(ALLJOYN_BUILD_VARIANT)/dist/$(AJ_SERVICE)
TARGET_CFLAGS+=-fPIC
TARGET_CPPFLAGS+=-fPIC
ifdef CONFIG_PACKAGE_$(PKG_NAME)-samples
ifdef CONFIG_PACKAGE_alljoyn-about
ALLJOYN_BUILD_SERVICES_SAMPLES:=on
endif
endif
define Build/Configure/Default
# Override default to do nothing
endef
define Build/Compile
scons -C $(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE) \
$(PKG_JOBS) \
WS=off \
CPU=openwrt \
OS=openwrt \
"BINDINGS=$(ALLJOYN_BINDINGS)" \
"BUILD_SERVICES_SAMPLES=$(ALLJOYN_BUILD_SERVICES_SAMPLES)" \
"VARIANT=$(ALLJOYN_BUILD_VARIANT)" \
BR=off \
BT=off \
ICE=off \
"TARGET_CC=$$(TARGET_CC)" \
"TARGET_CXX=$$(TARGET_CXX)" \
"TARGET_CFLAGS=$$(TARGET_CFLAGS)" \
"TARGET_CPPFLAGS=$$(TARGET_CPPFLAGS)" \
"TARGET_PATH=$$(TARGET_PATH)" \
"TARGET_LINKFLAGS=$$(TARGET_LDFLAGS)" \
"TARGET_LINK=$$(TARGET_CC)" \
"TARGET_AR=$$(TARGET_AR)" \
"TARGET_RANLIB=$$(TARGET_RANLIB)" \
"STAGING_DIR=$$(STAGING_DIR)"
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(CP) $(PKG_INSTALL_DIR)/inc/alljoyn/$(AJ_SERVICE)/*.h $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
define Package/$(PKG_NAME)-samples/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/* $(1)/usr/bin/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)-samples))

View File

@@ -1,160 +0,0 @@
AJ_SERVICE:=onboarding
AJ_SERVICE_NAME:=onboarding
include $(TOPDIR)/rules.mk
PKG_NAME:=alljoyn-$(AJ_SERVICE)
PKG_BASE_VERSION:=14.12
PKG_PATCHLEVEL:=.00
PKG_RELEASE:=1
PKG_MD5SUM:=389c2623619281e6849da25cee7e1bb7
PKG_VERSION:=$(PKG_BASE_VERSION)$(PKG_PATCHLEVEL)
PKG_TARBALL_VERSION:=$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/alljoyn-services-$(PKG_TARBALL_VERSION)-src
PKG_SOURCE:=alljoyn-services-$(PKG_TARBALL_VERSION)-src.tar.gz
PKG_SOURCE_URL:=https://allseenalliance.org/releases/alljoyn/$(PKG_BASE_VERSION)/
# SCons supports parallel builds but does not support make's jobserver
PKG_BUILD_PARALLEL:=$(if $(CONFIG_PKG_BUILD_USE_JOBSERVER),0,1)
include $(INCLUDE_DIR)/package.mk
ifneq ($(CONFIG_CCACHE),)
TARGET_CC=$(TARGET_CC_NOCACHE)
TARGET_CXX=$(TARGET_CXX_NOCACHE)
endif
ALLJOYN_BINDINGS:=cpp,
# Due to inherited dependencies (onboarding package depends on wpa-cli package and therefore inherits its dependencies)
# the onboarding package will not be visible for selection unless the wpa-supplicant package is first selected
define Package/$(PKG_NAME)
TITLE:=AllJoyn $(AJ_SERVICE_NAME) service library
SECTION:=net
CATEGORY:=Network
DEPENDS:=alljoyn \
wpa-supplicant \
+alljoyn-about \
+alljoyn-config \
+alljoyn-services_common \
+hostapd \
+wpa-cli
URL:=http://www.allseenalliance.org
MAINTAINER:=AllSeen Alliance <allseen-core@lists.allseenalliance.org>
endef
define Package/$(PKG_NAME)/description
AllJoyn $(AJ_SERVICE_NAME) service.
endef
ifeq ($(CONFIG_DEBUG),y)
ALLJOYN_BUILD_VARIANT:=debug
else
ALLJOYN_BUILD_VARIANT:=release
endif
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE)/build/openwrt/openwrt/$(ALLJOYN_BUILD_VARIANT)/dist/$(AJ_SERVICE)
TARGET_CFLAGS+=-fPIC
TARGET_CPPFLAGS+=-fPIC
TARGET_LDFLAGS+=-lpthread -lrt
define Build/Configure/Default
# Override default to do nothing
endef
define Build/Compile
scons -C $(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE) \
$(PKG_JOBS) \
WS=off \
CPU=openwrt \
OS=openwrt \
"BINDINGS=$(ALLJOYN_BINDINGS)" \
"BUILD_SERVICES_SAMPLES=off" \
"VARIANT=$(ALLJOYN_BUILD_VARIANT)" \
BR=off \
BT=off \
ICE=off \
"TARGET_CC=$$(TARGET_CC)" \
"TARGET_CXX=$$(TARGET_CXX)" \
"TARGET_CFLAGS=$$(TARGET_CFLAGS)" \
"TARGET_CPPFLAGS=$$(TARGET_CPPFLAGS)" \
"TARGET_PATH=$$(TARGET_PATH)" \
"TARGET_LINKFLAGS=$$(TARGET_LDFLAGS)" \
"TARGET_LINK=$$(TARGET_CC)" \
"TARGET_AR=$$(TARGET_AR)" \
"TARGET_RANLIB=$$(TARGET_RANLIB)" \
"STAGING_DIR=$$(STAGING_DIR)"
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(CP) $(PKG_INSTALL_DIR)/inc/alljoyn/$(AJ_SERVICE)/*.h $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/onboarding-daemon $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/alljoyn-onboarding.init $(1)/etc/init.d/alljoyn-onboarding
$(INSTALL_BIN) ./files/alljoyn-onboarding-reload.init $(1)/etc/init.d/alljoyn-onboarding-reload
$(INSTALL_BIN) ./files/wifi_scan.init $(1)/etc/init.d/wifi_scan
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/alljoyn-onboarding.defaults $(1)/etc/uci-defaults/alljoyn-onboarding
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/alljoyn-onboarding.config $(1)/etc/config/alljoyn-onboarding
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/wifi_scan $(1)/usr/sbin/wifi_scan
$(INSTALL_BIN) ./files/parse_iw_wifi_scan $(1)/usr/sbin/parse_iw_wifi_scan
$(INSTALL_BIN) ./files/parse_iwlist_wifi_scan $(1)/usr/sbin/parse_iwlist_wifi_scan
$(INSTALL_BIN) ./files/wifi_mgmt $(1)/usr/sbin/wifi_mgmt
$(INSTALL_DIR) $(1)/etc/alljoyn-onboarding
$(INSTALL_CONF) ./files/alljoyn-onboarding.state $(1)/etc/alljoyn-onboarding/alljoyn-onboarding-state
$(CP) $(PKG_BUILD_DIR)/services/base/onboarding/cpp/src/OnboardingDaemon/OnboardingService.conf $(1)/etc/alljoyn-onboarding/
$(CP) $(PKG_BUILD_DIR)/services/base/onboarding/cpp/src/OnboardingDaemon/FactoryOnboardingService.conf $(1)/etc/alljoyn-onboarding/
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
. /etc/uci-defaults/alljoyn-onboarding
rm -f /etc/uci-defaults/alljoyn-onboarding
fi
exit 0
endef
define Package/$(PKG_NAME)/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/alljoyn-onboarding stop
/etc/init.d/alljoyn-onboarding disable
/etc/init.d/wifi_scan disable
/etc/init.d/alljoyn-onboarding-reload disable
crontab -l 2>/dev/null | sed '/\/etc\/init.d\/alljoyn-onboarding/d' | crontab -
crontab -l 2>/dev/null | sed '/\/usr\/sbin\/wifi_scan/d' | crontab -
local obswifiIndex=$(uci show /etc/config/firewall | grep obswifi | grep name | cut -d"[" -f2 | cut -c1)
uci delete firewall.@zone[$(obswifiIndex)]
uci commit firewall
uci batch <<EOF
del_list ucitrack.@alljoyn[-1].affects=alljoyn-onboarding
delete ucitrack.@alljoyn-onboarding[-1]
commit ucitrack
EOF
fi
exit 0
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,87 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2013 - 2014, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
START=58
RADIO_24G=
find_2_4_radio() {
local cfg=$1
#list of known wireless protocols
local validModes="11b 11g 11a 11ng 11na"
# get the current hwmode
local hwmode
config_get hwmode "$cfg" hwmode
# verify that the hwmode is one of the valid modes
local hasMode=`echo "$validModes" | grep $hwmode`
if [ -n "$hasMode" ]; then
RADIO_24G=$cfg
fi
}
APVAP_24G=
find_2_4_apvap() {
local cfg=$1
local radio=$2
local mode
config_get mode "$cfg" mode
local device
config_get device "$cfg" device
[ "$mode" = "ap" -a "$device" = "$radio" ] && \
APVAP_24G="$cfg"
}
start() {
config_load alljoyn-onboarding
local state
state=$(uci_get alljoyn-onboarding @onboarding[0] state)
[ "${state}" = "3" ] && return 0
local iface=$(cat /proc/net/wireless | grep -m 1 : | sed -e 's/:.*//' | sed -e 's/ //g')
local macaddr=$(cat /sys/class/net/$iface/address)
# save the ssid in case it gets overwritten and we need it again
uci_set alljoyn-onboarding @onboarding[0] apssid "AJ_OpenWRT ${macaddr}"
uci_commit alljoyn-onboarding
config_load wireless
config_foreach find_2_4_radio wifi-device
[ -z "${RADIO_24G}" ] && {
echo "Error: No 2.4GHz radio found"
return 1
}
config_foreach find_2_4_apvap wifi-iface ${RADIO_24G}
[ -z "${APVAP_24G}" ] && {
echo "Error: No 2.4GHz AP VAP found"
return 1
}
# Ok, now we start setting the configuration parameters
uci_set wireless ${RADIO_24G} disabled 0
uci_set wireless ${RADIO_24G} channel 6
uci_set wireless ${APVAP_24G} ssid "AJ_OpenWRT ${macaddr}"
uci_commit wireless
wifi
# Add other appropriate tasks when device is not fully configured
}

View File

@@ -1,15 +0,0 @@
# Option Values:
#
# option apssid The access point name as seen by the onboarder application.
# Note: In order for Alljoyn to detect the access point the name must start with prefix 'AJ_'
# option apencryption The cypher mode
# For the full list refer to http://wiki.openwrt.org/doc/uci/wireless#wpa.modes
# Example - WPA2 would be: option apencryption 'psk2+tkip+ccmp'
# option apkey Cypher key for connecting to the access point
# option aphidden Determines whether the softAp will be hidden or broadcast. Default is 0 - not hidden
config onboarding
option apssid 'AJ_OpenWRT'
option apencryption 'none'
option apkey ''
option aphidden '0'

View File

@@ -1,33 +0,0 @@
#! /bin/sh
local hasOnboarding=$(uci get ucitrack.@alljoyn-onboarding[-1] 2> /dev/null)
if [ -z "$hasOnboarding" ]; then
uci batch <<EOF
add ucitrack alljoyn-onboarding
set ucitrack.@alljoyn-onboarding[-1].init=alljoyn-onboarding
add_list ucitrack.@alljoyn[-1].affects=alljoyn-onboarding
commit ucitrack
EOF
fi
uci batch <<EOF
set wireless.@wifi-device[-1].disabled=0
set wireless.@wifi-iface[-1].disabled=0
commit wireless
EOF
local hasObswifi=$(uci show /etc/config/firewall | grep obswifi)
if [ -z "$hasObswifi" ]; then
uci batch <<EOF
add firewall zone
set firewall.@zone[-1].name=obswifi
add_list firewall.@zone[-1].network='obswifi'
set firewall.@zone[-1].input=ACCEPT
set firewall.@zone[-1].output=ACCEPT
set firewall.@zone[-1].forward=ACCEPT
commit firewall
EOF
fi
/etc/init.d/alljoyn-onboarding enable
/etc/init.d/wifi_scan enable
/etc/init.d/alljoyn-onboarding-reload enable
crontab -l 2>/dev/null | sed '/\/etc\/init.d\/alljoyn-onboarding/d' | echo '*/1 * * * * /etc/init.d/alljoyn-onboarding poll_connection' | crontab -
/etc/init.d/cron enable
exit 0

View File

@@ -1,199 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2013 - 2014, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
. /usr/sbin/wifi_mgmt
START=66
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
CONFIGFILE=/etc/alljoyn-onboarding/OnboardingService.conf
FACTORYCONFIGFILE=/etc/alljoyn-onboarding/FactoryOnboardingService.conf
EXTRA_COMMANDS="state error connect softap offboard configure validate reset retry poll_connection"
EXTRA_HELP=<<EOF
state Get onboarding state
error Get onboarding error
connect Connect to AP with provided configuration
softap Disconnect from AP and enable soft AP
offboard softap + wipe configuration
configure Configure device with personal AP credentials
validate Validate the provided configuration
reset Reset the radio
retry Enter SoftAP mode temporarily to allow reconfig
poll_connection Poll the status of the connection
EOF
STATE_NOTCONFIGURED=0
STATE_CONFIGURED=1
STATE_VALIDATING=2
STATE_VALIDATED=3
STATE_ERROR=4
STATE_RETRY=5
boot() {
local obswifi=$(uci get network.obswifi)
if [ -z "$obswifi" ]; then
uci set network.obswifi=interface
uci set network.obswifi.proto=dhcp
uci commit network
/etc/init.d/network reload
fi
start
}
start() {
cache_state
cache_error
connect
service_start /usr/bin/onboarding-daemon --config-file=$CONFIGFILE --factory-config-file=$FACTORYCONFIGFILE
}
stop() {
service_stop /usr/bin/onboarding-daemon
}
state() {
return $(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].state)
}
error() {
return $(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].lasterrorcode)
}
connect() {
local state="$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].state)"
if [ ${state} -eq $STATE_NOTCONFIGURED ]; then
return
fi
if [ ${state} -eq $STATE_CONFIGURED ] || [ ${state} -eq $STATE_ERROR ]; then
validate
return
fi
if [ ${state} -eq $STATE_VALIDATING ]; then
retries=2
else
retries=$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].connect_retry_max)
fi
local status=$ERROR_NONE
while [ $retries -gt 0 ]; do
wifi_connect
sleep 2
wifi_connect_status
status=$?
echo "status: $status"
if [ ${status} -eq $ERROR_NONE ]; then
set_state $STATE_VALIDATED
return $status
else
retries=$((--retries))
fi
done
if [ ${state} -eq $STATE_VALIDATED ] || [ ${state} -eq $STATE_RETRY ]; then
if [ $(ps -w | grep "/etc/init.d/alljoyn-onboarding retry" | grep -v "grep" | wc -l) -eq 0 ]; then
/etc/init.d/alljoyn-onboarding retry &
status=$((status+8)) # set a bit saying we are in retry
fi
elif [ ${state} -eq ${STATE_VALIDATING} ]; then
set_state $STATE_ERROR
softap
fi
return $status
}
offboard() {
set_state $STATE_NOTCONFIGURED
softap
uci delete alljoyn-onboarding.@onboarding[0].ssid
uci delete alljoyn-onboarding.@onboarding[0].encryption
uci delete alljoyn-onboarding.@onboarding[0].key
uci commit alljoyn-onboarding
set_error $ERROR_NONE "Unconfigured"
}
softap() {
wifi_softap
}
reset() {
wifi_reset
}
retry() {
echo "STATE_RETRY"
set_state $STATE_RETRY
local retry_duration="$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].config_retry_duration)"
softap
sleep $retry_duration
local state="$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].state)"
if [ ${state} -eq $STATE_RETRY ]; then
/etc/init.d/alljoyn-onboarding connect &
fi
}
configure() {
local codeoption="-p"
if [ "$2" = "WEP" ]; then
codeoption="-k"
fi
wifi_configure -s "$1" -a "$2" $codeoption "$3"
set_state $STATE_CONFIGURED
}
validate() {
set_state $STATE_VALIDATING
connect
}
set_state() {
uci set -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].state=$1
uci commit -c /etc/alljoyn-onboarding alljoyn-onboarding-state
cache_state $1
}
cache_state(){
local state="$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].state)"
printf '%d\n' "$state" > /tmp/state/alljoyn-onboarding
}
cache_error() {
local code=$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].lasterrorcode)
local msg=$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].lasterrormsg)
printf '%s\n%s' "$code" "$msg" > /tmp/state/alljoyn-onboarding-lasterror
}
poll_connection() {
local state="$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].state)"
if [ ${state} -eq $STATE_VALIDATED ]; then
wifi_connect_status
local status=$?
if [ ${status} -ne $ERROR_NONE ]; then
## check state again in case it changed since last get
state="$(uci get -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].state)"
if [ ${state} -ne $STATE_VALIDATED ]; then
return
fi
/etc/init.d/alljoyn-onboarding connect &
fi
fi
}

View File

@@ -1,6 +0,0 @@
config onboarding
option state '0'
option lasterrorcode '0'
option lasterrormsg 'Unconfigured'
option config_retry_duration '180'
option connect_retry_max '2'

View File

@@ -1,89 +0,0 @@
#!/bin/sh
# Copyright (c) 2014, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
device=`iw dev | grep Interface | cut -f 2 -s -d" "`
# Sometimes right after boot, the device is not ready yet
if [ -n $device ]; then
iw $device scan |
grep -e "^BSS" -e "signal:" -e "SSID:" -e "capability:" -e "RSN:" -e "WPA:" -e "Pairwise ciphers" -e "Authentication suites" |
{
while read -r line; do
case "$line" in
BSS* )
## Handling a new SSID. Print out previously processed SSID only if it is defined.
## Note the different syntax based on WPA/WPA2 VS Open or WEP
if [ "$enc" == "Open" ] || [ "$enc" == "WEP" ]; then
printf "%s\t%s\t%s\n" "$quality" "$enc" "$ssid"
elif [ -n "$ssid" ]; then
printf "%s\t%s-%s-%s-%s\t%s\n" "$quality" "$enc" "$ccmp" "$tkip" "$psk" "$ssid"
fi
## Initialize the variables
ssid=""
enc="Open"
ccmp=""
tkip=""
psk=""
quality=""
;;
SSID:* )
## Set the ssid variable
ssid=$(echo "$line" | sed s/"SSID: "//)
;;
signal:* )
## Set signal quality variable
quality=$(echo "$line" | sed s/"signal: "//)
;;
capability:* )
## Encryption is on. We assume it's WEP by default, if we later find out it's WPA or WPA2 we override it
if [ $(echo $line | grep "Privacy" | wc -l) -ne 0 ]; then
enc="WEP"
fi
;;
RSN:* )
## Set Encryption to be WPA2
enc="WPA2"
;;
WPA* )
enc="WPA"
;;
"* Pairwise ciphers:"* )
## Set the appropriate cipher variables
if [ $(echo $line | grep "CCMP" | wc -l) -ne 0 ]; then
ccmp="CCMP"
fi
if [ $(echo $line | grep "TKIP" | wc -l) -ne 0 ]; then
tkip="TKIP"
fi
;;
"* Authentication suites:"* )
## Set the appropriate Authentication Suite variable
if [ $(echo $line | grep "PSK" | wc -l) -ne 0 ]; then
psk="PSK";
fi
;;
* ) ;;
esac
done
if [ "$enc" == "Open" ] || [ "$enc" == "WEP" ]; then
printf "%s\t%s\t%s\n" "$quality" "$enc" "$ssid"
elif [ -n "$ssid" ]; then
printf "%s\t%s-%s-%s-%s\t%s\n" "$quality" "$enc" "$ccmp" "$tkip" "$psk" "$ssid"
fi
}
fi

View File

@@ -1,83 +0,0 @@
#!/bin/sh
# Copyright (c) 2014, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
iwlist scanning 2> /dev/null |
grep -e "Quality=" -e "ESSID:" -e "Encryption key:on" -e "IE:" -e "Pairwise Ciphers" -e "Authentication Suites" |
{
while read -r line; do
case "$line" in
ESSID:\"* )
## Handling a new SSID. Print out previously processed SSID only if it is defined.
## Note the different syntax based on WPA/WPA2 VS Open or WEP
if [ "$enc" == "Open" ] || [ "$enc" == "WEP" ]; then
printf "%s\t%s\t%s\n" "$quality" "$enc" "$ssid"
elif [ -n "$ssid" ]; then
printf "%s\t%s-%s-%s-%s\t%s\n" "$quality" "$enc" "$ccmp" "$tkip" "$psk" "$ssid"
fi
## Initialize the variables
ssid=$(echo "${line%?}" | sed s/ESSID:\"//)
enc="Open"
ccmp=""
tkip=""
psk=""
quality=""
;;
Quality=* )
## Set signal quality variables
quality=$(echo "$line" | sed s/.*"Signal level="// | sed s/" dBm".*/" dBm"/)
;;
Encryption* )
## Encryption is on. We assume it's WEP by default, if we later find out it's WPA or WPA2 we override it
enc="WEP"
;;
IE:* )
## Set Encryption to be WPA or WPA2
case "$line" in
*WPA2* )
enc="WPA2"
;;
*WPA* )
enc="WPA"
;;
esac
;;
Pairwise* )
## Set the appropriate cipher variables
if [ $(echo $line | grep "CCMP" | wc -l) -ne 0 ]; then
ccmp="CCMP"
fi
if [ $(echo $line | grep "TKIP" | wc -l) -ne 0 ]; then
tkip="TKIP"
fi
;;
Authentication* )
## Set the appropriate Authentication Suite variable
if [ $(echo $line | grep "PSK" | wc -l) -ne 0 ]; then
psk="PSK";
fi
;;
* ) ;;
esac
done
if [ "$enc" == "Open" ] || [ "$enc" == "WEP" ]; then
printf "%s\t%s\t%s\n" "$quality" "$enc" "$ssid"
elif [ -n "$ssid" ]; then
printf "%s\t%s-%s-%s-%s\t%s\n" "$quality" "$enc" "$ccmp" "$tkip" "$psk" "$ssid"
fi
}

View File

@@ -1,337 +0,0 @@
#!/bin/sh
# Copyright (c) 2013 - 2014, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
. /lib/config/uci.sh
. /usr/share/libubox/jshn.sh
DEBUG=
ERROR_NONE=0
ERROR_UNREACHABLE=1
ERROR_PROTOCOL=2
ERROR_UNAUTHORIZED=3
ERROR_GENERAL=4
WPA_CLI() {
local iface=$1;shift
local opt
case ${iface} in
global) opt="-g /var/run/wpa_supplicant-${iface}" ;;
*) opt="-p /var/run/wpa_supplicant-${iface} -i ${iface}";;
esac
if [ -n "${DEBUG}" ]; then
echo wpa_cli ${opt} "$@" >&2
wpa_cli ${opt} "$@" || exit 2
return 0
fi
wpa_cli ${opt} "$@" >/dev/null 2>&1 || exit 2
}
wifi_connect() {
local ssid=$(uci get alljoyn-onboarding.@onboarding[0].ssid)
local encryption=$(uci get alljoyn-onboarding.@onboarding[0].encryption)
local key=$(uci get alljoyn-onboarding.@onboarding[0].key)
if [ "$encryption" = "wep" ]; then
local getwepkey="uci get alljoyn-onboarding.@onboarding[0].key$key"
uci set wireless.@wifi-iface[0].key$key="$($getwepkey)"
fi
uci set wireless.@wifi-iface[0].mode=sta
uci set wireless.@wifi-iface[0].network=obswifi
uci set wireless.@wifi-iface[0].ssid="$ssid"
uci set wireless.@wifi-iface[0].key="$key"
uci set wireless.@wifi-iface[0].encryption=$encryption
uci delete wireless.@wifi-iface[0].hidden
uci commit wireless
wifi
# when in station mode, set the scan_wifi cron job to run every hour
/etc/init.d/cron stop
sed -i '/\/usr\/sbin\/wifi_scan/d' /etc/crontabs/root
echo '1 * * * * /usr/sbin/wifi_scan' >> /etc/crontabs/root
/etc/init.d/cron start
}
wifi_softap() {
local ssid=$(uci get alljoyn-onboarding.@onboarding[0].apssid)
local encryption=$(uci get alljoyn-onboarding.@onboarding[0].apencryption)
local key=$(uci get alljoyn-onboarding.@onboarding[0].apkey)
local hidden=$(uci get alljoyn-onboarding.@onboarding[0].aphidden)
uci set wireless.@wifi-iface[0].mode=ap
uci set wireless.@wifi-iface[0].network=lan
uci set wireless.@wifi-iface[0].ssid="$ssid"
uci set wireless.@wifi-iface[0].key="$key"
uci set wireless.@wifi-iface[0].encryption=$encryption
uci set wireless.@wifi-iface[0].hidden=$hidden
uci commit wireless
wifi
# when in soft ap mode, set the scan_wifi cron job to run every 15 minutes
/etc/init.d/cron stop
sed -i '/\/usr\/sbin\/wifi_scan/d' /etc/crontabs/root
echo '*/15 * * * * /usr/sbin/wifi_scan' >> /etc/crontabs/root
/etc/init.d/cron start
}
wifi_reset() {
wifi
}
wifi_configure_commit() {
uci set alljoyn-onboarding.@onboarding[0].ssid="$1"
uci set alljoyn-onboarding.@onboarding[0].encryption="$2"
if [ "$2" = "wep" ]; then
uci set alljoyn-onboarding.@onboarding[0].key="$5"
uci set alljoyn-onboarding.@onboarding[0].key$5="$4"
else
uci set alljoyn-onboarding.@onboarding[0].key="$3"
fi
uci commit alljoyn-onboarding
}
wifi_connect_status() {
ifstatus=$(ifstatus obswifi)
json_load "$ifstatus"
json_get_var iface device
local timeout=4
local result=$ERROR_UNREACHABLE
local conn_state=0
if [ -z $iface ]; then
echo "Device not defined for obswifi" >&2
set_error $ERROR_UNREACHABLE "Unreachable"
return $result
fi
while [ ${timeout} -gt 0 ]; do
sleep 1
ctrl_iface=$(grep ctrl_interface /var/run/wpa_supplicant-${iface}.conf | sed s/ctrl_interface=//)
if [ -z "${ctrl_iface}" ]; then
conn_state=$(wpa_cli -i ${iface} status 2>/dev/null | grep wpa_state | cut -d= -f2)
else
conn_state=$(wpa_cli -i ${iface} -p ${ctrl_iface} status 2>/dev/null | grep wpa_state | cut -d= -f2)
fi
echo ${conn_state} >&2
if [ "${conn_state}" = "COMPLETED" ]; then
result=$ERROR_NONE
set_error $ERROR_NONE "Validated"
return $result
elif [ "${conn_state}" = "SCANNING" ]; then
result=$ERROR_UNREACHABLE
set_error $ERROR_UNREACHABLE "Unreachable"
elif [ "${conn_state}" = "4WAY_HANDSHAKE" ]; then
set_error $ERROR_UNAUTHORIZED "Unauthorized - 4WAY_HANDSHAKE timeout"
result=$ERROR_UNAUTHORIZED
elif [ "${conn_state}" = "DISCONNECTED" ]; then
set_error $ERROR_UNAUTHORIZED "Unauthorized - DISCONNECTED"
result=$ERROR_UNAUTHORIZED
else
result=$ERROR_PROTOCOL
set_error $ERROR_PROTOCOL "Unsupported protocol"
echo "wpa_cli returned unknown status" >&2
fi
timeout=$((--timeout))
done
echo "Timeout --> unreachable" >&2
return $result
}
showhelp() {
cat << EOF
$0 -s <ssid> -a <auth>
[-p <passphrase>] [-k key] [-i index] [ -t timeout ] [ -d ]
Mandatory parameters:
-s <ssid>: Connect to SSID <ssid>
-a <auth>: Use authentication <auth>, where <auth> can be one of:
"open": No authentication
"wep": WEP authentication
"psk": WPA authentication
"psk2": WPA2 authentication
Optional parameters:
-p <passphrase>: (WEP or WPA only) Set the WEP (string) or WPA passphrase
-k <key>: (WEP only) Set the key (hex key only, either 5 or 13 bytes len)
-i <index>: (WEP only) Set the key index (1-4)
-t <timeout>: Set the connection timeout (in seconds) - default=4
-d : enable debug
-h : print this help
Return value:
0: Connection Success
1: Connection Failed
2: Error
EOF
}
check_params() {
local ssid=$1
local auth=$2
local psk=$3
local key=$4
local index=$5
if [ -z "${auth}" ] || [ -z "${ssid}" ]; then
echo "Error:ssid or authentication not found" >&2
return 1
fi
# Using passphrase and/or key and/or index in Open mode is inconsistent
if [ "${auth}" = "open" ]; then
if [ -n "${key}" -o -n "${index}" -o -n "${psk}" ]; then
echo "Open mode can't be used with passphrase/key/index" >&2
return 1
fi
fi
# If wep is used, make sure we also got a key & its index
if [ "${auth}" = "wep" ]; then
if [ -z "${key}" ]; then
echo "In WEP, please specify the key and optionally, the index" >&2
return 1
fi
fi
# Having a key and/or index with non-WEP encryption is inconsistent
if [ "${auth}" != "wep" ]; then
if [ -n "${key}" -o -n "${index}" ]; then
echo "Index/Key can't be used with non-WEP authentication " >&2
return 1
fi
fi
# If wpa is used, make sure we also got a passphrase
case "$auth" in
*psk*)
if [ -z "${psk}" ]; then
echo "In WPA, please specify a passphrase" >&2
return 1
fi
if [ $(expr length "${psk}") -lt 8 ]; then
echo "In WPA, please specify a passphrase of size at least 8" >&2
return 1
fi
if [ $(expr length "${psk}") -eq 64 ]; then
local i=0
while [ $i -lt 64 ]; do
char=${psk:$i:1}
case "$char" in
[a-fA-F0-9] );;
* )
echo "In WPA, please specify an ASCII passphrase of size less than 64 or a Hex passphrase of size 64" >&2
return 1;;
esac
i=$((i+1))
done
elif [ $(expr length "${psk}") -gt 64 ]; then
echo "In WPA, please specify an ASCII passphrase of size less than 64 or a Hex passphrase of size 64" >&2
return 1
fi
;;
*)
esac
return 0
}
wifi_configure() {
# Process arguments
local ssid auth psk key index
while [ -n "$1" ];do
case "$1" in
-s) ssid="$2"; shift;;
-a) auth="$2"; shift
if [ "${auth}" = "OPEN" ]; then
auth="none"
fi
if [ "${auth}" = "WEP" ]; then
auth="wep"
fi
case "$auth" in
WPA2*)
auth="psk2+tkip+ccmp"
;;
WPA*)
auth="psk+tkip+ccmp"
;;
esac
if [ "${auth}" = "WPS" ]; then
auth="psk"
fi
[ ${auth} = "none" ] || [ ${auth} = "wep" ] || [ ${auth} = "psk+tkip+ccmp" ] || [ ${auth} = "psk2+tkip+ccmp" ] || {
echo "Invalid authentication \"${auth}\"" >&2
echo "Valid authentication values are \"none\", \"wep\", \"psk+tkip+ccmp\", \"psk2+tkip+ccmp\"" >&2
showhelp
exit 2;
};;
-p) psk="$2"; shift;;
-k) key="$2"; shift;;
-i) index="$2"; shift
if [ ! ${index} -ge 1 ] && [ ! ${index} -le 4 ]; then
echo "Invalid index \"${index}\"" >&2
echo "Valid index values are \"1\", \"2\", \"3\", \"4\"" >&2
showhelp
exit 2
fi;;
-t) timeout="$2"; shift;;
-d) DEBUG=1;;
-h) showhelp; exit 2;;
*)
echo "Invalid option: -${OPTARG}" >&2
showhelp
exit 2
;;
esac
shift
done
if [ "${auth}" = "wep" ]; then
if [ -z "${index}" ]; then
index=1
echo "Defaulting index to 1" >&2
fi
fi
# Perform sanity checks on the script arguments
check_params "${ssid}" "${auth}" "${psk}" "${key}" "${index}" || {
showhelp
exit 2
}
wifi_configure_commit "${ssid}" "${auth}" "${psk}" "${key}" "${index}"
}
set_error() {
uci set -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].lasterrorcode=$1
uci set -c /etc/alljoyn-onboarding alljoyn-onboarding-state.@onboarding[0].lasterrormsg="$2"
uci commit -c /etc/alljoyn-onboarding alljoyn-onboarding-state
printf '%s\n%s' "$1" "$2" > /tmp/state/alljoyn-onboarding-lasterror
}

View File

@@ -1,34 +0,0 @@
# Copyright (c) 2014, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
findPid=$(pgrep /usr/sbin/wifi_scan)
if [ -z $findPid ]; then
## Get the scan results based on method available
hasIw=$(which iw)
hasIwList=$(which iwlist)
if [ -n "$hasIw" ]; then
result=$(/usr/sbin/parse_iw_wifi_scan)
elif [ -n "$hasIwList" ]; then
result=$(/usr/sbin/parse_iwlist_wifi_scan)
fi
## Sort the results based on signal strength and print it to the file
if [ -n "$result" ]; then
printf "$result" | sort -n -r | awk '{sep="";for (i=4;i<=NF;i++) {printf "%s%s",sep, $i;sep=" "}; printf "\t"$3"\n"}' | sort | uniq > /tmp/wifi_scan_results
fi
fi

View File

@@ -1,26 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2013 - 2014, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
START=61
boot() {
# Schedule the script to refresh the results with a cron job
/etc/init.d/cron stop
sed -i '/\/usr\/sbin\/wifi_scan/d' /etc/crontabs/root
echo '*/15 * * * * /usr/sbin/wifi_scan' >> /etc/crontabs/root
/etc/init.d/cron start
}

View File

@@ -1,104 +0,0 @@
AJ_SERVICE:=sample_apps
AJ_SERVICE_NAME:=sample_apps
include $(TOPDIR)/rules.mk
PKG_NAME:=alljoyn-$(AJ_SERVICE)
PKG_BASE_VERSION:=14.12
PKG_PATCHLEVEL:=.00
PKG_RELEASE:=1
PKG_MD5SUM:=389c2623619281e6849da25cee7e1bb7
PKG_VERSION:=$(PKG_BASE_VERSION)$(PKG_PATCHLEVEL)
PKG_TARBALL_VERSION:=$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/alljoyn-services-$(PKG_TARBALL_VERSION)-src
PKG_SOURCE:=alljoyn-services-$(PKG_TARBALL_VERSION)-src.tar.gz
PKG_SOURCE_URL:=https://allseenalliance.org/releases/alljoyn/$(PKG_BASE_VERSION)/
# SCons supports parallel builds but does not support make's jobserver
PKG_BUILD_PARALLEL:=$(if $(CONFIG_PKG_BUILD_USE_JOBSERVER),0,1)
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
ifneq ($(CONFIG_CCACHE),)
TARGET_CC=$(TARGET_CC_NOCACHE)
TARGET_CXX=$(TARGET_CXX_NOCACHE)
endif
ALLJOYN_BINDINGS:=cpp,
ALLJOYN_BUILD_SERVICES_SAMPLES:=on
define Package/$(PKG_NAME)
TITLE:=AllJoyn services $(AJ_SERVICE_NAME) - sample applications
SECTION:=net
CATEGORY:=Network
DEPENDS:=alljoyn \
+alljoyn-about \
+alljoyn-config \
+alljoyn-controlpanel \
+alljoyn-notification \
+alljoyn-services_common
URL:=http://www.allseenalliance.org
MAINTAINER:=AllSeen Alliance <allseen-core@lists.allseenalliance.org>
endef
define Package/$(PKG_NAME)/description
AllJoyn services $(AJ_SERVICE_NAME) sample applications - includes ServerSample and ACServerSample.
endef
ifeq ($(CONFIG_DEBUG),y)
ALLJOYN_BUILD_VARIANT:=debug
else
ALLJOYN_BUILD_VARIANT:=release
endif
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE)/build/openwrt/openwrt/$(ALLJOYN_BUILD_VARIANT)/dist/$(AJ_SERVICE)
TARGET_CFLAGS+=-fPIC
TARGET_CPPFLAGS+=-fPIC
define Build/Configure/Default
# Override default to do nothing
endef
define Build/Compile
scons -C $(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE) \
$(PKG_JOBS) \
WS=off \
CPU=openwrt \
OS=openwrt \
"BINDINGS=$(ALLJOYN_BINDINGS)" \
"BUILD_SERVICES_SAMPLES=$(ALLJOYN_BUILD_SERVICES_SAMPLES)" \
"VARIANT=$(ALLJOYN_BUILD_VARIANT)" \
BR=off \
BT=off \
ICE=off \
"TARGET_CC=$$(TARGET_CC)" \
"TARGET_CXX=$$(TARGET_CXX)" \
"TARGET_CFLAGS=$$(TARGET_CFLAGS)" \
"TARGET_CPPFLAGS=$$(TARGET_CPPFLAGS)" \
"TARGET_PATH=$$(TARGET_PATH)" \
"TARGET_LINKFLAGS=$$(TARGET_LDFLAGS)" \
"TARGET_LINK=$$(TARGET_CC)" \
"TARGET_AR=$$(TARGET_AR)" \
"TARGET_RANLIB=$$(TARGET_RANLIB)" \
"STAGING_DIR=$$(STAGING_DIR)" \
"ALL=1"
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/* $(1)/usr/bin/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/* $(1)/usr/bin/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,97 +0,0 @@
AJ_SERVICE:=services_common
AJ_SERVICE_NAME:=Services Common
include $(TOPDIR)/rules.mk
PKG_NAME:=alljoyn-$(AJ_SERVICE)
PKG_BASE_VERSION:=14.12
PKG_PATCHLEVEL:=.00
PKG_RELEASE:=1
PKG_MD5SUM:=389c2623619281e6849da25cee7e1bb7
PKG_VERSION:=$(PKG_BASE_VERSION)$(PKG_PATCHLEVEL)
PKG_TARBALL_VERSION:=$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/alljoyn-services-$(PKG_TARBALL_VERSION)-src
PKG_SOURCE:=alljoyn-services-$(PKG_TARBALL_VERSION)-src.tar.gz
PKG_SOURCE_URL:=https://allseenalliance.org/releases/alljoyn/$(PKG_BASE_VERSION)/
# SCons supports parallel builds but does not support make's jobserver
PKG_BUILD_PARALLEL:=$(if $(CONFIG_PKG_BUILD_USE_JOBSERVER),0,1)
include $(INCLUDE_DIR)/package.mk
ifneq ($(CONFIG_CCACHE),)
TARGET_CC=$(TARGET_CC_NOCACHE)
TARGET_CXX=$(TARGET_CXX_NOCACHE)
endif
ALLJOYN_BINDINGS:=cpp,
ALLJOYN_BUILD_SERVICES_SAMPLES:=off
define Package/$(PKG_NAME)
TITLE:=AllJoyn $(AJ_SERVICE_NAME) service library
SECTION:=net
CATEGORY:=Network
DEPENDS:=alljoyn
URL:=http://www.allseenalliance.org
MAINTAINER:=AllSeen Alliance <allseen-core@lists.allseenalliance.org>
endef
define Package/$(PKG_NAME)/description
AllJoyn $(AJ_SERVICE_NAME) service library.
endef
ifeq ($(CONFIG_DEBUG),y)
ALLJOYN_BUILD_VARIANT:=debug
else
ALLJOYN_BUILD_VARIANT:=release
endif
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE)/build/openwrt/openwrt/$(ALLJOYN_BUILD_VARIANT)/dist/$(AJ_SERVICE)
TARGET_CFLAGS+=-fPIC
TARGET_CPPFLAGS+=-fPIC
define Build/Configure/Default
# Override default to do nothing
endef
define Build/Compile
scons -C $(PKG_BUILD_DIR)/services/base/$(AJ_SERVICE) \
$(PKG_JOBS) \
WS=off \
CPU=openwrt \
OS=openwrt \
"BINDINGS=$(ALLJOYN_BINDINGS)" \
"BUILD_SERVICES_SAMPLES=$(ALLJOYN_BUILD_SERVICES_SAMPLES)" \
"VARIANT=$(ALLJOYN_BUILD_VARIANT)" \
BR=off \
BT=off \
ICE=off \
"TARGET_CC=$$(TARGET_CC)" \
"TARGET_CXX=$$(TARGET_CXX)" \
"TARGET_CFLAGS=$$(TARGET_CFLAGS)" \
"TARGET_CPPFLAGS=$$(TARGET_CPPFLAGS)" \
"TARGET_PATH=$$(TARGET_PATH)" \
"TARGET_LINKFLAGS=$$(TARGET_LDFLAGS)" \
"TARGET_LINK=$$(TARGET_CC)" \
"TARGET_AR=$$(TARGET_AR)" \
"TARGET_RANLIB=$$(TARGET_RANLIB)" \
"STAGING_DIR=$$(STAGING_DIR)"
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(CP) $(PKG_INSTALL_DIR)/inc/alljoyn/$(AJ_SERVICE)/*.h $(1)/usr/include/alljoyn/$(AJ_SERVICE)
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/lib/liballjoyn_$(AJ_SERVICE).so $(1)/usr/lib/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,301 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=alljoyn
PKG_BASE_VERSION:=14.12
PKG_PATCHLEVEL:=a
PKG_RELEASE:=1
PKG_MD5SUM:=1435d8611a26bfde115a771ab7cd3d74
PKG_VERSION:=$(PKG_BASE_VERSION)$(PKG_PATCHLEVEL)
PKG_TARBALL_VERSION:=$(PKG_BASE_VERSION).00$(PKG_PATCHLEVEL)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_TARBALL_VERSION)-src
PKG_SOURCE:=$(PKG_NAME)-$(PKG_TARBALL_VERSION)-src.tar.gz
PKG_SOURCE_URL:=https://allseenalliance.org/releases/alljoyn/$(PKG_BASE_VERSION)/
# SCons supports parallel builds but does not support make's jobserver
PKG_BUILD_PARALLEL:=$(if $(CONFIG_PKG_BUILD_USE_JOBSERVER),0,1)
PKG_CONFIG_DEPENDS:= \
CONFIG_DEBUG \
CONFIG_PACKAGE_alljoyn-c \
CONFIG_PACKAGE_alljoyn-about \
CONFIG_PACKAGE_alljoyn-samples
include $(INCLUDE_DIR)/package.mk
ifneq ($(CONFIG_CCACHE),)
TARGET_CC=$(TARGET_CC_NOCACHE)
TARGET_CXX=$(TARGET_CXX_NOCACHE)
endif
define Package/alljoyn/Default
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libopenssl +libpthread +librt +libstdcpp
URL:=http://www.allseenalliance.org
MAINTAINER:=AllSeen Alliance <allseen-core@lists.allseenalliance.org>
endef
define Package/alljoyn
$(call Package/alljoyn/Default)
TITLE:=AllJoyn Peer-to-Peer networking
MENU:=1
endef
define Package/alljoyn/description
AllJoyn is a daemon and application framework for developing
ad hoc peer-to-peer applications. This includes the run-time
daemon and C++ library.
endef
define Package/alljoyn-non-gw-config
$(call Package/alljoyn/Default)
TITLE:=AllJoyn - alternate non-Gateway Config
DEPENDS:=alljoyn
endef
define Package/alljoyn-non-gw-config/description
Alternate AllJoyn configuration with defaults suitable for
non-Gateway devices. Do not install this on devices with a
network interface connected to an insecure network such as
the Internet.
endef
define Package/alljoyn-c
$(call Package/alljoyn/Default)
TITLE:=AllJoyn - C binding
DEPENDS:=alljoyn
endef
define Package/alljoyn-c/description
AllJoyn C binding. This provides a C library for building
AllJoyn programs in C. This is just a C callable wrapper
to the C++ library.
endef
define Package/alljoyn-about
$(call Package/alljoyn/Default)
TITLE:=AllJoyn - About service library (deprecated)
DEPENDS:=alljoyn
endef
define Package/alljoyn-about/description
AllJoyn About services library. This library is deprecated. The functionality
provided by About has been integrated into liballjoyn with a simpler API. This
library will continue to be supported into 2015 and will be removed in 2016.
endef
define Package/alljoyn-samples
$(call Package/alljoyn/Default)
TITLE:=AllJoyn - testing samples
DEPENDS:=alljoyn \
+PACKAGE_alljoyn-about:alljoyn-about
endef
define Package/alljoyn-samples/description
Alljoyn samples. (This is primarily for testing. The contents of this
package vary according which other alljoyn packages are selected.)
endef
ALLJOYN_BINDINGS:=cpp,
ALLJOYN_SERVICES:=
ALLJOYN_BUILD_SERVICES_SAMPLES:=off
ifdef CONFIG_PACKAGE_alljoyn-c
ALLJOYN_BINDINGS+=c,
endif
ifdef CONFIG_PACKAGE_alljoyn-about
ALLJOYN_SERVICES+=about,
endif
ifeq ($(CONFIG_DEBUG),y)
ALLJOYN_BUILD_VARIANT:=debug
else
ALLJOYN_BUILD_VARIANT:=release
endif
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/build/openwrt/openwrt/$(ALLJOYN_BUILD_VARIANT)/dist
TARGET_CFLAGS+=-fPIC
TARGET_CPPFLAGS+=-fPIC
define Build/Configure
# Override default to do nothing
endef
define Build/Compile
scons -C $(PKG_BUILD_DIR) \
$(PKG_JOBS) \
WS=off \
CPU=openwrt \
OS=openwrt \
"BINDINGS=$(ALLJOYN_BINDINGS)" \
"SERVICES=$(ALLJOYN_SERVICES)" \
"BUILD_SERVICES_SAMPLES=$(ALLJOYN_BUILD_SERVICES_SAMPLES)" \
"VARIANT=$(ALLJOYN_BUILD_VARIANT)" \
BR=off \
ICE=off \
POLICYDB=on \
"TARGET_CC=$$(TARGET_CC)" \
"TARGET_CXX=$$(TARGET_CXX)" \
"TARGET_CFLAGS=$$(TARGET_CFLAGS)" \
"TARGET_CPPFLAGS=$$(TARGET_CPPFLAGS)" \
"TARGET_PATH=$$(TARGET_PATH)" \
"TARGET_LINKFLAGS=$$(TARGET_LDFLAGS)" \
"TARGET_LINK=$$(TARGET_CC)" \
"TARGET_AR=$$(TARGET_AR)" \
"TARGET_RANLIB=$$(TARGET_RANLIB)" \
"STAGING_DIR=$$(STAGING_DIR)"
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/alljoyn
$(INSTALL_DIR) $(1)/usr/include/qcc
$(INSTALL_DIR) $(1)/usr/include/qcc/posix
$(CP) $(PKG_INSTALL_DIR)/cpp/inc/alljoyn/*.h $(1)/usr/include/alljoyn/
$(CP) $(PKG_INSTALL_DIR)/cpp/inc/qcc/*.h $(1)/usr/include/qcc/
$(CP) $(PKG_INSTALL_DIR)/cpp/inc/qcc/posix/*.h $(1)/usr/include/qcc/posix/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/cpp/lib/liballjoyn.a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/cpp/lib/liballjoyn.so $(1)/usr/lib/
ifdef CONFIG_PACKAGE_alljoyn-about
$(INSTALL_DIR) $(1)/usr/include/alljoyn/about
$(CP) $(PKG_INSTALL_DIR)/cpp/inc/alljoyn/about/*.h $(1)/usr/include/alljoyn/about
$(CP) $(PKG_INSTALL_DIR)/cpp/lib/liballjoyn_about.a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/cpp/lib/liballjoyn_about.so $(1)/usr/lib/
endif
ifdef CONFIG_PACKAGE_alljoyn-c
$(INSTALL_DIR) $(1)/usr/include/alljoyn_c
$(CP) $(PKG_INSTALL_DIR)/c/inc/alljoyn_c/*.h $(1)/usr/include/alljoyn_c/
$(CP) $(PKG_INSTALL_DIR)/c/lib/liballjoyn_c.a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/c/lib/liballjoyn_c.so $(1)/usr/lib/
endif
endef
define Package/alljoyn/conffiles
/etc/alljoyn/alljoyn.conf
/etc/config/alljoyn
endef
define Package/alljoyn-non-gw-config/conffiles
/etc/config/alljoyn
endef
define Package/alljoyn/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/alljoyn-daemon $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/cpp/lib/liballjoyn.so $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/alljoyn.init $(1)/etc/init.d/alljoyn
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/alljoyn.defaults $(1)/etc/uci-defaults/alljoyn
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/alljoyn.config $(1)/etc/config/alljoyn
$(INSTALL_DIR) $(1)/etc/alljoyn
$(INSTALL_CONF) ./files/alljoyn.conf $(1)/etc/alljoyn/alljoyn.conf
endef
define Package/alljoyn-non-gw-config/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/alljoyn-non-gw.config $(1)/etc/config/alljoyn
endef
define Package/alljoyn-c/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/c/lib/liballjoyn_c.so $(1)/usr/lib/
endef
define Package/alljoyn-about/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/cpp/lib/liballjoyn_about.so $(1)/usr/lib/
endef
define Package/alljoyn-samples/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/advtunnel $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/aes_ccm $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/bastress $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/bastress2 $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/bbclient $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/bbjitter $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/bbjoin $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/bbservice $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/bbsig $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/bignum $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/compression $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/keystore $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/marshal $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/names $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/ns $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/rawclient $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/rawservice $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/remarshal $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/rsa $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/sessions $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/socktest $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/srp $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/unpack $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/samples/AboutClient $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/samples/AboutService $(1)/usr/bin/
ifdef CONFIG_PACKAGE_alljoyn-about
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/cpp/bin/samples/sample_rule_app $(1)/usr/bin/
endif
endef
define Package/alljoyn/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
. /etc/uci-defaults/alljoyn
rm -f /etc/uci-defaults/alljoyn
fi
exit 0
endef
define Package/alljoyn/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/alljoyn stop
/etc/init.d/alljoyn disable
uci batch <<EOF
del_list ucitrack.@network[-1].affects=alljoyn
delete ucitrack.@alljoyn[-1]
commit ucitrack
EOF
fi
exit 0
endef
define Package/alljoyn-non-gw-config/preinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
echo 'Saving original alljoyn config file to alljoyn-orig'
mv /etc/config/alljoyn /etc/config/alljoyn-orig
fi
exit 0
endef
define Package/alljoyn-non-gw-config/postrm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
if [ -e /etc/config/alljoyn-orig ]; then
echo 'Restoring original alljoyn config file from alljoyn-orig'
mv /etc/config/alljoyn-orig /etc/config/alljoyn
fi
fi
exit 0
endef
$(eval $(call BuildPackage,alljoyn))
$(eval $(call BuildPackage,alljoyn-non-gw-config))
$(eval $(call BuildPackage,alljoyn-c))
$(eval $(call BuildPackage,alljoyn-about))
$(eval $(call BuildPackage,alljoyn-samples))

View File

@@ -1,25 +0,0 @@
config transport 'unix'
option enable '1'
option path 'alljoyn'
option abstract '1'
config transport 'ip'
option enable '1'
option max_incomplete_conn '16'
option max_complete_conn '96'
option bus_port '9955'
option auth_timeout '20000'
option advertise_daemon '1'
option all_networks '1'
list networks
config transport 'slap'
option enable '0'
option path '/dev/ttyUSB0'
option baud 115200
option databits 8
option parity 'none'
option stopbits 1
config daemon 'daemon'
option user 'nobody'

View File

@@ -1,38 +0,0 @@
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<!--
Copyright (c) 2014, AllSeen Alliance. All rights reserved.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<busconfig>
<type>alljoyn</type>
<fork/>
<syslog/>
<!-- Default limits -->
<limit name="auth_timeout">20000</limit>
<limit name="max_incomplete_connections">16</limit>
<limit name="max_completed_connections">96</limit>
<limit name="max_untrusted_clients">96</limit>
<flag name="restrict_untrusted_clients">false</flag>
<!-- Include configuration file generated from /etc/config/alljoyn -->
<include>/var/etc/alljoyn.conf</include>
<!-- Include Gateway Agent policy rules configuration -->
<includedir ignore_missing="yes">/etc/alljoyn/gwagent</includeidr>
</busconfig>

View File

@@ -1,25 +0,0 @@
config transport 'unix'
option enable '1'
option path 'alljoyn'
option abstract '1'
config transport 'ip'
option enable '1'
option max_incomplete_conn '16'
option max_complete_conn '96'
option bus_port '9955'
option auth_timeout '20000'
option advertise_daemon '1'
option all_networks '0'
list networks 'lan'
config transport 'slap'
option enable '0'
option path '/dev/ttyUSB0'
option baud 115200
option databits 8
option parity 'none'
option stopbits 1
config daemon 'daemon'
option user 'nobody'

View File

@@ -1,9 +0,0 @@
#! /bin/sh
uci batch <<EOF
add ucitrack alljoyn
set ucitrack.@alljoyn[-1].init=alljoyn
add_list ucitrack.@network[-1].affects=alljoyn
commit ucitrack
EOF
/etc/init.d/alljoyn enable
exit 0

View File

@@ -1,170 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2013-2015, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
START=65
SERVICE_PID_FILE=/var/run/alljoyn.pid
CONFIGFILE="/etc/alljoyn/alljoyn.conf"
GENCONFIGFILE="/var/etc/alljoyn.conf"
check() {
local flag
config_get_bool flag "$1" "$2" 0
test "$flag" == "1"
return $?
}
process_unix_transport() {
if check unix enable; then
local path
local abstract
config_get path unix path "alljoyn"
config_get_bool abstract unix abstract "1"
if [ -n "$abstract" ]; then
path="abstract=$path"
else
path="path=$path"
fi
export ${NO_EXPORT:+-n} listen_specs="${listen_specs}
<listen>unix:${path}</listen>"
fi
}
process_ip_network() {
local network="$1"
local port="$2"
local ifname
config_get ifname "$network" ifname
if [ -n "$ifname" ]; then
export ${NO_EXPORT:+-n} listen_specs="${listen_specs}
<listen>tcp:iface=${ifname},port=${port}</listen>
<listen>udp:iface=${ifname},port=${port}</listen>"
fi
}
process_ip_transport() {
if check ip enable; then
local port
if check ip advertise_daemon; then
export ${NO_EXPORT:+-n} ip_advertise_daemon="<property name=\"router_advertisement_prefix\">org.alljoyn.BusNode.</property>"
fi
config_get port ip bus_port 9955
if check ip all_networks; then
export ${NO_EXPORT:+-n} listen_specs="${listen_specs}
<listen>tcp:iface=*,port=${port}</listen>
<listen>udp:iface=*,port=${port}</listen>"
else
config_load network
config_load alljoyn # loading the network config clobbers the alljoyn config vars
config_list_foreach ip networks process_ip_network "${port}"
fi
config_get ip_max_incomplete_conn ip max_incomplete_conn "$ip_max_incomplete_conn"
config_get ip_max_complete_conn ip max_complete_conn "$ip_max_complete_conn"
config_get ip_auth_timeout ip auth_timeout "$ip_auth_timeout"
fi
}
process_slap_transport() {
if check slap enable; then
local path
local baud
config_get path slap path "/dev/ttyUSB0"
config_get baud slap baud "115200"
config_get databits slap databits "8"
config_get parity slap parity "none"
config_get stopbits slap stopbits "1"
export ${NO_EXPORT:+-n} listen_specs="${listen_specs}
<listen>slap:type=uart;dev=${path};baud=${baud};databits=${databits};parity=${parity};stopbits=${stopbits}</listen>"
fi
}
process_switch_user() {
local user
config_get user daemon user "root"
if [ "$user" != "root" ]; then
export ${NO_EXPORT:+-n} switch_user="<user>${user}</user>"
fi
}
generate_conf_file() {
local listen_specs=""
local ip_max_incomplete_conn=16
local ip_max_complete_conn=64
local ip_auth_timeout=20000
local ip_networks=""
local ip_advertise_daemon=""
local switch_user=""
rm -f $GENCONFIGFILE
include /lib/network
config_load alljoyn
process_unix_transport
process_ip_transport
process_slap_transport
process_switch_user
mkdir -p $(dirname $GENCONFIGFILE)
cat > $GENCONFIGFILE <<EOF
<busconfig>
<pidfile>${SERVICE_PID_FILE}</pidfile>
${switch_user}
${listen_specs}
${ip_advertise_daemon}
<limit name="auth_timeout">${ip_auth_timeout}</limit>
<limit name="max_incomplete_connections">${ip_max_incomplete_conn}</limit>
<limit name="max_completed_connections">${ip_max_complete_conn}</limit>
<limit name="max_untrusted_clients">${ip_max_complete_conn}</limit>
</busconfig>
EOF
}
start() {
generate_conf_file
if [ -e $CONFIGFILE ]; then
service_start /usr/bin/alljoyn-daemon --config-file=$CONFIGFILE
fi
}
stop() {
service_stop /usr/bin/alljoyn-daemon
}

View File

@@ -1,65 +0,0 @@
This repository is designated to serve as a feed for OpenWrt
(http://openwrt.org) based systems. As such, the organization, management,
and usage of this repository will be different from the other source
repositories hosted by the AllSeen Alliance.
Most notable of these differences is that the master branch only contains this
readme file. Package definitions will only exist in branches whos name
corresponds to code names for OpenWrt releases. At the time of the initial
commit of this readme file, there will be 2 such branches: attitude_adjustment
and barrier_breaker. As the OpenWrt project develops and creates new
releases, new corresponding branches will be created.
The reason for tracking package definitions on a per OpenWrt release basis is
due to the fact that AllJoyn packages depend on OpenWrt packages which may
change from release to release. This also allows us to retire support for
obsolete versions of OpenWrt in the future without breaking others who may
still be using/building the obsolete versions.
To use this feed in an OpenWrt build environment, follow these instructions:
1. Copy feeds.conf.default to feeds.conf (if not already done):
cp feeds.conf.default feeds.conf
2. Add the following feeds.conf (replace <openwrt_release> with the
appropriate branch that corresponds to the OpenWrt release you are building):
src-git alljoyn git://git.allseenalliance.org/gerrit/core/openwrt_feed;<openwrt_release>
# For Attitude Adjustment
src-git alljoyn git://git.allseenalliance.org/gerrit/core/openwrt_feed;attitude_adjustment
# For Barrier Breaker
src-git alljoyn git://git.allseenalliance.org/gerrit/core/openwrt_feed;barrier_breaker
3. Update the feed information:
./scripts/feeds update -a
4. Add the the packages from the AllJoyn feed to build system:
./scripts feeds install -a -p alljoyn
5. Enable AllJoyn in the build:
make menuconfig
Networking --->
< > alljoyn --->
< > alljoyn-about
< > alljoyn-c
< > alljoyn-config
< > alljoyn-config-samples
< > alljoyn-controlpanel
< > alljoyn-controlpanel-samples
< > alljoyn-notification
< > alljoyn-notification-samples
< > alljoyn-onboarding
< > alljoyn-onboarding-samples
< > alljoyn-sample_apps
< > alljoyn-samples
< > alljoyn-service_common

View File

@@ -1,51 +0,0 @@
#
# Copyright (C) 2013 Inteno
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ami
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
#PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
#STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
include $(INCLUDE_DIR)/package.mk
target=$(firstword $(subst -, ,$(BOARD)))
TARGET_LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib -luci -lubus -lubox -lpthread
TARGET_CFLAGS += $(FPIC) -Dtarget_$(target)=1 -Wall
MAKE_FLAGS += TARGET="$(target)"
define Package/ami
CATEGORY:=Utilities
DEPENDS:= +libuci +libubox +ubus
TITLE:=Asterisk management interface listener
endef
define Package/ami/description
Application that listen on the asterisk management interface to handle the leds
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
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"
endef
define Package/ami/install
$(INSTALL_DIR) $(1)/sbin
$(CP) ./files/* $(1)/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ami_tool $(1)/sbin/
endef
$(eval $(call BuildPackage,ami))

View File

@@ -1,30 +0,0 @@
#!/bin/sh /etc/rc.common
. /lib/functions.sh
START=99
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
boot() {
start
}
start() {
service_start /sbin/ami_tool
}
stop() {
service_stop /sbin/ami_tool
}
restart() {
stop
start
}

View File

@@ -1,26 +0,0 @@
# Makefile for Asterisk management interface listener application
CC = gcc
MAKEDEPEND = makedepend
CDEBUG = -g
CFLAGS = ${CDEBUG} ${INCL} -Wall
LDFLAGS = ${CDEBUG}
LIBDIR =
LOCLIBS =
LIBS = ${LOCLIBS} ${SYSLIBS}
OBJS = ami_tool.o ami_connection.o ucix.o
SRCS = ami_tool.c ami_connection.c ucix.c
LIBSRCS =
ISRCS = ami_tool.h ami_connection.h ucix.h
ALLSRCS = ${SRCS} ${ISRCS} ${LIBSRCS}
all: ami_tool
ami_tool: ${OBJS}
${CC} ${LDFLAGS} -o ami_tool ${OBJS} ${LIBDIR} ${LIBS}
clean:
rm -f ami_tool ${OBJS}
depend:
${MAKEDEPEND} ${INCL} ${SRCS} ${LIBSRCS}

View File

@@ -1,832 +0,0 @@
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <netdb.h>
#include <sys/socket.h>
#include <unistd.h>
#include "ami_connection.h"
typedef enum ami_message {
UNKNOWN_MESSAGE,
LOGIN_MESSAGE,
EVENT_MESSAGE,
RESPONSE_MESSAGE
} ami_message;
/*
* message_frame: String defining message border
* buffer: Buffer to parse
* framed_message: Pointer to framed message (mallocd)
* buffer_read: Bytes read from buffer in previous run
*/
static ami_message parse_buffer(char *message_frame, char *buffer, char **framed_message, int *buffer_read)
{
//Skip bytes already read
buffer = &buffer[*buffer_read];
if (strlen(buffer) == 0) {
return UNKNOWN_MESSAGE;
}
//Locate message frame
char *message_end = strstr(buffer, message_frame);
if (!message_end) {
//Could not find message frame, use left over
//data in next call to parse_buffer
return UNKNOWN_MESSAGE;
}
//Found a message boundry
int message_length = message_end - buffer;
//printf("Framed message:\n[%s]\n\n", *framed_message);
//Update byte counter
*buffer_read += message_length + strlen(message_frame);
//Find out what type of message this is
ami_message message_type;
if (!strncmp(buffer, "Asterisk Call Manager", 21)) {
//printf("Login prompt detected\n");
message_type = LOGIN_MESSAGE;
} else if(!strncmp(buffer, "Event", 5)) {
//printf("Event detected: ");
message_type = EVENT_MESSAGE;
} else if(!strncmp(buffer, "Response", 8)) {
//printf("Response detected: ");
message_type = RESPONSE_MESSAGE;
} else {
//printf("Unknown event: ");
return UNKNOWN_MESSAGE;
}
*framed_message = malloc(message_length +1);
strncpy(*framed_message, buffer, message_length);
(*framed_message)[message_length] = '\0';
return message_type;
}
/*
* Find the type on an event and advance the idx buffer pointer
* to the beginning of the event.
*/
static ami_event_type get_event_type(char* buf, int* idx) {
int i = 0;
if (!memcmp(buf, "RegistryEntry", 13)) {
i +=13;
while((buf[i] == '\n') || (buf[i] == '\r'))
i++;
*idx = i;
return REGISTRY_ENTRY;
} else if (!memcmp(buf, "Registry", 8)) {
i +=8;
while((buf[i] == '\n') || (buf[i] == '\r'))
i++;
*idx = i;
return REGISTRY;
} else if (!memcmp(buf, "RegistrationsComplete", 4)) {
i +=21;
while((buf[i] == '\n') || (buf[i] == '\r'))
i++;
*idx = i;
return REGISTRATIONS_COMPLETE;
} else if (!memcmp(buf, "BRCM", 4)) {
i +=8;
while((buf[i] == '\n') || (buf[i] == '\r'))
i++;
*idx = i;
return BRCM;
} else if (!memcmp(buf, "ChannelReload", 13)) {
i +=8;
while((buf[i] == '\n') || (buf[i] == '\r'))
i++;
*idx = i;
return CHANNELRELOAD;
} else if (!memcmp(buf, "FullyBooted", 11)) {
i +=11;
while((buf[i] == '\n') || (buf[i] == '\r'))
i++;
*idx = i;
return FULLYBOOTED;
} else if (!memcmp(buf, "VarSet", 6)) {
i +=6;
while((buf[i] == '\n') || (buf[i] == '\r'))
i++;
*idx = i;
return VARSET;
} // else if() handle other events
while(buf[i] || i > AMI_BUFLEN) {
if (buf[i] == '\n') {
break;
}
i++;
}
*idx = i;
printf("Unhandled event\n%s\n", buf);
return UNKNOWN_EVENT;
}
static char *trim_whitespace(char *str)
{
char *end;
while (isspace(*str)) {
str++;
}
if(*str == 0) {
return str;
}
end = str + strlen(str) - 1;
while(end > str && isspace(*end)) {
end--;
}
*(end+1) = 0;
return str;
}
ami_event parse_registry_event(char* buf)
{
ami_event event;
event.type = REGISTRY;
event.registry_event = malloc(sizeof(registry_event));
event.registry_event->status = REGISTRY_UNKNOWN_EVENT;
event.registry_event->account_name = NULL;
char* domain = strstr(buf, "Domain: ");
if (domain) {
domain += 8; //Increment pointer to start of domain name
int len = 0;
while (domain[len] && !isspace(domain[len])) {
len++;
}
char* account_name = calloc(len + 1, sizeof(char));
strncpy(account_name, domain, len);
event.registry_event->account_name = account_name;
printf("Found domain: %s of length %d\n", account_name, len);
}
else {
printf("Warning: No domain found in Registry event\n");
}
char* status = NULL;
if ((status = strstr(buf, "Status: Request Sent"))) {
event.registry_event->status = REGISTRY_REQUEST_SENT_EVENT;
}
else if ((status = strstr(buf, "Status: Unregistered"))) {
event.registry_event->status = REGISTRY_UNREGISTERED_EVENT;
}
else if ((status = strstr(buf, "Status: Registered"))) {
event.registry_event->status = REGISTRY_REGISTERED_EVENT;
}
else {
printf("Warning: No status found in Registry event\n");
}
return event;
}
ami_event parse_registry_entry_event(char* buf)
{
ami_event event;
memset(&event, 0, sizeof(event));
event.type = REGISTRY_ENTRY;
event.registry_entry_event = (registry_entry_event*)malloc(sizeof(registry_entry_event));
event.registry_entry_event->host = 0;
event.registry_entry_event->port = 0;
event.registry_entry_event->username = 0;
event.registry_entry_event->domain = 0;
event.registry_entry_event->refresh = 0;
event.registry_entry_event->state = 0;
event.registry_entry_event->registration_time = 0;
char* host_start = strstr(buf, "Host:");
if (host_start) {
//Found host
host_start += 6; //Advance to start of content
char* host_end = strstr(host_start, "\r\n");
if (host_end) {
//Found end of host
int host_len = host_end - host_start;
event.registry_entry_event->host = (char*)calloc(host_len + 1, 1);
strncpy(event.registry_entry_event->host, host_start, host_len);
}
}
char* port_start = strstr(buf, "Port:");
if (port_start) {
//Found port
port_start += 6; //Advance to start of content
event.registry_entry_event->port = strtol(port_start, NULL, 10);
}
char* username_start = strstr(buf, "Username:");
if (username_start) {
//Found username
username_start += 10; //Advance to start of content
char* username_end = strstr(username_start, "\r\n");
if (username_end) {
//Found end of username
int username_len = username_end - username_start;
event.registry_entry_event->username = (char*)calloc(username_len + 1, 1);
strncpy(event.registry_entry_event->username, username_start, username_len);
}
}
char* domain_start = strstr(buf, "Domain:");
if (domain_start) {
//Found domain
domain_start += 8; //Advance to start of content
char* domain_end = strstr(domain_start, "\r\n");
if (domain_end) {
//Found end of domain
int domain_len = domain_end - domain_start;
event.registry_entry_event->domain = (char*)calloc(domain_len + 1, 1);
strncpy(event.registry_entry_event->domain, domain_start, domain_len);
}
}
char* domain_port_start = strstr(buf, "DomainPort:");
if (domain_port_start) {
//Found port
domain_port_start += 12; //Advance to start of content
event.registry_entry_event->port = strtol(domain_port_start, NULL, 10);
}
char* refresh_start = strstr(buf, "Refresh:");
if (refresh_start) {
//Found refresh interval
refresh_start += 9; //Advance to start of content
event.registry_entry_event->refresh = strtol(refresh_start, NULL, 10);
}
char* state_start = strstr(buf, "State:");
if (state_start) {
//Found state
state_start += 7; //Advance to start of content
char* state_end = strstr(state_start, "\r\n");
if (state_end) {
//Found end of state
int state_len = state_end - state_start;
event.registry_entry_event->state = (char*)calloc(state_len + 1, 1);
strncpy(event.registry_entry_event->state, state_start, state_len);
}
}
char* registration_time_start = strstr(buf, "RegistrationTime:");
if (registration_time_start) {
//Found reg timestamp
registration_time_start += 18; //Advance to start of content
event.registry_entry_event->registration_time = strtol(registration_time_start, NULL, 10);
}
return event;
}
ami_event parse_brcm_event(char* buf)
{
ami_event event;
memset(&event, 0, sizeof(event));
event.type = BRCM;
event.brcm_event = malloc(sizeof(brcm_event));
event.brcm_event->type = BRCM_UNKNOWN_EVENT;
char* event_type = NULL;
char parse_buffer[AMI_BUFLEN];
char delimiter = ' ';
char *value;
if ((event_type = strstr(buf, "Status: "))) {
event.brcm_event->type = BRCM_STATUS_EVENT;
strncpy(parse_buffer, event_type + 8, AMI_BUFLEN);
parse_buffer[AMI_BUFLEN -1] = '\0';
//strcpy(parse_buffer, event_type + 8);
value = strtok(parse_buffer, &delimiter);
if (value && !strcmp(value, "OFF")) {
event.brcm_event->status.off_hook = 1;
}
else if (value && !strcmp(value, "ON")) {
event.brcm_event->status.off_hook = 0;
}
else {
printf("Warning: No/Unknown status in brcm status event\n");
}
value = strtok(NULL, &delimiter);
if (value) {
event.brcm_event->status.line_id = strtol(value, NULL, 10);
}
else {
printf("Warning: No/Unknown line id in brcm status event\n");
event.brcm_event->status.line_id = 0;
}
}
else if ((event_type = strstr(buf, "State: "))) {
event.brcm_event->type = BRCM_STATE_EVENT;
strncpy(parse_buffer, event_type + 7, AMI_BUFLEN);
parse_buffer[AMI_BUFLEN -1] = '\0';
//strcpy(parse_buffer, event_type + 7);
value = strtok(parse_buffer, &delimiter);
if (value) {
value = trim_whitespace(value);
event.brcm_event->state.state = calloc(strlen(value) + 1, sizeof(char));
strcpy(event.brcm_event->state.state, value);
}
else {
printf("Warning: No state in brcm state event\n");
event.brcm_event->state.state = NULL;
}
value = strtok(NULL, &delimiter);
if (value) {
event.brcm_event->state.line_id = strtol(value, NULL, 10);
}
else {
printf("Warning: No line_id in brcm state event\n");
event.brcm_event->state.line_id = -1;
}
value = strtok(NULL, &delimiter);
if (value) {
event.brcm_event->state.subchannel_id = strtol(value, NULL, 10);
}
else {
printf("Warning: No subchannel_id in brcm state event\n");
event.brcm_event->state.subchannel_id = -1;
}
}
else if ((event_type = strstr(buf, "Module unload"))) {
event.brcm_event->type = BRCM_MODULE_EVENT;
event.brcm_event->module_loaded = 0;
}
else if ((event_type = strstr(buf, "Module load"))) {
event.brcm_event->type = BRCM_MODULE_EVENT;
event.brcm_event->module_loaded = 1;
}
return event;
}
ami_event parse_varset_event(char* buf)
{
int len;
ami_event event;
memset(&event, 0, sizeof(event));
event.type = VARSET;
event.varset_event = malloc(sizeof(varset_event));
char* channel = strstr(buf, "Channel: ");
if (channel) {
channel += 9; //Increment pointer to start of channel
len = 0;
while (channel[len] && !isspace(channel[len])) {
len++;
}
event.varset_event->channel = calloc(len + 1, sizeof(char));
strncpy(event.varset_event->channel, channel, len);
}
else {
printf("Warning: No Channel in varset event\n");
event.varset_event->channel = NULL;
}
char* variable = strstr(buf, "Variable: ");
if (variable) {
variable += 10; //Increment pointer to start of variable
len = 0;
while (variable[len] && !isspace(variable[len])) {
len++;
}
event.varset_event->variable = calloc(len + 1, sizeof(char));
strncpy(event.varset_event->variable, variable, len);
}
else {
printf("Warning: No Variable in varset event\n");
event.varset_event->variable = NULL;
}
char* value = strstr(buf, "Value: ");
if (value) {
value += 7; //Increment pointer to start of value
len = 0;
while (value[len] && !isspace(value[len])) {
len++;
}
event.varset_event->value = calloc(len + 1, sizeof(char));
strncpy(event.varset_event->value, value, len);
}
else {
printf("Warning: No Value in varset event\n");
event.varset_event->value = NULL;
}
return event;
}
ami_event parse_channel_reload_event(char* buf) {
ami_event event;
memset(&event, 0, sizeof(event));
event.type = CHANNELRELOAD;
event.channel_reload_event = malloc(sizeof(channel_reload_event));
char* result;
if ((result = strstr(buf, "ChannelType: SIP"))) {
event.channel_reload_event->channel_type = CHANNELRELOAD_SIP_EVENT;
}
else {
printf("Warning: unknown channel in ChannelReload event\n");
event.channel_reload_event->channel_type = CHANNELRELOAD_UNKNOWN_EVENT;
}
return event;
}
ami_event parse_fully_booted_event(char* buf) {
ami_event event;
memset(&event, 0, sizeof(event));
event.type = FULLYBOOTED;
return event;
}
void ami_free_event(ami_event event) {
switch (event.type) {
case REGISTRY:
free(event.registry_event->account_name);
free(event.registry_event);
break;
case BRCM:
if (event.brcm_event->type == BRCM_STATE_EVENT) {
free(event.brcm_event->state.state);
}
free(event.brcm_event);
break;
case CHANNELRELOAD:
free(event.channel_reload_event);
break;
case VARSET:
free(event.varset_event->channel);
free(event.varset_event->value);
free(event.varset_event->variable);
free(event.varset_event);
break;
case REGISTRY_ENTRY:
free(event.registry_entry_event->host);
free(event.registry_entry_event->domain);
free(event.registry_entry_event->state);
free(event.registry_entry_event->username);
free(event.registry_entry_event);
break;
case FULLYBOOTED:
case LOGIN:
case DISCONNECT:
case REGISTRATIONS_COMPLETE:
/* no event data to free */
break;
case UNKNOWN_EVENT:
break;
default:
printf("WARNING: Unhandled event type, can't free (may leak)\n");
break;
}
}
static void ami_handle_event(ami_connection* con, char* message)
{
int idx = 0;
ami_event_type type = get_event_type(message, &idx);
ami_event event;
memset(&event, 0, sizeof(event));
switch(type) {
case BRCM:
event = parse_brcm_event(&message[idx]);
break;
case CHANNELRELOAD:
event = parse_channel_reload_event(&message[idx]);
break;
case FULLYBOOTED:
event = parse_fully_booted_event(&message[idx]);
break;
case VARSET:
event = parse_varset_event(&message[idx]);
break;
case REGISTRY:
event = parse_registry_event(&message[idx]);
break;
case REGISTRY_ENTRY:
event = parse_registry_entry_event(&message[idx]);
break;
case REGISTRATIONS_COMPLETE:
/*
* Probably not needed.
* (this happens after all registry entry events have been received)
* Event: RegistrationsComplete
* EventList: Complete
* ListItems: 1
*/
event.type = REGISTRATIONS_COMPLETE;
break;
case UNKNOWN_EVENT:
default:
event.type = UNKNOWN_EVENT;
break;
}
//Let client handle the event
if (con->event_callback) {
con->event_callback(con, event);
}
ami_free_event(event);
}
static void ami_send_action(ami_connection* con, ami_action* action) {
if (con->current_action) {
printf("ERROR: Attempt to send AMI action, but there is already an action pending\n");
return;
}
con->current_action = action;
write(con->sd, action->message, strlen(action->message));
}
static void ami_handle_response(ami_connection* con, char* message)
{
ami_action* current = con->current_action;
assert(current);
ami_action* next = current->next_action;
con->current_action = NULL;
if (next) {
ami_send_action(con, next);
}
if (current->callback) {
current->callback(con, message);
}
free(current);
}
static void queue_action(ami_connection* con, ami_action* action)
{
action->next_action = NULL;
if (con->current_action) {
ami_action* a = con->current_action;
while(a->next_action) {
a = a->next_action;
}
a->next_action = action;
}
else {
ami_send_action(con, action);
}
}
/*
* PUBLIC FUNCTION IMPLEMENTATIONS
*/
ami_connection* ami_init(ami_event_cb on_event) {
ami_connection* con;
con = calloc(1, sizeof(*con));
con->connected = 0;
con->sd = -1;
bzero(con->message_frame, sizeof(con->message_frame));
memset(con->left_over, 0, AMI_BUFLEN * 2 + 1);
con->current_action = NULL;
con->event_callback = on_event;
return con;
}
int ami_connect(ami_connection* con, const char* hostname, const char* portno)
{
ami_disconnect(con);
int result = 0;
strncpy(con->message_frame, MESSAGE_FRAME_LOGIN, MESSAGE_FRAME_LEN);
struct addrinfo *host;
int err = getaddrinfo(hostname, portno, NULL, &host);
if (err) {
fprintf(stderr, "Unable to connect to AMI: %s\n", gai_strerror(err));
con->connected = 0;
return result;
}
con->sd = socket(AF_INET, SOCK_STREAM, 0);
int res = connect(con->sd, host->ai_addr, host->ai_addrlen);
if (res == 0) {
//printf("Connected to AMI\n");
con->connected = 1;
result = 1;
}
else {
fprintf(stderr, "Unable to connect to AMI: %s\n", strerror(errno));
con->connected = 0;
result = 0;
}
freeaddrinfo(host);
return result;
}
void ami_disconnect(ami_connection* con)
{
if (con->connected) {
close(con->sd);
con->sd = -1;
con->connected = 0;
//Let client know about disconnect
ami_event event;
memset(&event, 0, sizeof(event));
event.type = DISCONNECT;
con->event_callback(con, event);
}
}
void ami_free(ami_connection* con) {
ami_disconnect(con);
free(con);
}
/*
* Called by client when ami_connection has new data to process
*/
void ami_handle_data(ami_connection* con)
{
//printf("Handling data on AMI connection\n");
int idx = 0; //buffer position
char* message = NULL;
char buf[AMI_BUFLEN * 2 + 1];
//Read data from ami
memset(buf, 0, AMI_BUFLEN * 2 + 1);
if (read(con->sd, buf, AMI_BUFLEN-1) <= 0) {
ami_disconnect(con); //we have been disconnected
return;
}
//Concatenate left over data with newly read
if (strlen(con->left_over)) {
char tmp[AMI_BUFLEN * 2 + 1];
strcpy(tmp, con->left_over);
strcat(tmp, buf);
strcpy(buf, tmp);
con->left_over[0] = '\0';
}
ami_message message_type = UNKNOWN_MESSAGE;
ami_event event;
memset(&event, 0, sizeof(event));
while(idx < strlen(buf)) {
message_type = parse_buffer(con->message_frame, buf, &message, &idx);
if (message_type == UNKNOWN_MESSAGE) {
break;
}
switch (message_type) {
case LOGIN_MESSAGE:
//Send login event to client (time to log in...)
event.type = LOGIN;
con->event_callback(con, event);
ami_free_event(event);
break;
case EVENT_MESSAGE:
ami_handle_event(con, message + 7);
break;
case RESPONSE_MESSAGE:
ami_handle_response(con, message);
break;
default:
printf("Unknown data from AMI: %s\n", message);
break;
}
free(message);
}
//store remaining buffer until next packet is read
if (idx < strlen(buf)) {
strcpy(con->left_over, &buf[idx]);
}
}
/*
* ACTIONS
* Send an Action to AMI. We expect a response to this, so its possible to provide
* a callback that will be executed when a response is retrieved. There can only
* be one action pending at a time. If one is already pending, any new attempts
* will be ignored.
*/
/*
* Send command to reload sip channel.
* CHANNELRELOAD event will be received when reload is completed.
*
* Example response:
* "Response: Follows
* Privilege: Command
* --END COMMAND--"
*/
void ami_send_sip_reload(ami_connection* con, ami_response_cb on_response) {
//printf("Queueing Action: ami_send_sip_reload\n");
ami_action* action = malloc(sizeof(ami_action));
action->callback = on_response;
sprintf(action->message,"Action: Command\r\nCommand: sip reload\r\n\r\n");
queue_action(con, action);
}
/*
* Send username and password to AMI
*
* Example response:
* "Response: Success
* Message: Authentication accepted"
*/
void ami_send_login(ami_connection* con, char* username, char* password, ami_response_cb on_response)
{
//printf("Queueing Action: ami_send_login\n");
strncpy(con->message_frame, MESSAGE_FRAME, MESSAGE_FRAME_LEN); //Login sent, now there's always <CR><LF><CR><LR> after a message
ami_action* action = malloc(sizeof(ami_action));
action->callback = on_response;
sprintf(action->message,"Action: Login\r\nUsername: %s\r\nSecret: %s\r\n\r\n", username, password);
queue_action(con, action);
}
/*
* Request an indication on if BRCM module is loaded or not
*
* Example response:
* "Response: Follows
* Privilege: Command
* --END COMMAND--"
*/
void ami_send_brcm_module_show(ami_connection* con, ami_response_cb on_response) {
//printf("Queueing Action: ami_send_brcm_module_show\n");
ami_action* action = malloc(sizeof(ami_action));
action->callback = on_response;
sprintf(action->message, "Action: Command\r\nCommand: module show like chan_brcm\r\n\r\n");
queue_action(con, action);
}
/*
* Request an indication on the port configuration
*
* Example response:
* "Response: Success
* Message:
* FXS 2
* DECT 4"
*/
void ami_send_brcm_ports_show(ami_connection* con, ami_response_cb on_response) {
//printf("Queueing Action: ami_send_brcm_ports_show\n");
ami_action* action = malloc(sizeof(ami_action));
action->callback = on_response;
sprintf(action->message, "Action: BRCMPortsShow\r\n\r\n");
queue_action(con, action);
}
/*
* Request SIP Registry information
* (response is a simple message, then the registry events
* follow separately, one per registered account)
* Example response:
* Response: Success
* EventList: start
* Message: Registrations will follow
*
* Event: RegistryEntry
* Host: sip0
* Port: 5060
* Username: 0510409896
* Domain: 62.80.209.10
* DomainPort: 5060
* Refresh: 5385
* State: Registered
* RegistrationTime: 1401282865
*
* Event: RegistrationsComplete
* EventList: Complete
* ListItems: 1
*/
void ami_send_sip_show_registry(ami_connection* con, ami_response_cb on_response) {
ami_action* action = (ami_action*)malloc(sizeof(ami_action));
action->callback = on_response;
sprintf(action->message, "Action: SIPshowregistry\r\n\r\n");
queue_action(con, action);
}

View File

@@ -1,131 +0,0 @@
/*
* ami_connection.h
*
* Manage connections to AMI.
*
* Callbacks in client code will be called when events or responses have been received
* from AMI. There is no event loop built in, client should call ami_handle_data whenever
* new data is available on the connections filedescriptor.
*/
#define MESSAGE_FRAME "\r\n\r\n"
#define MESSAGE_FRAME_LOGIN "\r\n"
#define MESSAGE_FRAME_LEN 5
#define AMI_BUFLEN 512
typedef struct {
enum {
BRCM_UNKNOWN_EVENT,
BRCM_STATUS_EVENT,
BRCM_STATE_EVENT,
BRCM_MODULE_EVENT
} type;
struct {
int line_id;
int off_hook;
} status;
struct {
int line_id;
int subchannel_id;
char* state;
} state;
int module_loaded;
} brcm_event;
typedef struct {
char* account_name;
enum {
REGISTRY_UNKNOWN_EVENT,
REGISTRY_REQUEST_SENT_EVENT,
REGISTRY_UNREGISTERED_EVENT,
REGISTRY_REGISTERED_EVENT
} status;
} registry_event;
typedef struct {
char* host; //Account name (e.g. sip0)
int port; //5060
char* username; //0510409896
char* domain; //62.80.209.10
int domain_port; //5060
int refresh; //Refresh interval, 285
char* state; //Registration state Registered
int registration_time; //Registration timestamp, 1401282865
} registry_entry_event;
typedef struct {
enum {
CHANNELRELOAD_UNKNOWN_EVENT,
CHANNELRELOAD_SIP_EVENT
} channel_type;
} channel_reload_event;
typedef struct {
char* channel;
char* variable;
char* value;
} varset_event;
typedef enum ami_event_type {
LOGIN,
REGISTRY,
REGISTRY_ENTRY,
REGISTRATIONS_COMPLETE,
BRCM,
CHANNELRELOAD,
FULLYBOOTED,
VARSET,
DISCONNECT,
UNKNOWN_EVENT,
} ami_event_type;
typedef struct ami_event {
ami_event_type type;
brcm_event* brcm_event;
registry_event* registry_event;
registry_entry_event* registry_entry_event;
channel_reload_event* channel_reload_event;
varset_event* varset_event;
} ami_event;
typedef struct ami_connection ami_connection;
typedef struct ami_action ami_action;
typedef void (*ami_event_cb) (ami_connection* con, ami_event event);
typedef void (*ami_response_cb) (ami_connection* con, char* buf);
/*
* Holds data related to an AMI connection
*/
struct ami_connection {
int connected; //ami_connection is connected to asterisk
int sd;
char message_frame[MESSAGE_FRAME_LEN];
char left_over[AMI_BUFLEN * 2 + 1];
ami_event_cb event_callback;
ami_action* current_action;
};
ami_connection* ami_init(ami_event_cb on_event);
int ami_connect(ami_connection* con, const char* hostname, const char* portno);
void ami_disconnect(ami_connection* con);
void ami_free(ami_connection* con);
/*
* Call when new data is available
*/
void ami_handle_data(ami_connection* con);
/*
* Actions
*/
struct ami_action {
char message[AMI_BUFLEN];
ami_response_cb callback;
ami_action* next_action;
};
void ami_send_sip_reload(ami_connection* con, ami_response_cb on_response);
void ami_send_login(ami_connection* con, char*username, char* password, ami_response_cb on_response);
void ami_send_brcm_module_show(ami_connection* con, ami_response_cb on_response);
void ami_send_brcm_ports_show(ami_connection* con, ami_response_cb on_response);
void ami_send_sip_show_registry(ami_connection* con, ami_response_cb on_response);

File diff suppressed because it is too large Load Diff

View File

@@ -1,250 +0,0 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <netdb.h>
#include <sys/socket.h>
#include <unistd.h>
#include <time.h>
#include <arpa/inet.h>
//For dynamic firewall support
#define IPTABLES_CHAIN "zone_wan_input"
#define IPTABLES_BIN "iptables"
#define IPTABLES_FILE "/etc/firewall.sip"
#ifdef USE_IPV6
#define IP6TABLES_BIN "ip6tables"
#define IP6TABLES_FILE "/etc/firewall6.sip"
#endif
#define ECHO_BIN "echo"
#define UCI_BIN "uci"
#define UCI_VOICE_PACKAGE "voice_client"
#ifndef NI_MAXHOST
#define NI_MAXHOST 65
#endif
#define MAX_IP_LIST_LENGTH 20
#define RTP_RANGE_START_DEFAULT 10000
#define RTP_RANGE_END_DEFAULT 20000
#define BUFLEN 512
typedef struct IP
{
int family;
char addr[NI_MAXHOST];
} IP;
typedef enum AMI_STATE {
DISCONNECTED, //Not connected to AMI
CONNECTED, //Connected to AMI
LOGGED_IN, //Logged in to AMI
READY //Ready to handle all events
} AMI_STATE;
AMI_STATE state;
typedef enum LED_STATE
{
LS_OK,
LS_NOTICE,
LS_ALERT,
LS_ERROR,
LS_OFF,
LS_UNKNOWN
} LED_STATE;
#define MAX_LED_STATE 10
typedef struct LED_STATE_MAP
{
LED_STATE state;
char str[MAX_LED_STATE];
} LED_STATE_MAP;
static const LED_STATE_MAP led_states[] =
{
{LS_OK, "ok"},
{LS_NOTICE, "notice"},
{LS_ALERT, "alert"},
{LS_ERROR, "error"},
{LS_OFF, "off"},
{LS_UNKNOWN, "-"},
};
typedef enum LED_NAME
{
LN_DSL,
LN_WIFI,
LN_WPS,
LN_LAN,
LN_STATUS,
LN_DECT,
LN_TV,
LN_USB,
LN_WAN,
LN_INTERNET,
LN_VOICE1,
LN_VOICE2,
LN_ECO,
LN_ALL,
LN_UNKNOWN
} LED_NAME;
#define MAX_LED_NAME 13
typedef struct LED_NAME_MAP
{
LED_NAME name;
char str[MAX_LED_NAME];
} LED_NAME_MAP;
static const LED_NAME_MAP led_names[] =
{
{LN_DSL, "led.dsl"},
{LN_WIFI, "led.wifi"},
{LN_WPS, "led.wps"},
{LN_LAN, "led.lan"},
{LN_STATUS, "led.status"},
{LN_DECT, "led.dect"},
{LN_TV, "led.tv"},
{LN_USB, "led.usb"},
{LN_WAN, "led.wan"},
{LN_INTERNET, "led.internet"},
{LN_VOICE1, "led.voice1"},
{LN_VOICE2, "led.voice2"},
{LN_ECO, "led.eco"},
{LN_ALL, "All"},
{LN_UNKNOWN, "-"}
};
typedef struct LED_CURRENT_STATE_MAP
{
LED_NAME name;
LED_STATE state;
} LED_CURRENT_STATE_MAP;
static LED_CURRENT_STATE_MAP led_current_states[] =
{
{LN_VOICE1, LS_UNKNOWN},
{LN_VOICE2, LS_UNKNOWN},
{LN_UNKNOWN, LS_UNKNOWN}
};
//These are used to map SIP peer name to a port
//CPE may be configured to share the same SIP-account for several ports or to use individual accounts
typedef enum BRCM_PORT
{
PORT_BRCM0 = 0,
PORT_BRCM1,
PORT_BRCM2,
PORT_BRCM3,
PORT_BRCM4,
PORT_BRCM5,
PORT_ALL,
PORT_UNKNOWN
} BRCM_PORT;
typedef struct SUBCHANNEL
{
char state[80];
} SUBCHANNEL;
#define MAX_PORT_NAME 10
typedef struct PORT_MAP
{
char name[MAX_PORT_NAME];
BRCM_PORT port;
int off_hook;
SUBCHANNEL sub[2]; //TODO define for number of subchannels?
struct ubus_object *ubus_object;
} PORT_MAP;
static PORT_MAP brcm_ports[] =
{
{"brcm0", PORT_BRCM0, 0, { {"ONHOOK"}, {"ONHOOK"} }, NULL },
{"brcm1", PORT_BRCM1, 0, { {"ONHOOK"}, {"ONHOOK"} }, NULL },
{"brcm2", PORT_BRCM2, 0, { {"ONHOOK"}, {"ONHOOK"} }, NULL },
{"brcm3", PORT_BRCM3, 0, { {"ONHOOK"}, {"ONHOOK"} }, NULL },
{"brcm4", PORT_BRCM4, 0, { {"ONHOOK"}, {"ONHOOK"} }, NULL },
{"brcm5", PORT_BRCM5, 0, { {"ONHOOK"}, {"ONHOOK"} }, NULL },
//Add other ports here as needed
{"port_all", PORT_ALL, 0, { {"ONHOOK"}, {"ONHOOK"} }, NULL },
{"-", PORT_UNKNOWN, 0, { {"ONHOOK"}, {"ONHOOK"} }, NULL },
};
typedef enum SIP_ACCOUNT_ID
{
SIP_ACCOUNT_0 = 0,
SIP_ACCOUNT_1,
SIP_ACCOUNT_2,
SIP_ACCOUNT_3,
SIP_ACCOUNT_4,
SIP_ACCOUNT_5,
SIP_ACCOUNT_6,
SIP_ACCOUNT_7,
SIP_ACCOUNT_UNKNOWN
} SIP_ACCOUNT_ID;
#define MAX_ACCOUNT_NAME 10
typedef struct SIP_ACCOUNT
{
SIP_ACCOUNT_ID id;
char name[MAX_ACCOUNT_NAME];
} SIP_ACCOUNT;
static const SIP_ACCOUNT sip_accounts[] = {
{SIP_ACCOUNT_0, "sip0"},
{SIP_ACCOUNT_1, "sip1"},
{SIP_ACCOUNT_2, "sip2"},
{SIP_ACCOUNT_3, "sip3"},
{SIP_ACCOUNT_4, "sip4"},
{SIP_ACCOUNT_5, "sip5"},
{SIP_ACCOUNT_6, "sip6"},
{SIP_ACCOUNT_7, "sip7"},
{SIP_ACCOUNT_UNKNOWN, "-"}
};
#define MAX_SIP_PEERS 10
#define MAX_SIP_PEER_NAME 10
#define MAX_SIP_PEER_USERNAME 128
#define MAX_SIP_PEER_DOMAIN 128
#define MAX_SIP_PEER_STATE 128
typedef struct SIP_PEER
{
SIP_ACCOUNT account;
int sip_registry_request_sent; //Bool indicating if we have sent a registration request
int sip_registry_registered; //Bool indicating if we are registered or not
time_t sip_registry_time; //The time when we received the registry event
IP ip_list[MAX_IP_LIST_LENGTH]; //IP addresses of the sip registrar
int ip_list_length; //Number of addresses
//Info from sip show registry
int port; //The port we are connected to
char username[MAX_SIP_PEER_USERNAME]; //Our username
char domain[MAX_SIP_PEER_DOMAIN]; //The domain we are registered on
int domain_port; //The domain port
int refresh; //Refresh interval for this registration
char state[MAX_SIP_PEER_STATE]; //Registration state e.g. Registered
time_t registration_time; //Registration timestamp, 1401282865
struct ubus_object *ubus_object;
} SIP_PEER;
/*
* Struct that stores configuration for a LED
*/
typedef struct {
LED_STATE state;
LED_NAME name;
int num_ports;
PORT_MAP** ports; //Array of pointers to brcm ports that govern this leds state
int num_peers;
SIP_PEER** peers;//Array of pointers to sip peers that govern this leds state
} Led;
void init_sip_peers();
void manage_leds();
void manage_led(LED_NAME led, LED_STATE state);
LED_STATE get_led_state(Led* led);
void configure_leds();
void free_led_config();

View File

@@ -1,208 +0,0 @@
/*-
* Copyright (c) 2011 Felix Fietkau <nbd@openwrt.org>
* Copyright (c) 2010 Isilon Systems, Inc.
* Copyright (c) 2010 iX Systems, Inc.
* Copyright (c) 2010 Panasas, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice unmodified, this list of conditions, and the following
* disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _LINUX_LIST_H_
#define _LINUX_LIST_H_
#include <stddef.h>
#include <stdbool.h>
#define prefetch(x)
#ifndef container_of
#define container_of(ptr, type, member) \
({ \
const typeof(((type *) NULL)->member) *__mptr = (ptr); \
(type *) ((char *) __mptr - offsetof(type, member)); \
})
#endif
struct list_head {
struct list_head *next;
struct list_head *prev;
};
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#undef LIST_HEAD
#define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name)
static inline void
INIT_LIST_HEAD(struct list_head *list)
{
list->next = list->prev = list;
}
static inline bool
list_empty(const struct list_head *head)
{
return (head->next == head);
}
static inline bool
list_is_first(const struct list_head *list,
const struct list_head *head)
{
return list->prev == head;
}
static inline bool
list_is_last(const struct list_head *list,
const struct list_head *head)
{
return list->next == head;
}
static inline void
_list_del(struct list_head *entry)
{
entry->next->prev = entry->prev;
entry->prev->next = entry->next;
}
static inline void
list_del(struct list_head *entry)
{
_list_del(entry);
entry->next = entry->prev = NULL;
}
static inline void
_list_add(struct list_head *_new, struct list_head *prev,
struct list_head *next)
{
next->prev = _new;
_new->next = next;
_new->prev = prev;
prev->next = _new;
}
static inline void
list_del_init(struct list_head *entry)
{
_list_del(entry);
INIT_LIST_HEAD(entry);
}
#define list_entry(ptr, type, field) container_of(ptr, type, field)
#define list_first_entry(ptr, type, field) list_entry((ptr)->next, type, field)
#define list_last_entry(ptr, type, field) list_entry((ptr)->prev, type, field)
#define list_for_each(p, head) \
for (p = (head)->next; p != (head); p = p->next)
#define list_for_each_safe(p, n, head) \
for (p = (head)->next, n = p->next; p != (head); p = n, n = p->next)
#define list_for_each_entry(p, h, field) \
for (p = list_first_entry(h, typeof(*p), field); &p->field != (h); \
p = list_entry(p->field.next, typeof(*p), field))
#define list_for_each_entry_safe(p, n, h, field) \
for (p = list_first_entry(h, typeof(*p), field), \
n = list_entry(p->field.next, typeof(*p), field); &p->field != (h);\
p = n, n = list_entry(n->field.next, typeof(*n), field))
#define list_for_each_entry_reverse(p, h, field) \
for (p = list_last_entry(h, typeof(*p), field); &p->field != (h); \
p = list_entry(p->field.prev, typeof(*p), field))
#define list_for_each_prev(p, h) for (p = (h)->prev; p != (h); p = p->prev)
#define list_for_each_prev_safe(p, n, h) for (p = (h)->prev, n = p->prev; p != (h); p = n, n = p->prev)
static inline void
list_add(struct list_head *_new, struct list_head *head)
{
_list_add(_new, head, head->next);
}
static inline void
list_add_tail(struct list_head *_new, struct list_head *head)
{
_list_add(_new, head->prev, head);
}
static inline void
list_move(struct list_head *list, struct list_head *head)
{
_list_del(list);
list_add(list, head);
}
static inline void
list_move_tail(struct list_head *entry, struct list_head *head)
{
_list_del(entry);
list_add_tail(entry, head);
}
static inline void
_list_splice(const struct list_head *list, struct list_head *prev,
struct list_head *next)
{
struct list_head *first;
struct list_head *last;
if (list_empty(list))
return;
first = list->next;
last = list->prev;
first->prev = prev;
prev->next = first;
last->next = next;
next->prev = last;
}
static inline void
list_splice(const struct list_head *list, struct list_head *head)
{
_list_splice(list, head, head->next);
}
static inline void
list_splice_tail(struct list_head *list, struct list_head *head)
{
_list_splice(list, head->prev, head);
}
static inline void
list_splice_init(struct list_head *list, struct list_head *head)
{
_list_splice(list, head, head->next);
INIT_LIST_HEAD(list);
}
static inline void
list_splice_tail_init(struct list_head *list, struct list_head *head)
{
_list_splice(list, head->prev, head);
INIT_LIST_HEAD(list);
}
#endif /* _LINUX_LIST_H_ */

View File

@@ -1,204 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Copyright (C) 2008 John Crispin <blogic@openwrt.org>
*/
#include <string.h>
#include <stdlib.h>
#include <uci_config.h>
#include <uci.h>
#include "ucix.h"
static struct uci_ptr ptr;
static inline int ucix_get_ptr(struct uci_context *ctx, const char *p, const char *s, const char *o, const char *t)
{
memset(&ptr, 0, sizeof(ptr));
ptr.package = p;
ptr.section = s;
ptr.option = o;
ptr.value = t;
return uci_lookup_ptr(ctx, &ptr, NULL, true);
}
struct uci_context* ucix_init(const char *config_file)
{
struct uci_context *ctx = uci_alloc_context();
uci_add_delta_path(ctx, "/var/state");
if(uci_load(ctx, config_file, NULL) != UCI_OK)
{
printf("%s/%s is missing or corrupt\n", ctx->savedir, config_file);
return NULL;
}
return ctx;
}
struct uci_context* ucix_init_path(const char *path, const char *config_file)
{
struct uci_context *ctx = uci_alloc_context();
if(path)
uci_set_confdir(ctx, path);
if(uci_load(ctx, config_file, NULL) != UCI_OK)
{
printf("%s/%s is missing or corrupt\n", ctx->savedir, config_file);
return NULL;
}
return ctx;
}
void ucix_cleanup(struct uci_context *ctx)
{
uci_free_context(ctx);
}
void ucix_save(struct uci_context *ctx)
{
uci_set_savedir(ctx, "/tmp/.uci/");
uci_save(ctx, NULL);
}
void ucix_save_state(struct uci_context *ctx)
{
uci_set_savedir(ctx, "/var/state/");
uci_save(ctx, NULL);
}
int ucix_get_option_list(struct uci_context *ctx, const char *p,
const char *s, const char *o, struct list_head *l)
{
struct uci_element *e = NULL;
if(ucix_get_ptr(ctx, p, s, o, NULL))
return 1;
if (!(ptr.flags & UCI_LOOKUP_COMPLETE))
return 1;
e = ptr.last;
switch (e->type)
{
case UCI_TYPE_OPTION:
switch(ptr.o->type) {
case UCI_TYPE_LIST:
uci_foreach_element(&ptr.o->v.list, e)
{
struct ucilist *ul = malloc(sizeof(struct ucilist));
ul->val = strdup((e->name)?(e->name):(""));
list_add_tail(&ul->list, l);
}
break;
default:
break;
}
break;
default:
return 1;
}
return 0;
}
const char* ucix_get_option(struct uci_context *ctx, const char *p, const char *s, const char *o)
{
struct uci_element *e = NULL;
const char *value = NULL;
if(ucix_get_ptr(ctx, p, s, o, NULL))
return NULL;
if (!(ptr.flags & UCI_LOOKUP_COMPLETE))
return NULL;
e = ptr.last;
switch (e->type)
{
case UCI_TYPE_SECTION:
value = uci_to_section(e)->type;
break;
case UCI_TYPE_OPTION:
switch(ptr.o->type) {
case UCI_TYPE_STRING:
value = ptr.o->v.string;
break;
default:
value = NULL;
break;
}
break;
default:
return 0;
}
return value;
}
int ucix_get_option_int(struct uci_context *ctx, const char *p, const char *s, const char *o, int def)
{
const char *tmp = ucix_get_option(ctx, p, s, o);
int ret = def;
if (tmp)
ret = atoi(tmp);
return ret;
}
void ucix_add_section(struct uci_context *ctx, const char *p, const char *s, const char *t)
{
if(ucix_get_ptr(ctx, p, s, NULL, t))
return;
uci_set(ctx, &ptr);
}
void ucix_add_option(struct uci_context *ctx, const char *p, const char *s, const char *o, const char *t)
{
if(ucix_get_ptr(ctx, p, s, o, (t)?(t):("")))
return;
uci_set(ctx, &ptr);
}
void ucix_add_option_int(struct uci_context *ctx, const char *p, const char *s, const char *o, int t)
{
char tmp[64];
snprintf(tmp, 64, "%d", t);
ucix_add_option(ctx, p, s, o, tmp);
}
void ucix_del(struct uci_context *ctx, const char *p, const char *s, const char *o)
{
if(!ucix_get_ptr(ctx, p, s, o, NULL))
uci_delete(ctx, &ptr);
}
void ucix_revert(struct uci_context *ctx, const char *p, const char *s, const char *o)
{
if(!ucix_get_ptr(ctx, p, s, o, NULL))
uci_revert(ctx, &ptr);
}
void ucix_for_each_section_type(struct uci_context *ctx,
const char *p, const char *t,
void (*cb)(const char*, void*), void *priv)
{
struct uci_element *e;
if(ucix_get_ptr(ctx, p, NULL, NULL, NULL))
return;
uci_foreach_element(&ptr.p->sections, e)
if (!strcmp(t, uci_to_section(e)->type))
cb(e->name, priv);
}
int ucix_commit(struct uci_context *ctx, const char *p)
{
if(ucix_get_ptr(ctx, p, NULL, NULL, NULL))
return 1;
return uci_commit(ctx, &ptr.p, false);
}

View File

@@ -1,54 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Copyright (C) 2008 John Crispin <blogic@openwrt.org>
*/
#ifndef _UCI_H__
#define _UCI_H__
#include "list.h"
struct ucilist {
struct list_head list;
char *val;
};
struct uci_context* ucix_init(const char *config_file);
struct uci_context* ucix_init_path(const char *path, const char *config_file);
void ucix_cleanup(struct uci_context *ctx);
void ucix_save(struct uci_context *ctx);
void ucix_save_state(struct uci_context *ctx);
const char* ucix_get_option(struct uci_context *ctx,
const char *p, const char *s, const char *o);
int ucix_get_option_list(struct uci_context *ctx, const char *p,
const char *s, const char *o, struct list_head *l);
int ucix_get_option_int(struct uci_context *ctx,
const char *p, const char *s, const char *o, int def);
void ucix_add_section(struct uci_context *ctx,
const char *p, const char *s, const char *t);
void ucix_add_option(struct uci_context *ctx,
const char *p, const char *s, const char *o, const char *t);
void ucix_add_option_int(struct uci_context *ctx,
const char *p, const char *s, const char *o, int t);
int ucix_commit(struct uci_context *ctx, const char *p);
void ucix_revert(struct uci_context *ctx,
const char *p, const char *s, const char *o);
void ucix_del(struct uci_context *ctx, const char *p,
const char *s, const char *o);
void ucix_for_each_section_type(struct uci_context *ctx,
const char *p, const char *t,
void (*cb)(const char*, void*), void *priv);
#endif

View File

@@ -1,7 +0,0 @@
config ANYFI_CONTROLLER
string "Controller IP or FQDN"
depends PACKAGE_anyfi
help
The default IP address or fully qualified domain name (FQDN)
of the Controller that should manage the Anyfi.net software.

View File

@@ -1,61 +0,0 @@
include $(TOPDIR)/rules.mk
ANYFI_TARGET := $(ARCH)-linux-$(subst C,c,$(LIBC))-$(LIBCV)
PKG_NAME := anyfi
PKG_VERSION := 1.3.9
PKG_RELEASE := 1
PKG_SOURCE := anyfimac-$(PKG_VERSION)-$(ANYFI_TARGET).tar.bz2
PKG_SOURCE_URL := http://anyfi.net/download
PKG_BUILD_DIR := $(BUILD_DIR)/anyfimac-$(PKG_VERSION)-$(ANYFI_TARGET)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION := net
CATEGORY := Network
TITLE := Anyfi.net - Free SDWN Data Plane for IEEE 802.11
URL := http://anyfi.net
DEPENDS := +kmod-tun +librt +wl-anyfi
MAINTAINER := Anyfi Networks <eng@anyfinetworks.com>
endef
define Package/$(PKG_NAME)/description
Anyfi.net is a free Software-Defined Wirless Networking (SDWN)
forwarding data plane implementation for IEEE 802.11.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
define Build/Configure
echo "config anyfi controller" > $(PKG_BUILD_DIR)/anyfi.conf
echo " option 'hostname' $(CONFIG_ANYFI_CONTROLLER)" >> \
$(PKG_BUILD_DIR)/anyfi.conf
echo "config anyfi optimizer" >> $(PKG_BUILD_DIR)/anyfi.conf
endef
define Build/Compile
@echo "Nothing to do - Anyfi.net software comes pre-built."
endef
define Package/$(PKG_NAME)/conffiles
/etc/config/anyfi
endef
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/anyfi.conf $(1)/etc/config/anyfi
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/anyfimac $(1)/sbin
$(LN) anyfimac $(1)/sbin/anyfid
$(LN) anyfimac $(1)/sbin/myfid
$(INSTALL_DIR) $(1)/bin
$(LN) ../sbin/anyfimac $(1)/bin/anyfidctl
$(LN) ../sbin/anyfimac $(1)/bin/myfidctl
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,558 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2013-2014 Anyfi Networks AB.
#
# Overview of the Integration
# ===========================
#
# Anyfi.net software consists of two user space daemons; the radio daemon
# anyfid and the tunnel termination daemon myfid. They communicate with each
# other and with a Controller [1] over UDP/IP.
#
# The radio daemon anyfid provides guests with access to remote Wi-Fi networks.
# It needs a Wi-Fi monitor interface to detect when guest devices come within
# range and a pool of virtual access points to serve them. The integration is
# responsible for creating the monitor interface and the pool of virtual access
# points; anyfid handles the rest.
#
# The tunnel termination daemon myfid provides remote access to the local Wi-Fi
# network. It is up to the integration to configure myfid to authenticate remote
# devices in the same way that devices are authenticated when connecting
# locally.
#
# Myfid is also responsible for telling the controller the MAC address of
# devices that connect locally, so that they can later be offered seamless
# remote access whenever they come close to another access point running anyfid.
# However, when the user changes the WPA passphrase all such associations
# between previously connected devices and the local Wi-Fi network should be
# removed. The integration does so by passing myfid the --reset flag.
#
# Below is the integration logic in pseudo code. If you need to integrate
# Anyfi.net software in your own firmware build environment you can find step
# by step instructions at http://anyfi.net/integration.
#
# 1. A Community Edition of the Controller is available for download at
# http://www.anyfinetworks.com/download. You can also use the public
# demonstration controller at "demo.anyfi.net".
#
#
# Integration Logic in Pseudo Code
# ================================
#
# After enabling a Wi-Fi device:
# IF a controller is configured AND Anyfi.net is not disabled
# ALLOCATE monitor interface and virtual access point pool for anyfid
# START anyfid
#
# FOREACH Wi-Fi interface of this device
# IF a controller is configured AND Anyfi.net is not disabled
# GENERATE a config file for myfid
#
# IF the WPA passphrase has changed
# ADD the --reset flag to myfid arguments
#
# START myfid on the Wi-Fi interface
#
# After disabling a Wi-Fi device:
# STOP anyfid
#
# FOREACH Wi-Fi interface of this device
# STOP myfid on the Wi-Fi interface
#
# NOTE 1: The integration provides remote access to all Wi-Fi interfaces on the
# system that have anyfi_disabled set to 0. Each interface will have
# its own myfid daemon. There should however only be one anyfid daemon
# per radio.
#
# NOTE 2: On concurrent dual band routers each radio should have its own anyfid
# daemon.
#
#
# Anyfi.net UCI data model
# ========================
#
# Anyfi.net global parameters:
#
# Name Type Default Description
# controller
# .hostname IP or FQDN demo.anyfi.net Controller IP or FQDN
# .key path - Controller public key PEM file
# optimizer
# .key path - Optimizer public key PEM file
#
# Wi-Fi device parameters:
#
# Name Type Default Description
# anyfi_disabled boolean 0 Enable/disable guest access on this radio
# anyfi_iface port - Bind anyfid to a WAN interface IP address
# anyfi_port number - Bind anyfid to a SDWN UDP port
# anyfi_floor percent 5 Min backhaul and spectrum allocation
# anyfi_ceiling percent 75 Max backhaul and spectrum allocation
# anyfi_uplink integer - WAN uplink capacity in bits per second
# anyfi_downlink integer - WAN downlink capacity in bits per second
# anyfi_bssids integer - Max number of virtual interfaces to use
# anyfi_clients integer - Max number of concurrent guest users
#
# Wi-Fi interface parameters:
#
# Name Type Default Description
# anyfi_disabled boolean 0 Enable remote access on this network
# anyfi_iface string - Bind myfid to a WAN interface IP
# address
# anyfi_port port - Bind myfid to a SDWN UDP port
# anyfi_autz_server IP - RADIUS authorization server IP
# anyfi_autz_port port 1812 RADIUS authorization server UDP port
# anyfi_autz_secret string - RADIUS authorization server shared
# secret
# anyfi_acct_server IP - RADIUS extra accounting server IP
# anyfi_acct_port port 1813 RADIUS extra accounting server UDP port
# anyfi_acct_secret string - RADIUS extra accounting server shared
# secret
append ENABLE_HOOKS anyfi_enable
append DISABLE_HOOKS anyfi_disable
# Daemon run dir for temporary files.
RUNDIR=/var/run
# Config file dir for persistent configuration files.
CONFDIR=/etc
##### Wi-Fi device handling ##################################################
# Get the channel for Wi-Fi device.
# anyfi_dev_get_channel <device>
anyfi_dev_get_channel() {
local device="$1"
local hwmode channel
config_get hwmode "$device" hwmode
config_get channel "$device" channel
if [ "$channel" = auto -o "$channel" = 0 ]; then
case "$hwmode" in
auto)
channel=auto
;;
*b*|*g*)
channel=auto2
;;
*a*)
channel=auto5
;;
esac
fi
echo "$channel"
}
# Get the WLAN interface list for a WLAN device.
# anyfi_get_vifs <device>
anyfi_get_vifs() {
local device=$1
local vifs=""
local cfg
for cfg in $CONFIG_SECTIONS; do
local type dev
config_get type "$cfg" TYPE
config_get dev "$cfg" device
if [ "$type" = wifi-iface ] && [ "$dev" = "$device" ]; then
append vifs "$cfg"
fi
done
echo "$vifs"
}
# Start the Anyfi.net radio head daemon anyfid on a device.
# anyfi_dev_start <device> <type> <controller> <controller_key>
anyfi_dev_start()
{
local device="$1"
local type="$2"
local controller="$3"
local controller_key="$4"
local nvifs bssids monitor iflist
# Determine how many virtual interfaces we should use
config_get bssids "$device" anyfi_bssids
nvifs=$(anyfi_get_vifs "$device" | wc -w)
if [ -n "$bssids" ]; then
# Limit the number of virtual interfaces to 32
[ "$bssids" -lt 32 ] || bssids=32
elif [ $nvifs -lt 4 ]; then
# Don't use more that 8 interfaces in total if possible...
bssids=$((8 - $nvifs))
else
# ...but try to allocate at least 4 interfaces for anyfid.
bssids=4
fi
# ALLOCATE monitor and pool of virtual access points
if monitor=$(anyfi_${type}_alloc_monitor "$device") && \
iflist=$(anyfi_${type}_alloc_iflist "$device" $bssids)
then
local args=""
local wanif port floor ceiling uplink downlink clients
config_get wanif "$device" anyfi_iface
config_get port "$device" anyfi_port
config_get floor "$device" anyfi_floor
config_get ceiling "$device" anyfi_ceiling
config_get uplink "$device" anyfi_uplink
config_get downlink "$device" anyfi_downlink
config_get clients "$device" anyfi_clients
# If there are no interfaces on this device then
# anyfid controls channel
if [ "$nvifs" -eq 0 ]; then
args="$args --channel=$(anyfi_dev_get_channel $device)"
fi
[ -n "$wanif" ] && args="$args --bind-if=$wanif"
[ -n "$port" ] && args="$args --bind-port=$port"
[ -n "$floor" ] && args="$args --floor=$floor"
[ -n "$ceiling" ] && args="$args --ceiling=$ceiling"
[ -n "$uplink" ] && args="$args --uplink=$uplink"
[ -n "$downlink" ] && args="$args --downlink=$downlink"
[ -n "$clients" ] && args="$args --max-clients=$clients"
[ -n "$controller_key" ] && \
args="$args --controller-key=$controller_key"
# START anyfid
echo "$device: starting anyfid"
/sbin/anyfid --accept-license -C "$controller" -B \
-P $RUNDIR/anyfid_$device.pid $args \
$monitor $iflist
else
echo "$device: failed to allocate anyfid interfaces" 1>&2
fi
}
##### Wi-Fi interface handling ###############################################
# Get the printable name of an interface.
anyfi_vif_get_name() {
local ifname
config_get ifname "$1" ifname
echo "${ifname:-$1}"
}
# Generate the config file for myfid from UCI variables.
# anyfi_vif_gen_config <vif>
anyfi_vif_gen_config() {
local vif="$1"
local name="$(anyfi_vif_get_name $1)"
local device net ssid enc key isolate ifname
config_get device "$vif" device
config_get net "$vif" network
config_get ssid "$vif" ssid
config_get enc "$vif" encryption
config_get key "$vif" key
config_get isolate "$vif" isolate
config_get ifname "$vif" ifname
# Check basic settings before proceeding
[ -n "$net" ] || [ -n "$ssid" ] || return 1
local auth_proto auth_mode auth_cache group_rekey
local ciphers wpa_ciphers rsn_ciphers passphrase
local auth_server auth_port auth_secret
local autz_server autz_port autz_secret
local acct_server acct_port acct_secret
local acct2_server acct2_port acct2_secret
local radius_nasid
# Resolve explicit cipher overrides (tkip, ccmp or tkip+ccmp)
case "$enc" in
*+tkip+ccmp|*+tkip+aes)
ciphers=tkip+ccmp
;;
*+ccmp|*+aes)
ciphers=ccmp
;;
*+tkip)
ciphers=tkip
;;
esac
# Resolve authentication protocol (WPA or WPA2)
case "$enc" in
psk-mixed*|wpa-mixed*|mixed-psk*|mixed-wpa*)
auth_proto=wpa+rsn
wpa_ciphers=$ciphers
rsn_ciphers=$ciphers
;;
psk2*|wpa2*)
auth_proto=rsn
rsn_ciphers=$ciphers
;;
psk*|wpa*)
auth_proto=wpa
wpa_ciphers=$ciphers
;;
none)
echo "$name: no remote access for security reasons (open network)" 1>&2
return 1
;;
wep*)
echo "$name: no remote access for security reasons (wep is insecure)" 1>&2
return 1
;;
*)
echo "$name: unrecognized encryption type $enc" 1>&2
return 1
;;
esac
# Resolve authenticator mode (PSK or 802.1X)
case "$enc" in
psk*)
auth_mode=psk
passphrase=$key
[ -n "$passphrase" ] || return 1
;;
wpa*)
auth_mode=eap
config_get auth_server "$vif" radius_server
config_get auth_port "$vif" radius_port
config_get auth_secret "$vif" radius_secret
config_get acct_server "$vif" acct_server
config_get acct_port "$vif" acct_port
config_get acct_secret "$vif" acct_secret
config_get auth_cache "$vif" auth_cache
config_get group_rekey "$vif" wpa_group_rekey
[ -n "$auth_server" ] || return 1
[ -n "$auth_secret" ] || auth_secret="$key"
[ -n "$acct_server" -a -z "$acct_secret" ] && acct_secret="$key"
;;
none)
;;
*)
echo "$name: no remote access ('encryption' not configured)" 1>&2
return 1
;;
esac
# Optional RADIUS authorization and accounting for Anyfi.net
config_get autz_server "$vif" anyfi_autz_server
config_get autz_port "$vif" anyfi_autz_port
config_get autz_secret "$vif" anyfi_autz_secret
config_get acct2_server "$vif" anyfi_acct_server
config_get acct2_port "$vif" anyfi_acct_port
config_get acct2_secret "$vif" anyfi_acct_secret
config_get radius_nasid "$vif" radius_nasid
# Generate common config file options
cat <<EOF
ssid = '$ssid'
bridge = br-$net
auth_proto = $auth_proto
EOF
# Generate dependent config file options
[ "$isolate" = 1 ] && echo "isolation = 1"
[ -n "$ifname" ] && echo "local_ap = $ifname"
[ -n "$auth_mode" ] && echo "auth_mode = $auth_mode"
[ -n "$auth_cache" ] && echo "auth_cache = $auth_cache"
[ -n "$rsn_ciphers" ] && echo "rsn_ciphers = $rsn_ciphers"
[ -n "$wpa_ciphers" ] && echo "wpa_ciphers = $wpa_ciphers"
[ -n "$group_rekey" ] && echo "group_rekey = $group_rekey"
[ -n "$passphrase" ] && echo "passphrase = '$passphrase'"
[ -n "$radius_nasid" ] && echo "radius_nas_id = $radius_nas_id"
if [ -n "$auth_server" ] && [ -n "$auth_secret" ]; then
echo "radius_auth_server = $auth_server"
echo "radius_auth_port = ${auth_port:-1812}"
echo "radius_auth_secret = $auth_secret"
fi
if [ -n "$acct_server" ] && [ -n "$acct_secret" ]; then
echo "radius_acct_server = $acct_server"
echo "radius_acct_port = ${acct_port:-1813}"
echo "radius_acct_secret = $acct_secret"
fi
if [ -n "$autz_server" ] && [ -n "$autz_secret" ]; then
echo "radius_autz_server = $autz_server"
echo "radius_autz_port = ${autz_port:-1812}"
echo "radius_autz_secret = $autz_secret"
fi
if [ -n "$acct2_server" ] && [ -n "$acct2_secret" ]; then
echo "radius_acct2_server = $acct2_server"
echo "radius_acct2_port = ${acct2_port:-1813}"
echo "radius_acct2_secret = $acct2_secret"
fi
return 0
}
# Get the current value from a myfid configuration file.
# anyfi_vif_get_config <file> <config>
anyfi_vif_get_config() {
local file="$1"
local key="$2"
[ -e "$file" ] || return 1
# Assume the format is exactly "key = value",
# where value may or may not be in ''
grep "$key = " $file | cut -d '=' -f2- | cut -b2- | \
sed -e "/^'.*'$/s/^'\\(.*\\)'$/\\1/"
}
# Start the Anyfi.net tunnel-termination daemon myfid on an interface.
# anyfi_vif_start <vif> <controller> <controller_key> <optimizer_key>
anyfi_vif_start()
{
local vif="$1"
local controller="$2"
local controller_key="$3"
local optimizer_key="$4"
local name="$(anyfi_vif_get_name $vif)"
local pid_file="$RUNDIR/myfid_$name.pid"
local conf_file="$CONFDIR/myfid_$name.conf"
local new_conf_file="$RUNDIR/myfid_$name.conf"
# GENERATE a config file for myfid
if (anyfi_vif_gen_config $vif) > $new_conf_file; then
local controller_key optimizer_key
local key old_key wanif port
local args=""
config_get key "$vif" key
config_get wanif "$vif" anyfi_iface
config_get port "$vif" anyfi_port
# ADD optional arguments
[ -n "$wanif" ] && args="$args --bind-if=$wanif"
[ -n "$port" ] && args="$args --bind-port=$port"
[ -n "$controller_key" ] && \
args="$args --controller-key=$controller_key"
[ -n "$optimizer_key" ] && \
args="$args --optimizer-key=$optimizer_key"
# ADD the --reset flag to myfid arguments if the passphrase
# has changed or myfid is started for the first time
old_key="$(anyfi_vif_get_config $conf_file passphrase)"
[ "$key" == "$old_key" ] || args="$args --reset"
# Update the myfid config file in flash only if needed
if ! cmp -s $new_conf_file $conf_file; then
mv $new_conf_file $conf_file
else
rm -f $new_conf_file
fi
# START myfid
echo "$name: starting myfid"
/sbin/myfid --accept-license -C "$controller" -B -P $pid_file \
$args $conf_file
fi
}
# Stop an Anyfi.net daemon gracefully
# anyfi_stop_daemon <pidfile>
anyfi_stop_daemon() {
local pidfile="$1"
kill -TERM $(cat $pidfile)
for t in $(seq 0 5); do
[ -e $pidfile ] || return 0
sleep 1
done
echo "Timeout waiting for daemon assocated with $pidfile to exit" 1>&2
kill -KILL $(cat $pidfile)
rm -f $pidfile
return 1
}
# Enable Anyfi.net for a Wi-Fi device.
# Run from ENABLE_HOOKS
anyfi_enable()
{
local device="$1"
local controller
local type vif vifs
# A controller IP or FQDN is required
controller="$(uci get anyfi.controller.hostname 2>/dev/null)"
[ -n "$controller" ] || return 0
# Optional controller and optimizer public keys
controller_key="$(uci get anyfi.controller.key 2>/dev/null)"
optimizer_key="$(uci get anyfi.optimizer.key 2>/dev/null)"
# Reload the wireless config to get the assigned ifnames right
config_load wireless
config_get type "$device" type
vifs=$(anyfi_get_vifs "$device")
# START anyfid on this device
if [ "$(config_get $device anyfi_disabled)" != 1 ] && \
/sbin/anyfi-probe "$type"
then
anyfi_dev_start $device $type "$controller" "$controller_key"
fi
# FOREACH Wi-Fi interface of this device
for vif in $vifs; do
if [ "$(config_get $vif disabled)" != 1 ] && \
[ "$(config_get $vif anyfi_disabled)" != 1 ]
then
anyfi_vif_start $vif "$controller" \
"$controller_key" "$optimizer_key"
fi
done
}
# Disable Anyfi.net for a Wi-Fi device.
# Run from DISABLE_HOOKS
anyfi_disable()
{
local device="$1"
local type vif vifs
# Reload the wireless config to get the assigned ifnames right
config_load wireless
config_get type "$device" type
vifs=$(anyfi_get_vifs "$device")
# STOP anyfid on this device (if anyfid is running)
if [ -e $RUNDIR/anyfid_$device.pid ]; then
echo "$device: stopping anyfid"
anyfi_stop_daemon $RUNDIR/anyfid_$device.pid
anyfi_${type}_release_iflist $device
anyfi_${type}_release_monitor $device
fi
# FOREACH Wi-Fi interface of this device (with myfid running)
for vif in $vifs; do
local name="$(anyfi_vif_get_name $vif)"
local pidfile="$RUNDIR/myfid_$name.pid"
if [ -e $pidfile ]; then
echo "$name: stopping myfid"
anyfi_stop_daemon $pidfile
fi
done
}

View File

@@ -1,86 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2013-2014 Anyfi Networks AB.
# Anyfi.net setup functions for Broadcom wl driver.
# Get monitor name interface based for a device.
# anyfi_dev_monitor_name <device>
anyfi_broadcom_name_monitor() {
local device="$1"
# Map wlX => radiotapX
echo "$device" | sed 's/^.*\([0-9]\)$/radiotap\1/'
}
# Get BSS index of the last wl interface that is used (=up)
# wl0.2 => 2
# wl0 => (empty)
anyfi_broadcom_get_wlindex() {
ifconfig | grep -o "^$1\..." | cut -d'.' -f2 | sort -n | tail -n 1
}
# Allocate virtual Wi-Fi interfaces for anyfid.
# anyfi_broadcom_alloc_iflist <device> <bssids>
anyfi_broadcom_alloc_iflist() {
local device="$1"
local bssids="$2"
local count=0
local wlindex num
# Enable MBSS mode if not already enabled
if [ "$(wlctl -i $device mbss)" = 0 ]; then
wlctl -i $device down
wlctl -i $device mbss 1
wlctl -i $device up
fi
wlindex=$(anyfi_broadcom_get_wlindex $device)
# Create WLAN interfaces and let the driver assign the BSSIDs
for num in $(seq $bssids); do
local idx=$(($wlindex + $num))
local wlif=$device.$idx
# Do the 'wlctl' dance to make the driver assign proper BSSIDs
wlctl -i $device bss -C $idx up > /dev/null || break
wlctl -i $device ssid -C $idx "dummy" > /dev/null
wlctl -i $device bss -C $idx up > /dev/null
wlctl -i $device bss -C $idx down > /dev/null
wlctl -i $device ssid -C $idx "" > /dev/null
local bssid=$(wlctl -i $wlif cur_etheraddr | cut -d' ' -f2)
ifconfig $wlif hw ether $bssid > /dev/null
count=$(($count + 1))
done
[ "$count" -gt 0 ] && echo $device.$(($wlindex + 1))/$count
}
# Release virtual Wi-Fi interfaces allocated for anyfid.
# anyfi_broadcom_release_iflist <device>
anyfi_broadcom_release_iflist() {
true
}
# Allocate a monitor interface for anyfid.
# anyfi_broadcom_alloc_monitor <device>
anyfi_broadcom_alloc_monitor() {
local device="$1"
local monitor=$(anyfi_broadcom_name_monitor $device)
wlctl -i $device monitor 0 || return 1
wlctl -i $device monitor 3 || return 1
ifconfig $monitor down || return 1
ifconfig $monitor up || return 1
echo $monitor
}
# Release the monitor interface for anyfid.
# anyfi_broadcom_release_monitor <device>
anyfi_broadcom_release_monitor() {
local device="$1"
local monitor=$(anyfi_broadcom_name_monitor $device)
ifconfig $monitor down 2> /dev/null
wlctl -i $device monitor 0 2> /dev/null
}

View File

@@ -1,58 +0,0 @@
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Check if a WLAN driver type is supported by Anyfi.net radio software."
echo "Usage: $0 {mac80211|...}"
exit 1
fi
number() {
echo $2 | sed -e 's/[^0-9]/ /g' | cut -d' ' -f $1
}
major() {
number 1 $1
}
minor() {
number 2 $1
}
case $1 in
mac80211)
COMPAT_VER=$(opkg list-installed kmod-mac80211 | cut -d'+' -f2)
KERNEL_VER=$(uname -r)
# Future kernels > 3.x are OK
[ "$(major $KERNEL_VER)" -gt 3 ] && return 0
# The required commit 86c228a7627f3f2776893da47592234140fbfba8
# for mac80211 support was introduced in kernel 3.12.
[ "$(major $KERNEL_VER)" -eq 3 ] && \
[ "$(minor $KERNEL_VER)" -ge 12 ] && return 0
[ "$(major $COMPAT_VER)" -gt 2013 ] && return 0
[ "$(major $COMPAT_VER)" -eq 2013 ] && \
[ "$(minor $COMPAT_VER)" -ge 11 ] && return 0
cat <<EOF
Support for mac80211 requires Linux kernel >= 3.12 or
compat-wireless >= 2013-11-05. Please update your system.
EOF
;;
broadcom)
return 0
;;
*)
cat<<EOF
WLAN driver \"$1\" is not supported by the Anyfi.net radio software.
Improved drivers with Anyfi.net support are available for Broadcom,
Qualcomm Atheros, Ralink and Realtek chipsets. Please contact
support@anyfi.net for updated drivers, reference integrations and
commercial integration services.
EOF
;;
esac
exit 1

View File

@@ -10,20 +10,16 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk18-mod
PKG_VERSION:=1.8.10.1
PKG_SOURCE_VERSION:=8d5a855296f61391d0166b66b11e4e6055fd86c6
PKG_SOURCE_VERSION:=015d279241d0ac5d8c1321aa6f78b9ae551575d1
PKG_SOURCE_PROTO:=git
ifeq ($(CONFIG_BCM_OPEN),y)
PKG_SOURCE_URL:=http://ihgsp.inteno.se/git/asterisk-aa
else
PKG_SOURCE_URL:=git@ihgsp.inteno.se:asterisk-aa
endif
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)/ltqtapi.mk
include $(INCLUDE_DIR)/package.mk
define Package/asterisk18-mod/Default
@@ -123,7 +119,7 @@ endef
define Package/asterisk18-mod-cdr
$(call Package/asterisk18-mod/Default)
TITLE:=CDR support
DEPENDS:= asterisk18-mod
DEPENDS:= asterisk18-mod +libsqlite3
endef
define Package/asterisk18-mod-cdr/description
@@ -192,17 +188,6 @@ $(call Package/asterisk18-mod/Default/description)
support to Asterisk.
endef
define Package/asterisk18-mod-chan-mobile
$(call Package/asterisk18-mod/Default)
TITLE:=Mobile channel support
DEPENDS:= asterisk18-mod +bluez-libs
endef
define Package/asterisk18-mod-chan-mobile/description
$(call Package/asterisk18-mod/Default/description)
This package provides the channel chan_mobile support to Asterisk.
endef
define Package/asterisk18-mod-res-timing-timerfd
$(call Package/asterisk18-mod/Default)
TITLE:= Timerfd Timing Interface
@@ -345,14 +330,6 @@ else
--without-spandsp
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-chan-mobile),)
CONFIGURE_ARGS+= \
--with-bluetooth="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= \
--without-bluetooth
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-res-srtp),)
CONFIGURE_ARGS+= \
--with-srtp="$(STAGING_DIR)/usr"
@@ -396,6 +373,9 @@ CONFIGURE_ARGS+= \
--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)
@@ -572,17 +552,6 @@ define Package/asterisk18-mod-chan-gtalk/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-chan-mobile/conffiles
/etc/asterisk/chan_mobile.conf
endef
define Package/asterisk18-mod-chan-mobile/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/chan_mobile.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mobile.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/
@@ -734,7 +703,6 @@ $(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-chan-mobile))
$(eval $(call BuildPackage,asterisk18-mod-res-fax))
$(eval $(call BuildPackage,asterisk18-mod-res-fax-spandsp))
$(eval $(call BuildPackage,asterisk18-mod-res-timing-timerfd))

View File

@@ -9,6 +9,12 @@ PROG=/usr/sbin/asterisk
DEFAULT=/etc/default/asterisk
init_asterisk() {
# do not start asterisk until the
# router receives a default route
while ! ip r | grep -q default; do
sleep 1
done
[ -f $DEFAULT ] && . $DEFAULT
[ -d /var/run/asterisk ] || mkdir -p /var/run/asterisk
[ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk

View File

@@ -1,50 +0,0 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=bcmhotproxy
PKG_RELEASE:=13
PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
include $(INCLUDE_DIR)/package.mk
define Package/bcmhotproxy
SECTION:=utils
CATEGORY:=Base system
TITLE:=Daemon That feeds broadcom driver calls to hotplug2
endef
define Package/bcmhotproxy/description
This package contains a Daemon that will listen to link events from broadcoms adsl driver and etherent driver and proxy them to hotplug
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
target=$(firstword $(subst -, ,$(BOARD)))
MAKE_FLAGS += TARGET="$(target)"
TARGET_CFLAGS += -Dtarget_$(target)=1 -Wall
define Package/bcmhotproxy/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/etc/init.d/* $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bcmhotproxy $(1)/sbin/
endef
$(eval $(call BuildPackage,bcmhotproxy))

View File

@@ -1,20 +0,0 @@
#!/bin/sh /etc/rc.common
START=15
STOP=95
USE_PROCD=1
NAME=bcmhotproxy
PROG=/sbin/bcmhotproxy
start_service() {
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance
}
stop() {
service_stop /sbin/bcmhotproxy
}

View File

@@ -1,8 +0,0 @@
CC = gcc
CFLAGS += -Wall
obj = bcmhotproxy.o brcmdaemon.o
bcmhotproxy: $(obj) $(obj.$(TARGET))
clean:
rm -f *.o

View File

@@ -1,139 +0,0 @@
/*
* bcmhotproxy -- a proxy to send messages from broadcom drivers to userspace
*
* Copyright (C) 2012-2013 Inteno Broadband Technology AB. All rights reserved.
*
* Author: Strhuan Blomquist
*
* 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 "bcmhotproxy.h"
int netlink_init() {
int sock_fd;
sock_fd=socket(PF_NETLINK, SOCK_RAW, NETLINK_BRCM_MONITOR);
if(sock_fd<0)
return -1;
return sock_fd;
}
int hotplug_call(struct hotplug_arg arg)
{
char str[512];
int ret;
memset(str, '\0', sizeof(512));
syslog(LOG_INFO, "ACTION=%s INTERFACE=%s /sbin/hotplug-call %s", arg.action,arg.inteface,arg.subsystem);
sprintf(str, "ACTION=%s INTERFACE=%s /sbin/hotplug-call %s",arg.action,arg.inteface,arg.subsystem);
ret=system(str);
return ret;
}
hotplug_arg createargumetstruct(char *hotplugmsg)
{
hotplug_arg arg;
char argumets[3][20];
char * pch;
int x=0;
pch = strtok (hotplugmsg," ");
while (pch != NULL){
strcpy(argumets[x],pch);
pch = strtok (NULL, " ");
x++;
}
strncpy(arg.action,argumets[0],sizeof(arg.action));
strncpy(arg.inteface,argumets[1],sizeof(arg.action));
strncpy(arg.subsystem,argumets[2],sizeof(arg.action));
return arg;
}
int netlink_bind(int sock_fd) {
struct sockaddr_nl src_addr;
memset(&src_addr, 0, sizeof(src_addr));
src_addr.nl_family = AF_NETLINK;
src_addr.nl_pid = getpid(); /* self pid */
src_addr.nl_groups = 1; //multicast Group
bind(sock_fd, (struct sockaddr*)&src_addr,sizeof(src_addr));
if (bind(sock_fd, (struct sockaddr*)&src_addr,sizeof(src_addr))) {
close(sock_fd);
return -1;
}
return sock_fd;
}
int dispatcher() {
struct sockaddr_nl dest_addr;
struct nlmsghdr *nlh = NULL;
struct iovec iov;
struct msghdr msg;
hotplug_arg arg;
int sock_fd;
/* Initlize the netlink socket */
sock_fd=netlink_init();
if (sock_fd == -1) {
fprintf(stderr, "Unable to Intitlize netlink socket.\n");
exit(1);
}
/* Bind the netlink socket */
sock_fd=netlink_bind(sock_fd);
if (sock_fd == -1) {
fprintf(stderr, "Unable to Listen to netlink socket.\n");
exit(1);
}
/* destination address to listen to */
nlh = (struct nlmsghdr *)malloc(NLMSG_SPACE(MAX_PAYLOAD));
memset(nlh, 0, NLMSG_SPACE(MAX_PAYLOAD));
nlh->nlmsg_len = NLMSG_SPACE(MAX_PAYLOAD);
nlh->nlmsg_pid = getpid();
nlh->nlmsg_flags = 0;
/* Fill the netlink message header */
iov.iov_base = (void *)nlh;
iov.iov_len = nlh->nlmsg_len;
msg.msg_name = (void *)&dest_addr;
msg.msg_namelen = sizeof(dest_addr);
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
/* Read message from kernel */
while(1){
recvmsg(sock_fd, &msg, 0);
switch (nlh->nlmsg_type)
{
case MSG_NETLINK_BRCM_WAKEUP_MONITOR_TASK:
case MSG_NETLINK_BRCM_LINK_STATUS_CHANGED:
/*process the message */
fprintf(stderr, "No Handle\n");
break;
case MSG_NETLINK_BRCM_LINK_HOTPLUG:
arg=createargumetstruct((char *)NLMSG_DATA(nlh));
if(hotplug_call(arg)){
fprintf(stderr, "Unable to call hotplug.\n");
}
break;
default:
fprintf(stderr, "Unknown type\n");
break;
}
}
close(sock_fd);
return 0;
}

View File

@@ -1,28 +0,0 @@
#ifndef BCMHOTPROXY_H
#define BCMHOTPROXY_H 1
#include <sys/socket.h>
#include <linux/netlink.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <syslog.h>
#define MSG_NETLINK_BRCM_WAKEUP_MONITOR_TASK 0X1000
#define MSG_NETLINK_BRCM_LINK_STATUS_CHANGED 0X2000
#define MSG_NETLINK_BRCM_LINK_HOTPLUG 0X3000
#define MAX_PAYLOAD 1024 /* maximum payload size*/
#ifndef NETLINK_BRCM_MONITOR
#define NETLINK_BRCM_MONITOR 25
#endif
typedef struct hotplug_arg hotplug_arg;
struct hotplug_arg
{
char action[20];
char inteface[20];
char subsystem[20];
};
#endif

View File

@@ -1,153 +0,0 @@
#include "brcmdaemon.h"
/**************************************************************************
Function: Print Usage
Description:
Output the command-line options for this daemon.
Params:
@argc - Standard argument count
@argv - Standard argument array
Returns:
returns void always
**************************************************************************/
void PrintUsage(int argc, char *argv[]) {
if (argc >=1) {
printf("Usage: %s -h -n\n", argv[0]);
printf(" Options: \n");
printf(" -ntDon't fork off as a daemon.\n");
printf(" -htShow this help screen.\n");
printf("\n");
}
}
/**************************************************************************
Function: signal_handler
Description:
This function handles select signals that the daemon may
receive. This gives the daemon a chance to properly shut
down in emergency situations. This function is installed
as a signal handler in the 'main()' function.
Params:
@sig - The signal received
Returns:
returns void always
**************************************************************************/
void signal_handler(int sig) {
switch(sig) {
case SIGHUP:
syslog(LOG_WARNING, "Received SIGHUP signal.");
break;
case SIGTERM:
syslog(LOG_WARNING, "Received SIGTERM signal.");
break;
default:
syslog(LOG_WARNING, "Unhandled signal (%d) %s", strsignal(sig));
break;
}
}
/**************************************************************************
Function: main
Description:
The c standard 'main' entry point function.
Params:
@argc - count of command line arguments given on command line
@argv - array of arguments given on command line
Returns:
returns integer which is passed back to the parent process
**************************************************************************/
int main(int argc, char *argv[]) {
#if defined(DEBUG)
int daemonize = 0;
#else
int daemonize = 0;
#endif
// Setup signal handling before we start
signal(SIGHUP, signal_handler);
signal(SIGTERM, signal_handler);
signal(SIGINT, signal_handler);
signal(SIGQUIT, signal_handler);
int c;
while( (c = getopt(argc, argv, "nh|help")) != -1) {
switch(c){
case 'h':
PrintUsage(argc, argv);
exit(0);
break;
case 'n':
daemonize = 0;
break;
default:
PrintUsage(argc, argv);
exit(0);
break;
}
}
syslog(LOG_INFO, "%s daemon starting up", DAEMON_NAME);
// Setup syslog logging - see SETLOGMASK(3)
#if defined(DEBUG)
setlogmask(LOG_UPTO(LOG_DEBUG));
openlog(DAEMON_NAME, LOG_CONS | LOG_NDELAY | LOG_PERROR | LOG_PID, LOG_USER);
#else
setlogmask(LOG_UPTO(LOG_INFO));
openlog(DAEMON_NAME, LOG_CONS, LOG_USER);
#endif
/* Our process ID and Session ID */
pid_t pid, sid;
if (daemonize) {
syslog(LOG_INFO, "starting the daemonizing process");
/* Fork off the parent process */
pid = fork();
if (pid < 0) {
exit(EXIT_FAILURE);
}
/* If we got a good PID, then
we can exit the parent process. */
if (pid > 0) {
exit(EXIT_SUCCESS);
}
/* Change the file mode mask */
umask(0);
/* Create a new SID for the child process */
sid = setsid();
if (sid < 0) {
/* Log the failure */
exit(EXIT_FAILURE);
}
/* Change the current working directory */
if ((chdir("/")) < 0) {
/* Log the failure */
exit(EXIT_FAILURE);
}
/* Close out the standard file descriptors */
close(STDIN_FILENO);
close(STDOUT_FILENO);
close(STDERR_FILENO);
}
dispatcher();
syslog(LOG_INFO, "%s daemon exiting", DAEMON_NAME);
exit(0);
}

View File

@@ -1,17 +0,0 @@
#ifndef BRCMDAEMON_H
#define BRCMDAEMON_H 1
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <syslog.h>
#include <string.h>
#include <assert.h>
#include <signal.h>
#define DAEMON_NAME "brcmnetlink"
#define PID_FILE "/var/run/brcmnetlink.pid"
#endif

View File

@@ -1,231 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# update this based on the Broadcom SDK version, 4.14L.04 -> 414040
BRCM_SDK_VERSION:=414040
ifeq ($(CONFIG_BCM_OPEN),y)
$(error "OPEN SDK compile not tested with this kernel!")
endif
PKG_NAME:=bcmkernel-3.4
PKG_VERSION:=$(BRCM_SDK_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel-4.14L.04
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8216815ced065e527681a079ad0e17fbb007baec
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BRCM_SDK_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
export CONFIG_BCM_CHIP_ID
export CONFIG_BCM_KERNEL_PROFILE
export CONFIG_SECURE_BOOT_CFE
BCM_BS_PROFILE = $(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
BCM_KERNEL_VERSION:=3.4.11-rt19
BCM_SDK_VERSION:=bcm963xx
RSTRIP:=true
define Package/bcmkernel/removevoice
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
ifeq ($(CONFIG_BCM_ENDPOINT_MODULE),y)
define Package/bcmkernel/removevoice
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
endif
define Package/bcmkernel/removei2c
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
ifeq ($(CONFIG_BCM_I2C),y)
define Package/bcmkernel/removei2c
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
endif
define Package/bcmkernel/install
$(INSTALL_DIR) $(1)/lib/bcm
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/adsl
$(INSTALL_DIR) $(1)/etc/wlan
$(INSTALL_DIR) $(1)/etc/cms_entity_info.d
# Install header files
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/shared/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/countryArchive.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/countryArchive.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/codec/codec.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec/codec.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h
echo "#define BCM_SDK_VERSION $(BRCM_SDK_VERSION)" > $(STAGING_DIR)/usr/include/bcm_sdk_version.h
# create symlink to kernel build directory
rm -f $(BUILD_DIR)/bcmkernel
ln -sfn $(PKG_SOURCE_SUBDIR) $(BUILD_DIR)/bcmkernel
# Install binaries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/bin/* $(1)/usr/sbin/
rm -f $(1)/usr/sbin/dhcp6c
rm -f $(1)/usr/sbin/dhcp6s
rm -f $(1)/usr/sbin/dhcpc
rm -f $(1)/usr/sbin/dhcpd
rm -f $(1)/usr/sbin/dnsproxy
rm -f $(1)/usr/sbin/httpd
rm -f $(1)/usr/sbin/openssl
rm -f $(1)/usr/sbin/racoon
rm -f $(1)/usr/sbin/ripd
rm -f $(1)/usr/sbin/send_cms_msg
rm -f $(1)/usr/sbin/sshd
rm -f $(1)/usr/sbin/ssk
rm -f $(1)/usr/sbin/telnetd
rm -f $(1)/usr/sbin/tr64c
rm -f $(1)/usr/sbin/tr69c
rm -f $(1)/usr/sbin/ubi*
rm -f $(1)/usr/sbin/udhcpd
rm -f $(1)/usr/sbin/upnp
rm -f $(1)/usr/sbin/upnpd
rm -f $(1)/usr/sbin/vodsl
rm -f $(1)/usr/sbin/wlmngr
rm -f $(1)/usr/sbin/zebra
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/eid_bcm_kthreads.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/symbol_table.txt $(1)/etc/cms_entity_info.d/
# Install libraries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/gpl/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/private/* $(1)/usr/lib/
mv $(1)/usr/lib/ld-uClibc.so.0 $(1)/lib/bcm/
mv $(1)/usr/lib/libc.so.0 $(1)/lib/bcm/
mv $(1)/usr/lib/libdl.so.0 $(1)/lib/bcm/
mv $(1)/usr/lib/libgcc_s.so.1 $(1)/lib/bcm/
mv $(1)/usr/lib/libpthread.so.0 $(1)/lib/bcm/
rm -f $(1)/usr/lib/libcrypt.so.0
rm -f $(1)/usr/lib/libm.so.0
rm -f $(1)/usr/lib/libutil.so.0
rm -f $(1)/usr/lib/libcms_boardctl.so
rm -f $(1)/usr/lib/libcms_msg.so
rm -f $(1)/usr/lib/libcms_util.so
rm -f $(1)/usr/lib/libcrypto.so.0.9.7
rm -f $(1)/usr/lib/libssl.so.0.9.7
rm -f $(1)/usr/lib/libnvram.so
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/public/* $(1)/usr/lib/
rm -rf $(1)/usr/lib/modules
rm -rf $(1)/usr/lib/private
rm -rf $(1)/usr/lib/public
rm -rf $(1)/usr/lib/gpl
# Install kernel modules
rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/*
mkdir -p $(1)/lib/
mkdir -p $(1)/lib/modules/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/extra/* $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/
find $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ -name *.ko -exec cp {} $(1)/lib/modules/$(BCM_KERNEL_VERSION)/ \;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/wlan/*_map.bin $(1)/etc/wlan
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/telephonyProfiles.d $(1)/etc/
# rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bcm_usb.ko
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)strip --remove-section=.note --remove-section=.comment $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -O binary $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm
# bootloader nor
# cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/bcm9$(CONFIG_BCM_CHIP_ID)_cfe.w $(KDIR)/bcm_bootloader_cfe.w
# ram part of the bootloader for nand boot
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin $(KDIR)/cferam.001
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/cfe/ $(KDIR)/cfe
# dd if=$(KDIR)/vmlinux.bcm.elf of=$(KDIR)/vmlinux.bcm bs=4096 count=1
# $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
$(call Package/bcmkernel/removevoice,$(1))
$(call Package/bcmkernel/removei2c,$(1))
endef

View File

@@ -1,266 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# update this based on the Broadcom SDK version, 4.16L.02 -> 416020
# 4.16L.02A -> 416021
BRCM_SDK_VERSION:=416021
ifeq ($(CONFIG_BCM_OPEN),y)
$(error "OPEN SDK compile not tested with this kernel!")
endif
PKG_NAME:=bcmkernel-3.4
PKG_VERSION:=$(BRCM_SDK_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel-4.16L.02A
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=00e673bd751d19059cb3ed5fd2dbf3831a7e0401
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BRCM_SDK_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
export CONFIG_BCM_CHIP_ID
export CONFIG_BCM_KERNEL_PROFILE
export CONFIG_SECURE_BOOT_CFE
BCM_BS_PROFILE = $(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
BCM_KERNEL_VERSION:=3.4.11-rt19
BCM_SDK_VERSION:=bcm963xx
RSTRIP:=true
define Package/bcmkernel/removevoice
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
ifeq ($(CONFIG_BCM_ENDPOINT_MODULE),y)
define Package/bcmkernel/removevoice
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
endif
define Package/bcmkernel/removesound
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
endef
ifeq ($(BCM_USBSOUND_MODULES),y)
define Package/bcmkernel/removesound
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
endef
endif
define Package/bcmkernel/removei2c
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
ifeq ($(CONFIG_BCM_I2C),y)
define Package/bcmkernel/removei2c
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
endif
define Package/bcmkernel/removebluetooth
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bnep.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/btusb.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/rfcomm.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/hci_uart.ko
endef
ifeq ($(CONFIG_BCM_BLUETOOTH),y)
define Package/bcmkernel/removebluetooth
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko etc...
endef
endif
define Package/bcmkernel/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/adsl
$(INSTALL_DIR) $(1)/etc/wlan
$(INSTALL_DIR) $(1)/etc/cms_entity_info.d
# Install header files
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/shared/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/countryArchive.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/countryArchive.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/codec/codec.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec/codec.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/userspace/private/apps/vodsl/voip/inc/tpProfiles.h $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
echo "#define BCM_SDK_VERSION $(BRCM_SDK_VERSION)" > $(STAGING_DIR)/usr/include/bcm_sdk_version.h
# create symlink to kernel build directory
rm -f $(BUILD_DIR)/bcmkernel
ln -sfn $(PKG_SOURCE_SUBDIR) $(BUILD_DIR)/bcmkernel
# Install binaries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/bin/* $(1)/usr/sbin/
rm -f $(1)/usr/sbin/dhcp6c
rm -f $(1)/usr/sbin/dhcp6s
rm -f $(1)/usr/sbin/dhcpc
rm -f $(1)/usr/sbin/dhcpd
rm -f $(1)/usr/sbin/dnsproxy
rm -f $(1)/usr/sbin/httpd
rm -f $(1)/usr/sbin/openssl
rm -f $(1)/usr/sbin/racoon
rm -f $(1)/usr/sbin/ripd
rm -f $(1)/usr/sbin/send_cms_msg
rm -f $(1)/usr/sbin/sshd
rm -f $(1)/usr/sbin/ssk
rm -f $(1)/usr/sbin/telnetd
rm -f $(1)/usr/sbin/tr64c
rm -f $(1)/usr/sbin/tr69c
rm -f $(1)/usr/sbin/ubi*
rm -f $(1)/usr/sbin/udhcpd
rm -f $(1)/usr/sbin/upnp
rm -f $(1)/usr/sbin/upnpd
rm -f $(1)/usr/sbin/vodsl
rm -f $(1)/usr/sbin/wlmngr
rm -f $(1)/usr/sbin/zebra
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/eid_bcm_kthreads.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/symbol_table.txt $(1)/etc/cms_entity_info.d/
# Install libraries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/gpl/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/private/* $(1)/usr/lib/
rm -f $(1)/usr/lib/ld-uClibc.so.0
rm -f $(1)/usr/lib/libc.so.0
rm -f $(1)/usr/lib/libdl.so.0
rm -f $(1)/usr/lib/libgcc_s.so.1
rm -f $(1)/usr/lib/libpthread.so.0
rm -f $(1)/usr/lib/libm.so.0
rm -f $(1)/usr/lib/libutil.so.0
rm -f $(1)/usr/lib/libcms_boardctl.so
rm -f $(1)/usr/lib/libcms_msg.so
rm -f $(1)/usr/lib/libcms_util.so
rm -f $(1)/usr/lib/libnvram.so
rm -f $(1)/usr/lib/libcrypt.so.0
rm -f $(1)/usr/lib/libcrypto.so
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so
rm -f $(1)/usr/lib/libcrypto.so.0.9.7
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so.0.9.7
rm -f $(1)/usr/lib/libssl.so
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so
rm -f $(1)/usr/lib/libssl.so.0.9.7
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so.0.9.7
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/public/* $(1)/usr/lib/
rm -rf $(1)/usr/lib/modules
rm -rf $(1)/usr/lib/private
rm -rf $(1)/usr/lib/public
rm -rf $(1)/usr/lib/gpl
# Install kernel modules
rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/*
mkdir -p $(1)/lib/
mkdir -p $(1)/lib/modules/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/extra/* $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/
find $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ -name *.ko -exec cp {} $(1)/lib/modules/$(BCM_KERNEL_VERSION)/ \;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/wlan/* $(1)/etc/wlan
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/telephonyProfiles.d $(1)/etc/
# rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bcm_usb.ko
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)strip --remove-section=.note --remove-section=.comment $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -O binary $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm
# bootloader nor
# cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/bcm9$(CONFIG_BCM_CHIP_ID)_cfe.w $(KDIR)/bcm_bootloader_cfe.w
# ram part of the bootloader for nand boot
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin $(KDIR)/cferam.001
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/cfe/ $(KDIR)/cfe
# dd if=$(KDIR)/vmlinux.bcm.elf of=$(KDIR)/vmlinux.bcm bs=4096 count=1
# $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
$(call Package/bcmkernel/removevoice,$(1))
$(call Package/bcmkernel/removesound,$(1))
# $(call Package/bcmkernel/removei2c,$(1))
endef

View File

@@ -1,278 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# update this based on the Broadcom SDK version, 4.16L.03 -> 416030
BRCM_SDK_VERSION:=416030
ifneq ($(CONFIG_BCM_OPEN),y)
PKG_NAME:=bcmkernel-3.4
PKG_VERSION:=$(BRCM_SDK_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel-4.16L.03
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=205c1d7bdd24388e0bae8c2883ac83ca0b1e5458
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BRCM_SDK_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
export CONFIG_BCM_CHIP_ID
export CONFIG_BCM_CFE_PASSWORD
export CONFIG_BCM_KERNEL_PROFILE
export CONFIG_SECURE_BOOT_CFE
BCM_BS_PROFILE = $(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
BCM_KERNEL_VERSION:=3.4.11-rt19
BCM_SDK_VERSION:=bcm963xx
RSTRIP:=true
define Package/bcmkernel/removevoice
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
ifeq ($(CONFIG_BCM_ENDPOINT_MODULE),y)
define Package/bcmkernel/removevoice
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
endif
define Package/bcmkernel/removesound
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
endef
ifeq ($(BCM_USBSOUND_MODULES),y)
define Package/bcmkernel/removesound
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
endef
endif
define Package/bcmkernel/removei2c
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
ifeq ($(CONFIG_BCM_I2C),y)
define Package/bcmkernel/removei2c
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
endif
define Package/bcmkernel/removebluetooth
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bnep.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/btusb.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/rfcomm.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/hci_uart.ko
endef
ifeq ($(CONFIG_BCM_BLUETOOTH),y)
define Package/bcmkernel/removebluetooth
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko etc...
endef
endif
define Package/bcmkernel/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/adsl
$(INSTALL_DIR) $(1)/etc/wlan
$(INSTALL_DIR) $(1)/etc/cms_entity_info.d
# Install header files
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/shared/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/countryArchive.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/countryArchive.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/codec/codec.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec/codec.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h
ifneq ($(CONFIG_BCM_OPEN),y)
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/userspace/private/apps/vodsl/voip/inc/tpProfiles.h $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
endif
echo "#define BCM_SDK_VERSION $(BRCM_SDK_VERSION)" > $(STAGING_DIR)/usr/include/bcm_sdk_version.h
# create symlink to kernel build directory
rm -f $(BUILD_DIR)/bcmkernel
ln -sfn $(PKG_SOURCE_SUBDIR) $(BUILD_DIR)/bcmkernel
# Install binaries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/bin/* $(1)/usr/sbin/
rm -f $(1)/usr/sbin/dhcp6c
rm -f $(1)/usr/sbin/dhcp6s
rm -f $(1)/usr/sbin/dhcpc
rm -f $(1)/usr/sbin/dhcpd
rm -f $(1)/usr/sbin/dnsproxy
rm -f $(1)/usr/sbin/httpd
rm -f $(1)/usr/sbin/openssl
rm -f $(1)/usr/sbin/racoon
rm -f $(1)/usr/sbin/ripd
rm -f $(1)/usr/sbin/send_cms_msg
rm -f $(1)/usr/sbin/sshd
rm -f $(1)/usr/sbin/ssk
rm -f $(1)/usr/sbin/telnetd
rm -f $(1)/usr/sbin/tr64c
rm -f $(1)/usr/sbin/tr69c
rm -f $(1)/usr/sbin/ubi*
rm -f $(1)/usr/sbin/udhcpd
rm -f $(1)/usr/sbin/upnp
rm -f $(1)/usr/sbin/upnpd
rm -f $(1)/usr/sbin/vodsl
rm -f $(1)/usr/sbin/wlmngr
rm -f $(1)/usr/sbin/zebra
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/eid_bcm_kthreads.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/symbol_table.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/init.d/bcm-base-drivers.sh $(1)/lib/
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/rdpa_init.sh ]; then $(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/rdpa_init.sh $(1)/etc/; fi;
# Install libraries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/gpl/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/private/* $(1)/usr/lib/
rm -f $(1)/usr/lib/ld-uClibc.so.0
rm -f $(1)/usr/lib/libc.so.0
rm -f $(1)/usr/lib/libdl.so.0
rm -f $(1)/usr/lib/libgcc_s.so.1
rm -f $(1)/usr/lib/libpthread.so.0
rm -f $(1)/usr/lib/libm.so.0
rm -f $(1)/usr/lib/libutil.so.0
rm -f $(1)/usr/lib/libcms_boardctl.so
rm -f $(1)/usr/lib/libcms_msg.so
rm -f $(1)/usr/lib/libcms_util.so
rm -f $(1)/usr/lib/libnvram.so
rm -f $(1)/usr/lib/libcrypt.so.0
rm -f $(1)/usr/lib/libbcm_crc.so
rm -f $(1)/usr/lib/libbcm_flashutil.so
rm -f $(1)/usr/lib/libcrypto.so
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so
rm -f $(1)/usr/lib/libcrypto.so.0.9.7
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so.0.9.7
rm -f $(1)/usr/lib/libssl.so
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so
rm -f $(1)/usr/lib/libssl.so.0.9.7
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so.0.9.7
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/public/* $(1)/usr/lib/
$(CP) --remove-destination $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/public/* $(1)/usr/lib/
rm -rf $(1)/usr/lib/modules
rm -rf $(1)/usr/lib/private
rm -rf $(1)/usr/lib/public
rm -rf $(1)/usr/lib/gpl
# Install kernel modules
rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/*
mkdir -p $(1)/lib/modules/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/extra/* $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/
#cp -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
find $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ -name *.ko -exec cp {} $(1)/lib/modules/$(BCM_KERNEL_VERSION)/ \;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/wlan/* $(1)/etc/wlan
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/telephonyProfiles.d $(1)/etc/
# rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bcm_usb.ko
# Alternative DECT modules taken from the Natalie package and if that is not selected, no DECT modules should be loaded
rm -f $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/dect.ko
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)strip --remove-section=.note --remove-section=.comment $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -O binary $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm
# bootloader nor
# cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/bcm9$(CONFIG_BCM_CHIP_ID)_cfe.w $(KDIR)/bcm_bootloader_cfe.w
# ram part of the bootloader for nand boot
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin ]; then cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin $(KDIR)/cferam.001; fi;
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID)ram.bin ]; then cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID)ram.bin $(KDIR)/cferam.001; fi;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/cfe/ $(KDIR)/cfe
# dd if=$(KDIR)/vmlinux.bcm.elf of=$(KDIR)/vmlinux.bcm bs=4096 count=1
# $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
$(call Package/bcmkernel/removevoice,$(1))
$(call Package/bcmkernel/removesound,$(1))
# $(call Package/bcmkernel/removei2c,$(1))
endef

View File

@@ -1,268 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# update this based on the Broadcom SDK version, 4.16L.04 -> 416040
BRCM_SDK_VERSION:=416040
ifneq ($(CONFIG_BCM_OPEN),y)
PKG_NAME:=bcmkernel-3.4
PKG_VERSION:=$(BRCM_SDK_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=963801c26cf4c86c53952a28e806cc233e5b62be
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BRCM_SDK_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
export CONFIG_BCM_CHIP_ID
export CONFIG_BCM_CFE_PASSWORD
export CONFIG_BCM_KERNEL_PROFILE
export CONFIG_SECURE_BOOT_CFE
BCM_BS_PROFILE = $(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
BCM_KERNEL_VERSION:=3.4.11-rt19
BCM_SDK_VERSION:=bcm963xx
RSTRIP:=true
define Package/bcmkernel/removevoice
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
ifeq ($(CONFIG_BCM_ENDPOINT_MODULE),y)
define Package/bcmkernel/removevoice
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
endif
define Package/bcmkernel/removesound
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
endef
ifeq ($(BCM_USBSOUND_MODULES),y)
define Package/bcmkernel/removesound
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
endef
endif
define Package/bcmkernel/removei2c
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
ifeq ($(CONFIG_BCM_I2C),y)
define Package/bcmkernel/removei2c
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
endif
define Package/bcmkernel/removebluetooth
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bnep.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/btusb.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/rfcomm.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/hci_uart.ko
endef
ifeq ($(CONFIG_BCM_BLUETOOTH),y)
define Package/bcmkernel/removebluetooth
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko etc...
endef
endif
define Package/bcmkernel/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/adsl
$(INSTALL_DIR) $(1)/etc/wlan
$(INSTALL_DIR) $(1)/etc/cms_entity_info.d
# Install header files
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/shared/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/countryArchive.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/countryArchive.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/codec/codec.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec/codec.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h
ifneq ($(CONFIG_BCM_OPEN),y)
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/userspace/private/apps/vodsl/voip/inc/tpProfiles.h $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
endif
echo "#define BCM_SDK_VERSION $(BRCM_SDK_VERSION)" > $(STAGING_DIR)/usr/include/bcm_sdk_version.h
# create symlink to kernel build directory
rm -f $(BUILD_DIR)/bcmkernel
ln -sfn $(PKG_SOURCE_SUBDIR) $(BUILD_DIR)/bcmkernel
# Install binaries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/bin/* $(1)/usr/sbin/
rm -f $(1)/usr/sbin/dhcp6c
rm -f $(1)/usr/sbin/dhcp6s
rm -f $(1)/usr/sbin/dhcpc
rm -f $(1)/usr/sbin/dhcpd
rm -f $(1)/usr/sbin/dnsproxy
rm -f $(1)/usr/sbin/httpd
rm -f $(1)/usr/sbin/openssl
rm -f $(1)/usr/sbin/racoon
rm -f $(1)/usr/sbin/ripd
rm -f $(1)/usr/sbin/send_cms_msg
rm -f $(1)/usr/sbin/sshd
rm -f $(1)/usr/sbin/ssk
rm -f $(1)/usr/sbin/telnetd
rm -f $(1)/usr/sbin/tr64c
rm -f $(1)/usr/sbin/tr69c
rm -f $(1)/usr/sbin/ubi*
rm -f $(1)/usr/sbin/udhcpd
rm -f $(1)/usr/sbin/upnp
rm -f $(1)/usr/sbin/upnpd
rm -f $(1)/usr/sbin/vodsl
rm -f $(1)/usr/sbin/wlmngr
rm -f $(1)/usr/sbin/zebra
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/eid_bcm_kthreads.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/symbol_table.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/init.d/bcm-base-drivers.sh $(1)/lib/
sed -i '/bcm_usb\.ko/d' $(1)/lib/bcm-base-drivers.sh
sed -i 's|/kernel/.*/|/|' $(1)/lib/bcm-base-drivers.sh
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/rdpa_init.sh ]; then $(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/rdpa_init.sh $(1)/etc/; fi;
# Install libraries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/* $(1)/usr/lib/
rm -f $(1)/usr/lib/ld-uClibc.so.0
rm -f $(1)/usr/lib/libc.so.0
rm -f $(1)/usr/lib/libdl.so.0
rm -f $(1)/usr/lib/libgcc_s.so.1
rm -f $(1)/usr/lib/libpthread.so.0
rm -f $(1)/usr/lib/libm.so.0
rm -f $(1)/usr/lib/libutil.so.0
rm -f $(1)/usr/lib/libcrypt.so.0
rm -f $(1)/usr/lib/libcrypto.so
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so
rm -f $(1)/usr/lib/libcrypto.so.0.9.7
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so.0.9.7
rm -f $(1)/usr/lib/libssl.so
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so
rm -f $(1)/usr/lib/libssl.so.0.9.7
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so.0.9.7
rm -rf $(1)/usr/lib/modules
rm -rf $(1)/usr/lib/private
rm -rf $(1)/usr/lib/public
rm -rf $(1)/usr/lib/gpl
# Install kernel modules
rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/*
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/extra $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
#cp -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
find $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ -name *.ko -exec cp {} $(1)/lib/modules/$(BCM_KERNEL_VERSION)/ \;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/wlan/* $(1)/etc/wlan
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/telephonyProfiles.d $(1)/etc/
# rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bcm_usb.ko
# Alternative DECT modules taken from the Natalie package and if that is not selected, no DECT modules should be loaded
rm -f $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/dect.ko
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)strip --remove-section=.note --remove-section=.comment $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -O binary $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm
# bootloader nor
# cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/bcm9$(CONFIG_BCM_CHIP_ID)_cfe.w $(KDIR)/bcm_bootloader_cfe.w
# ram part of the bootloader for nand boot
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin ]; then cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin $(KDIR)/cferam.001; fi;
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID)ram.bin ]; then cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID)ram.bin $(KDIR)/cferam.001; fi;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/cfe/ $(KDIR)/cfe
# dd if=$(KDIR)/vmlinux.bcm.elf of=$(KDIR)/vmlinux.bcm bs=4096 count=1
# $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
$(call Package/bcmkernel/removevoice,$(1))
$(call Package/bcmkernel/removesound,$(1))
# $(call Package/bcmkernel/removei2c,$(1))
endef

View File

@@ -1,97 +0,0 @@
menu "Profile and CFE"
depends on PACKAGE_bcmkernel
config BCM_OPEN
bool
prompt "Build package for Public SDK"
default n
help
Set this to build an package using a release tarball with the proprietary components removed.
choice
prompt "Broadcom SDK version"
default BRCM_SDK_VER_416030
help
Version of the Broadcom SDK to use.
config BRCM_SDK_VER_414040
bool
prompt "bcmkernel-4.14L.04"
config BRCM_SDK_VER_416021
bool
prompt "bcmkernel-4.16L.02A"
config BRCM_SDK_VER_416030
bool
prompt "bcmkernel-4.16L.03"
config BRCM_SDK_VER_416040
bool
prompt "bcmkernel-4.16L.04"
endchoice
config BCM_KERNEL_PROFILE
string
prompt "Broadcom kernel profile"
default "96368GWV"
help
Profile to build the broadcom software with, 96368GWV, 963268GWV, 96362GWV, 96816GWV, 96816OV
config BCM_CFE_PASSWORD
string
prompt "Broadcom cfe password"
default ""
config BCM_CHIP_ID
string
prompt "Broadcom chip id"
default "6368"
help
Chip id to build the cfe with, 6328|6362|6368|6816|63268
config BCM_BLNAND
string
prompt "Broadcom boot loader nand"
default "0"
help
Set this to 1 to build a boot loader for nand flash
config BCM_ENDPOINT_MODULE
bool
prompt "Broadcom endpoint voice FXS support"
default y
help
Set this to include the endpoint module in image
config BCM_USBSOUND_MODULES
bool
prompt "Broadcom USB audio support"
default n
help
Set this to include sound support modules in image
config BCM_I2C
bool
prompt "Broadcom I2C support"
default n
help
Set this to include the i2c modules in image
config BCM_BLUETOOTH
bool
prompt "Broadcom Bluetooth support"
default n
help
Set this to include the Bluetooth modules in image
config SECURE_BOOT_CFE
prompt "Secure boot CFE"
bool
endmenu

View File

@@ -1,64 +0,0 @@
#
# Primary/common bcmkernel makefile for all versions of Broadcom SDKs
#
include $(TOPDIR)/rules.mk
define Package/bcmkernel
SECTION:=net
CATEGORY:=Base system
TITLE:=Broadcom sdk 3.4 kernel
URL:=
MENU:=1
endef
define Package/bcmkernel/description
Broadcom kernel and userspace, compiled with the broadcom supplied tool-chain.
endef
define Package/bcmkernel/config
source "$(SOURCE)/Config.in"
endef
# Include SDK version specific makefile based on config selection
ifeq ($(CONFIG_ARCH),)
include $(TOPDIR)/.config
endif
ifeq ($(CONFIG_BCM_OPEN),y)
PKG_NAME:=bcmopen
PKG_VERSION:=consumer
PKG_RELEASE:=1
TARGET_VERSION=$(shell echo $(CONFIG_TARGET_VERSION) | sed s/\"//g)
TARGET_IBOARDID=$(shell echo $(CONFIG_TARGET_IBOARDID) | sed s/\"//g)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).$(TARGET_VERSION).$(TARGET_IBOARDID).tar.gz
PKG_SOURCE_URL:=http://ihgsp.inteno.se/ihgsp/consumer/
endif
ifeq ($(CONFIG_BRCM_SDK_VER_414040),y)
include ./414040.mk
else ifeq ($(CONFIG_BRCM_SDK_VER_416021),y)
include ./416021.mk
else ifeq ($(CONFIG_BRCM_SDK_VER_416030),y)
include ./416030.mk
else ifeq ($(CONFIG_BRCM_SDK_VER_416040),y)
include ./416040.mk
else
# Make 'make menuconfig' work even though no SDK version specified
PKG_VERSION:=none
include $(INCLUDE_DIR)/package.mk
endif
# hack to be able to compile just the userspace part.
# TOPDIR=$PWD make -C package/bcmkernel userspace
userspace:
$(call Build/Compile/Default, userspace)
$(eval $(call BuildPackage,bcmkernel))

View File

@@ -1,17 +0,0 @@
#
# Copyright (C) 2010 Vertical Communications
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
config EXTROOT_SETTLETIME
int
prompt "Settle time for root block device (s)" if PACKAGE_block-mount
default 20
help
This is the amount of time, in seconds, to wait for the block device
the root filesystem is on to become available, after the kernel that
modules for the rootfs and device are loaded.

View File

@@ -1,70 +0,0 @@
#
# Copyright (C) 2006-2012 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=block-mount-old
PKG_VERSION:=0.2.0
PKG_RELEASE:=9
include $(INCLUDE_DIR)/package.mk
define Package/block-mount-old/Default
SECTION:=base
CATEGORY:=Base system
endef
define Package/block-mount-old
$(call Package/block-mount-old/Default)
TITLE:=Block device mounting and checking
DEPENDS:= +blkid +swap-utils
MENU:=1
endef
define Package/block-mount-old/description
Scripts used to mount and check block devices (filesystems and swap), as well
as hotplug scripts to automount and check block devices when hotplug event (e.g.
from plugging in a device) occurs.
Also includes preinit scripts for mounting a block device as the root filesystem.
This allows one to have the root filesystem on devices other than the built in flash
device.
endef
define Package/block-mount-old/config
source "$(SOURCE)/Config.in"
endef
define Build/Compile
endef
define Package/block-mount-old/conffiles
/etc/config/fstab
endef
define Package/block-mount-old/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/fstab.config $(1)/etc/config/fstab
$(INSTALL_DIR) $(1)/lib/functions/fsck
$(INSTALL_DATA) ./files/mount.sh $(1)/lib/functions/
$(INSTALL_DATA) ./files/fsck.sh $(1)/lib/functions/
$(INSTALL_DATA) ./files/block.sh $(1)/lib/functions/
$(INSTALL_DIR) $(1)/etc/hotplug.d/block
$(INSTALL_DATA) ./files/10-swap $(1)/etc/hotplug.d/block/
$(INSTALL_DATA) ./files/20-fsck $(1)/etc/hotplug.d/block/
$(INSTALL_DATA) ./files/40-mount $(1)/etc/hotplug.d/block/
$(INSTALL_DATA) ./files/extmount.sh $(1)/lib/functions/
$(INSTALL_DIR) $(1)/lib/preinit
$(INSTALL_DATA) ./files/50_determine_usb_root $(1)/lib/preinit/
#$(INSTALL_DATA) ./files/55_determine_extroot_sysupgrade $(1)/lib/preinit/
#$(INSTALL_DATA) ./files/60_pivot_usb_root $(1)/lib/preinit/
echo "extroot_settle_time=\"$(CONFIG_EXTROOT_SETTLETIME)\"" >$(1)/lib/preinit/00_extroot.conf
$(INSTALL_DIR) $(1)/overlay
endef
$(eval $(call BuildPackage,block-mount-old))

View File

@@ -1,78 +0,0 @@
#!/bin/sh
# Copyright (C) 2009-2010 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
. /lib/functions/block.sh
blkdev=`dirname $DEVPATH`
if [ `basename $blkdev` != "block" ]; then
device=`basename $DEVPATH`
case "$ACTION" in
add)
local autoswap_from_fstab
local automount_from_fstab
local from_fstab
local anon_mount
local anon_swap
local anon_fsck
local mds_mount_device
local sds_swap_device
local sds_swap_enabled
local use_device
local do_swap=0
mount_dev_section_cb() {
mds_mount_device="$3"
}
swap_dev_section_cb() {
sds_swap_device="$2"
sds_swap_enabled="$3"
return 0
}
config_get_automount
automount_from_fstab="$from_fstab"
[ "$automount_from_fstab" -eq 1 ] && {
config_get_mount_section_by_device "/dev/$device"
}
# skip trying swap if this device is defined as a mount point
[ -z "$mds_mount_device" ] && {
config_get_autoswap
autoswap_from_fstab="$from_fstab"
[ "$autoswap_from_fstab" -eq 1 ] && {
config_get_swap_section_by_device "/dev/$device"
use_device="$sds_swap_device"
do_swap="$sds_swap_enabled"
}
[ -z "$use_device" ] && [ "$anon_swap" -eq 1 ] && {
use_device="/dev/$device" && do_swap=1
}
}
[ -n "$use_device" ] && [ "$do_swap" -eq 1 ] && {
grep -q "$use_device" /proc/swaps || grep -q "$use_device" /proc/mounts || {
swapon "$use_device"
}
}
reset_dev_section_cb
;;
remove)
grep -q "/dev/$device" /proc/swaps && {
swapoff "/dev/$device"
}
;;
esac
fi

View File

@@ -1,83 +0,0 @@
#!/bin/sh
# Copyright (C) 2009-2010 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
. /lib/functions/block.sh
. /lib/functions/fsck.sh
blkdev=`dirname $DEVPATH`
if [ `basename $blkdev` != "block" ]; then
device=`basename $DEVPATH`
case "$ACTION" in
add)
local from_fstab
local anon_mount
local anon_swap
local anon_fsck
local mds_mount_target
local mds_mount_device
local mds_mount_fstype
local mds_mount_enabled_fsck
local sds_swap_device
local use_device
local do_fsck=0
local fsck_type
local autoswap_from_fstab
local automount_from_fstab
local hotplug_blkid_fstype_match
mount_dev_section_cb() {
mds_mount_device="$3"
mds_mount_fstype="$4"
mds_mount_enabled_fsck="$7"
}
swap_dev_section_cb() {
sds_swap_device="$2"
return 0
}
config_get_automount
automount_from_fstab="$from_fstab"
[ "$automount_from_fstab" -eq 1 ] && {
config_get_mount_section_by_device "/dev/$device"
use_device="$mds_mount_device"
[ "$mds_mount_enabled_fsck" -eq 1 ] && {
do_fsck=1
fsck_type="$mds_mount_fstype"
}
}
[ -z "$use_device" ] && {
config_get_autoswap
autoswap_from_fstab="$from_fstab"
[ "$autoswap_from_fstab" -eq 1 ] && {
config_get_swap_section_by_device "/dev/$device"
use_device="$sds_swap_device" && do_fsck=0
}
}
grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || {
[ "$anon_fsck" -eq 1 ] && [ -z "$use_device" ] && {
use_device="/dev/$device" && do_fsck=1 && mds_mount_fstype="" && hotplug_blkid_fstype_match=0
}
}
[ "$do_fsck" -eq 1 ] && {
libmount_fsck "$use_device" "$fsck_type" "$do_fsck"
}
reset_dev_section_cb
;;
esac
fi

View File

@@ -1,107 +0,0 @@
#!/bin/sh
# Copyright (C) 2009-2012 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
. /lib/functions/block.sh
blkdev=`dirname $DEVPATH`
if [ `basename $blkdev` != "block" ]; then
device=`basename $DEVPATH`
mountpoint=`sed -ne "s|^[^ ]*/$device ||; T; s/ .*//p" /proc/self/mounts`
# Determine mount path
usbno=$(echo $DEVPATH | awk -F'/' '{print$7}')
case "$usbno" in
*:*) usbno=$(echo $DEVPATH | awk -F'/' '{print$6}') ;;
esac
mnfct="$(cat /sys/bus/usb/devices/$usbno/manufacturer | sed 's/ //g')"
prdct="$(cat /sys/bus/usb/devices/$usbno/product | sed 's/ //g')"
mnthd="${mnfct:-$prdct}"
serial="$(cat /sys/bus/usb/devices/$usbno/serial | sed 's/ //g')"
case "$ACTION" in
add)
local from_fstab
local anon_mount
local anon_swap
local anon_fsck
local mds_mount_target
local mds_mount_device
local mds_mount_fstype
local sds_swap_device
local use_device
local do_fsck=0
local fsck_type
local autoswap_from_fstab
local automount_from_fstab
mount_dev_section_cb() {
mds_mount_target="$2"
mds_mount_device="$3"
mds_mount_fstype="$4"
mds_mount_enabled="$6"
}
swap_dev_section_cb() {
sds_swap_device="$2"
return 0
}
config_get_automount
automount_from_fstab="$from_fstab"
[ "$automount_from_fstab" -eq 1 ] && {
config_get_mount_section_by_device "/dev/$device"
use_device="$mds_mount_device"
[ "$mds_mount_enabled" -eq 1 ] && {
if [ -n "$mds_mount_target" ]; then
grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || {
( mkdir -p "$mds_mount_target" && mount "$mds_mount_target" ) 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab'
}
else
logger -t 'fstab' "Mount enabled for $mds_mount_device but it doesn't have a defined mountpoint (target)"
fi
}
}
[ -z "$use_device" ] && {
config_get_autoswap
autoswap_from_fstab="$from_fstab"
[ "$autoswap_from_fstab" -eq 1 ] && {
config_get_swap_section_by_device "/dev/$device"
use_device="$sds_swap_device"
}
}
grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || {
[ "$anon_mount" -eq 1 -a -z "$use_device" ] && {
case "$device" in
mtdblock*) ;;
*)
mntdir="$mnthd$serial"
( mkdir -p /mnt/$mntdir && mount /dev/$device /mnt/$mntdir -o umask=0 || ntfs-3g /dev/$device /mnt/$mntdir ) 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab'
echo "/dev/$device /mnt/$mntdir" >> /var/usbmounts
[ -n "$mntdir" ] && ubus send usb 2>/dev/null
;;
esac
}
}
reset_dev_section_cb
;;
remove)
umount /dev/$device
umount $mountpoint
rm -rf $mountpoint
sed -i "/$device/ d" /var/usbmounts
[ -n "$device" ] && ubus send usb 2>/dev/null
;;
esac
fi

View File

@@ -1,65 +0,0 @@
#!/bin/sh
# Copyright (C) 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
determine_external_root() {
. /lib/functions/extmount.sh
. /lib/functions/mount.sh
local OLD_UCI_CONFIG_DIR="$UCI_CONFIG_DIR"
local OLD_PATH="$PATH"
local OLD_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
set_jffs_mp
determine_root_device
# extroot requires extroot and fstab config files, therefore
# we assume configuration is incomplete and not to be used if either of them
# is missing (for jffs versions of these files on squashfs image)
if [ "$jffs" = "/tmp/overlay" ] && [ -r "/tmp/overlay/etc/config/fstab" ]; then
UCI_CONFIG_DIR="/tmp/overlay/etc/config"
ER_IS_SQUASHFS=true
ER_OVERLAY_PREFIX="/tmp/overlay"
PATH=$ER_OVERLAY_PREFIX/sbin:$PATH
LD_LIBRARY_PATH=$ER_OVERLAY_PREFIX/usr/lib:$LD_LIBRARY_PATH
export PATH LD_LIBRARY_PATH
fi
# For squashfs on firstboot root_device will be tmpfs for the ramoverlay,
# unless there is a saved config, in which case it will be /dev/root,
# however in the case of a saved config, it won't be restored until after
# this script, so there won't be a config on the first boot after
# flashing a squashfs-based filesystem
# For ext2, ramdisk, or jffs2 root filesystems root_device is /dev/root
# For squashfs after firstboot, root filesystem is /dev/root
# We only use the config from the root or jffs if the root_device is
# /dev/root
[ "$root_device" = "/dev/root" ] && {
er_load_modules
[ -n "$extroot_settle_time" ] && [ "$extroot_settle_time" -gt 0 ] && {
sleep $extroot_settle_time
}
config_load fstab
config_foreach config_mount_by_section mount 1
ER_OVERLAY_ROM="/no-extroot"
[ "$rootfs_found" = "1" ] && grep -q ' /overlay ' /proc/mounts && {
pi_extroot_mount_success=true
pi_mount_skip_next=false
ER_OVERLAY_ROM="/overlay"
}
[ "$rootfs_found" = "1" ] && grep -q ' /rom ' /proc/mounts && {
pi_extroot_mount_success=true
pi_mount_skip_next=false
ER_OVERLAY_ROM="/rom"
}
}
UCI_CONFIG_DIR="$OLD_UCI_CONFIG_DIR"
PATH="$OLD_PATH"
LD_LIBRARY_PATH="$OLD_LD_LIBRARY_PATH"
export PATH LD_LIBRARY_PATH
}
boot_hook_add preinit_mount_root determine_external_root

View File

@@ -1,63 +0,0 @@
#!/bin/sh
# Copyright (C) 2010 Daniel Dickinson
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
check_set_md5sum() {
local er_md5sum_file
er_md5sum_file="${ER_OVERLAY_PREFIX}/.extroot.md5sum"
local er_disabled
if [ "${ER_OVERLAY_ROM}" = "/rom" ]; then
er_disabled=/tmp/whole_root-disabled
else
er_disabled=/tmp${ER_OVERLAY_ROM}-disabled
fi
local er_extroot_md5sum
if [ -f $md5sum_file ]; then
er_extroot_md5sum="$(cat $er_md5sum_file)"
fi
local er_overlay_file="${ER_OVERLAY_ROM}/etc/extroot.md5sum"
local er_extroot_overlay_md5sum
if [ -f "$er_overlay_file" ]; then
er_extroot_overlay_md5sum="$(cat $er_overlay_file)"
fi
if [ -z "$er_extroot_overlay_md5sum" ]; then
cat $er_md5sum_file >$er_overlay_file
elif [ "$er_extroot_overlay_md5sum" != "$er_extroot_md5sum" ]; then
pi_extroot_mount_success="false"
mkdir -p $er_disabled
mount --move ${ER_OVERLAY_ROM} $er_disabled
fi
}
set_jffs_md5sum() {
# We do this anytime block-extroot exists, even on the first boot with
# no extroot defined.
local er_md5sum_file
er_md5sum_file="${ER_OVERLAY_PREFIX}/.extroot.md5sum"
local er_extroot_md5sum
if [ -f $er_md5sum_file ]; then
er_extroot_md5sum="$(cat $er_md5sum_file)"
fi
if [ -z "$er_extroot_md5sum" ]; then
dd if=/dev/urandom count=32 bs=1k 2>/dev/null | md5sum | cut -f1 -d\ >$er_md5sum_file
fi
}
determine_extroot_sysupgrade() {
check_skip || set_jffs_md5sum
check_skip || [ "$pi_extroot_mount_success" != "true" ] || {
check_set_md5sum
}
}
boot_hook_add preinit_mount_root determine_extroot_sysupgrade

View File

@@ -1,27 +0,0 @@
#!/bin/sh
# Copyright (C) 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# Determine if we are requested to mount external root
external_root_pivot() {
check_skip || [ "$pi_extroot_mount_success" != "true" ] || {
echo "switching to external rootfs"
if [ "$ER_OVERLAY_ROM" = "/overlay" ]; then
if [ "$ER_IS_SQUASHFS" = "true" ]; then
umount /tmp/overlay
fi
mount -o remount,ro / && fopivot /overlay /rom && pi_mount_skip_next=true
elif [ "$ER_OVERLAY_ROM" = "/rom" ]; then
if [ "$ER_IS_SQUASHFS" = "true" ]; then
umount /tmp/overlay
fi
mount -o remount,ro / && pivot_rom /rom /rom && pi_mount_skip_next=true
fi
}
}
boot_hook_add preinit_mount_root external_root_pivot

View File

@@ -1,264 +0,0 @@
#!/bin/sh
# Copyright 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
. /lib/functions.sh
reset_block_cb() {
mount_cb() {
dmc_mount_cfg="$1"
shift # skip optional param
dmc_target="$2"
dmc_mount_device="$3"
dmc_fstype="$4"
dmc_options="$5"
dmc_enabled="$6"
dmc_enabled_fsck="$7"
dmc_uuid="$8"
dmc_label="$9"
shift
dmc_is_rootfs="$9"
return 0
}
swap_cb() {
dsc_swap_cfg="$1"
shift # skip optional param
dsc_swap_device="$2"
dsc_enabled="$3"
dsc_uuid="$4"
dsc_label="$5"
return 0
}
}
reset_block_cb
reset_dev_section_cb() {
mount_dev_section_cb() {
dmds_mount_cfg="$1"
dmds_mount_target="$2"
dmds_mount_device="$3"
dmds_mount_fstype="$4"
dmds_mount_options="$5"
dmds_mount_enabled="$6"
dmds_mount_enabled_fsck="$7"
dmds_mount_uuid="$8"
dmds_mount_label="$9"
shift
dmds_is_rootfs="$9"
return 0
}
swap_dev_section_cb() {
dsds_swap_cfg="$1"
dsds_swap_device="$2"
dsds_swap_enabled="$3"
dsds_swap_uuid="$4"
dsds_swap_label="$5"
return 0
}
}
reset_dev_section_cb
config_get_mount() {
local gm_cfg="$1"
local gm_param="$2"
local gm_target
local gm_device
local gm_fstype
local gm_options
local gm_enabled
local gm_enabled_fsck
local gm_uuid
local gm_label
local gm_is_rootfs
config_get gm_target "$1" target
config_get gm_device "$1" device
config_get gm_fstype "$1" fstype 'auto'
config_get gm_options "$1" options 'rw'
config_get_bool gm_enabled "$1" enabled 1
config_get_bool gm_enabled_fsck "$1" enabled_fsck 0
config_get gm_uuid "$1" uuid
config_get gm_label "$1" label
config_get_bool gm_is_rootfs "$1" is_rootfs 0
mount_cb "$gm_cfg" "$gm_param" "$gm_target" "$gm_device" "$gm_fstype" "$gm_options" "$gm_enabled" "$gm_enabled_fsck" "$gm_uuid" "$gm_label" "$gm_is_rootfs"
}
config_get_swap() {
local gs_cfg="$1"
local gs_param="$2"
local gs_device
local gs_enabled
local gs_uuid
local gs_label
config_get gs_device "$1" device
config_get_bool gs_enabled "$1" enabled 1
config_get gs_uuid "$1" uuid
config_get gs_label "$1" label
swap_cb "$gs_cfg" "$gs_param" "$gs_device" "$gs_enabled" "$gs_uuid" "$gs_label"
}
config_get_automount() {
config_load fstab
config_get_bool from_fstab "automount" from_fstab 1
config_get_bool anon_mount "automount" anon_mount 1
config_get_bool anon_fsck "automount" anon_fsck 0
}
config_get_autoswap() {
config_load fstab
config_get_bool from_fstab "autoswap" from_fstab 1
config_get_bool anon_swap "autoswap" anon_swap 0
}
config_create_swap_fstab_entry() {
local device="$1"
local enabled="$2"
[ -n "$device" ] || return 0
local fstabnew
mkdir -p /var/lock
lock /var/lock/fstab.lck
fstabnew="$(mktemp -t '.fstab.XXXXXXXX')"
cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" >>"$fstabnew"
[ "$enabled" -eq 1 ] && echo "$device none swap sw 0 0" >> "$fstabnew"
cat "$fstabnew" >/tmp/fstab
rm -f $fstabnew
lock -u /var/lock/fstab.lck
}
config_create_mount_fstab_entry() {
local device="$1"
local target="$2"
local fstype="$3"
local options="$4"
local enabled="$5"
options="${options:-rw}"
[ "$enabled" -eq 0 ] && options="noauto,$options"
[ -n "$target" ] || return 0
[ -n "$device" ] || return 0
local fstabnew
mkdir -p /var/lock
lock /var/lock/fstab.lck
fstabnew="$(mktemp -t '.fstab.XXXXXXXX')"
cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" | grep -v "$target" >>"$fstabnew"
echo "$device $target $fstype $options 0 0" >>"$fstabnew"
cat "$fstabnew" >/tmp/fstab
rm -f $fstabnew
lock -u /var/lock/fstab.lck
}
libmount_find_token() {
local token="$1"
local value="$2"
local device
device="$(blkid -w /dev/null -c /dev/null | grep "$token=\"$value\"" | cut -f1 -d:)"
echo "$device"
}
libmount_find_device_by_id() {
local uuid="$1"
local label="$2"
local device="$3"
local cfg_device="$4"
local found_device
if [ -n "$uuid" ]; then
found_device="$(libmount_find_token "UUID" "$uuid")"
elif [ -n "$label" ]; then
found_device="$(libmount_find_token "LABEL" "$label")"
elif [ "$device" = "$cfg_device" ]; then
found_device="$device"
elif [ -z "$device" ] && [ -e "$cfg_device" ]; then
found_device="$cfg_device"
fi
[ -n "$device" ] && [ "$device" != "$found_device" ] && {
found_device=""
}
echo "$found_device"
}
config_get_mount_section_by_device() {
local msbd_device="$1"
local msbd_mount_cfg=
local msbd_target=
local msbd_mount_device=
local msbd_fstype=
local msbd_options=
local msbd_enabled=
local msbd_enabled_fsck=
local msbd_uuid=
local msbd_label=
local msbd_is_rootfs
local msbd_blkid_fstype_match=
mount_cb() {
local mc_cfg="$1"
local mc_device="$2"
shift
local mc_target="$2"
local mc_cfgdevice="$3"
local mc_fstype="$4"
local mc_uuid="$8"
local mc_label="$9"
shift
local mc_is_rootfs="$9"
local mc_found_device=""
mc_found_device="$(libmount_find_device_by_id "$mc_uuid" "$mc_label" "$mc_device" "$mc_cfgdevice")"
if [ -n "$mc_found_device" ]; then
msbd_mount_cfg="$mc_cfg"
msbd_target="$mc_target"
msbd_mount_device="$mc_found_device"
msbd_fstype="$mc_fstype"
msbd_options="$4"
msbd_enabled="$5"
msbd_enabled_fsck="$6"
msbd_uuid="$7"
msbd_label="$8"
msbd_is_rootfs="$9"
fi
return 0
}
config_foreach config_get_mount mount "$msbd_device"
[ -n "$msbd_mount_device" ] && config_create_mount_fstab_entry "$msbd_mount_device" "$msbd_target" "$msbd_fstype" "$msbd_options" "$msbd_enabled"
mount_dev_section_cb "$msbd_mount_cfg" "$msbd_target" "$msbd_mount_device" "$msbd_fstype" "$msbd_options" "$msbd_enabled" "$msbd_enabled_fsck" "$msbd_uuid" "$msbd_label" "$msbd_is_rootfs"
reset_block_cb
}
config_get_swap_section_by_device() {
local ssbd_device="$1"
local ssbd_swap_cfg=
local ssbd_swap_device=
local ssbd_enabled=
local ssbd_uuid=
local ssbd_label=
swap_cb() {
local sc_cfg="$1"
local sc_device="$2"
local sc_uuid="$5"
local sc_label="$6"
local sc_cfgdevice="$3"
local sc_found_device
sc_found_device="$(libmount_find_device_by_id "$sc_uuid" "$sc_label" "$sc_device" "$sc_cfgdevice")"
if [ -n "$sc_found_device" ]; then
ssbd_swap_cfg="$sc_cfg"
ssbd_swap_device="$sc_found_device"
ssbd_enabled="$4"
ssbd_uuid="$5"
ssbd_label="$6"
fi
return 0
}
config_foreach config_get_swap swap "$ssbd_device"
[ -n "$ssbd_swap_device" ] && config_create_swap_fstab_entry "$ssbd_swap_device" "$ssbd_enabled"
swap_dev_section_cb "$ssbd_swap_cfg" "$ssbd_swap_device" "$ssbd_enabled" "$ssbd_uuid" "$ssbd_label"
reset_block_cb
}

View File

@@ -1,37 +0,0 @@
#!/bin/sh
# Copyright (C) 2006-2011 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
determine_root_device() {
root_device="$(mount | grep ' / ' | cut -f1 -d\ | grep -v rootfs )"
}
set_jffs_mp() {
jffs="$(awk '/jffs2/ {print $2}' /proc/mounts)"
}
er_load_modules() {
mkdir -p /tmp/extroot_modules/modules.d
mkdir -p /tmp/extroot_modules/modules
cp -L /etc/modules-boot.d/* /tmp/overlay/etc/modules-boot.d/* /tmp/extroot_modules/modules.d
ln -sf /lib/modules/*/* /tmp/overlay/lib/modules/*/* /tmp/extroot_modules/modules
local modules="$(cat /tmp/extroot_modules/modules.d/* 2>/dev/null)"
cd /tmp/extroot_modules/modules && [ -n "$modules" ] && {
echo "$modules" | sed -e 's/^\([^#].*\)/insmod \.\/\1.ko/'| sh 2>&- || :
}
rm -rf /tmp/extroot_modules
}
pivot_rom() { # <new_root> <old_root>
mount -o move /proc $1/proc && \
pivot_root $1 $1$2 && {
mount -o move $2/dev /dev
mount -o move $2/tmp /tmp
mount -o move $2/sys /sys 2>&-
return 0
}
}

View File

@@ -1,34 +0,0 @@
#!/bin/sh
# Copyright 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
libmount_fsck() {
local device="$1"
local fsck_fstype="$2"
local fsck_enabled="$3"
local known_type
local found_fsck=0
grep -q "$device" /proc/swaps || grep -q "$device" /proc/mounts || {
[ -e "$device" ] && [ "$fsck_enabled" -eq 1 ] && {
for known_type in $libmount_known_fsck; do
if [ "$known_type" = "$fsck_fstype" ]; then
fsck_${known_type} "$device"
found_fsck=1
break
fi
done
if [ "$found_fsck" -ne 1 ]; then
logger -t 'fstab' "Unable to check/repair $device; no known fsck for filesystem type $fstype"
fi
}
}
}
libmount_known_fsck=""
include /lib/functions/fsck

View File

@@ -1,20 +0,0 @@
config global automount
option from_fstab 0
option anon_mount 1
config global autoswap
option from_fstab 0
option anon_swap 0
config mount
option target /mnt
option device /dev/sda1
option fstype ext4
option options rw,sync
option enabled 0
option enabled_fsck 0
config swap
option device /dev/sda2
option enabled 0

View File

@@ -1,88 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
START=20
EXTRA_COMMANDS="overlay_enable whole_root_enable"
EXTRA_HELP=" overlay_enable Reenable overlay rootfs. (After you fix it).
whole_root_enable Reenable whole-disk rootfs. (After you fix it)."
rootfs_enable() {
local extroot_type="$1"
if [ ! -d /tmp/${extroot_type}-disabled ]; then
echo "No disabled ${extroot_type} present (/tmp/${extroot_type}-disabled). Can't renable."
exit 1
fi
rm -f /tmp/${extroot_type}-disabled/.extroot.md5sum
rm -f /tmp/${extroot_type}-disabled/etc/extroot.md5sum
echo "Please reboot router to complete re-enabling external rootfs."
}
overlay_enable() {
rootfs_enable overlay
}
whole_root_enable() {
rootfs_enable whole_root
}
do_mount() {
local cfg="$1"
config_mount_by_section "$cfg"
}
do_swapon() {
local cfg="$1"
config_swapon_by_section "$cfg"
}
do_unmount() {
local cfg="$1"
config_get target "$cfg" target
config_get_bool enabled "$cfg" "enabled" '1'
[ -n "$target" -a "$enabled" -gt 0 ] || return 0
umount $target
}
do_swapoff() {
local cfg="$1"
config_get device "$cfg" device
config_get_bool enabled "$cfg" "enabled" '1'
[ -n "$device" -a "$enabled" -gt 0 ] && type swapoff >/dev/null || return 0
swapoff $device
}
start() {
. /lib/functions/mount.sh
config_load fstab
mkdir -p /var/lock
lock /var/lock/fstab.lck
[ -e /tmp/fstab ] || {
echo '# WARNING: this is an auto generated file, please use uci to set defined filesystems' > /tmp/fstab
}
lock -u /var/lock/fstab.lck
config_foreach do_swapon swap
config_foreach do_mount mount
config_foreach do_swapon swap # do swap a second time so that swap on filesystems is enabled
}
stop() {
. /lib/functions/mount.sh
config_load fstab
config_foreach do_unmount mount
config_foreach do_swapoff swap
swapoff -a
}

View File

@@ -1,103 +0,0 @@
#!/bin/sh
# Copyright 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
. /lib/functions/block.sh
. /lib/functions/fsck.sh
config_mount_by_section() {
local cfg="$1"
local find_rootfs="$2"
mount_cb() {
local cfg="$1"
local device="$2"
shift
local target="$2"
local cfgdevice="$3"
local fstype="$4"
local options="$5"
local enabled="$6"
local enabled_fsck="$7"
local uuid="$8"
local label="$9"
shift
local is_rootfs="$9"
shift
local found_device=""
found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")"
if [ -n "$found_device" ]; then
if [ "$find_rootfs" != "1" ] || ( [ "$is_rootfs" -eq 1 ] || [ "$target" = "/" ] || [ "$target" = "/overlay" ] ); then
[ "$enabled_fsck" -eq 1 ] && {
grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || {
libmount_fsck "$found_device" "$fstype" "$enabled_fsck"
}
}
if [ "$find_rootfs" = "1" ]; then
if [ "$is_rootfs" -eq 1 ]; then
target=/overlay
elif [ "$target" = "/" ]; then
target=/rom
fi
else
if [ "$is_rootfs" -eq 1 ] || [ "$target" = "/overlay" ]; then
target=/tmp/overlay-disabled
elif [ "$target" = "/" ] || [ "$target" = "/rom" ]; then
target="/tmp/whole_root-disabled"
fi
fi
config_create_mount_fstab_entry "$found_device" "$target" "$fstype" "$options" "$enabled"
grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || {
[ "$enabled" -eq 1 ] && mkdir -p "$target" && mount "$target" 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab'
}
fi
fi
[ "$find_rootfs" = "1" ] && {
[ "$target" = "/overlay" ] && {
rootfs_found=1
}
[ "$target" = "/rom" ] && {
rootfs_found=1
}
}
return 0
}
config_get_mount "$cfg"
reset_block_cb
}
config_swapon_by_section() {
local cfg="$1"
swap_cb() {
local cfg="$1"
local device="$2"
local cfgdevice="$3"
local enabled="$4"
local uuid="$5"
local label="$6"
local uuid
local label
local found_device=""
found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")"
if [ -n "$found_device" ]; then
config_create_swap_fstab_entry "$found_device" "$enabled"
grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || {
[ "$enabled" -eq 1 ] && swapon "$found_device" | tee /proc/self/fd/2 | logger -t 'fstab'
}
fi
return 0
}
config_get_swap "$cfg"
reset_block_cb
}

43
bootchart2/Makefile Normal file
View File

@@ -0,0 +1,43 @@
#
# Copyright (C) 2007-2011 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:=bootchart2
PKG_VERSION:=0.14.7
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mmeeks/bootchart.git
PKG_SOURCE_VERSION:=3ab81137cafe25c2ca4bc3a5f322a63646f9ce8d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/bootchart2
SECTION:=base
CATEGORY:=Utilities
TITLE:=Bootchart2
URL:=https://github.com/mmeeks/bootchart
endef
define Package/bootchart2/description
Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process.
endef
define Package/bootchart2/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bootchart-collector $(1)/sbin
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,bootchart2))

View File

@@ -0,0 +1,10 @@
do_bootchart()
{
[ -f /dev/null ] || mknod /dev/null c 1 3
mkdir -p /lib/bootchart/tmpfs
echo "starting bootchart"
/sbin/bootchart_run_preinit boot &
}
boot_hook_add preinit_essential do_bootchart

View File

@@ -0,0 +1,7 @@
bootchart_rootfs_pivot()
{
mount -o move /rom/lib/bootchart/tmpfs /lib/bootchart/tmpfs
}
boot_hook_add preinit_mount_root bootchart_rootfs_pivot

View File

@@ -0,0 +1,59 @@
#! /bin/sh
# this is intended to be started in preinit.
# 11_bootchart, starts it
# 72_bootchart, fixup mount point after pivot
#
# program can be killed early with
# bootchart_run_preinit stop
trap "stop; exit 0;" SIGINT SIGTERM
STOP_AFTER=250
HZ=50
if [ -z "$1" ]
then
echo "you need to specify start or stop"
exit 1
fi
start()
{
/sbin/bootchart-collector $HZ &
}
stop()
{
echo "bootchart DUMP"
mkdir /tmp/bootchart
/sbin/bootchart-collector --dump /tmp/bootchart
cd /tmp/bootchart
tar -zcf /tmp/bootchart.tgz header *.log
cd /
rm -rf /tmp/bootchart
}
case $1 in
boot) # secret option for preinit
start
sleep $STOP_AFTER
# test to see if someone has manually killed us
if [ -f /tmp/bootchart.tgz ]
then
exit 0
fi
stop
;;
start)
start
;;
stop)
stop
;;
*)
echo "you need to specify start or stop, not $1"
exit 1
;;
esac

View File

@@ -0,0 +1,40 @@
diff --git a/pybootchartgui/draw.py b/pybootchartgui/draw.py
index 7c3f60c..5c9f046 100644
--- a/pybootchartgui/draw.py
+++ b/pybootchartgui/draw.py
@@ -63,6 +63,7 @@ AXIS_FONT_SIZE = 11
LEGEND_FONT_SIZE = 12
# CPU load chart color.
+CPU_SYS_COLOR = (0.65, 0.13, 0.36, 1.0)
CPU_COLOR = (0.40, 0.55, 0.70, 1.0)
# IO wait chart color.
IO_COLOR = (0.76, 0.48, 0.48, 0.5)
@@ -300,21 +301,19 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
# render bar legend
ctx.set_font_size(LEGEND_FONT_SIZE)
- draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s)
- draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s)
+ draw_legend_box(ctx, "CPU (user)", CPU_COLOR, off_x, curr_y+20, leg_s)
+ draw_legend_box(ctx, "CPU (sys)", CPU_SYS_COLOR, off_x + 120, curr_y+20, leg_s)
+ draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120 + 120 , curr_y+20, leg_s)
# render I/O wait
chart_rect = (off_x, curr_y+30, w, bar_h)
if clip_visible (clip, chart_rect):
draw_box_ticks (ctx, chart_rect, sec_w)
draw_annotations (ctx, proc_tree, trace.times, chart_rect)
- draw_chart (ctx, IO_COLOR, True, chart_rect, \
- [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \
- proc_tree, None)
+ draw_chart (ctx, IO_COLOR, True, chart_rect, [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], proc_tree, None)
# render CPU load
- draw_chart (ctx, CPU_COLOR, True, chart_rect, \
- [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \
- proc_tree, None)
+ draw_chart (ctx, CPU_SYS_COLOR, True, chart_rect, [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], proc_tree, None)
+ draw_chart (ctx, CPU_COLOR, True, chart_rect, [(sample.time, sample.user ) for sample in trace.cpu_stats], proc_tree, None)
curr_y = curr_y + 30 + bar_h

View File

@@ -1,54 +0,0 @@
#
# Copyright (C) 2006-2008 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:=brcm-h
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=git@iopsys.inteno.se:brcm-h
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=HEAD
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
define Package/brcm-h
SECTION:=net
CATEGORY:=Base system
TITLE:=Broadcom header files
URL:=
endef
define Package/brcm-h/description
Broadcom header files
endef
define Package/brcm--h/install
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/brcm
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/voice_res_gw/inc/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/voice_res_gw/codec/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/xchg_drivers/inc/* $(STAGING_DIR)/usr/include/brcm \
endef
$(eval $(call BuildPackage,brcm-h))

View File

@@ -1,53 +0,0 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
export BUILD_DIR
PKG_NAME:=brcm_fw_tool
PKG_RELEASE:=1
PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
include $(INCLUDE_DIR)/package.mk
define Package/brcm_fw_tool
SECTION:=utils
CATEGORY:=Base system
TITLE:=Update utility for Broadcom nand firmware images
DEPENDS:=bcmkernel
endef
define Package/brcm_fw_tool/description
This package contains an utility useful to upgrade from other firmware or
older OpenWrt releases.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
target=$(firstword $(subst -, ,$(BOARD)))
MAKE_FLAGS += TARGET="$(target)"
TARGET_CFLAGS += -Dtarget_$(target)=1 -Wall
ifdef CONFIG_MTD_REDBOOT_PARTS
MAKE_FLAGS += FIS_SUPPORT=1
TARGET_CFLAGS += -DFIS_SUPPORT=1
endif
define Package/brcm_fw_tool/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/brcm_fw_tool $(1)/sbin/
endef
$(eval $(call BuildPackage,brcm_fw_tool))

View File

@@ -1,16 +0,0 @@
CC = gcc
CFLAGS += -Wall
CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx/
CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
obj = brcm_fw_tool.o jffs2.o crc32.o
obj.brcm47xx = $(obj.brcm)
brcm_fw_tool: $(obj) $(obj.$(TARGET))
clean:
rm -f *.o jffs2

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +0,0 @@
#ifndef __mtd_h
#define __mtd_h
#include <stdbool.h>
#define JFFS2_EOF "\xde\xad\xc0\xde"
extern int quiet;
extern int mtd_replace_jffs2(const char *mtd, int fd, int ofs, const char *filename, int nand_erasesize);
#endif /* __mtd_h */

View File

@@ -1,95 +0,0 @@
/*
* COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or
* code or tables extracted from it, as desired without restriction.
*
* First, the polynomial itself and its table of feedback terms. The
* polynomial is
* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
*
* Note that we take it "backwards" and put the highest-order term in
* the lowest-order bit. The X^32 term is "implied"; the LSB is the
* X^31 term, etc. The X^0 term (usually shown as "+1") results in
* the MSB being 1
*
* Note that the usual hardware shift register implementation, which
* is what we're using (we're merely optimizing it by doing eight-bit
* chunks at a time) shifts bits into the lowest-order term. In our
* implementation, that means shifting towards the right. Why do we
* do it this way? Because the calculated CRC must be transmitted in
* order from highest-order term to lowest-order term. UARTs transmit
* characters in order from LSB to MSB. By storing the CRC this way
* we hand it to the UART in the order low-byte to high-byte; the UART
* sends each low-bit to hight-bit; and the result is transmission bit
* by bit from highest- to lowest-order term without requiring any bit
* shuffling on our part. Reception works similarly
*
* The feedback terms table consists of 256, 32-bit entries. Notes
*
* The table can be generated at runtime if desired; code to do so
* is shown later. It might not be obvious, but the feedback
* terms simply represent the results of eight shift/xor opera
* tions for all combinations of data and CRC register values
*
* The values must be right-shifted by eight bits by the "updcrc
* logic; the shift must be unsigned (bring in zeroes). On some
* hardware you could probably optimize the shift in assembler by
* using byte-swap instructions
* polynomial $edb88320
*/
#include <stdint.h>
const uint32_t crc32_table[256] = {
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
0x2d02ef8dL
};

View File

@@ -1,26 +0,0 @@
#ifndef CRC32_H
#define CRC32_H
#include <stdint.h>
extern const uint32_t crc32_table[256];
/* Return a 32-bit CRC of the contents of the buffer. */
static inline uint32_t
crc32(uint32_t val, const void *ss, int len)
{
const unsigned char *s = ss;
while (--len >= 0)
val = crc32_table[(val ^ *s++) & 0xff] ^ (val >> 8);
return val;
}
static inline unsigned int crc32buf(char *buf, size_t len)
{
return crc32(0xFFFFFFFF, buf, len);
}
#endif

View File

@@ -1,350 +0,0 @@
/*
* jffs2 on-disk structure generator for mtd
*
* Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License v2
* 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.
* Based on:
* JFFS2 -- Journalling Flash File System, Version 2.
* Copyright © 2001-2007 Red Hat, Inc.
* Created by David Woodhouse <dwmw2@infradead.org>
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <stdint.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <endian.h>
#include "jffs2.h"
#include "crc32.h"
#include "brcm_fw_tool.h"
#define PAD(x) (((x)+3)&~3)
#if BYTE_ORDER == BIG_ENDIAN
# define CLEANMARKER "\x19\x85\x20\x03\x00\x00\x00\x0c\xf0\x60\xdc\x98"
#else
# define CLEANMARKER "\x85\x19\x03\x20\x0c\x00\x00\x00\xb1\xb0\x1e\xe4"
#endif
static int last_ino = 0;
static int last_version = 0;
static char *buf = NULL;
static int ofs = 0;
static int outfd = -1;
static int mtdofs = 0;
static int target_ino = 0;
static int erasesize = 128*1024;
static void prep_eraseblock(void);
static void pad(int size)
{
if ((ofs % size == 0) && (ofs < erasesize))
return;
if (ofs < erasesize) {
memset(buf + ofs, 0xff, (size - (ofs % size)));
ofs += (size - (ofs % size));
}
ofs = ofs % erasesize;
if (ofs == 0) {
write(outfd, buf, erasesize);
mtdofs += erasesize;
}
}
static inline int rbytes(void)
{
return erasesize - (ofs % erasesize);
}
static inline void add_data(char *ptr, int len)
{
if (ofs + len > erasesize) {
pad(erasesize);
prep_eraseblock();
}
memcpy(buf + ofs, ptr, len);
ofs += len;
}
static void prep_eraseblock(void)
{
if (ofs > 0)
return;
add_data(CLEANMARKER, sizeof(CLEANMARKER) - 1);
}
static int add_dirent(const char *name, const char type, int parent)
{
struct jffs2_raw_dirent *de;
if (ofs - erasesize < sizeof(struct jffs2_raw_dirent) + strlen(name))
pad(erasesize);
prep_eraseblock();
last_ino++;
memset(buf + ofs, 0, sizeof(struct jffs2_raw_dirent));
de = (struct jffs2_raw_dirent *) (buf + ofs);
de->magic = JFFS2_MAGIC_BITMASK;
de->nodetype = JFFS2_NODETYPE_DIRENT;
de->type = type;
de->name_crc = crc32(0, name, strlen(name));
de->ino = last_ino++;
de->pino = parent;
de->totlen = sizeof(*de) + strlen(name);
de->hdr_crc = crc32(0, (void *) de, sizeof(struct jffs2_unknown_node) - 4);
de->version = last_version++;
de->mctime = 0;
de->nsize = strlen(name);
de->node_crc = crc32(0, (void *) de, sizeof(*de) - 8);
memcpy(de->name, name, strlen(name));
ofs += sizeof(struct jffs2_raw_dirent) + de->nsize;
pad(4);
return de->ino;
}
static int add_dir(const char *name, int parent)
{
struct jffs2_raw_inode ri;
int inode;
inode = add_dirent(name, IFTODT(S_IFDIR), parent);
if (rbytes() < sizeof(ri))
pad(erasesize);
prep_eraseblock();
memset(&ri, 0, sizeof(ri));
ri.magic = JFFS2_MAGIC_BITMASK;
ri.nodetype = JFFS2_NODETYPE_INODE;
ri.totlen = sizeof(ri);
ri.hdr_crc = crc32(0, &ri, sizeof(struct jffs2_unknown_node) - 4);
ri.ino = inode;
ri.mode = S_IFDIR | 0755;
ri.uid = ri.gid = 0;
ri.atime = ri.ctime = ri.mtime = 0;
ri.isize = ri.csize = ri.dsize = 0;
ri.version = 1;
ri.node_crc = crc32(0, &ri, sizeof(ri) - 8);
ri.data_crc = 0;
add_data((char *) &ri, sizeof(ri));
pad(4);
return inode;
}
static void add_file(const char *name, int parent)
{
int inode, f_offset = 0, fd;
struct jffs2_raw_inode ri;
struct stat st;
char wbuf[4096];
const char *fname;
if (stat(name, &st)) {
fprintf(stderr, "File %s does not exist\n", name);
return;
}
fname = strrchr(name, '/');
if (fname)
fname++;
else
fname = name;
inode = add_dirent(fname, IFTODT(S_IFREG), parent);
memset(&ri, 0, sizeof(ri));
ri.magic = JFFS2_MAGIC_BITMASK;
ri.nodetype = JFFS2_NODETYPE_INODE;
ri.ino = inode;
ri.mode = st.st_mode;
ri.uid = ri.gid = 0;
ri.atime = st.st_atime;
ri.ctime = st.st_ctime;
ri.mtime = st.st_mtime;
ri.isize = st.st_size;
ri.compr = 0;
ri.usercompr = 0;
fd = open(name, 0);
if (fd < 0) {
fprintf(stderr, "File %s does not exist\n", name);
return;
}
for (;;) {
int len = 0;
for (;;) {
len = rbytes() - sizeof(ri);
if (len > 128)
break;
pad(erasesize);
prep_eraseblock();
}
if (len > sizeof(wbuf))
len = sizeof(wbuf);
len = read(fd, wbuf, len);
if (len <= 0)
break;
ri.totlen = sizeof(ri) + len;
ri.hdr_crc = crc32(0, &ri, sizeof(struct jffs2_unknown_node) - 4);
ri.version = ++last_version;
ri.offset = f_offset;
ri.csize = ri.dsize = len;
ri.node_crc = crc32(0, &ri, sizeof(ri) - 8);
ri.data_crc = crc32(0, wbuf, len);
f_offset += len;
add_data((char *) &ri, sizeof(ri));
add_data(wbuf, len);
pad(4);
prep_eraseblock();
}
close(fd);
}
int mtd_replace_jffs2(const char *mtd, int fd, int ofs, const char *filename, int nand_erasesize)
{
outfd = fd;
mtdofs = ofs;
erasesize = nand_erasesize;
buf = malloc(erasesize);
target_ino = 1;
if (!last_ino)
last_ino = 1;
add_file(filename, target_ino);
pad(erasesize);
/* add eof marker, pad to eraseblock size and write the data */
add_data(JFFS2_EOF, sizeof(JFFS2_EOF) - 1);
pad(erasesize);
free(buf);
return 0;
}
void mtd_parse_jffs2data(const char *buf, const char *dir)
{
struct jffs2_unknown_node *node = (struct jffs2_unknown_node *) buf;
unsigned int ofs = 0;
while (ofs < erasesize) {
node = (struct jffs2_unknown_node *) (buf + ofs);
if (node->magic != 0x1985)
break;
ofs += PAD(node->totlen);
if (node->nodetype == JFFS2_NODETYPE_DIRENT) {
struct jffs2_raw_dirent *de = (struct jffs2_raw_dirent *) node;
/* is this the right directory name and is it a subdirectory of / */
if (*dir && (de->pino == 1) && !strncmp((char *) de->name, dir, de->nsize))
target_ino = de->ino;
/* store the last inode and version numbers for adding extra files */
if (last_ino < de->ino)
last_ino = de->ino;
if (last_version < de->version)
last_version = de->version;
}
}
}
int quiet = 0;
int mtd_write_jffs2(const char *mtd, const char *filename, const char *dir)
{
int err = -1, fdeof = 0;
if (quiet < 2)
fprintf(stderr, "Appending %s to jffs2 partition %s\n", filename, mtd);
buf = malloc(erasesize);
if (!buf) {
fprintf(stderr, "Out of memory!\n");
goto done;
}
if (!*dir)
target_ino = 1;
/* parse the structure of the jffs2 first
* locate the directory that the file is going to be placed in */
for(;;) {
struct jffs2_unknown_node *node = (struct jffs2_unknown_node *) buf;
if (read(outfd, buf, erasesize) != erasesize) {
fdeof = 1;
break;
}
mtdofs += erasesize;
if (node->magic == 0x8519) {
fprintf(stderr, "Error: wrong endianness filesystem\n");
goto done;
}
/* assume no magic == end of filesystem
* the filesystem will probably end with be32(0xdeadc0de) */
if (node->magic != 0x1985)
break;
mtd_parse_jffs2data(buf, dir);
}
if (fdeof) {
fprintf(stderr, "Error: No room for additional data\n");
goto done;
}
/* jump back one eraseblock */
mtdofs -= erasesize;
lseek(outfd, mtdofs, SEEK_SET);
ofs = 0;
if (!last_ino)
last_ino = 1;
if (!target_ino)
target_ino = add_dir(dir, 1);
add_file(filename, target_ino);
pad(erasesize);
/* add eof marker, pad to eraseblock size and write the data */
add_data(JFFS2_EOF, sizeof(JFFS2_EOF) - 1);
pad(erasesize);
err = 0;
done:
close(outfd);
if (buf)
free(buf);
return err;
}

View File

@@ -1,216 +0,0 @@
/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
* Copyright (C) 2001-2003 Red Hat, Inc.
*
* Created by David Woodhouse <dwmw2@infradead.org>
*
* For licensing information, see the file 'LICENCE' in the
* jffs2 directory.
*
*
*/
#ifndef __LINUX_JFFS2_H__
#define __LINUX_JFFS2_H__
#define JFFS2_SUPER_MAGIC 0x72b6
/* You must include something which defines the C99 uintXX_t types.
We don't do it from here because this file is used in too many
different environments. */
/* Values we may expect to find in the 'magic' field */
#define JFFS2_OLD_MAGIC_BITMASK 0x1984
#define JFFS2_MAGIC_BITMASK 0x1985
#define KSAMTIB_CIGAM_2SFFJ 0x8519 /* For detecting wrong-endian fs */
#define JFFS2_EMPTY_BITMASK 0xffff
#define JFFS2_DIRTY_BITMASK 0x0000
/* Summary node MAGIC marker */
#define JFFS2_SUM_MAGIC 0x02851885
/* We only allow a single char for length, and 0xFF is empty flash so
we don't want it confused with a real length. Hence max 254.
*/
#define JFFS2_MAX_NAME_LEN 254
/* How small can we sensibly write nodes? */
#define JFFS2_MIN_DATA_LEN 128
#define JFFS2_COMPR_NONE 0x00
#define JFFS2_COMPR_ZERO 0x01
#define JFFS2_COMPR_RTIME 0x02
#define JFFS2_COMPR_RUBINMIPS 0x03
#define JFFS2_COMPR_COPY 0x04
#define JFFS2_COMPR_DYNRUBIN 0x05
#define JFFS2_COMPR_ZLIB 0x06
/* Compatibility flags. */
#define JFFS2_COMPAT_MASK 0xc000 /* What do to if an unknown nodetype is found */
#define JFFS2_NODE_ACCURATE 0x2000
/* INCOMPAT: Fail to mount the filesystem */
#define JFFS2_FEATURE_INCOMPAT 0xc000
/* ROCOMPAT: Mount read-only */
#define JFFS2_FEATURE_ROCOMPAT 0x8000
/* RWCOMPAT_COPY: Mount read/write, and copy the node when it's GC'd */
#define JFFS2_FEATURE_RWCOMPAT_COPY 0x4000
/* RWCOMPAT_DELETE: Mount read/write, and delete the node when it's GC'd */
#define JFFS2_FEATURE_RWCOMPAT_DELETE 0x0000
#define JFFS2_NODETYPE_DIRENT (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 1)
#define JFFS2_NODETYPE_INODE (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 2)
#define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
#define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4)
#define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6)
#define JFFS2_NODETYPE_XATTR (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 8)
#define JFFS2_NODETYPE_XREF (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 9)
/* XATTR Related */
#define JFFS2_XPREFIX_USER 1 /* for "user." */
#define JFFS2_XPREFIX_SECURITY 2 /* for "security." */
#define JFFS2_XPREFIX_ACL_ACCESS 3 /* for "system.posix_acl_access" */
#define JFFS2_XPREFIX_ACL_DEFAULT 4 /* for "system.posix_acl_default" */
#define JFFS2_XPREFIX_TRUSTED 5 /* for "trusted.*" */
#define JFFS2_ACL_VERSION 0x0001
// Maybe later...
//#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4)
#define JFFS2_INO_FLAG_PREREAD 1 /* Do read_inode() for this one at
mount time, don't wait for it to
happen later */
#define JFFS2_INO_FLAG_USERCOMPR 2 /* User has requested a specific
compression type */
/* These can go once we've made sure we've caught all uses without
byteswapping */
typedef uint32_t jint32_t;
typedef uint32_t jmode_t;
typedef uint16_t jint16_t;
struct jffs2_unknown_node
{
/* All start like this */
jint16_t magic;
jint16_t nodetype;
jint32_t totlen; /* So we can skip over nodes we don't grok */
jint32_t hdr_crc;
};
struct jffs2_raw_dirent
{
jint16_t magic;
jint16_t nodetype; /* == JFFS2_NODETYPE_DIRENT */
jint32_t totlen;
jint32_t hdr_crc;
jint32_t pino;
jint32_t version;
jint32_t ino; /* == zero for unlink */
jint32_t mctime;
uint8_t nsize;
uint8_t type;
uint8_t unused[2];
jint32_t node_crc;
jint32_t name_crc;
uint8_t name[0];
};
/* The JFFS2 raw inode structure: Used for storage on physical media. */
/* The uid, gid, atime, mtime and ctime members could be longer, but
are left like this for space efficiency. If and when people decide
they really need them extended, it's simple enough to add support for
a new type of raw node.
*/
struct jffs2_raw_inode
{
jint16_t magic; /* A constant magic number. */
jint16_t nodetype; /* == JFFS2_NODETYPE_INODE */
jint32_t totlen; /* Total length of this node (inc data, etc.) */
jint32_t hdr_crc;
jint32_t ino; /* Inode number. */
jint32_t version; /* Version number. */
jmode_t mode; /* The file's type or mode. */
jint16_t uid; /* The file's owner. */
jint16_t gid; /* The file's group. */
jint32_t isize; /* Total resultant size of this inode (used for truncations) */
jint32_t atime; /* Last access time. */
jint32_t mtime; /* Last modification time. */
jint32_t ctime; /* Change time. */
jint32_t offset; /* Where to begin to write. */
jint32_t csize; /* (Compressed) data size */
jint32_t dsize; /* Size of the node's data. (after decompression) */
uint8_t compr; /* Compression algorithm used */
uint8_t usercompr; /* Compression algorithm requested by the user */
jint16_t flags; /* See JFFS2_INO_FLAG_* */
jint32_t data_crc; /* CRC for the (compressed) data. */
jint32_t node_crc; /* CRC for the raw inode (excluding data) */
uint8_t data[0];
};
struct jffs2_raw_xattr {
jint16_t magic;
jint16_t nodetype; /* = JFFS2_NODETYPE_XATTR */
jint32_t totlen;
jint32_t hdr_crc;
jint32_t xid; /* XATTR identifier number */
jint32_t version;
uint8_t xprefix;
uint8_t name_len;
jint16_t value_len;
jint32_t data_crc;
jint32_t node_crc;
uint8_t data[0];
} __attribute__((packed));
struct jffs2_raw_xref
{
jint16_t magic;
jint16_t nodetype; /* = JFFS2_NODETYPE_XREF */
jint32_t totlen;
jint32_t hdr_crc;
jint32_t ino; /* inode number */
jint32_t xid; /* XATTR identifier number */
jint32_t xseqno; /* xref sequencial number */
jint32_t node_crc;
} __attribute__((packed));
struct jffs2_raw_summary
{
jint16_t magic;
jint16_t nodetype; /* = JFFS2_NODETYPE_SUMMARY */
jint32_t totlen;
jint32_t hdr_crc;
jint32_t sum_num; /* number of sum entries*/
jint32_t cln_mkr; /* clean marker size, 0 = no cleanmarker */
jint32_t padded; /* sum of the size of padding nodes */
jint32_t sum_crc; /* summary information crc */
jint32_t node_crc; /* node crc */
jint32_t sum[0]; /* inode summary info */
};
union jffs2_node_union
{
struct jffs2_raw_inode i;
struct jffs2_raw_dirent d;
struct jffs2_raw_xattr x;
struct jffs2_raw_xref r;
struct jffs2_raw_summary s;
struct jffs2_unknown_node u;
};
/* Data payload for device nodes. */
union jffs2_device_node {
jint16_t old;
jint32_t new;
};
#endif /* __LINUX_JFFS2_H__ */

View File

@@ -1,58 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=brcminfo
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
include $(INCLUDE_DIR)/package.mk
define Package/brcminfo
CATEGORY:=Utilities
TITLE:=Broadcom voice driver info utility
URL:=
DEPENDS:= bcmkernel
endef
define Package/brcminfo/description
Utility that prints information regarding voice configuration
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
target=$(firstword $(subst -, ,$(BOARD)))
MAKE_FLAGS += TARGET="$(target)"
EXTRA_CFLAGS += -DBOS_OS_LINUXUSER
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
TARGET_CFLAGS += -D$(CONFIG_TARGET_IBOARDID) -Dtarget_$(target)=1 -Wall
define Package/brcminfo/install
$(INSTALL_DIR) $(1)/usr/bin
cp $(PKG_BUILD_DIR)/brcminfo $(1)/usr/bin/
endef
$(eval $(call BuildPackage,brcminfo))

View File

@@ -1,15 +0,0 @@
# Makefile for brcminfo utility
%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
OBJS = brcminfo.o
all: main
dynamic: all
main: brcminfo.o
$(CC) $(LDFLAGS) $(EXTRA_CFLAGS) -o brcminfo brcminfo.o -lm
clean:
rm -f brcminfo ${OBJS}

View File

@@ -1,92 +0,0 @@
/*
* brcminfo.c
* Minor utility that will attempt to read the number of available
* endpoints from the brcm voice driver
*/
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <endpointdrv.h>
static int endpoint_fd = -1;
static int num_fxs_endpoints = -1;
static int num_fxo_endpoints = -1;
static int num_dect_endpoints = -1;
static int num_endpoints = -1;
int vrgEndptDriverOpen(void)
{
endpoint_fd = open("/dev/bcmendpoint0", O_RDWR);
if (endpoint_fd == -1) {
return -1;
} else {
return 0;
}
}
int vrgEndptDriverClose(void)
{
int result = close(endpoint_fd);
endpoint_fd = -1;
return result;
}
static int brcm_get_endpoints_count(void)
{
ENDPOINTDRV_ENDPOINTCOUNT_PARM endpointCount;
endpointCount.size = sizeof(ENDPOINTDRV_ENDPOINTCOUNT_PARM);
if ( ioctl( endpoint_fd, ENDPOINTIOCTL_FXSENDPOINTCOUNT, &endpointCount ) != IOCTL_STATUS_SUCCESS ) {
return -1;
} else {
num_fxs_endpoints = endpointCount.endpointNum;
}
if ( ioctl( endpoint_fd, ENDPOINTIOCTL_FXOENDPOINTCOUNT, &endpointCount ) != IOCTL_STATUS_SUCCESS ) {
return -1;
} else {
num_fxo_endpoints = endpointCount.endpointNum;
}
if ( ioctl( endpoint_fd, ENDPOINTIOCTL_DECTENDPOINTCOUNT, &endpointCount ) != IOCTL_STATUS_SUCCESS ) {
return -1;
} else {
num_dect_endpoints = endpointCount.endpointNum;
}
num_endpoints = num_fxs_endpoints + num_fxo_endpoints + num_dect_endpoints;
return 0;
}
int main(int argc, char **argv)
{
int result;
result = vrgEndptDriverOpen();
if (result != 0) {
printf("Could not open endpoint driver\n");
return result;
}
result = brcm_get_endpoints_count();
if (result == 0) {
printf("DECT Endpoints:\t%d\n", num_dect_endpoints);
printf("FXS Endpoints:\t%d\n", num_fxs_endpoints);
printf("FXO Endpoints:\t%d\n", num_fxo_endpoints);
printf("All Endpoints:\t%d\n", num_endpoints);
}
else {
printf("Endpoint counting failed, maybe driver is not initialized?\n");
}
result = vrgEndptDriverClose();
if (result != 0) {
printf("Could not close endpoint driver\n");
return result;
}
return 0;
}

View File

@@ -1,51 +0,0 @@
#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=bridge-utils
PKG_RELEASE:=1
PKG_SOURCE_URL:=@SF/bridge
PKG_VERSION:=1.5
PKG_MD5SUM:=ec7b381160b340648dede58c31bb2238
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
define Package/bridge
SECTION:=net
CATEGORY:=Base system
TITLE:=Ethernet bridging configuration utility
URL:=http://bridge.sourceforge.net/
endef
define Package/bridge/description
Manage ethernet bridging: a way to connect networks together to
form a larger network.
endef
CONFIGURE_ARGS += \
--with-linux-headers="$(LINUX_DIR)" \
define Build/Prepare
$(call Build/Prepare/Default)
( cd $(PKG_BUILD_DIR) ; \
[ -f ./configure ] || { \
ln -sf configure.in configure.ac ; \
autoconf ; \
} \
)
endef
define Package/bridge/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
endef
$(eval $(call BuildPackage,bridge))

View File

@@ -1,11 +0,0 @@
--- a/libbridge/Makefile.in
+++ b/libbridge/Makefile.in
@@ -5,7 +5,7 @@ AR=ar
RANLIB=@RANLIB@
CC=@CC@
-CFLAGS = -Wall -g $(KERNEL_HEADERS)
+CFLAGS = -Wall -g @CFLAGS@ $(KERNEL_HEADERS)
prefix=@prefix@
exec_prefix=@exec_prefix@

View File

@@ -1,37 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=broadcom-diag
PKG_RELEASE:=10
include $(INCLUDE_DIR)/package.mk
define KernelPackage/diag
SUBMENU:=Other modules
DEPENDS:=@TARGET_brcm47xx
TITLE:=Driver for router LEDs and Buttons
FILES:=$(PKG_BUILD_DIR)/diag.ko
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(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="$(BUILDFLAGS)" \
modules
endef
$(eval $(call KernelPackage,diag))

View File

@@ -1,17 +0,0 @@
#
# Makefile for diag driver
#
# Copyright (C) 2005 Felix Fietkau <nbd@openwrt.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version
# 2 of the License, or (at your option) any later version.
#
obj-m := diag.o
ifeq ($(MAKING_MODULES),1)
-include $(TOPDIR)/Rules.make
endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,134 +0,0 @@
/*
* diag.h - GPIO interface driver for Broadcom boards
*
* Copyright (C) 2006 Mike Baker <mbm@openwrt.org>,
* Felix Fietkau <nbd@openwrt.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <linux/irq.h>
#define MODULE_NAME "diag"
#define MAX_GPIO 16
#define FLASH_TIME HZ/6
enum polarity_t {
REVERSE = 0,
NORMAL = 1,
INPUT = 2,
};
enum {
PROC_BUTTON,
PROC_LED,
PROC_MODEL,
PROC_GPIOMASK
};
struct prochandler_t {
int type;
void *ptr;
};
struct button_t {
struct prochandler_t proc;
char *name;
u32 gpio;
unsigned long seen;
u8 pressed;
};
struct led_t {
struct prochandler_t proc;
char *name;
u32 gpio;
u8 polarity;
u8 flash;
u8 state;
};
struct platform_t {
char *name;
struct button_t buttons[MAX_GPIO];
u32 button_mask;
u32 button_polarity;
void (*platform_init)(void);
struct led_t leds[MAX_GPIO];
};
struct event_t {
struct work_struct wq;
unsigned long seen;
char *name, *action;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
struct sk_buff *skb;
#else
char *scratch;
char *argv[4];
char *envp[7];
u8 enr, anr;
#endif
};
extern char *nvram_get(char *str);
static struct platform_t platform;
/* buttons */
static void register_buttons(struct button_t *b);
static void unregister_buttons(struct button_t *b);
static void hotplug_button(struct work_struct *work);
static irqreturn_t button_handler(int irq, void *dev_id);
/* leds */
static void register_leds(struct led_t *l);
static void unregister_leds(struct led_t *l);
static void set_led_extif(struct led_t *led);
static void led_flash(unsigned long dummy);
/* 2.4 compatibility */
#ifndef TIMER_INITIALIZER
#define TIMER_INITIALIZER(_function, _expires, _data) \
{ \
/* _expires and _data currently unused */ \
function: _function \
}
#endif
static struct timer_list led_timer = TIMER_INITIALIZER(&led_flash, 0, 0);
/* proc */
static struct proc_dir_entry *diag, *leds;
static ssize_t diag_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos);
static ssize_t diag_proc_write(struct file *file, const char *buf, size_t count, loff_t *ppos);
static struct file_operations diag_proc_fops = {
read: diag_proc_read,
write: diag_proc_write
};
static struct prochandler_t proc_model = { .type = PROC_MODEL };
static struct prochandler_t proc_gpiomask = { .type = PROC_GPIOMASK };

View File

@@ -1,16 +0,0 @@
#ifndef __DIAG_GPIO_H
#define __DIAG_GPIO_H
#include <linux/interrupt.h>
#include <linux/ssb/ssb_embedded.h>
#include <linux/gpio.h>
#include <bcm47xx.h>
#define EXTIF_ADDR 0x1f000000
#define EXTIF_UART (EXTIF_ADDR + 0x00800000)
#define GPIO_TYPE_NORMAL (0x0 << 24)
#define GPIO_TYPE_EXTIF (0x1 << 24)
#define GPIO_TYPE_MASK (0xf << 24)
#endif /* __DIAG_GPIO_H */

View File

@@ -1,54 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=broadcom-nvram
PKG_RELEASE:=1
PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
include $(INCLUDE_DIR)/package.mk
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
RSTRIP:=true
define Package/bcmnvram
CATEGORY:=Libraries
TITLE:=Broadcom nvram emulator library
URL:=
DEPENDS:=PACKAGE_libuci:libuci
endef
define Package/bcmnvram/description
Broadcom nvram to uci wrapper
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
target=$(firstword $(subst -, ,$(BOARD)))
MAKE_FLAGS += TARGET="$(target)"
TARGET_CFLAGS += -Dtarget_$(target)=1 -Wall
define Package/bcmnvram/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/bin
cp $(PKG_BUILD_DIR)/libnvram.so $(1)/usr/lib/
cp $(PKG_BUILD_DIR)/uci_test $(1)/usr/bin/
endef
$(eval $(call BuildPackage,bcmnvram))

View File

@@ -1,3 +0,0 @@
config 'broadcom' 'nvram'

View File

@@ -1,23 +0,0 @@
# Makefile for broadcom nvram to uci wrapper
%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
OBJS = nvram_emu_lib.o ucix.o main.o
all: libnvram main
dynamic: all
libnvram: nvram_emu_lib.o
$(CC) -c $(CFLAGS) $(LDFLAGS) -fPIC -o ucix_shared.o ucix.c -luci
$(CC) -c $(CFLAGS) $(LDFLAGS) -fPIC -o nvram_emu_lib.o nvram_emu_lib.c -luci
$(CC) $(LDFLAGS) -shared -Wl,-soname,libnvram.so -o libnvram.so nvram_emu_lib.o ucix_shared.o -luci
main: main.o ucix.o
$(CC) $(LDFLAGS) -o uci_test main.o ucix.o -luci
clean:
rm -f libnvram.so ucix_shared.o uci_test ${OBJS}

View File

@@ -1,30 +0,0 @@
// uci test program Copyright Benjamin Larsson 2012 <benjamin@southpole.se>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <uci.h>
#include "ucix.h"
int main(int argc, char **argv)
{
struct uci_context *ctx;
const char *ucitmp;
ctx = ucix_init("broadcom");
if(!ctx)
printf("Failed to load config file");
ucitmp = ucix_get_option(ctx, "broadcom", "nvram", "test");
printf("test = %s\n",ucitmp);
ucix_add_section(ctx, "broadcom", "nvram", "broadcom");
ucix_add_option(ctx, "broadcom", "nvram", "test", "tomte");
ucix_add_option(ctx, "broadcom", "nvram", "test2", "tomte2");
printf("Hello world\n");
ucix_commit(ctx, "broadcom");
ucitmp = ucix_get_option(ctx, "broadcom", "nvram", "test");
printf("test = %s\n",ucitmp);
ucix_cleanup(ctx);
}

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