Compare commits

..

65 Commits

Author SHA1 Message Date
Jakob Olsson
2117bc1903 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 1b8501d fix enable pin, add get signal strength
* 6db2741 add set_pin, disable_pin
-------------------------------------------------------------------------------
commit 1b8501d5a24fcdf784678e8f864964fc0138254c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-04 14:04:47 +0200

    fix enable pin, add get signal strength

Base directory -> /
 dongle_network.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 dongle_pin.c     | 58 ++++++++++++++++++++++++++++++++++++++++++++-
 libmobile.c      |  4 ++--
 libmobile.h      |  2 +-
 4 files changed, 131 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 6db274197ef6151d119335d99e85dbbbbc788978
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-04 12:54:09 +0200

    add set_pin, disable_pin

Base directory -> /
 dongle_pin.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 libmobile.c  | 112 +++++++++++++++++++++++++++++++++++++++++++++---
 libmobile.h  |   4 ++
 3 files changed, 238 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
2018-05-04 14:05:25 +02:00
Jakob Olsson
b553a6bb9f new binary to add 2018-05-04 14:05:10 +02:00
Jakob Olsson
6a2e0a259e Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 01d0e03 accomodate for splitting files, some test code for pin
* 5eb1ecb rename file and object
* f01ee70 remove remaining curls from dongle.c, remove duplicate function, TODO: naming scheme, run cppcheck, checkpatch
* 911c050 move (most) curl code to libmobile, still some remaining in dongle, write_func duplicate, TODO: consistent returns, clean memory?
* 76f11f2 add delete, set (default apn), and show current apn, some cleanup
* c39d839 add list_apn_profiles, listing the APN_config names, essentiall listing their names
* 89d9e82 dynamically find index fix
* 634b533 can send post request to add new APN profile, TODO: add dynamic idx, set_default(), apply()
* 85beb1d add preliminary functionality & ubus method for setting APN
* 2a6dd7c Merge branch 'jakob' of private.inteno.se:iopsys-onboarding into HEAD
* 28356f4 add referer to dongle
-------------------------------------------------------------------------------
commit 01d0e038fd26a2fc5a483ad4bf2c7f7accd5820c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-04 09:14:16 +0200

    accomodate for splitting files, some test code for pin

Base directory -> /
 Makefile     | 16 ++++++-----
 dongle_apn.c | 48 +--------------------------------
 dongle_pin.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 libmobile.c  | 74 +++++++++++++++++++++++++++++++--------------------
 4 files changed, 143 insertions(+), 82 deletions(-)
-------------------------------------------------------------------------------
commit 5eb1ecbb3fd267917df4ed5b387f840d59db8ba1
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-03 16:52:24 +0200

    rename file and object

Base directory -> /
 dongle.c     | 255 -----------------------------------------------------------
 dongle_apn.c | 255 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 255 insertions(+), 255 deletions(-)
-------------------------------------------------------------------------------
commit f01ee707753f66ed918f9603d4e9f98975ba882b
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-03 16:48:31 +0200

    remove remaining curls from dongle.c, remove duplicate function, TODO:
    naming scheme, run cppcheck, checkpatch

Base directory -> /
 dongle.c    | 53 +++++------------------------------------------------
 libmobile.c | 35 +++++++++++++++++++++++++++++++++++
 libmobile.h |  3 ++-
 3 files changed, 42 insertions(+), 49 deletions(-)
-------------------------------------------------------------------------------
commit 911c05069f03c08dd45692333318134c4a00cc9e
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-03 16:35:20 +0200

    move (most) curl code to libmobile, still some remaining in dongle,
    write_func duplicate, TODO: consistent returns, clean memory?

Base directory -> /
 Makefile    |  12 ++-
 dongle.c    | 224 +++++---------------------------------------------------
 libmobile.c | 238 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 libmobile.h |  17 +++++
 4 files changed, 282 insertions(+), 209 deletions(-)
-------------------------------------------------------------------------------
commit 76f11f2f6fd746d36b0a5f8def09153e0ddb77c1
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-03 14:54:01 +0200

    add delete, set (default apn), and show current apn, some cleanup

Base directory -> /
 dongle.c | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 205 insertions(+), 22 deletions(-)
-------------------------------------------------------------------------------
commit c39d83953dba361d676e247002b7f63e5c4851bf
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-03 12:22:06 +0200

    add list_apn_profiles, listing the APN_config names, essentiall listing
    their names

Base directory -> /
 dongle.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 61 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
commit 89d9e82bf0d68adbd110774f989a557a500eabee
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-03 11:20:02 +0200

    dynamically find index fix

Base directory -> /
 dongle.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 65 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
commit 634b5338b59cf65e22d645996d785ce9260862c0
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-03 09:25:33 +0200

    can send post request to add new APN profile, TODO: add dynamic idx,
    set_default(), apply()

Base directory -> /
 dongle.c | 74 +++++++++++++++++++++++++++++-----------------------------------
 1 file changed, 34 insertions(+), 40 deletions(-)
-------------------------------------------------------------------------------
commit 85beb1d0cccc607802d46af01ab3bae2f695f18f
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-02 16:10:13 +0200

    add preliminary functionality & ubus method for setting APN

Base directory -> /
 dongle.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 68 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 2a6dd7c10342831238ad9b123824be10a8714601
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-02 12:12:19 +0200

    Merge branch 'jakob' of private.inteno.se:iopsys-onboarding into HEAD

Base directory -> /
 dongle.c | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 28356f4b967693740071e99af1592429073dfb8a
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-05-02 12:11:54 +0200

    add referer to dongle

Base directory -> /
 dongle.c | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
2018-05-04 09:17:53 +02:00
Jakob Olsson
9d1540df1d accomodate for splitting dongle file into several 2018-05-04 09:12:04 +02:00
Jakob Olsson
547a955cfe Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 33af504 change from verbose to loglevel, from -v to -l
-------------------------------------------------------------------------------
commit 33af50474ee9f9ef9b7fdf80f43de31f69bd6014
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-30 12:52:12 +0200

    change from verbose to loglevel, from -v to -l

Base directory -> /
 parse_args.c | 8 ++++----
 parser.c     | 2 +-
 watcher.c    | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2018-04-30 12:52:54 +02:00
Jakob Olsson
4f9594a6d1 change verbose to loglevel for all files 2018-04-30 12:32:31 +02:00
Jakob Olsson
86487e8c23 add object from bash script, status and set_configurations available 2018-04-30 12:26:27 +02:00
Jakob Olsson
0caad1b5c7 publishes and prints status 2018-04-30 11:50:54 +02:00
Jakob Olsson
101224dd31 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 7424f4a fix restart and update configurations from publishing event, other minor fixes
* 8d9286f typo
* b774f37 fix some compile errors
* 3ff8fa6 some name scheme changes, send new flags by event
* 77a2cb7 fix receiving events - listener required to be global or static
* d7e3c62 parser crash crash when receive event
* 825e628 add listener for events
* 6674802 consistent header and c declarations
* b322927 add send event method
* d9266c7 documentation addition, style change
*   3be1f4f fix merge conflicts
|\
| * 88e8a18 fix regarding error handling
| * 229f367 change if-case in check_for_change to prevent multiple printouts on restart, minor style and error handling fixes
| * 15ecc8d changes according to cppcheck, add some error handling in watcher
| * b3d0151 fix to compile - plenty warnings and not tested with cppcheck
| * 3c19c3c small style changes and makefile fix
| * 260bc4a error handling and general style changes -untested!
| * 7242c3c initial changes, test if limits.h is correct
* | 18366b5 add documentation
|/
* f12fdbb minor fixes
* 6aa5b34 some stylistic changes - untested
* caf59c5 print dongle response on ubus, minor style fixes
* 287a85a add struct to keep track of len instead, as in libcurl example
* a2fe80d unfinished, print garbage + response
-------------------------------------------------------------------------------
commit 7424f4adcaac30925ca7f36f78e90136af8be8fa
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-27 13:20:36 +0200

    fix restart and update configurations from publishing event, other minor
    fixes

Base directory -> /
 parser.c  | 10 ++++++----
 watcher.c | 43 +++++++++++++++++++++++--------------------
 watcher.h |  1 +
 3 files changed, 30 insertions(+), 24 deletions(-)
-------------------------------------------------------------------------------
commit 8d9286ff4bb421a21dbe5d945b5f1867068343e4
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-27 09:11:26 +0200

    typo

Base directory -> /
 watcher.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit b774f37a70134158290bbcc389166d6b884dafef
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-27 09:03:57 +0200

    fix some compile errors

Base directory -> /
 watcher.c | 34 ++++++++++------------------------
 1 file changed, 10 insertions(+), 24 deletions(-)
-------------------------------------------------------------------------------
commit 3ff8fa611ce6541cbefa0d72b86bd403a941aa61
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-27 08:52:20 +0200

    some name scheme changes, send new flags by event

Base directory -> /
 parser.c  | 30 +++++++++++++-----------------
 watcher.c | 61 ++++++++++++++++++++++++++++++++++++++++---------------------
 2 files changed, 53 insertions(+), 38 deletions(-)
-------------------------------------------------------------------------------
commit 77a2cb7762a2140a55437377ed9ae779049394f1
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-26 15:56:38 +0200

    fix receiving events - listener required to be global or static

Base directory -> /
 parser.c  | 47 +++++++++++++++++++++++------------------------
 watcher.c |  8 ++++----
 2 files changed, 27 insertions(+), 28 deletions(-)
-------------------------------------------------------------------------------
commit d7e3c6221fb648d6ff4966d8fed078bbb6421b91
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-26 11:25:34 +0200

    parser crash crash when receive event

Base directory -> /
 parser.c | 28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 825e6288af7757dda7cb1a229e36b95281fb6f2e
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-26 10:57:28 +0200

    add listener for events

Base directory -> /
 parser.c | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 6674802533ebd5e86692acde93295d24d648198d
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-26 10:24:25 +0200

    consistent header and c declarations

Base directory -> /
 watcher.c |  5 +++--
 watcher.h | 14 +++++++++-----
 2 files changed, 12 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit b322927957e294867eaf16296d5d1253e6e6efe6
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-26 10:17:03 +0200

    add send event method

Base directory -> /
 dongle.c  |  4 ++--
 watcher.c | 21 ++++++++++++++++++---
 2 files changed, 20 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit d9266c7f4c2af00073cfa35d0dd4552961ff767c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-26 09:26:08 +0200

    documentation addition, style change

Base directory -> /
 .gitignore |  4 ++++
 parser.c   | 18 +++++++--------
 parser.h   |  2 +-
 watcher.c  | 52 ++++++++++++++++++++++++++---------------
 watcher.h  | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 5 files changed, 123 insertions(+), 31 deletions(-)
-------------------------------------------------------------------------------
commit 3be1f4f09875baaa665389dc34c002303fdf46ba
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-26 08:45:52 +0200

    fix merge conflicts

Base directory -> /
 Makefile     |   6 ++
 common.h     |   6 ++
 dongle.c     |   6 +-
 parse_args.c |  10 +--
 parser.c     | 256 +++++++++++++++++++++++++++++++++++++++++------------------
 parser.h     |  28 +++++--
 watcher.c    | 215 ++++++++++++++++++++++++++++++++-----------------
 watcher.h    |  22 ++++-
 8 files changed, 384 insertions(+), 165 deletions(-)
-------------------------------------------------------------------------------
commit 18366b5fa66e6c9126d583b88a9794a3cbc2fa4c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-26 08:39:43 +0200

    add documentation

Base directory -> /
 parse_args.h |  7 +++++++
 parser.h     | 33 ++++++++++++++++++++++-----------
 watcher.c    | 26 ++++++--------------------
 watcher.h    | 10 ++++++++--
 4 files changed, 43 insertions(+), 33 deletions(-)
-------------------------------------------------------------------------------
commit 88e8a18867c9dd1ff389a8e0b94e5bae93abd8b1
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-25 11:43:33 +0200

    fix regarding error handling

Base directory -> /
 parser.c  | 78 ++++++++++++++++++++++++++++++++++++++++++++++--------------
 parser.h  |  3 ++-
 watcher.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++-----------------
 watcher.h |  4 ++--
 4 files changed, 123 insertions(+), 43 deletions(-)
-------------------------------------------------------------------------------
commit 229f36701dea502fab841166c18b5a04168f47de
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-25 10:35:05 +0200

    change if-case in check_for_change to prevent multiple printouts on restart,
    minor style and error handling fixes

Base directory -> /
 parser.c  | 18 ++++++++----------
 watcher.c | 26 ++++++++++++++------------
 2 files changed, 22 insertions(+), 22 deletions(-)
-------------------------------------------------------------------------------
commit 15ecc8d0f703b8facf4221bf21693c1387589a50
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-25 09:20:57 +0200

    changes according to cppcheck, add some error handling in watcher

Base directory -> /
 parser.c  |  15 ++-----
 watcher.c | 141 +++++++++++++++++++++++++++++++++++++++-----------------------
 watcher.h |   2 +-
 3 files changed, 94 insertions(+), 64 deletions(-)
-------------------------------------------------------------------------------
commit b3d015126ae1d817c283ab4be0fe5cc89b778526
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-24 16:53:59 +0200

    fix to compile - plenty warnings and not tested with cppcheck

Base directory -> /
 parser.c | 8 ++++----
 parser.h | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 3c19c3c30148fa995c84fb6fbdee0aa903035461
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-24 16:43:35 +0200

    small style changes and makefile fix

Base directory -> /
 Makefile     |  4 ++--
 dongle.c     |  6 +++---
 parse_args.c | 10 ++++------
 parser.c     |  9 ++++-----
 4 files changed, 13 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
commit 260bc4a5bc5e22e29b0352187c8a5682a8c4ad4b
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-24 16:35:20 +0200

    error handling and general style changes -untested!

Base directory -> /
 common.h  |   6 ++
 parser.c  | 197 ++++++++++++++++++++++++++++++++++++++++++++------------------
 parser.h  |   2 +
 watcher.h |   1 +
 4 files changed, 151 insertions(+), 55 deletions(-)
-------------------------------------------------------------------------------
commit 7242c3c2b8537f09ae8e87a17e2690c8f24fe13a
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-24 14:09:42 +0200

    initial changes, test if limits.h is correct

Base directory -> /
 Makefile  |  6 ++++++
 parser.c  | 21 +--------------------
 parser.h  | 16 +++++++++++++++-
 watcher.c | 20 --------------------
 watcher.h | 19 +++++++++++++++++++
 5 files changed, 41 insertions(+), 41 deletions(-)
-------------------------------------------------------------------------------
commit f12fdbb07029cbfa69f7b8976474f88046fb4e2a
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-24 12:09:29 +0200

    minor fixes

Base directory -> /
 parser.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 6aa5b3402ad216f4428f171c390a52d5ed0e8b61
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-24 12:04:39 +0200

    some stylistic changes - untested

Base directory -> /
 dongle.c |  6 +-----
 parser.c | 53 ++++++++++++++++++++++++++++-------------------------
 2 files changed, 29 insertions(+), 30 deletions(-)
-------------------------------------------------------------------------------
commit caf59c521938b8bcc083379015e98b5e0d217f8d
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-24 11:24:17 +0200

    print dongle response on ubus, minor style fixes

Base directory -> /
 Makefile  |   2 +-
 dongle.c  | 102 +++++++++++++++++++++++++++++++++++++++++++++-----------------
 parser.c  |   1 -
 watcher.c |   3 +-
 4 files changed, 77 insertions(+), 31 deletions(-)
-------------------------------------------------------------------------------
commit 287a85a5c2f3762f510e5ce83c658e3ac2c64e61
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-24 10:26:18 +0200

    add struct to keep track of len instead, as in libcurl example

Base directory -> /
 .gitignore |  1 +
 dongle.c   | 39 ++++++++++++++++++++++++++-------------
 2 files changed, 27 insertions(+), 13 deletions(-)
-------------------------------------------------------------------------------
commit a2fe80d5ad7a85ad3301fbce08bce1e003d2a0d1
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 16:52:01 +0200

    unfinished, print garbage + response

Base directory -> /
 dongle.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2018-04-30 10:29:23 +02:00
Jakob Olsson
7382667fc1 attempt to publish ubus object through script 2018-04-30 10:21:06 +02:00
Jakob Olsson
24e497b471 add dongle binary to makefile 2018-04-26 11:28:02 +02:00
Jakob Olsson
7c2ba26b8c Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 4567e2f minor bug fix
* d00214e some dongle test with curl
* 354a426 small improvement to parsing loglevel flag
* cb71185 consistency change for flags
-------------------------------------------------------------------------------
commit 4567e2f38f3f85222bd44c4810bb9bade824dbca
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 15:43:28 +0200

    minor bug fix

Base directory -> /
 dongle.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit d00214e63a827d0731c4b73a402fd7dcc12bf20b
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 15:24:12 +0200

    some dongle test with curl

Base directory -> /
 Makefile | 11 ++++++---
 dongle.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 354a42605ede034f54243212a455f00d1f8ebbb6
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 13:39:46 +0200

    small improvement to parsing loglevel flag

Base directory -> /
 parse_args.c | 9 +++++----
 watcher.c    | 6 +++++-
 2 files changed, 10 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit cb7118580c39418c23a2248e790d359806c32235
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 09:55:19 +0200

    consistency change for flags

Base directory -> /
 .gitignore |  3 +--
 parser.c   | 35 ++++++++++++++++++++---------------
 watcher.c  | 34 ++++++++++++++++++++--------------
 3 files changed, 41 insertions(+), 31 deletions(-)
-------------------------------------------------------------------------------
2018-04-23 15:44:43 +02:00
Jakob Olsson
ccbf01013b test for some dongle 2018-04-23 15:44:23 +02:00
Jakob Olsson
2b4cef1cb4 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 9b7f1d4 clean some printouts
* 3e3d127 change some loglevel printouts
-------------------------------------------------------------------------------
commit 9b7f1d4e7ceefc205e799cc6fa8d231363c6f48d
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 09:31:22 +0200

    clean some printouts

Base directory -> /
 parser.c  |  5 ++---
 watcher.c | 39 ++++++++++++---------------------------
 2 files changed, 14 insertions(+), 30 deletions(-)
-------------------------------------------------------------------------------
commit 3e3d12778eb03315ca6a2554271df9a6cbffbbaf
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 09:24:06 +0200

    change some loglevel printouts

Base directory -> /
 parser.c | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
2018-04-23 09:39:44 +02:00
Jakob Olsson
0674212035 start with loglevel 0 2018-04-23 09:39:01 +02:00
Jakob Olsson
da55d5ef09 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 27bb443 move bash-scripts to test folder, remove capital files pathes
* 71c8008 move uloop_timeout struct outside restart application, now restarts with correct flags, add files to gitignore
* 58ee177 try to restart parser with execv, unsccessful adding to uloop, crashesh with uloop, does not without
* d242006 kill and replace process with new start flags
-------------------------------------------------------------------------------
commit 27bb443eb1380e142b827c9a413adcddd0e964e5
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 08:57:29 +0200

    move bash-scripts to test folder, remove capital files pathes

Base directory -> /
 bash-tests/multiple-addremove.sh | 10 ++++++++++
 bash-tests/nested-array.sh       | 21 +++++++++++++++++++++
 bash-tests/nested-objects.sh     | 19 +++++++++++++++++++
 bash-tests/ssid.sh               | 13 +++++++++++++
 common.h                         |  4 ++--
 multiple-addremove.sh            | 10 ----------
 nested-array.sh                  | 21 ---------------------
 nested-objects.sh                | 19 -------------------
 parse_args.c                     |  4 ++--
 ssid.sh                          | 13 -------------
 10 files changed, 67 insertions(+), 67 deletions(-)
-------------------------------------------------------------------------------
commit 71c80083e3ee35d8ea71fd12e923783a75300f22
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-23 08:33:42 +0200

    move uloop_timeout struct outside restart application, now restarts with
    correct flags, add files to gitignore

Base directory -> /
 .gitignore | 12 +++++++++++-
 parser.c   | 30 ++++++++----------------------
 2 files changed, 19 insertions(+), 23 deletions(-)
-------------------------------------------------------------------------------
commit 58ee1775d3ec4d5c5979687a1262a227d828b83e
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-20 16:01:36 +0200

    try to restart parser with execv, unsccessful adding to uloop, crashesh with
    uloop, does not without

Base directory -> /
 parser.c  | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 watcher.c | 41 ++++++++++++++++++++++++-------------
 2 files changed, 92 insertions(+), 19 deletions(-)
-------------------------------------------------------------------------------
commit d2420069fdda2d38b47ab1d7e06143ad5e05e52f
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-20 11:34:51 +0200

    kill and replace process with new start flags

Base directory -> /
 parser.c  |  5 ++--
 watcher.c | 98 ++++++++++++++++++++++++---------------------------------------
 2 files changed, 39 insertions(+), 64 deletions(-)
-------------------------------------------------------------------------------
2018-04-23 09:11:57 +02:00
Jakob Olsson
fc2d33ec4d remove capitalization 2018-04-23 09:01:49 +02:00
Jakob Olsson
99ac1c3c41 manual hash change 2018-04-19 14:04:56 +02:00
Jakob Olsson
79e09f6627 manual change of hash 2018-04-19 12:05:58 +02:00
Jakob Olsson
fb29645dbe add mosquitto package and adjust Makefile in onboardingd to accomodate 2018-04-19 10:51:40 +02:00
Jakob Olsson
35dee9de2e Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 258865c attempting execv solution that keeps pid
* aba0a7f some style change, documentation and name scheme changes
* f77798f swap functionality of set_configurations from parser to watcher and all corresponding changes
* 66b18db add timeout prior to lookup, small error fixes
* d5ad23f add restart from wtihin application functionality for watcher, some more small error fixes
* dc9a03e correct error printouts for invoking ubus from watcher, also provide preliminary restart functions in order to change paths and loglevel from within applications
* f914252 set buf mem to 0 prior to initializing, invoking ubus calls from separate binary works, however will not invoke after restart
* 9ac0215 add uloop and ubus object to watcher, currently incomplete
* e413469 small fix to make ubus IPC work through invoking ubus call
* b9135c8 attempt at invoking ubus method from outside binary that registers it
* a3001e0 update according to checkpatch errors and added some documentation
* c48bd84 added ubus IPC by system() from watcher
* 4ec1230 correction to parser header for declaration of check_pipe (should rename)
* 8bef035 does not compile -- fix header at monday
* 3227782 small fixes
* 07218dc prepare for ubus ipc, untested
* b02592a can change both arguments from single call to set_configuration with both arguments
* 0b2f4ec cleaned up and can now use same method to change configuration file and loglevel
* 6666a31 change config through UCI c API
* 877a72d add support for path through uci, loglevel timing out
* 3ff7676 delete binary
* dc74ccc forgot to add parser.c, test
* ee27697 add functionality to change configuration file through UCI api
* 4968afd some minor errors
* 24921f6 test stackoverflow code to see uci functionality
* 0cc6235 add return to prevent request timeout
* 5618a04 restart from init.d and add paranthesis
* 1e699fe fixed small errors
-------------------------------------------------------------------------------
commit 258865c880870d87fc90917140ab883e73d9c38a
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-18 11:00:06 +0200

    attempting execv solution that keeps pid

Base directory -> /
 parse_args.c | 12 ++++++-----
 watcher.c    | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 70 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit aba0a7f0ebf8663f9181c274fde4744e7673bff2
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-18 09:04:39 +0200

    some style change, documentation and name scheme changes

Base directory -> /
 Makefile     | 16 +++++-----
 debug.c      | 50 -------------------------------
 debug.h      |  8 -----
 parse_args.c | 50 +++++++++++++++++++++++++++++++
 parse_args.h |  8 +++++
 parser.c     | 55 +++++++++++++++++-----------------
 parser.h     | 43 ++++++++++++++++++++++++++-
 watcher.c    | 97 ++++++++++++++++--------------------------------------------
 8 files changed, 160 insertions(+), 167 deletions(-)
-------------------------------------------------------------------------------
commit f77798fdb527019b251044c63e01c685e64e4369
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-17 16:54:55 +0200

    swap functionality of set_configurations from parser to watcher and all
    corresponding changes

Base directory -> /
 parser.c  | 234 +++++++++++++-------------------------------------------------
 watcher.c | 136 ++++++++++++++++++++++++++++++++----
 2 files changed, 171 insertions(+), 199 deletions(-)
-------------------------------------------------------------------------------
commit 66b18dbc824259721fb1c628a28367fca1bcee44
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-17 15:39:55 +0200

    add timeout prior to lookup, small error fixes

Base directory -> /
 parser.c  | 2 +-
 watcher.c | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit d5ad23f9a91b021109082210d35f949ff4423eab
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-17 14:14:47 +0200

    add restart from wtihin application functionality for watcher, some more
    small error fixes

Base directory -> /
 parser.c  |  9 +++++----
 watcher.c | 26 ++++++++++++++++++++------
 2 files changed, 25 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit dc9a03ea2309acb0a3d8077bf4a67cf42bb95b5f
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-17 13:32:27 +0200

    correct error printouts for invoking ubus from watcher, also provide
    preliminary restart functions in order to change paths and loglevel from
    within applications

Base directory -> /
 parser.c  | 61 +++++++++++++++++++++++++++++++++++++++++++++++++------------
 watcher.c | 41 +++++++++++++++++++++++++++++++----------
 2 files changed, 80 insertions(+), 22 deletions(-)
-------------------------------------------------------------------------------
commit f914252a366c6d253a0ad31ed9ddff11a0c59def
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-17 09:59:18 +0200

    set buf mem to 0 prior to initializing, invoking ubus calls from separate
    binary works, however will not invoke after restart

Base directory -> /
 watcher.c | 58 +++++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 37 insertions(+), 21 deletions(-)
-------------------------------------------------------------------------------
commit 9ac0215fa11dd9b5fd89c97dd2e52e0d8d8b5bf5
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-16 16:25:14 +0200

    add uloop and ubus object to watcher, currently incomplete

Base directory -> /
 parser.c  |   2 ++
 watcher.c | 103 +++++++++++++++++++++++++++++++++++++++++---------------------
 watcher.h |  10 ++++--
 3 files changed, 78 insertions(+), 37 deletions(-)
-------------------------------------------------------------------------------
commit e41346923ce263deadbb8c806fa41a876a1b6b70
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-16 14:39:43 +0200

    small fix to make ubus IPC work through invoking ubus call

Base directory -> /
 watcher.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit b9135c8eb608d2203f6820fe940609ce24b6dd21
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-16 12:33:31 +0200

    attempt at invoking ubus method from outside binary that registers it

Base directory -> /
 watcher.c | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit a3001e08a77a7a4597628f3a754eb7c30cdb4012
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-16 10:41:04 +0200

    update according to checkpatch errors and added some documentation

Base directory -> /
 parser.c  | 81 ++++++++++++++++++++++++---------------------------------------
 parser.h  | 74 +++++++++++++++++++++++++++++++++++++++++++++++++--------
 watcher.c |  2 +-
 watcher.h |  2 +-
 4 files changed, 97 insertions(+), 62 deletions(-)
-------------------------------------------------------------------------------
commit c48bd844a11904a9cb9d73bffb4041b17a918b30
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-16 09:51:36 +0200

    added ubus IPC by system() from watcher

Base directory -> /
 parser.c  | 45 ++++++++++++++++++++++++++++++---------------
 watcher.c | 24 +++++++++++++-----------
 2 files changed, 43 insertions(+), 26 deletions(-)
-------------------------------------------------------------------------------
commit 4ec1230d5d98dac7a33b37191f2470aeca3cb34f
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-16 08:29:58 +0200

    correction to parser header for declaration of check_pipe (should rename)

Base directory -> /
 parser.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 8bef0353a661578d5358d315430e632bcb0d958c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 16:53:22 +0200

    does not compile -- fix header at monday

Base directory -> /
 parser.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 3227782da6e164111ab121e875e165f8fe69bca4
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 16:49:30 +0200

    small fixes

Base directory -> /
 parser.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 07218dc0e73b500aa586511296c3087153258d1a
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 16:47:32 +0200

    prepare for ubus ipc, untested

Base directory -> /
 parser.c | 97 ++++++++++++++++++++++++++++------------------------------------
 1 file changed, 42 insertions(+), 55 deletions(-)
-------------------------------------------------------------------------------
commit b02592a3efac991ca7836bcf365570352f634c34
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 15:58:43 +0200

    can change both arguments from single call to set_configuration with both
    arguments

Base directory -> /
 parser.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 0b2f4ecbfe469acc974da9c15aa72afca913851a
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 14:49:52 +0200

    cleaned up and can now use same method to change configuration file and
    loglevel

Base directory -> /
 parser.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
-------------------------------------------------------------------------------
commit 6666a31f3e3fb4045c087a94bd0ac80bcc5b21a9
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 14:11:13 +0200

    change config through UCI c API

Base directory -> /
 parser.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
-------------------------------------------------------------------------------
commit 877a72dc5d490578b47ddcd26d114352724a97c4
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 11:57:57 +0200

    add support for path through uci, loglevel timing out

Base directory -> /
 parser.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 3ff76761d2dc05061d9d68282cfa93bfbe1e971c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 10:32:43 +0200

    delete binary

Base directory -> /
 parser | Bin 57260 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
-------------------------------------------------------------------------------
commit dc74ccc90b12899a92b34f39314fd489ceeda26b
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 10:32:06 +0200

    forgot to add parser.c, test

Base directory -> /
 parser.c | 78 ++++++++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 46 insertions(+), 32 deletions(-)
-------------------------------------------------------------------------------
commit ee276970030b3a53cc041df0596c32615ce1a2de
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-13 10:26:26 +0200

    add functionality to change configuration file through UCI api

Base directory -> /
 Makefile |   2 +-
 parser   | Bin 0 -> 57260 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 4968afd535bf929c4783cb593ad7d19ba2078b5c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 16:47:49 +0200

    some minor errors

Base directory -> /
 parser.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 24921f64ca06a077fd35018b8e8ccda69e5d9899
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 16:35:38 +0200

    test stackoverflow code to see uci functionality

Base directory -> /
 parser.c | 53 +++++++++++++++++++++++++++++++++++++++++++++--------
 parser.h | 42 ++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 85 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit 0cc623501d20bc7e11e0c441e6ef70d4f78cd2e3
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 14:42:47 +0200

    add return to prevent request timeout

Base directory -> /
 parser.c | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit 5618a04628e3d1ac147461d0aa1fd39e8c03e84c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 13:57:55 +0200

    restart from init.d and add paranthesis

Base directory -> /
 parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 1e699fe9cc0810470e3445af39ff32d09ce93600
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 13:28:04 +0200

    fixed small errors

Base directory -> /
 parser.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2018-04-18 11:36:24 +02:00
Jakob Olsson
6553804000 change verbose flag to take number 2018-04-18 11:01:11 +02:00
Jakob Olsson
a525ba8db1 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 7801606 take integer as input for ubus method
* ba0c6fa change set_loglevel to accept int
* f061d83 add null termination to strings prior to strcat, add to publish ubus method to alter loglevel, and some minor typoes
-------------------------------------------------------------------------------
commit 7801606c2a529348a08b32e6fc9aaffd324cbe50
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 12:08:42 +0200

    take integer as input for ubus method

Base directory -> /
 parser.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit ba0c6fada99fd51b09752753b1fe06d12229c4e9
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 10:58:23 +0200

    change set_loglevel to accept int

Base directory -> /
 parser.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit f061d8312861c46fcf27ef159dc9bf795aac5e55
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 10:49:33 +0200

    add null termination to strings prior to strcat, add to publish ubus method
    to alter loglevel, and some minor typoes

Base directory -> /
 parser.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
839b785329 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 3ffa4fd typo
-------------------------------------------------------------------------------
commit 3ffa4fdfe060b15ee21628d5bd3ed2b6563b1018
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 10:39:42 +0200

    typo

Base directory -> /
 parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
dae114b97b add JSON folder to copy to router so dont have to write it manually all the time to test 2018-04-12 13:49:55 +02:00
Jakob Olsson
f6ec7a3f58 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 36a4757 fix array format
*   e6451c7 Merge branch 'jakob' of private.inteno.se:iopsys-onboarding into jakob
|\
| * 7fe3e74 can send argument and print data
* | 0678b94 add functionality to pass path or verbose argument, alters configuration file and restarts daemon
|/
* 017a6de smaller error fixes
* 3509854 attempt at ubus method with argument
* 6b350fe add table brackets surrounding each element in an array
* c5f9df1 remove test printouts
* 2a72406 open table inside explore object rather than prior
* bca5404 additional printout tests
* 49a7de6 manual blobmsg addition to test print
* 1617af6 should now record empty arrays
* 0b31324 code errors fix
* 6e225cb keep track of current json structure in blobmsg
* 70eb760 ubus method call and application now both work, small bug fix and small code readability improvement.
* 58a34ac additional confusion regarding file path and pipe fixes
* 001926b mixed up file path and pipe path
* 1523a26 fix minor typoes and errors
* 8a3837e move main, add uloop
* 5c68335 additional test.
* 353fd54 print dummy info to ubus onboarding.parser status
* 17a77e5 missed to change name and add context, publish objects works
* c76006c corrected to ubus_add_object...
*   9216101 attempt to publish ubus objects
|\
| * 74c5b96 minor trivial fixes to watcher, parser & makefile. Does not publish ubus objects.
* b43931b attempt to publish ubus object
-------------------------------------------------------------------------------
commit 36a47571c015cb4e5c8b778f2e6d27f2343260e8
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 09:21:33 +0200

    fix array format

Base directory -> /
 parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit e6451c7c6cfc7d263c2830be64d19c6852482975
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 09:17:42 +0200

    Merge branch 'jakob' of private.inteno.se:iopsys-onboarding into jakob

Base directory -> /
 parser.c | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit 0678b945d6d2d72216627d7c43646a208140fdfb
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-12 09:16:08 +0200

    add functionality to pass path or verbose argument, alters configuration
    file and restarts daemon

Base directory -> /
 parser.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++------
 parser.h |  4 ++--
 2 files changed, 50 insertions(+), 8 deletions(-)
-------------------------------------------------------------------------------
commit 7fe3e743a2b181ea9227efcfb98a1c7f58f3d480
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 16:49:54 +0200

    can send argument and print data

Base directory -> /
 parser.c | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit 017a6de37338fcfd9c4e6d8f3a20c44f47b14322
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 16:19:59 +0200

    smaller error fixes

Base directory -> /
 parser.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit 350985405f9561ff5ec7ed0396babe5b5a2a233a
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 16:13:43 +0200

    attempt at ubus method with argument

Base directory -> /
 parser.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 61 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit 6b350feff33782b29a5b49956d211dcf3990bed9
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 13:39:44 +0200

    add table brackets surrounding each element in an array

Base directory -> /
 parser.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit c5f9df159ade9619b25829857929d71291720410
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 13:24:13 +0200

    remove test printouts

Base directory -> /
 parser.c | 37 +------------------------------------
 parser.h |  1 +
 2 files changed, 2 insertions(+), 36 deletions(-)
-------------------------------------------------------------------------------
commit 2a72406c8aecfdb7d5ce83320d94ab108806ae61
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 13:10:06 +0200

    open table inside explore object rather than prior

Base directory -> /
 parser.c | 52 +++++++++++++++++++++++++++++-----------------------
 1 file changed, 29 insertions(+), 23 deletions(-)
-------------------------------------------------------------------------------
commit bca54040f1faa6a795194ac8c8f7303e381a24a4
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 11:30:12 +0200

    additional printout tests

Base directory -> /
 parser.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 49a7de6e7bc854072f877469e103a86c6dd2563c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 11:14:16 +0200

    manual blobmsg addition to test print

Base directory -> /
 parser.c | 31 +++++++++++++++++--------------
 parser.h |  2 +-
 2 files changed, 18 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
commit 1617af6cde6ea57a635ba31258093c1a70464a54
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 10:48:40 +0200

    should now record empty arrays

Base directory -> /
 parser.c | 26 ++++++++++++++------------
 parser.h |  1 +
 2 files changed, 15 insertions(+), 12 deletions(-)
-------------------------------------------------------------------------------
commit 0b31324d9a2be85b00757cde2ec5b0a7d4e504a2
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 09:39:47 +0200

    code errors fix

Base directory -> /
 parser.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 6e225cb6c62da2987925c2da59408b3fc67b1278
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 09:36:11 +0200

    keep track of current json structure in blobmsg

Base directory -> /
 parser.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 70eb760c7e2492e1a133519617a7c2952d547234
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 09:17:01 +0200

    ubus method call and application now both work, small bug fix and small code
    readability improvement.

Base directory -> /
 parser.c  | 65 ++++++++++++++++++++++++++++++---------------------------------
 watcher.h |  4 ++--
 2 files changed, 33 insertions(+), 36 deletions(-)
-------------------------------------------------------------------------------
commit 58a34ac88530330de97df1e256da00fb8b65b6ce
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 08:40:19 +0200

    additional confusion regarding file path and pipe fixes

Base directory -> /
 watcher.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 001926b0cc8e0648df60fa5c4ed372bec0e42707
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-11 08:29:34 +0200

    mixed up file path and pipe path

Base directory -> /
 watcher.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 1523a26640a5db09e78c042403ec3738006c99ab
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 16:50:32 +0200

    fix minor typoes and errors

Base directory -> /
 parser.c  | 9 +++++----
 parser.h  | 3 +++
 watcher.c | 4 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 8a3837ec132c9c4bf850f046057e1c93c44d6fb3
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 16:43:57 +0200

    move main, add uloop

Base directory -> /
 parser.c | 127 ++++++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 77 insertions(+), 50 deletions(-)
-------------------------------------------------------------------------------
commit 5c68335f6fa4a5e0015756e2f174415545af778f
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 13:49:12 +0200

    additional test.

Base directory -> /
 parser.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 353fd547584c58316b475e2b00297ffc63dce1b8
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 12:27:22 +0200

    print dummy info to ubus onboarding.parser status

Base directory -> /
 parser.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 17a77e56d7a7a4200917cb7b4ad17c60d20e2665
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 11:07:58 +0200

    missed to change name and add context, publish objects works

Base directory -> /
 parser.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit c76006c38cb1dbefea92cfab49d84b1bf3a83b17
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 10:55:32 +0200

    corrected to ubus_add_object...

Base directory -> /
 parser.c  | 5 ++++-
 watcher.c | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 921610133314811605955335f91f997d7173a62b
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 10:41:48 +0200

    attempt to publish ubus objects

Base directory -> /
 Makefile  | 2 +-
 parser.c  | 4 ++--
 watcher.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit b43931b44d94855015c77cb0c309bd6aa6140a47
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 09:30:57 +0200

    attempt to publish ubus object

Base directory -> /
 parser.c  | 25 +++++++++++++++++++------
 parser.h  |  8 ++++----
 watcher.c | 25 +++++++++++++++++++------
 watcher.h |  2 +-
 4 files changed, 43 insertions(+), 17 deletions(-)
-------------------------------------------------------------------------------
commit 74c5b96edb5d25d139322d7dfb82978abbe965a2
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-10 08:46:18 +0200

    minor trivial fixes to watcher, parser & makefile. Does not publish ubus
    objects.

Base directory -> /
 Makefile  | 2 +-
 parser.c  | 6 +++---
 watcher.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
f8a92990b0 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* e7129e9 add ubus library to makefile
* e6f93e0 publish ubus objects
* fc0af41 changes to style, also accordance to checkpatch
-------------------------------------------------------------------------------
commit e7129e9f5a2145e20f2011e08233471a4c8ce73b
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-09 16:28:32 +0200

    add ubus library to makefile

Base directory -> /
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit e6f93e00ae413f5d0b5520397e59b159f958cfba
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-09 15:59:40 +0200

    publish ubus objects

Base directory -> /
 parser.c  | 21 +++++++++++++++++++++
 watcher.c | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)
-------------------------------------------------------------------------------
commit fc0af41610d1ad2e10b254b4e641de5b248938a0
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-09 15:37:40 +0200

    changes to style, also accordance to checkpatch

Base directory -> /
 parser.c  | 71 ++++++++++++++++++---------------------------------------------
 parser.h  |  1 +
 watcher.c | 39 ++++++++++++++---------------------
 watcher.h |  4 ++--
 4 files changed, 39 insertions(+), 76 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
e7bceaacbb Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* e6f93e0 publish ubus objects
* fc0af41 changes to style, also accordance to checkpatch
-------------------------------------------------------------------------------
commit e6f93e00ae413f5d0b5520397e59b159f958cfba
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-09 15:59:40 +0200

    publish ubus objects

Base directory -> /
 parser.c  | 21 +++++++++++++++++++++
 watcher.c | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)
-------------------------------------------------------------------------------
commit fc0af41610d1ad2e10b254b4e641de5b248938a0
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-09 15:37:40 +0200

    changes to style, also accordance to checkpatch

Base directory -> /
 parser.c  | 71 ++++++++++++++++++---------------------------------------------
 parser.h  |  1 +
 watcher.c | 39 ++++++++++++++---------------------
 watcher.h |  4 ++--
 4 files changed, 39 insertions(+), 76 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
cb2527007b forgot ! on shebang... 2018-04-12 13:49:55 +02:00
Jakob Olsson
6b92fe1d67 new name 2018-04-12 13:49:55 +02:00
Jakob Olsson
64f92411a6 test please dont look 2018-04-12 13:49:55 +02:00
Jakob Olsson
5f29bb8c6a re-add start and stop 2018-04-12 13:49:55 +02:00
Jakob Olsson
82addbb34f minor errors 2018-04-12 13:49:55 +02:00
Jakob Olsson
aad6415b66 change to naming convention 2018-04-12 13:49:55 +02:00
Jakob Olsson
b427c7b75c Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* aeca1e5 add blob list.h linked list library
* 1a1ea5b push common.h
* 6ed19ae swap to libubox test... dont look thanks
-------------------------------------------------------------------------------
commit aeca1e5f1385feef723af4955d665f244b75f5cd
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-09 09:50:43 +0200

    add blob list.h linked list library

Base directory -> /
 Makefile |  2 +-
 parser.c | 80 +++++++++++++++++++++++++++++-----------------------------------
 parser.h | 27 ++++++++--------------
 3 files changed, 47 insertions(+), 62 deletions(-)
-------------------------------------------------------------------------------
commit 1a1ea5bdc4033bbf3adbb1991572abdd2fff6f96
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-06 15:37:03 +0200

    push common.h

Base directory -> /
 common.h | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 6ed19ae13fb39e4b3a38c10b8eee307c46854a0a
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-06 15:35:20 +0200

    swap to libubox test... dont look thanks

Base directory -> /
 Makefile  |   4 +-
 debug.c   |   4 +-
 debug.h   |   2 +-
 parser.c  | 152 +++++++++++++++++++++++++++-----------------------------------
 parser.h  |   4 ++
 watcher.c |  49 ++++++++++----------
 watcher.h |  13 +++---
 7 files changed, 105 insertions(+), 123 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
a0afd51889 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 4c3b4b4 minor bug fix, faulty variable order
* 2195e87 get file path from flag
-------------------------------------------------------------------------------
commit 4c3b4b446c2c244d3dfee0a6fd9a18f97a56bfcf
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-06 10:20:49 +0200

    minor bug fix, faulty variable order

Base directory -> /
 debug.h   | 2 +-
 watcher.c | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 2195e87d017b174db3107e9b9d17d1b4520307be
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-06 09:57:33 +0200

    get file path from flag

Base directory -> /
 debug.c  | 65 ++++++++++++++++++++++++++++++++++++----------------------------
 debug.h  |  6 +++++-
 parser.c | 36 +++++++++++------------------------
 parser.h | 16 ++++++++--------
 4 files changed, 61 insertions(+), 62 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
c35d6e7db3 add file_path check to init.d script 2018-04-12 13:49:55 +02:00
Jakob Olsson
338465db4c add file path 2018-04-12 13:49:55 +02:00
Jakob Olsson
c4d04e1650 correct config structure 2018-04-12 13:49:55 +02:00
Jakob Olsson
7e0ee31372 config load typo... 2018-04-12 13:49:55 +02:00
Jakob Olsson
65eb95290e correct if cases and minor errors 2018-04-12 13:49:55 +02:00
Jakob Olsson
818c5f19c6 add possibility to stop and start 2018-04-12 13:49:55 +02:00
Jakob Olsson
aeb6c29f32 add configuration, make daemon depend on config for debug options 2018-04-12 13:49:55 +02:00
Jakob Olsson
9e6144f9d6 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 0f39861 correct json include
-------------------------------------------------------------------------------
commit 0f3986168f978d435c1dc0798ead921c18e913d1
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-05 15:20:50 +0200

    correct json include

Base directory -> /
 parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
48d8788fba Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 43c64d2 correct watcher in Make
* 66bbf23 add my own debug library to enable --verbose debug
-------------------------------------------------------------------------------
commit 43c64d2ccbd69c8135f975c389bb04ce23ead66c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-05 15:03:53 +0200

    correct watcher in Make

Base directory -> /
 Makefile | 3 +++
 debug.c  | 1 +
 2 files changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 66bbf23c9bac0882047f322b02a90f84cfd4a06f
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-05 14:43:41 +0200

    add my own debug library to enable --verbose debug

Base directory -> /
 JSON/APs.json |   6 +--
 Makefile      |  16 ++++---
 debug.c       |  40 ++++++++++++++++
 debug.h       |   4 ++
 parser.c      | 148 ++++++++++++++++++++++++++++++++++++++++------------------
 parser.h      |   5 +-
 watcher.c     |  32 ++++++++-----
 watcher.h     |   2 +-
 8 files changed, 185 insertions(+), 68 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
effd2ebb48 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 7359cac forget to change path...
-------------------------------------------------------------------------------
commit 7359cac711a4f3f0c882381aecf03f8ecefe4d40
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-05 10:28:06 +0200

    forget to change path...

Base directory -> /
 parser.c  | 2 +-
 watcher.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
e45b093cc5 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 647ef53 add correct messages and fixed some faulty behaviour (infinitely reading pipe)
-------------------------------------------------------------------------------
commit 647ef53d88bc941dbb0b14855e8ae38d7a4c7fbb
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-05 10:18:02 +0200

    add correct messages and fixed some faulty behaviour (infinitely reading
    pipe)

Base directory -> /
 JSON/APs.json |  2 +-
 parser.c      | 16 ++++++++++------
 watcher.c     | 45 +++++++++++----------------------------------
 watcher.h     |  9 ++++++---
 4 files changed, 28 insertions(+), 44 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
bbbf1327c4 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 1ff31b2 will try again in 30s if file did not exist
-------------------------------------------------------------------------------
commit 1ff31b20be62ff71d8a0697c5655003ed2b795c4
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-05 08:32:55 +0200

    will try again in 30s if file did not exist

Base directory -> /
 watcher.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
f26fd5d994 change to redirect stdout and stderr to logd 2018-04-12 13:49:55 +02:00
Jakob Olsson
10a8938afd add prints to functions - will hopefully solve starting as daemon 2018-04-12 13:49:55 +02:00
Jakob Olsson
b6e0983d92 remove duplicate start service 2018-04-12 13:49:55 +02:00
Jakob Olsson
d7973f4ede Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 500f481 Merge branch 'jakob' of private.inteno.se:iopsys-onboarding into jakob
* 4a05d44 move struct definition to header
-------------------------------------------------------------------------------
commit 500f4815385b8d434d0be997c9a31556025b8d21
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-04 15:53:38 +0200

    Merge branch 'jakob' of private.inteno.se:iopsys-onboarding into jakob

Base directory -> /
 parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 4a05d44da39640af324321ff42b66c03da9cf431
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-04 15:53:01 +0200

    move struct definition to header

Base directory -> /
 parser.c | 32 +++++++++++++++++---------------
 parser.h | 38 ++++++++++++++++++++++++++------------
 2 files changed, 43 insertions(+), 27 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
3dffcf6401 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* 8a35b40 change include to fit openWRT
-------------------------------------------------------------------------------
commit 8a35b40d95f98d6944c98f7dc7be620c5a1fd1f5
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-04 14:43:18 +0200

    change include to fit openWRT

Base directory -> /
 parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
3dafd0d521 Update feed [ feed_inteno_packages ] package [ onboardingd ]
-------------------------------------------------------------------------------
* fecd251 remove garbage file
* 38bb4ef add gitignore
* 5ae1d88 removed some options
-------------------------------------------------------------------------------
commit fecd251a7b36e03ce809be54b29ce7676bf8f00c
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-04 14:24:34 +0200

    remove garbage file

Base directory -> /
 JSON/.APs.json.swp | Bin 1024 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
-------------------------------------------------------------------------------
commit 38bb4ef90680e494376a06adfdef506182a9f5c7
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-04 14:22:39 +0200

    add gitignore

Base directory -> /
 .gitignore | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 5ae1d88c43c3cc03f940db254637d78196a5429d
Author: Jakob Olsson <jakobols@kth.se>
Date: 2018-04-04 13:57:46 +0200

    removed some options

Base directory -> /
 parser.c  |  4 ++--
 watcher.c | 15 ++-------------
 2 files changed, 4 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
2018-04-12 13:49:55 +02:00
Jakob Olsson
6e76de6519 added parser and watcher in procd 2018-04-12 13:49:55 +02:00
Jakob Olsson
6c5e065975 changed hash manually again ?? 2018-04-12 13:49:55 +02:00
Jakob Olsson
f4d2993bac removed some typo error 2018-04-12 13:49:55 +02:00
Jakob Olsson
d3e1350ee4 changed to most recent hash manually 2018-04-12 13:49:55 +02:00
Jakob Olsson
58a8256ee2 makefile changes 2018-04-12 13:49:55 +02:00
Jakob Olsson
09a486f90a hash update manual test 2018-04-12 13:49:55 +02:00
Jakob Olsson
9e55257916 change of hash manually test 2018-04-12 13:49:55 +02:00
Jakob Olsson
4118abd13e correct url for private folder 2018-04-12 13:49:55 +02:00
Jakob Olsson
95e4761eea some changes 2018-04-12 13:49:55 +02:00
Jakob Olsson
59bbfe6bf8 corrections within makefile addresses 2018-04-12 13:49:55 +02:00
Jakob Olsson
03df688e0e first commit 2018-04-12 13:49:55 +02:00
468 changed files with 19728 additions and 18179 deletions

View File

@@ -1,15 +1,8 @@
#
# Copyright (C) 2019 iopsys Software Solutions AB. All rights reserved.
# Copyright (C) 2016 inteno
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
@@ -21,16 +14,12 @@ PKG_RELEASE:=1
PKG_SOURCE_VERSION:=f614cba983d827d5185c60a6a5a35530621d44d2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/mediatek/ated.git
PKG_SOURCE_URL:=http://public.inteno.se:/ated
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
# support parallel build
#PKG_BUILD_PARALLEL:=1

View File

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

View File

@@ -1,31 +0,0 @@
config BBF_VENDOR_EXTENSION
bool "Enable Vendor Extension"
default y
config BBF_VENDOR_LIST
string "Vendor List"
default "iopsys"
config BBF_VENDOR_PREFIX
string "Vendor Prefix"
default "X_IOPSYS_EU_"
config BBF_TR104
bool "Enable TR-104 Data Model Support"
default y
config BBF_TR143
bool "Enable TR-143 Data Model Support"
default y
config BBFDM_ENABLE_JSON_PLUGIN
bool "Enable json plugin to extend datamodel"
default y
config BBFDM_ENABLE_DOTSO_PLUGIN
bool "Enable shared library plugin to extend datamodel"
default y
config BBF_MAX_OBJECT_INSTANCES
int "Maximum number of instances per object"
default 255

View File

@@ -1,181 +0,0 @@
#
# Copyright (C) 2022 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=6.8.9.25
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_VERSION:=e87b25b08294c608aef1e73d1268b35073097592
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libbbf_api
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for libbbfdm API
endef
define Package/libbbfdm/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libcurl
endef
define Package/libbbfdm
$(Package/libbbfdm/default)
TITLE += (internal)
VARIANT:=internal
endef
define Package/libbbfdm-mbedtls
$(Package/libbbfdm/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_libbbfdm-mbedtls:libmbedtls
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
endef
define Package/libbbfdm-openssl
$(Package/libbbfdm/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
CONFLICTS := libbbfdm-mbedtls
VARIANT:=openssl
endef
define Package/libbbfdm-wolfssl
$(Package/libbbfdm/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_libbbfdm-wolfssl:libwolfssl
CONFLICTS := libbbfdm-mbedtls libbbfdm-openssl
VARIANT:=wolfssl
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
define Package/libbbf_api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
define Package/libbbfdm/description
Library contains the data model tree. It includes TR181, TR104 and TR143 data models
endef
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
ifeq ($(CONFIG_BBF_TR104),y)
CMAKE_OPTIONS += \
-DBBF_TR104=ON
endif
ifeq ($(CONFIG_BBF_TR143),y)
CMAKE_OPTIONS += \
-DBBF_TR143=ON
endif
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
CMAKE_OPTIONS += \
-DBBF_VENDOR_EXTENSION=ON
CMAKE_OPTIONS += \
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
endif ##CONFIG_BBF_VENDOR_EXTENSION
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
CMAKE_OPTIONS += \
-DBBF_JSON_PLUGIN=ON
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
CMAKE_OPTIONS += \
-DBBF_DOTSO_PLUGIN=ON
endif
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
endif
define Package/libbbf_api/install
$(INSTALL_DIR) $(1)/lib
endef
define Package/libbbfdm/default/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
endef
define Package/libbbfdm/default/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
endef
Package/libbbfdm-openssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-wolfssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-mbedtls/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-openssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-wolfssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-mbedtls/install = $(Package/libbbfdm/default/install)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
touch $(1)/usr/lib/libbbf_api.so
endef
$(eval $(call BuildPackage,libbbf_api))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,libbbfdm-openssl))
$(eval $(call BuildPackage,libbbfdm-wolfssl))
$(eval $(call BuildPackage,libbbfdm-mbedtls))

View File

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

View File

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

View File

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

View File

@@ -1,58 +0,0 @@
#
# Copyright (C) 2022 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.0.3.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
PKG_SOURCE_VERSION:=33a6648de9ee0af33c44518656b56b0a30b6c1ab
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=bbf
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json
endef
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wall -Werror
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/bulkdata/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.so $(1)/usr/lib/bbfdm
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

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

View File

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

View File

@@ -1,75 +0,0 @@
#!/bin/sh
. /lib/functions.sh
PROFILE_COUNT=1
get_next_count()
{
local config="$1"
local default_name="${2}"
local count=${3}
local found=0
if [ -z "$count" ]; then
count=1
fi
while [ "${found}" -ne 1 ]; do
uci -q get ${config}.${default_name}_${count} >/dev/null
if [ $? -eq 0 ]; then
count=$((count + 1))
else
found=1;
fi
done
echo "${default_name}_${count}"
}
translate_profile_id_to_profile_name() {
local section="${1}"
local profile_id="${2}"
local profile_name="${3}"
local curr_profile_id
config_get curr_profile_id "${section}" profile_id
[ -n "${curr_profile_id}" ] || return
[ "${curr_profile_id}" != "${profile_id}" ] && return
uci -q set bulkdata.${section}.profile_name="${profile_name}"
uci -q set bulkdata.${section}.profile_id=""
}
update_profile_sections() {
local section="${1}"
local default="${2}"
local profile_name
config_get profile_id "${section}" profile_id
[ -n "${profile_id}" ] || return
case "${section}" in
"cfg"*)
profile_name="$(get_next_count bulkdata ${default} ${PROFILE_COUNT})"
uci_rename bulkdata "${section}" "${profile_name}"
;;
esac
PROFILE_COUNT=$((PROFILE_COUNT + 1))
[ -n "$profile_name" ] && section="${profile_name}"
uci -q set bulkdata.${section}.profile_id=""
config_foreach translate_profile_id_to_profile_name profile_parameter "${profile_id}" "${profile_name}"
config_foreach translate_profile_id_to_profile_name profile_http_request_uri_parameter "${profile_id}" "${profile_name}"
}
config_load bulkdata
config_foreach update_profile_sections profile profile
uci commit bulkdata
exit 0

View File

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

View File

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

Binary file not shown.

View File

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

31
crashlog/Makefile Normal file
View File

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

Binary file not shown.

View File

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

View File

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

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

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

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

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

42
crashlog/readme Normal file
View File

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

53
crashlog/scp_upload Normal file
View File

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

View File

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

View File

@@ -1,74 +0,0 @@
#
# Copyright (C) 2021 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.5.5
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cf4e91ffe0a1d83140fef5b41d16e581e5341cec
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=DECT Manager
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c
endef
define Package/$(PKG_NAME)/description
DECT manager is a daemon that provides UBUS RPC objects and sends UBUS events for communication with the DECT chip.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* ~/git/voip/dectmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-Wall \
-Werror \
-I$(STAGING_DIR)/usr/include/libxml2
ifeq ($(CONFIG_ENABLE_LINE_SETTINGS_EXTENSION),y)
TARGET_CFLAGS += -DENABLE_LINE_SETTINGS_EXTENSION
endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/app/dectmngr $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/dectmngr
$(CP) ./files/etc/* $(1)/etc/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/dect $(1)/lib/upgrade/keep.d/dect
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

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

Binary file not shown.

View File

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

View File

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

53
dectmngr2/Makefile Normal file
View File

@@ -0,0 +1,53 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_RELEASE:=1
PKG_VERSION:=1.1.0
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ace6a3dcb6aa463cf5a34ad39ac37a5bc7d4ce5e
PKG_NAME:=dectmngr2
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
define Package/dectmngr2
CATEGORY:=Utilities
TITLE:=Dectmngr2
URL:=
DEPENDS:= +natalie-dect-h bcmkernel +libubox +ubus
endef
define Package/dectmngr2/description
Dectmngr2
endef
define Package/dectmngr2/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/dect/
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/nvs_default $(1)/etc/dect/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
$(CP) ./files/dect.config $(1)/etc/config/dect
endef
$(eval $(call BuildPackage,dectmngr2))

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,37 +1,35 @@
#
# Copyright (C) 2018 IOPSYS Software Solutions AB
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=endptmngr
PKG_VERSION:=0.7
PKG_RELEASE:=1
PKG_VERSION:=0.1
PKG_SOURCE_VERSION:=fa9ba5d7c942571ae6e44eb7bb5dae2c9b9e8ca4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
ifeq ($(CONFIG_ENDPT_OPEN),y)
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
PKG_SOURCE:=endptmngr-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
PKG_NAME:=endptmngr-open
else
PKG_SOURCE_URL:=git@private.inteno.se:endptmngr
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
PKG_SOURCE_VERSION:=dc12712af8c4088f7873502ca845e51c68a1ada9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_NAME:=endptmngr
endif
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
export CONFIG_BRCM_SDK_VER_504021
export CONFIG_BCM_CHIP_ID
include $(INCLUDE_DIR)/package.mk
@@ -41,28 +39,27 @@ endef
define Package/endptmngr
CATEGORY:=Utilities
TITLE:=Broadcom Voice Endpoint Manager
TITLE:=Brcmslic
URL:=
DEPENDS:= +libubox +ubus +libpicoevent +uci +bcmkernel @TARGET_HAS_VOICE @BCM_VOICE
DEPENDS:= +libubox +ubus +libpicoevent +PACKAGE_bcmkernel:bcmkernel +PACKAGE_bcmopen:bcmopen
endef
define Package/endptmngr/description
endptmngr
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* ~/git/endptmngr/* $(PKG_BUILD_DIR)/
ifeq ($(CONFIG_ENDPT_OPEN),y)
define Build/Compile
endef
endif
TARGET_CFLAGS += \
-Wall \
-Werror
define Package/endptmngr/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d/
cp $(PKG_BUILD_DIR)/files/etc/init.d/* $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/endptmngr $(1)/usr/sbin/
endef

View File

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

View File

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

View File

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

View File

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

49
eventlog/Makefile Normal file
View File

@@ -0,0 +1,49 @@
#
# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=eventlog
PKG_VERSION:=0.2.9
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/eventlog/0.2/
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_MD5SUM:=76e3d7a0b8f335c12099e9b91191fbf1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libeventlog
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A new API to format and send structured log messages.
endef
define Package/eventlog/description
A new API to format and send structured log messages. It supports multiple message
representations (plain, XML attributes and XML tags) and multiple output methods
(local syslogd).
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libeventlog/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libeventlog))

View File

@@ -1,7 +1,7 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
@@ -20,9 +20,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE
# support parallel build
#PKG_BUILD_PARALLEL:=1

View File

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

54
fping/Makefile Normal file
View File

@@ -0,0 +1,54 @@
#
# Copyright (C) 2016 Nikil Mehta <nikil.mehta@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fping
PKG_VERSION:=4.0
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fping.org/dist/
PKG_HASH:=67eb4152b98ad34f99d2eec4e1098a0bb52caf13c0c89cd147349d08190fe8ce
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=BSD-4-Clause
PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/fping
SECTION:=net
CATEGORY:=Network
TITLE:=sends ICMP ECHO_REQUEST packets to network hosts
URL:=http://fping.org/
endef
define Package/fping/description
fping is a ping like program which uses the Internet Control Message Protocol
(ICMP) echo request to determine if a target host is responding. fping
differs from ping in that you can specify any number of targets on the command
line, or specify a file containing the lists of targets to ping. Instead of
sending to one target until it times out or replies, fping will send out a
ping packet and move on to the next target in a round-robin fashion.
endef
CONFIGURE_ARGS+= \
--enable-ipv4 \
--enable-ipv6
TARGET_CFLAGS += -std=gnu99
define Package/fping/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fping $(1)/usr/bin/
endef
$(eval $(call BuildPackage,fping))

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

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

65
gigaset-elements/Makefile Normal file
View File

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

View File

@@ -1,78 +0,0 @@
# Copyright (c) 2017 Genexis B.V.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=gryphon-led-kernel-module
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define KernelPackage/$(PKG_NAME)
SUBMENU:=LED modules
TITLE:=LED driver for Gryphon
FILES:=$(PKG_BUILD_DIR)/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
KCONFIG:=CONFIG_PACKAGE_kmod-gryphon-led-kernel-module=y
AUTOLOAD:=$(call AutoLoad,60,$(PKG_NAME))
DEPENDS:= +(TARGET_iopsys_brcm63xx_arm):bcmkernel
PKG_LICENSE:=GPLv2
PKG_LICENSE_URL:=
endef
define KernelPackage/$(PKG_NAME)/description
This package contains the LED driver for Gryphon devices.
endef
EXTRA_KCONFIG:= CONFIG_RGB_LED=m
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
LINUX_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.19
MODULES_SUBDIR:=lib/modules/4.19.183
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_PREFIX)-
ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"63158" "6856" "6858"))
# These targets use a 64-bit kernel
LINUX_KARCH:=arm64
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_PREFIX)-
endif
# For some reason, Broadcom's kernel does not set the include paths correctly when compiling out-of-tree modules
EXTRA_KCPPFLAGS:="-I $(LINUX_DIR)/../bcmkernel/include -I $(LINUX_DIR)/arch/arm/mach-bcm963xx/include"
endif
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)/kdevlinks/
$(CP) -s `pwd`/src/* $(PKG_BUILD_DIR)/kdevlinks/
$(CP) src/* $(PKG_BUILD_DIR)
endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="-DKERNEL_MODULE $(BUILDFLAGS) -I$(LINUX_DIR)/include -include generated/autoconf.h $(MODULE_INCLUDE)" \
modules
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
endef
$(eval $(call KernelPackage,$(PKG_NAME)))

View File

@@ -1,26 +0,0 @@
# Copyright (c) 2017 Genexis B.V.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
MODULE_NAME = gryphon-led-kernel-module
obj-m := $(MODULE_NAME).o
GENEXIS_FILES= \
main.o \
sk9822.o \
sk9822_bitbang.o
$(MODULE_NAME)-objs := $(GENEXIS_FILES)

View File

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

View File

@@ -1,82 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include "sk9822.h"
#include "sk9822_bitbang.h"
cRGB __hexs_to_rgb(const char *hex)
{
cRGB rgb;
int r, g, b;
sscanf(hex, "%02x%02x%02x", &r, &g, &b);
// This needs sanity checking
rgb.r = r;
rgb.g = g;
rgb.b = b;
return rgb;
}
/**
* @brief update the color over the given device struct to the provided HEX color
*/
int sk9822_set_color_str(struct sk9822_leds *sk9822, const char *hex)
{
int i;
cRGB color = __hexs_to_rgb(hex);
for (i = 0; i < sk9822->led_count; i++) {
sk9822->led_colors[i] = color;
}
return 0;
}
/**
* @brief write device struct to the device
*/
int sk9822_update(struct sk9822_leds *sk9822)
{
uint16_t i;
uint16_t led_count = sk9822->led_count;
// Start Frame
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
for (i = 0; i < led_count; i++) {
cRGB *p = &sk9822->led_colors[i];
sk9822_bb_write(sk9822, 0xe0+sk9822->led_brightness); // Maximum global brightness
sk9822_bb_write(sk9822, p->b);
sk9822_bb_write(sk9822, p->g);
sk9822_bb_write(sk9822, p->r);
}
// End frame
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
return 0;
}

View File

@@ -1,46 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef SK9822_H_
#define SK9822_H_
#include <linux/types.h>
#define SK9822_DEFAULT_NUM_LEDS 32 // U16, used if DT param fails
#define SK9822_DEFAULT_BRIGHTNESS 15 // 5-bit brightness, 0-31
typedef struct {
uint8_t b;
uint8_t g;
uint8_t r;
} cRGB; // BGR (SK9822 Standard)
struct sk9822_leds {
struct device *dev;
struct gpio_desc *clock_gpio;
struct gpio_desc *data_gpio;
cRGB *led_colors;
uint8_t led_brightness;
uint16_t led_count;
};
int sk9822_set_color_str(struct sk9822_leds *sk9822, const char *hex);
int sk9822_update(struct sk9822_leds *sk9822);
#endif /* SK9822_H_ */

View File

@@ -1,48 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/types.h>
#include "sk9822.h"
/**
* @brief Bitbang write operation CLOCK+DATA
*
* Assumed state before call: CLOCK- Low, DATA- High
*/
void sk9822_bb_write(struct sk9822_leds *sk9822, uint8_t c)
{
uint8_t i;
for (i = 0; i < 8 ; i++) {
if (!(c&0x80)) {
gpiod_set_value(sk9822->data_gpio, 0); // set data low
} else {
gpiod_set_value(sk9822->data_gpio, 1); // set data high
}
gpiod_set_value(sk9822->clock_gpio, 1); // set clock high, data sampled here
c <<= 1;
udelay(1); // stretch clock
gpiod_set_value(sk9822->clock_gpio, 0); // set clock low
}
// State after call: SCK Low, Data high
}

View File

@@ -1,28 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef _SK9822_BB_H_
#define _SK9822_BB_H_
#include <linux/types.h>
#include "sk9822.h"
void sk9822_bb_write(struct sk9822_leds *sk9822, uint8_t c);
#endif /* _SK9822_BB_H_ */

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

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

1046
ice-client/Makefile Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,67 @@
#!/bin/sh
grep -rq "^ice:" /etc/passwd || {
adduser -D -H -s /bin/false ice
}
uci -q delete passwords.ice
uci -q set passwords.ice=usertype
uci -q set passwords.ice.password="\$WPAKEY"
uci -q add_list passwords.ice._access_r=root
uci -q commit passwords
uci show rpcd | grep username=.*ice.* >/dev/null || {
cat >> /etc/config/rpcd << EOF
config login
option username 'ice'
option password '\$p\$ice'
list _access_r 'none'
list write 'user-user'
list write 'juci-broadcom-dsl'
list write 'juci-broadcom-dsl-admin'
list write 'juci-broadcom-ethernet'
list write 'juci-broadcom-iptv'
list write 'juci-broadcom-vlan'
list write 'juci-broadcom-vlan-admin'
list write 'juci-wireless'
list write 'juci-wireless-admin'
list write 'juci-catv'
list write 'juci-ddns'
list write 'juci-diagnostics'
list write 'juci-dnsmasq-dhcp'
list write 'juci-dropbear'
list write 'juci-ethernet'
list write 'juci-event'
list write 'juci-firewall-fw3'
list write 'juci-iconnect'
list write 'juci-igmpinfo'
list write 'juci-inteno-backup'
list write 'juci-inteno-multiwan'
list write 'juci-inteno-provisioning'
list write 'juci-inteno-qos'
list write 'juci-inteno-voice-client'
list write 'juci-minidlna'
list write 'juci-mod-status'
list write 'juci-mod-system'
list write 'juci-natalie-dect'
list write 'juci-netmode'
list write 'juci-network-netifd'
list write 'juci-owsd'
list write 'juci-printer'
list write 'juci-realtime-graphs'
list write 'juci-samba'
list write 'juci-sfp'
list write 'juci-snmpd'
list write 'juci-sysupgrade'
list write 'juci-uhttpd'
list write 'juci-upnp'
list write 'juci-usb'
list write 'core'
list write 'unauthenticated'
EOF
}
exit 0

46
icgroupd/Makefile Normal file
View File

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

76
icgroupd/files/cgroupd Executable file
View File

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

View File

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

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

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

31
icwmp/Config_cwmp.in Normal file → Executable file
View File

@@ -1,14 +1,31 @@
if PACKAGE_icwmp-curl || PACKAGE_icwmp-zstream
config CWMP_SCRIPTS_FULL
bool "Install all icwmp scripts"
default y
choice
prompt "Select ACS sever"
default CWMP_ACS_MULTI
depends on PACKAGE_icwmp || \
PACKAGE_icwmp-openssl || \
PACKAGE_icwmp-wolfssl || \
PACKAGE_icwmp-mbedtls
prompt "Select ACS sever"
default CWMP_ACS_MULTI
config CWMP_ACS_MULTI
bool "No specific ACS, follow standard"
config CWMP_ACS_HDM
bool "Select HDM as ACS server"
bool "HDM"
endchoice
config CWMP_DEBUG
bool "Compile with debug options"
default y
config XMPP_ENABLE
bool "enable xmpp feature"
default n
config CWMP_DEVEL_DEBUG
bool "Compile with development debug options"
default n
endif

7
icwmp/Config_datamodel.in Executable file
View File

@@ -0,0 +1,7 @@
if PACKAGE_libdatamodel
config UPNP_TR064
bool "Compile with tr064 features"
default n
endif

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2020-2022 IOPSYS Software Solutions AB
# Copyright (C) 2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,70 +8,68 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=8.4.25.10
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_VERSION:=cb601366e6a91db532ba7d577f653a2b86c4a479
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
PKG_VERSION:=4.0-2018-04-09
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cfbec44903f66dc53e2d560d1a4cde42dca923f4
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
CONFIG_CWMP_ACS_MULTI \
CONFIG_CWMP_ACS_HDM \
CONFIG_CWMP_DEBUG \
CONFIG_CWMP_DEVEL_DEBUG
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
CWMP_REVISION=$(shell svnversion ./src/ -n|cut -f2 -d:)
include $(INCLUDE_DIR)/package.mk
define Package/icwmp/default
define Package/libdatamodel
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for broadband-forum data model
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
endef
define Package/icwmp/Default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=TR069 CWMP client
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml
TITLE:=CWMP client
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +libstrophe +curl +libtrace +libdatamodel
endef
TARGET_CFLAGS += \
-D_GNU_SOURCE \
"-DCWMP_REVISION=\\\"$(PKG_SOURCE_VERSION)\\\""
define Package/icwmp-openssl
$(Package/icwmp/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
VARIANT:=openssl
define Package/icwmp/description
A free client implementation of CWMP (TR-069) protocol
endef
define Package/icwmp-wolfssl
$(Package/icwmp/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_icwmp-wolfssl:libwolfssl
CONFLICTS := icwmp-openssl
VARIANT:=wolfssl
define Package/icwmp-curl
$(call Package/icwmp/Default)
TITLE+= (using libcurl)
DEPENDS+= +libcurl
VARIANT:=curl
endef
define Package/icwmp-mbedtls
$(Package/icwmp/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_icwmp-mbedtls:libmbedtls
CONFLICTS := icwmp-openssl icwmp-wolfssl
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
define Package/icwmp-zstream
$(call Package/icwmp/Default)
TITLE+= (using libzstream)
DEPENDS+= +libzstream
VARIANT:=zstream
endef
ifeq ($(BUILD_VARIANT),openssl)
CONFIGURE_ARGS += --enable-libopenssl
endif
define Package/icwmp-zstream/config
source "$(SOURCE)/Config_cwmp.in"
endef
ifeq ($(BUILD_VARIANT),wolfssl)
CONFIGURE_ARGS += --enable-libwolfssl
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += --enable-libmbedtls
endif
define Package/libdatamodel/config
source "$(SOURCE)/Config_datamodel.in"
endef
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
@@ -80,29 +78,129 @@ define Build/Prepare
endef
endif
define Package/icwmp/default/install
$(INSTALL_DIR) $(1)/etc/icwmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_DIR) $(1)/etc/bbfdm/json/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(INSTALL_BIN) ./files/etc/icwmpd/update.sh $(1)/etc/icwmpd/update.sh
$(INSTALL_DATA) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1)/etc/bbfdm/json/
ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_CFLAGS += -DEX400
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE -D_AADJ
ifneq ($(CWMP_REVISION)_,_)
ifneq ($(CWMP_REVISION),exported)
ifneq ($(CWMP_REVISION),Unversioned directory)
TARGET_CFLAGS += "-DCWMP_REVISION=\\\"$(CWMP_REVISION)\\\""
TARGET_LDFLAGS += "-DCWMP_REVISION=\\\"$(CWMP_REVISION)\\\""
endif
endif
endif
TARGET_LDFLAGS += \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
CONFIGURE_ARGS += \
--with-uci-include-path=$(STAGING_DIR)/usr/include \
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
--with-libubus-include-path=$(STAGING_DIR)/usr/include
ifeq ($(CONFIG_UPNP_TR064),y)
CONFIGURE_ARGS += \
--enable-upnptr064
endif
ifeq ($(CONFIG_XMPP_ENABLE),y)
CONFIGURE_ARGS += \
--enable-xmpp
endif
ifeq ($(BUILD_VARIANT),zstream)
CONFIGURE_ARGS += \
--enable-http=zstream \
--with-zstream-include-path=$(STAGING_DIR)/usr/include
endif
ifeq ($(BUILD_VARIANT),curl)
CONFIGURE_ARGS += \
--enable-http=curl
endif
ifeq ($(CONFIG_CWMP_ACS_MULTI),y)
CONFIGURE_ARGS += \
--enable-acs=multi
endif
ifeq ($(CONFIG_CWMP_ACS_HDM),y)
CONFIGURE_ARGS += \
--enable-acs=hdm
endif
ifeq ($(CONFIG_CWMP_DEBUG),y)
CONFIGURE_ARGS += \
--enable-debug
endif
ifeq ($(CONFIG_CWMP_DEVEL_DEBUG),y)
CONFIGURE_ARGS += \
--enable-devel
endif
define Package/libdatamodel/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.so* $(1)/lib/
endef
Package/icwmp-openssl/install = $(Package/icwmp/default/install)
Package/icwmp-wolfssl/install = $(Package/icwmp/default/install)
Package/icwmp-mbedtls/install = $(Package/icwmp/default/install)
define Package/icwmp-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/etc/icwmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/bin/.libs/icwmpd $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/icwmpd
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/firewall.cwmp $(1)/etc/firewall.cwmp
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmpd.init $(1)/etc/init.d/icwmpd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/90-cwmpfirewall
ifeq ($(CONFIG_CWMP_SCRIPTS_FULL),y)
$(INSTALL_DIR) $(1)/usr/share/icwmp
$(CP) $(PKG_BUILD_DIR)/scripts/defaults $(1)/usr/share/icwmp
$(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/icwmp
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/icwmp.sh $(1)/usr/sbin/icwmp
endif
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,icwmp-openssl))
$(eval $(call BuildPackage,icwmp-wolfssl))
$(eval $(call BuildPackage,icwmp-mbedtls))
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libdatamodel
$(CP) $(PKG_BUILD_DIR)/dm/*.h $(1)/usr/include/libdatamodel
$(CP) $(PKG_BUILD_DIR)/dm/dmtree/common/root.h $(1)/usr/include/libdatamodel
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.so* $(1)/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.a $(1)/lib
endef
define Package/icwmp-$(BUILD_VARIANT)/postinst
#!/bin/sh
echo "$(CWMP_BKP_FILE)" >> $${IPKG_INSTROOT}/etc/sysupgrade.conf
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Enabling rc.d symlink for icwmpd"
/etc/init.d/icwmpd enable
fi
exit 0
endef
define Package/icwmp-$(BUILD_VARIANT)/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Disabling rc.d symlink for icwmpd"
/etc/init.d/icwmpd disable
fi
exit 0
endef
$(eval $(call BuildPackage,icwmp-curl))
$(eval $(call BuildPackage,libdatamodel))
$(eval $(call BuildPackage,icwmp-zstream))

136
icwmp/README Normal file
View File

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

View File

@@ -1,36 +0,0 @@
{
"json_plugin_version": 1,
"Device.CWMPManagementServer.": {
"type": "object",
"version": "2.15",
"protocols": [
"usp"
],
"access": false,
"array": false,
"dependency": "file:/etc/config/cwmp",
"EnableCWMP": {
"type": "boolean",
"version": "2.15",
"read": true,
"write": true,
"protocols": [
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "cwmp",
"section": {
"name": "cpe"
},
"option": {
"name": "enable"
}
}
}
]
}
}
}

View File

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

View File

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

View File

@@ -0,0 +1,57 @@
#!/bin/sh
. /lib/functions/network.sh
[ "$ACTION" == "ifup" ] || exit 0
[ -f /etc/config/cwmp ] || exit 0
handle_icwmp_reload() {
local islan="$(uci -q get network.$INTERFACE.is_lan)"
[ "$islan" == "1" ] && exit 0
local proto="$(uci -q get network.$INTERFACE.proto)"
[ "$proto" == "none" ] && exit 0
local ifname="$(uci -q get network.$INTERFACE.ifname)"
[ "${ifname:0:1}" == "@" ] && exit 0
mkdir -p /tmp/ipv4
network_flush_cache
local previpaddr=""
local curipaddr=""
local ipaddrfile=/tmp/ipv4/$INTERFACE-ipaddr
previpaddr=$(cat $ipaddrfile 2>/dev/null)
network_get_ipaddr curipaddr $INTERFACE
[ -n "$curipaddr" ] && echo $curipaddr > $ipaddrfile || rm -f $ipaddrfile
local prevgateway=""
local curgateway=""
local gatewayfile=/tmp/ipv4/$INTERFACE-gateway
prevgateway=$(cat $gatewayfile 2>/dev/null)
network_get_gateway curgateway $INTERFACE
[ -n "$curgateway" ] && echo $curgateway > $gatewayfile || rm -f $gatewayfile
local prevsubnets=""
local cursubnets=""
local subnetsfile=/tmp/ipv4/$INTERFACE-subnets
prevsubnets=$(cat $subnetsfile 2>/dev/null)
network_get_subnets cursubnets $INTERFACE
[ -n "$cursubnets" ] && echo $cursubnets > $subnetsfile || rm -f $subnetsfile
local prevdnsservers=""
local curdnsservers=""
local dnsserverfile=/tmp/ipv4/$INTERFACE-dnsservers
prevdnsservers=$(cat $dnsserverfile 2>/dev/null)
network_get_dnsserver curdnsservers $INTERFACE
[ -n "$curdnsservers" ] && echo $curdnsservers > $dnsserverfile || rm -f $dnsserverfile
[ "$previpaddr" = "$curipaddr" -a "$prevgateway" = "$curgateway" -a "$prevsubnets" = "$cursubnets" -a "$prevdnsservers" = "$curdnsservers" ] && exit 0
/etc/init.d/icwmpd reload &
}
handle_icwmp_reload

View File

@@ -1,29 +0,0 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "$@" |logger -t cwmp.update -p info
}
handle_icwmp_update() {
local cwmp_enable
config_load cwmp
config_get_bool cwmp_enable cpe enable 1
if [ "$cwmp_enable" = "0" ]; then
return 0
fi
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.status')"
if [ "$status" != "running" ]; then
log "Trigger out of bound inform, since last inform status was failure"
ubus -t 10 call tr069 inform >/dev/null 2>&1
# Handle timeout or tr069 object not found
if [ "$?" -eq 7 ] || [ "$?" -eq 4 ]; then
log "Restarting icwmp tr069 object"
/etc/init.d/icwmpd restart
fi
fi
}
handle_icwmp_update $@

View File

@@ -1,513 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2015-2019 iopsys Software Solutions AB
START=99
STOP=00
USE_PROCD=1
PROG="/usr/sbin/icwmpd"
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
include /lib/network
log() {
echo "${@}"|logger -t cwmp.init -p info
}
regenerate_ssl_link()
{
local cert_dir all_file rehash
cert_dir="${1}"
[ ! -d "${cert_dir}" ] && return 0;
### Generate all ssl link for pem certicates ###
all_file=$(ls $cert_dir/*.pem 2>/dev/null)
if [ -n "${all_file}" ]; then
for cfile in $all_file; do
rehash="$(openssl x509 -hash -noout -in $cfile)"
[ -f ${cert_dir}/${rehash}.0 ] || \
ln -s $cfile $cert_dir/${rehash}.0
done
fi
### Generate all ssl link for crt certicates ###
all_file=$(ls $cert_dir/*.crt 2>/dev/null)
if [ -n "${all_file}" ]; then
for cfile in $all_file; do
rehash="$(openssl x509 -hash -noout -in $cfile)"
[ -f ${cert_dir}/${rehash}.0 ] || \
ln -s $cfile $cert_dir/${rehash}.0
done
fi
}
enable_dhcp_option43() {
local wan="${1}"
### Ask for DHCP Option 43 only if CWMP is enabled ###
local reqopts="$(uci -q get network.$wan.reqopts)"
local proto="$(uci -q get network.$wan.proto)"
local newreqopts=""
local option43_present=0
for ropt in $reqopts; do
case $ropt in
43) option43_present=1 ;;
*) ;;
esac
done
if [ ${option43_present} -eq 1 ]; then
return;
fi
newreqopts="$reqopts 43"
if [ "${proto}" == "dhcp" ]; then
uci -q set network.$wan.reqopts="$newreqopts"
uci commit network
ubus call network reload
fi
}
convert_to_hex() {
local val=""
local optval="${1}"
OPTIND=1
while getopts ":" opt "-$optval"
do
temp=$(printf "%02X" "'${OPTARG:-:}")
val="${val}:${temp}"
done
echo "${val}"
}
configure_send_op125() {
local sendopt="${1}"
local intf="${2}"
local uci="${3}"
local hex_oui=""
local hex_serial=""
local hex_class=""
local oui_len=0
local serial_len=0
local class_len=0
if [ "${uci}" = "network" ]; then
local opt125="125:00:00:0D:E9"
else
local opt125="125,00:00:0D:E9"
fi
config_get oui cpe manufacturer_oui ""
if [ -z "${oui}" ]; then
oui=$(db -q get device.deviceinfo.ManufacturerOUI)
fi
oui=$(echo "${oui}" | tr 'a-f' 'A-F')
config_get serial cpe serial_number ""
if [ -z "${serial}" ]; then
serial=$(db -q get device.deviceinfo.SerialNumber)
fi
config_get class cpe product_class ""
if [ -z "${class}" ]; then
class=$(db -q get device.deviceinfo.ProductClass)
fi
oui_len=$(echo -n "${oui}" | wc -m)
serial_len=$(echo -n "${serial}" | wc -m)
class_len=$(echo -n "${class}" | wc -m)
if [ ${oui_len} -eq 0 ] || [ ${serial_len} -eq 0 ]; then
return 0
fi
opt125_len=$((oui_len + serial_len + class_len))
if [ ${class_len} -gt 0 ]; then
opt125_len=$((opt125_len + 6))
else
opt125_len=$((opt125_len + 4))
fi
hex_opt125_len=$(printf "%02X" "${opt125_len}")
opt125="${opt125}:${hex_opt125_len}"
hex_oui=$(convert_to_hex "${oui}")
if [ -z "${hex_oui}" ]; then
return 0
fi
hex_oui_len=$(printf "%02X" "${oui_len}")
if [ "${uci}" = "network" ]; then
opt125="${opt125}:01:${hex_oui_len}${hex_oui}"
else
opt125="${opt125}:04:${hex_oui_len}${hex_oui}"
fi
hex_serial=$(convert_to_hex "${serial}")
if [ -z "${hex_serial}" ]; then
return 0
fi
hex_serial_len=$(printf "%02X" "${serial_len}")
if [ "${uci}" = "network" ]; then
opt125="${opt125}:02:${hex_serial_len}${hex_serial}"
else
opt125="${opt125}:05:${hex_serial_len}${hex_serial}"
fi
if [ ${class_len} -gt 0 ]; then
hex_class=$(convert_to_hex "${class}")
if [ -z "${hex_class}" ]; then
return 0
fi
hex_class_len=$(printf "%02X" "${class_len}")
if [ "${uci}" = "network" ]; then
opt125="${opt125}:03:${hex_class_len}${hex_class}"
else
opt125="${opt125}:06:${hex_class_len}${hex_class}"
fi
fi
if [ "${uci}" = "network" ]; then
new_send_opt="$sendopt $opt125"
uci -q set network.$intf.sendopts="$new_send_opt"
else
uci -q add_list dhcp.$intf.dhcp_option="$opt125"
fi
}
enable_dnsmasq_option125() {
local lan="${1}"
local send125_present=0
local opt125="125,"
local proto="$(uci -q get dhcp.$lan.dhcpv4)"
if [ "${proto}" = "server" ]; then
opt_list="$(uci -q get dhcp.$lan.dhcp_option)"
for sopt in $opt_list; do
if [[ "$sopt" == "$opt125"* ]]; then
send125_present=1
break
fi
done
if [ ${send125_present} -eq 0 ]; then
configure_send_op125 "" "${lan}" "dhcp"
ubus call uci commit '{"config":"dhcp"}'
fi
fi
}
enable_disable_dhcp_option125() {
local wan="${1}"
local action="${2}"
local reqopts="$(uci -q get network.$wan.reqopts)"
local sendopts="$(uci -q get network.$wan.sendopts)"
local proto="$(uci -q get network.$wan.proto)"
local newreqopts=""
local newsendopts=""
local req125_present=0
local send125_present=0
local network_uci_update=0
local opt125="125:"
for ropt in $reqopts; do
case $ropt in
125) req125_present=1 ;;
*) ;;
esac
done
for sopt in $sendopts; do
if [[ "$sopt" == "$opt125"* ]]; then
send125_present=1
break
fi
done
if [ "${proto}" == "dhcp" ]; then
if [ "${action}" == "enable" ]; then
if [ ${req125_present} -eq 0 ]; then
newreqopts="$reqopts 125"
uci -q set network.$wan.reqopts="$newreqopts"
network_uci_update=1
fi
if [ ${send125_present} -eq 0 ]; then
configure_send_op125 "${sendopts}" "${wan}" "network"
network_uci_update=1
fi
else
if [ ${req125_present} -eq 1 ]; then
newreqopts=$(echo ${reqopts/125/})
uci -q set network.$wan.reqopts="$newreqopts"
network_uci_update=1
fi
if [ ${send125_present} -eq 1 ]; then
for sopt in $sendopts; do
if [[ "$sopt" == "$opt125"* ]]; then
newsendopts=$(echo ${sendopts/"${sopt}"/})
uci -q set network.$wan.sendopts="$newreqopts"
network_uci_update=1
break
fi
done
fi
fi
fi
if [ ${network_uci_update} -eq 1 ]; then
uci commit network
ubus call network reload
fi
}
wait_for_resolvfile() {
local time=$1
local tm=1
local resolvfile="$(uci -q get dhcp.@dnsmasq[0].resolvfile)"
[ -n "$resolvfile" ] || return
while [ ! -f "$resolvfile" ]; do
sleep 1
[ "$tm" -ge "$time" ] && break
tm=$((tm+1))
done
}
copy_cwmp_etc_files_to_varstate() {
mkdir -p /var/run/icwmpd
if [ -f /etc/icwmpd/cwmp ]; then
uci -q -c /etc/icwmpd delete cwmp.acs
uci -q -c /etc/icwmpd commit cwmp
cp -f /etc/icwmpd/cwmp /var/state/cwmp
fi
if [ -f /etc/icwmpd/icwmpd_backup_session.xml ]; then
cp -f /etc/icwmpd/icwmpd_backup_session.xml /var/run/icwmpd/ 2>/dev/null
fi
if [ -f /etc/icwmpd/dm_enabled_notify.xml ]; then
cp -f /etc/icwmpd/dm_enabled_notify /var/run/icwmpd/ 2>/dev/null
fi
}
copy_cwmp_varstate_files_to_etc() {
if [ -f /var/run/icwmpd/icwmpd_backup_session.xml ]; then
cp -f /var/run/icwmpd/icwmpd_backup_session.xml /etc/icwmpd/ 2>/dev/null
fi
if [ -f /var/run/icwmpd/dm_enabled_notify.xml ]; then
cp -f /var/run/icwmpd/dm_enabled_notify /etc/icwmpd/ 2>/dev/null
fi
if [ -f /var/state/cwmp ]; then
uci -q -c /var/state delete cwmp.sess_status
uci -q -c /var/state commit cwmp
cp -f /var/state/cwmp /etc/icwmpd/
fi
# move the successful custom notify import marker to persistent storage
if [ -f /var/run/icwmpd/icwmpd_notify_import_marker ]; then
cp -f /var/run/icwmpd/icwmpd_notify_import_marker /etc/icwmpd/
fi
}
validate_acs_section()
{
uci_validate_section cwmp acs "acs" \
'passwd:string' \
'periodic_inform_enable:bool' \
'periodic_inform_interval:uinteger' \
'periodic_inform_time:string' \
'url:string' \
'dhcp_discovery:string' \
'dhcp_url:string' \
'compression:or("GZIP","Deflate","Disabled")' \
'retry_min_wait_interval:range(1, 65535)' \
'retry_interval_multiplier:range(1000, 65535)' \
'ipv6_enable:bool' \
'ssl_capath:string'
}
validate_cpe_section()
{
uci_validate_section cwmp cpe "cpe" \
'interface:string' \
'default_wan_interface:string' \
'log_to_console:or("enable","disable")' \
'log_to_file:or("enable","disable")' \
'log_severity:or("EMERG", "ALERT", "CRITIC" ,"ERROR", "WARNING", "NOTICE", "INFO", "DEBUG")' \
'log_file_name:string' \
'log_max_size:uinteger' \
'userid:string' \
'passwd:string' \
'port:uinteger' \
'provisioning_code:string:""' \
'amd_version:range(1, 6)' \
'instance_mode:or("InstanceNumber","InstanceAlias")' \
'session_timeout:uinteger' \
'notification:bool' \
'exec_download:bool' \
'periodic_notify_enable:bool' \
'enable:bool' \
'periodic_notify_interval:uinteger'
}
validate_defaults() {
local ssl_capath
config_load cwmp
validate_acs_section || {
log "Validation of acs section failed"
return 1;
}
ssl_capath="${ssl_capath%/}"
# Put the cert pem file in keep list
if [ -d "${ssl_capath}" ]; then
if ! grep "*.pem\|*.crt" /lib/upgrade/keep.d/icwmp; then
echo "${ssl_capath}"'/*.pem' >> /lib/upgrade/keep.d/icwmp
echo "${ssl_capath}"'/*.crt' >> /lib/upgrade/keep.d/icwmp
echo "${ssl_capath}"'/*.0' >> /lib/upgrade/keep.d/icwmp
fi
fi
validate_cpe_section || {
log "Validation of cpe section failed"
return 1;
}
return 0;
}
boot() {
local dhcp_discovery="0"
config_load cwmp
config_get dhcp_discovery acs dhcp_discovery "0"
config_get wan_interface cpe default_wan_interface "wan"
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
# Set dhcp option 43 if not already configured
enable_dhcp_option43 "${wan_interface}"
fi
config_get lan_interface cpe default_lan_interface ""
if [ -n "${lan_interface}" ]; then
# Set dhcp_option 125 if not already configured
enable_disable_dhcp_option125 "${wan_interface}" "enable"
enable_dnsmasq_option125 "${lan_interface}"
else
# Remove dhcp option 125 if exists
enable_disable_dhcp_option125 "${wan_interface}" "disable"
fi
config_get ssl_capath acs ssl_capath
if [ -n "${ssl_capath}" ]; then
regenerate_ssl_link "${ssl_capath}"
fi
start
}
start_service() {
local enable_cwmp
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
[ -f /sbin/netifd ] && log "Waiting for Network to be started ..." && ubus -t 5 wait_for network.interface
[ -f /usr/sbin/dnsmasq ] && log "Waiting for DNS Proxy to be started ..." && ubus -t 5 wait_for dnsmasq
[ -f /etc/config/dhcp ] && log "Waiting for DNS Server(s) ..." && wait_for_resolvfile 20
validate_defaults || {
log "Validation of defaults failed"
return 1;
}
# Copy backup data so that if it restart latter on it gets the info
copy_cwmp_etc_files_to_varstate
procd_open_instance icwmp
procd_set_param command "$PROG"
procd_append_param command -b
procd_set_param respawn \
"${respawn_threshold:-5}" \
"${respawn_timeout:-10}" "${respawn_retry:-3}"
procd_set_param watch network.interface
procd_close_instance
}
service_stopped()
{
copy_cwmp_varstate_files_to_etc
}
stop_service()
{
copy_cwmp_varstate_files_to_etc
}
reload_service() {
local ret
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
ret="0"
if [ "$enable_cwmp" = "0" ]; then
stop
start
return 0
fi
status="$(ubus -t 1 call tr069 status |jsonfilter -qe '@.cwmp.status')"
ret="$?"
if [ "$status" = "up" ]; then
ubus -t 1 call tr069 command '{"command":"reload"}'
ret="$?"
fi
if [ "$status" = "init" ] || [ "$ret" -ne "0" ]; then
log "Restarting CWMP client"
stop
start
fi
}
service_triggers() {
procd_add_reload_trigger "cwmp"
procd_open_trigger
json_add_array
json_add_string "" "interface.update"
json_add_array
json_add_array
json_add_string "" "run_script"
json_add_string "" "/etc/icwmpd/update.sh"
json_close_array
json_close_array
json_add_int "" "2000"
json_close_array
procd_close_trigger
}

View File

@@ -1,41 +0,0 @@
#!/bin/sh
. /lib/functions.sh
# Copy defaults by the factory to the cwmp UCI user section.
config_load cwmp
# Get Manufacturer OUI.
config_get oui cpe manufacturer_oui ""
if [ -z "${oui}" ]; then
oui=$(db -q get device.deviceinfo.ManufacturerOUI)
fi
oui=$(echo "${oui}" | tr 'a-f' 'A-F')
# Get system serial number.
config_get serial cpe serial_number ""
if [ -z "${serial}" ]; then
serial=$(db -q get device.deviceinfo.SerialNumber)
fi
# Get userid values
config_get acs_userid acs userid ""
config_get cpe_userid cpe userid ""
# Only set if they are empty
if [ -z "${acs_userid}" ]; then
uci -q set cwmp.acs.userid="${oui}-${serial}"
fi
if [ -z "${cpe_userid}" ]; then
uci -q set cwmp.cpe.userid="${oui}-${serial}"
fi
# Fix the cwmp.cpe.enable parameter
# set default to 1 if not defined
config_get enable_cwmp cpe enable ""
if [ -z "${enable_cwmp}" ]; then
uci -q set cwmp.cpe.enable="1"
fi
# No need for commit here, it is done by uci_apply_defaults().

View File

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

View File

@@ -0,0 +1,44 @@
#!/bin/sh
. /lib/functions.sh
set_cwmp_reqopts() {
### Ask for DHCP Option 43 only if CWMP is enabled ###
local wan=$(uci -q get cwmp.cpe.default_wan_interface)
local dhcp_discovery=$(uci -q get cwmp.acs.dhcp_discovery)
local discovery=0
case $dhcp_discovery in
enable|1) discovery=1 ;;
esac
local newreqopts=
local baseopts=
local reqopts="$(uci -q get network.$wan.reqopts)"
local proto="$(uci -q get network.$wan.proto)"
local tropts="43"
local oldreqopts="$reqopts"
local ropt iopt
for ropt in $reqopts; do
case $ropt in
43) ;;
*) baseopts="$baseopts $ropt" ;;
esac
done
ropt=""
reqopts="$baseopts $tropts"
for ropt in $reqopts; do
case $ropt in
43) [ $discovery -eq 1 ] && newreqopts="$newreqopts $ropt" ;;
*) newreqopts="$newreqopts $ropt" ;;
esac
done
if [ "$proto" == "dhcp" ]; then
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
oldreqopts="$(echo $oldreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
[ "$newreqopts" == "$oldreqopts" ] && return
uci -q set network.$wan.reqopts="$newreqopts"
uci commit network
fi
}
set_cwmp_reqopts

View File

@@ -1,2 +0,0 @@
/var/run/icwmpd/icwmpd_backup_session.xml
/etc/icwmpd/cwmp

View File

@@ -1,14 +0,0 @@
if (PACKAGE_ieee1905)
menu "Configurations"
config IEEE1905_EXTENSION_ALLOWED
bool "Allow plugins to extend 1905 CMDUs and/or TLVs"
default y
config IEEE1905_PLATFORM_HAS_WIFI
bool "Platform has WiFi"
default y if PACKAGE_libwifi
endmenu
endif

View File

@@ -1,14 +0,0 @@
if (PACKAGE_map-plugin)
menu "Configurations"
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
bool "Sync configuration between dynamic controllers in the network"
default n
config MULTIAP_FUZZ_1905_CMDUS
bool "Include support to fuzz 1905 CMDUs for testing purpose"
default n
endmenu
endif

View File

@@ -1,150 +0,0 @@
#
# Copyright (C) 2021-2022 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=4.10.28
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e10385f117bc20a8d16f1b57ad4f86d4a98552c0
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/ieee1905/Default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=IEEE-1905.1 stack
endef
define Package/ieee1905/config
source "$(SOURCE)/Config.in"
endef
define Package/libieee1905
$(call Package/ieee1905/Default,$(1))
TITLE+= (library for CMDU and TLV handling)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json
endef
define Package/ieee1905
$(call Package/ieee1905/Default,$(1))
TITLE+= ieee1905d (daemon implementing 1905.1 and provides cli)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ubus +libpthread \
+libieee1905 +IEEE1905_PLATFORM_HAS_WIFI:libwifi
endef
define Package/map-plugin
$(call Package/ieee1905/Default,$(1))
TITLE:=Multi-AP (Easymesh) plugin
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/map-plugin/config
source "$(SOURCE)/Config.map-plugin.in"
endef
define Package/ieee1905/description
This package provides IEEE Std 1905.1 stack.
endef
define Package/libieee1905/description
This package provides library functions for IEEE Std 1905.1 stack.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
ifeq ($(CONFIG_IEEE1905_PLATFORM_HAS_WIFI),y)
TARGET_CFLAGS += -DHAS_WIFI
endif
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
endif
MAKE_PATH:=src
define Package/ieee1905/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ieee1905d $(1)/usr/sbin/
endef
define Package/libieee1905/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/src/libieee1905.so $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/src/libmidgen.so $(1)/usr/lib/
endef
define Package/map-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
endef
define Build/InstallDev/map-plugin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map2.h $(1)/usr/include/map2.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map_module.h $(1)/usr/include/map_module.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/cntlrsync.h $(1)/usr/include/cntlrsync.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
endef
define Build/InstallDev/libieee1905
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/cmdu.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/cmdu_ackq.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/1905_tlvs.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/i1905_wsc.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/bufutil.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/timer_impl.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/i1905_extension.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/libmidgen.so $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/src/libieee1905.so $(1)/usr/lib/
endef
define Build/InstallDev
$(call Build/InstallDev/libieee1905,$(1),$(2))
$(call Build/InstallDev/map-plugin,$(1),$(2))
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/ieee1905/ $(PKG_BUILD_DIR)/
endef
endif
$(eval $(call BuildPackage,ieee1905))
$(eval $(call BuildPackage,libieee1905))
$(eval $(call BuildPackage,map-plugin))

View File

@@ -1,26 +0,0 @@
config ieee1905 'ieee1905'
option enabled '1'
option extension '1'
list extmodule 'map'
option registrar '2 5'
# option macaddress '0a:1b:2c:3d:4e:50'
config al-iface
option enabled '1'
option ifname 'br-lan'
option type 'bridge'
# ap sections are auto-generated/overwritten during onboarding
#
config ap
option band '2'
option ssid 'IOWRT-2.4GHz'
option encryption 'sae-mixed'
option key '1234567890'
config ap
option band '5'
option ssid 'IOWRT-5GHz'
option encryption 'sae-mixed'
option key '1234567890'

View File

@@ -1,100 +0,0 @@
#!/bin/sh /etc/rc.common
START=96
STOP=21
USE_PROCD=1
IS_CFG_VALID=1
validate_ieee1905_section() {
uci_validate_section ieee1905 ieee1905 "ieee1905" \
'enabled:bool:true' \
'macaddress:or("auto",macaddr)' \
'registrar:string' \
'extension:bool:false' \
'extmodule:list(string)' \
[ "$?" -ne 0 ] && {
logger -s -t "ieee1905" "Validation of ieee1905 section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ali_section() {
local section="$1"
uci_validate_section ieee1905 $section "${1}" \
'ifname:string' \
'type:or("bridge",string)'
[ "$?" -ne 0 ] && {
logger -s -t "ieee1905" "Validation of al-iface section $section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ap_section() {
local section="$1"
uci_validate_section ieee1905 $section "${1}" \
'band:or("2", "5", "60")' \
'ssid:string' \
'encryption:or("psk2", "sae-mixed", "sae", string)' \
'key:string' \
'uuid:string' \
'manufacturer:string' \
'model_name:string' \
'device_name:string' \
'model_number:string' \
'serial_number:string' \
'device_type:string' \
'os_version:uinteger'
[ "$?" -ne 0 ] && {
logger -s -t "ieee1905" "Validation of ap section $section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ieee1905_config() {
IS_CFG_VALID=1
validate_ieee1905_section &&
config_foreach validate_ali_section "al-iface" &&
config_foreach validate_ap_section ap
[ "$IS_CFG_VALID" -ne 1 ] && {
logger -s -t "ieee1905" "Validation of ieee1905 UCI file failed"
return 1
}
return 0
}
start_service() {
config_load "ieee1905"
validate_ieee1905_config || return 1;
procd_open_instance
procd_set_param command "/usr/sbin/ieee1905d"
procd_set_param respawn
# procd_set_param stdout 1
# procd_set_param stderr 1
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger "ieee1905"
}
reload_service() {
stop
start
}

View File

@@ -1,22 +0,0 @@
#!/bin/sh
BMAC=$(db -q get hw.board.basemac)
BMAC=${BMAC//:/}
BMAC=${BMAC// /}
BMAC=$(printf "%12.12X" $((0x$BMAC)))
[ "$BMAC" == "" ] && exit 1
LMAC=$((0x$BMAC & 0xfeffffffffff))
LMAC=$(($LMAC | 0x020000000000))
LMAC=$(printf "%12.12X" $LMAC)
LMAC=$(echo $LMAC | sed -e 's/[0-9A-F]\{2\}/&:/g' -e 's/:$//')
mac=$(uci -q get ieee1905.ieee1905.macaddress)
[ "$mac" != "" ] && exit 0
uci set ieee1905.ieee1905.macaddress="$LMAC"
uci commit ieee1905

View File

@@ -1,17 +0,0 @@
#!/bin/sh
. /lib/functions.sh
config_load ieee1905
list_to_ifname() {
local section=$1
config_get ifname $section ifname # get list as space separated values
uci del ieee1905.${section}.ifname # delete entry
uci set ieee1905.${section}.ifname="$ifname" # writeback entry as option
}
config_foreach list_to_ifname al-iface

39
ifsi/Makefile Normal file
View File

@@ -0,0 +1,39 @@
#
# Copyright (C) 2015 Inteno
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ifsi
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
define Package/ifsi
CATEGORY:=Utilities
DEPENDS:=+ubus +libubox
TITLE:=Inteno Functional Script Interface
endef
define Package/ifsi/description
Inteno Functional Script Interface
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Package/ifsi/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ifsi $(1)/sbin/
endef
$(eval $(call BuildPackage,ifsi))

17
ifsi/src/Makefile Normal file
View File

@@ -0,0 +1,17 @@
CC = gcc
CFLAGS = -g -Wall
LOCLIBS =
LIBS = -lubus -lubox -lblobmsg_json
OBJS = ifsi.o
SRCS = ifsi.c
LIBSRCS =
ISRCS =
all: ifsi
ifsi: ${OBJS}
${CC} ${LDFLAGS} ${LIBSRCS} -o ifsi ${OBJS} ${LIBS}
clean:
rm -f ifsi *.o

74
ifsi/src/ifsi.c Normal file
View File

@@ -0,0 +1,74 @@
/*
* ifsi -- Inteno functional script interface
*
* Copyright (C) 2012-2013 Inteno Broadband Technology AB. All rights reserved.
*
* Author: dev@inteno.se
*
* 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 <unistd.h>
#include <libubox/blobmsg.h>
#include <libubox/blobmsg_json.h>
#include <libubox/uloop.h>
#include <libubus.h>
static struct ubus_context *ctx;
static struct ubus_event_handler event_listener;
static struct blob_buf b;
static void receive_event(struct ubus_context *ctx, struct ubus_event_handler *ev,
const char *type, struct blob_attr *msg)
{
char *str;
uint32_t id;
str = blobmsg_format_json(msg, true);
fprintf(stdout, "I got %s event %s\n", type, str);
free(str);
}
int main(int argc, char **argv)
{
const char *ubus_socket = NULL;
int ret;
uloop_init();
ctx = ubus_connect(ubus_socket);
if (!ctx) {
fprintf(stderr, "Failed to connect to ubus\n");
return 1;
}
ubus_add_uloop(ctx);
event_listener.cb = receive_event;
ret = ubus_register_event_handler(ctx, &event_listener, "*");
if (ret)
fprintf(stderr, "Couldn't register to router events\n");
uloop_run();
ubus_free(ctx);
uloop_done();
return 0;
}

View File

@@ -1,33 +1,30 @@
#
# Copyright (C) 2018 iopsys
# Copyright (C) 2018 Inteno
#
include $(TOPDIR)/rules.mk
PKG_NAME:=imonitor
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/imonitor.git
PKG_SOURCE_VERSION:=4beb1d5d6925507f1850a84c0b83aaf12a082f7f
PKG_SOURCE_URL:=http://public.inteno.se/imonitor.git
PKG_SOURCE_VERSION:=defec6849fb987619fc7fd9295895f4f0b9db5a9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
PKG_MAINTAINER:=Sartura Support for Inteno <support-inteno@sartura.hr>
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/imonitor
CATEGORY:=Utilities
TITLE:=iopsysWrt process supervisor
TITLE:=Inteno process supervisor
DEPENDS:=+ubox +uci +ubus +rpcd +rpcd-mod-file
endef

View File

@@ -1,9 +1,8 @@
config monitor
option app 'test'
option test 'echo test'
option stream 'stdout'
option string_match 'TEST'
option execute 'echo executing test'
option interval '10'
option nr_tests '2'
option app 'test'
option test 'echo test'
option stream 'stdout'
option string_match 'test'
option execute 'echo executing'
option interval '10'
option nr_tests '2'

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2016 iopsys
# Copyright (C) 2016 Inteno
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -9,20 +9,17 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=inbd
PKG_VERSION:=1.2.3
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=d4e910a31039e0c0b7a539311eafcd716c36be77
PKG_SOURCE_VERSION:=f81c146f0b07540877545e5ab644ec8e29905a4d
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
PKG_SOURCE_URL:=http://public.inteno.se/inbd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
# support parallel build
PKG_BUILD_PARALLEL:=1
@@ -37,7 +34,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/inbd
CATEGORY:=Utilities
TITLE:=iopsys Netlink Bridge Daemon
TITLE:=Inteno Netlink Bridge Daemon
URL:=
DEPENDS:=+libuci +libubus +libblobmsg-json +libnl-genl
endef

57
inotify-tools/Makefile Normal file
View File

@@ -0,0 +1,57 @@
#
# 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:=inotify-tools
PKG_VERSION:=3.14
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=1df9af4d6cd0f4af4b1b19254bcf056aed4ae395
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rvoicilas/inotify-tools.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
# support parallel build
PKG_BUILD_PARALLEL:=1
#re create configure scripts if not present.
PKG_FIXUP:=autoreconf
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
# this way we don't need to pick out the resulting files from the build dir.
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/inotify-tools
CATEGORY:=Utilities
TITLE:=Tools to trace filesystem events.
URL:=
endef
define Package/inotify-tools/description
Tools to trace filesystem events.
endef
define Package/inotify-tools/install
$(INSTALL_DIR) $(1)/usr
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) ./files/* $(1)/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libinotifytools.so.0.4.1 $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libinotifytools.so.0 $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libinotifytools.so $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/inotifywait $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/inotifywatch $(1)/usr/bin/
endef
$(eval $(call BuildPackage,inotify-tools))

View File

@@ -0,0 +1,13 @@
#! /bin/sh
# is the real root mounted ?
if [ ! -f /tmp/inotify_real_root/etc/preinit ]
then
ubivol=$( cat /proc/cmdline | sed -e "s/.*root=\(ubi:rootfs_.\).*/\1/" )
mkdir /tmp/inotify_real_root
mount -t ubifs $ubivol /tmp/inotify_real_root
fi
inotifywait -r -m -e modify -e create -e attrib -e delete -e move /tmp/inotify_real_root

36
inteno-netmodes/Makefile Normal file
View File

@@ -0,0 +1,36 @@
#
# Copyright (C) 2016 Inteno
#
include $(TOPDIR)/rules.mk
PKG_NAME:=inteno-netmodes
PKG_VERSION:=0.2.0
PKG_SOURCE_VERSION:=b898924491c378ca09ab124991b27f54a336e4e9
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/netmoded
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/inteno-netmodes
CATEGORY:=Base system
DEPENDS:=+fping +ubus +libubox +libuci
TITLE:=Predefined Network Modes
endef
define Package/inteno-netmodes/description
Predefined Network Modes
endef
define Package/inteno-netmodes/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/netmoded $(1)/sbin/
endef
$(eval $(call BuildPackage,inteno-netmodes))

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