Compare commits

..

542 Commits

Author SHA1 Message Date
Markus Gothe
c394034abd Redmine#27829 - easy-soc-libs: Use correct chipset defintions
The struct for passing ioctl() data does differ in size
(and offsets) on different platforms, hence we need to pass
the correct defines to the compiler.

Change-Id: If81a4bd79b21c5e93443e5ef48fb3f1b07058f60
2020-08-31 15:47:20 +02:00
Amin Ben Ramdhane
ff6f0d86e3 bbf: 1.6-2020-08-25 2020-08-26 11:33:23 +01:00
Omar Kallel
9c374abe87 bbf: 1.5-2020-08-06 2020-08-06 13:53:27 +02:00
Omar Kallel
2abf1cbd60 bbf: 1.5-2020-08-03 2020-08-03 16:16:42 +02:00
vdutta
42ac8650cc obuspa: 2.0.20 2020-07-31 15:24:30 +02:00
vdutta
6620496980 uspd: 2.0.0 2020-07-31 15:23:48 +02:00
Omar Kallel
1b0d5ca9f2 bbf: 1.5-2020-07-28 2020-07-29 15:07:22 +02:00
Rahul
fc9b4f5be2 mcastmngr: handle mcast config for ifup in snooping
The handling of ifup event in case of snooping config was missing.

Note: ifup event is generated only for l3 interface, so, say ethx is
member of br-y which has proto none. In this case if ethx link goes
down and comes up again, IPTV will not work without a mcast reload.
From the look of it this will be the case in old version as well and
at the moment I don't know how this can be handled but considering this
is a remote scenario in my opinion I don't think the risk is too high.
I would continue to look for a solution ofcourse.
2020-07-17 10:29:40 +02:00
vdutta
f80a9e5d96 obsupa: Updated to 2.0.19 2020-07-13 20:30:28 +05:30
vdutta
c130ffe882 uspd: Updated to 1.0.26 2020-07-13 20:28:50 +05:30
vdutta
84b5b1a42f bbf: 1.5-2020-07-13 2020-07-13 20:27:41 +05:30
Anjan Chanda
60fcda1616 wifimngr 2.9.3: report opclass in global opclass numbers 2020-07-13 15:34:06 +02:00
Amin Ben Ramdhane
a3df9da723 bbf: 1.5-2020-07-10 2020-07-11 12:42:30 +02:00
Amin Ben Ramdhane
ed169fbc0c bbf: 1.5-2020-07-09 2020-07-10 12:11:06 +02:00
Anjan Chanda
41405f112b easy-soc-libs 3.3.12 - libwifi: report all supported opclasses 2020-07-10 10:20:06 +02:00
Anjan Chanda
6cce55d77a easy-soc-libs 3.3.11 - libwifi: bcm: fix radio counters 2020-07-09 08:21:04 +02:00
Amin Ben Ramdhane
b266e2a2fa bbf: 1.5-2020-07-08 2020-07-08 10:18:36 +02:00
Omar Kallel
491b977545 bbf: 1.5-2020-07-07 2020-07-07 14:10:55 +02:00
Rahul
42a4daae03 mcastmngr: fix multicast forwarding on untagged interface.
Modifying the lookup method for forwarding multicast packets enables
forwarding on both tagged and untagged upstream interfaces.

I have tested:
- forwarding of traffic in untagged interface.
- forwarding of traffic on tagged interface.
- response to queries in above scenarios by upstream server.
- forwarding of unsolicited joins and leaves to upstream server.

I cannot see a fault at the moment
2020-07-06 13:23:04 +02:00
pitchaiah prakash
84ea2908c6 peripheral_manager: 1.0.5 2020-06-30 08:58:31 +02:00
vdutta
c333460ac6 obsupa: Suppress schema errors in get if its present in uspd 2020-06-30 11:34:30 +05:30
Suru Dissanaike
7b432d88f8 IOP: added support for iopsys-armvirt and x86 target 2020-06-26 13:47:28 +02:00
Sukru Senli
c56aed73d4 icwmp-4.0-2020-06-25 2020-06-26 10:19:07 +02:00
vdutta
af719df40c obuspa: Multiple fixes
- 447a01c vendor_uspd: Multiple fixes
 - d269d52 vendor_upsd: fix schema not getting created
 - 82a3765 openwrt: Set destination for MTP config
 - 63eac80 openwrt: Change destination default config value
2020-06-26 13:31:35 +05:30
vdutta
2d25beb3ab uspd: Multiple fixes
- bb11466 Initialise blob_buf before use
 - e23b2b4 Show "value" parameter on get_names_safe
2020-06-26 13:29:17 +05:30
vdutta
ba561afb24 ieee1905: Multiple fixes
- Supports reassembly of fragmented cmdus
 - Dependency on json config file removed
 - Support reliable multicast for map cmdus
 - Do cleanup on exit
 - Memory related fixes
2020-06-25 15:59:10 +05:30
Sukru Senli
4f8906c1f7 obuspa: log to stdout by default 2020-06-25 09:02:07 +02:00
Jakob Olsson
42c7aafb93 iop: config: select juci-sysupgrade and rpcd-mod-rpcsys by default 2020-06-24 09:55:14 +02:00
Jakob Olsson
6c1b78b69d owsd: make async cleanout timeout more leniant 2020-06-23 16:48:05 +02:00
Amin Ben Ramdhane
1eade44fe6 bbf: 1.5-2020-06-22 2020-06-22 16:50:41 +01:00
Anjan Chanda
834522d107 wifimngr: 2.9.2 - show supp_bands in radio info 2020-06-22 15:58:30 +02:00
vdutta
cc65e6ce52 obuspa: Fix duplicate alias entries from get 2020-06-19 16:53:52 +05:30
vdutta
b2061f27e0 obsupa: Dynamic registration of dm_schema 2020-06-19 14:34:26 +05:30
vdutta
cc26f7bbe9 uspd: Added object type and permission in object_names 2020-06-19 14:31:37 +05:30
Amin Ben Ramdhane
6841172f75 bbf: 1.5-2020-06-19 2020-06-19 09:58:33 +01:00
Sukru Senli
8fd7232ea2 peripheral_manager: 1.0.4
pitchaiah prakash <pitchaiah.murugan@iopsys.eu>
2020-06-19 10:45:31 +02:00
Sukru Senli
4d7ac5941e bbf: correct wifi associated device noise value mapping 2020-06-18 16:09:25 +02:00
Sukru Senli
2bd9e1ac13 bbf: 1.5-2020-06-17 2020-06-18 15:47:38 +02:00
Sukru Senli
766379c8e4 Revert "config: enable hostapd_cli and mpstat"
This reverts commit dd8edbec71.
2020-06-18 14:56:50 +02:00
Janusz Dziedzic
dd8edbec71 config: enable hostapd_cli and mpstat
For opensource iopsys-ramips we will use
hostapd_cli from libwifi.

Enable mpstat to get correct picture of
CPU/cores usage for platforms with more
than one CPU.

After that we have output like:

root@iopsys:~# mpstat -P ALL 2
Linux 4.14.171 (iopsys)         06/18/20        _mips_  (4 CPU)

CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
all    0.50    0.00    0.75    0.00    0.00    0.50    0.00    0.00    0.00   98.26
  0    1.00    0.00    1.00    0.00    0.00    0.50    0.00    0.00    0.00   97.51
  1    0.50    0.00    1.00    0.00    0.00    0.00    0.00    0.00    0.00   98.51
  2    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00
  3    0.50    0.00    1.00    0.00    0.00    1.49    0.00    0.00    0.00   97.01

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2020-06-18 14:01:02 +02:00
Anjan Chanda
a0bfac1658 wfadatad: fix dependency on map-agent 2020-06-17 17:12:13 +02:00
Anjan Chanda
ec68c58bb7 easy-soc-events: copy kmod to proper path for brcm-arm 2020-06-17 17:06:49 +02:00
Omar Kallel
701a77b6b3 icwmp: 2020-06-17 2020-06-17 11:56:08 +01:00
Janusz Dziedzic
18e94a6b47 iopsys-ramips: set subtarget in genconfig.sh
Today we base on open source code/tree.
In this code we need to setup subtarget
correctly.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2020-06-16 21:52:41 +02:00
vdutta
514a85703c obuspa: Override get values from uspd 2020-06-16 16:25:09 +05:30
Markus Gothe
e72ef7290b peripheral-manager: 1.0.3 2020-06-15 20:42:57 +02:00
Jakob Olsson
428a1791ed owsd: fix segfault on remove_client
use safe func when iterating and removing from list
2020-06-15 16:12:13 +02:00
vdutta
43bd7d872f uspd: Multiple fixes
- c2d0d99 uspd: Align ut cases with next-level parameter
 - 46e9475 Add get_safe variant of object_names
 - 366e022 Add ParameterKey to set callback
 - 15b8a80 Cleanup and reuse code
 - 86d72e8 Add get_attributes call
2020-06-15 15:31:19 +05:30
Sukru Senli
1fd62bbfa2 port-management: remove unused functions 2020-06-14 18:27:48 +02:00
Rahul
08c542cf6f mcastmngr: update stats param names, config l2l mcast
- The parameters used for stats are updated.
- Configuration support for lan to lan multicast via UCI added.
2020-06-14 20:15:07 +05:30
Rahul
098f3340b1 mcastmngr: add support for stats
ubus call added to fetch igmp stats, format is,
ubus call mcast stats

Sample output:

root@iopsys:~# ubus call mcast stats
{
	"snooping": [
		{
			"interface": "br-lan",
			"groups": [
				{
					"group_address": "225.10.10.20",
					"associated_devices": [
						{
							"host_address": "192.168.1.152",
							"source_interface": "eth1",
							"timeout": "258"
						}
					]
				},
				{
					"group_address": "225.10.10.2",
					"associated_devices": [
						{
							"host_address": "192.168.1.146",
							"source_interface": "eth0",
							"timeout": "259"
						}
					]
				}
			]
		}
	]
}
2020-06-14 13:26:12 +05:30
Sukru Senli
d43113a471 bbf: 1.5-2020-06-13 2020-06-13 14:53:41 +02:00
Sukru Senli
597fadf578 questd: 5.1.11 2020-06-13 13:47:51 +02:00
Yalu Zhang
d45959b3da Update package easy-soc-libs
libdsl: update header files for Broadcom platform due to upgrading
2020-06-12 14:22:48 +02:00
Sukru Senli
8952a6eca8 bbf: 1.5-2020-06-11 2020-06-11 18:21:04 +02:00
Markus Gothe
c5df7e08a1 peripheral-manager: 1.0.2 2020-06-11 18:04:54 +02:00
vdutta
a2c6430caa obuspa: Align version with obuspa 2020-06-11 20:52:48 +05:30
vdutta
e364957074 uspd: 'next-level' parameter in 'object_names'
a8a90df object_names: add all entries returned from libbbf
0937f3c object_names: add 'next-level' parameter
2020-06-11 20:20:24 +05:30
vdutta
a14e72e26f obuspa: Support dynamic datamodel parameters from uspd
- Skip registration of datamodel objects supported by uspd
2020-06-11 20:13:30 +05:30
Yalu Zhang
fc38f16aa5 Update package endptmngr: Change country code from 3 letters to 2 2020-06-11 16:35:31 +02:00
Markus Gothe
ebf1f8fd39 peripheral_manager: add test-mode 2020-06-11 12:58:42 +02:00
Anjan Chanda
005d53ff14 dslmngr 1.0.1: handle easysoc netlink events 2020-06-10 15:18:47 +02:00
Anjan Chanda
a585061b6c wifimngr: 2.9.1: ignore non-wifi 'easysoc/notify' events 2020-06-10 12:08:33 +02:00
Anjan Chanda
c945f19c3c easy-soc-libs: 3.3.1 - fix event handling when ifname=NULL 2020-06-10 12:06:35 +02:00
Sukru Senli
9566dbfb8e questd: 5.1.10 2020-06-10 11:47:06 +02:00
Sukru Senli
120785335c wifimngr: hotplug script handling wifi and wps button press 2020-06-09 19:58:07 +02:00
Sukru Senli
f87a160b98 inbd: 1.0.1 2020-06-09 19:23:59 +02:00
vdutta
bf6342472a uspd: Updated Readme with log_level 2020-06-09 16:43:13 +05:30
Rahul
36e9c3a3d7 mcastmngr: updates
- Default filter value updated as per requirements.
- Logic added to modify filter ip address as accepted in /var/mcpd.conf
  in broadcom.sh

Noticed one hard coding in qos, fixed that too.
2020-06-09 13:31:33 +05:30
Sukru Senli
3c79856802 bbf: bump version 2020-06-08 18:01:27 +02:00
Sukru Senli
e29ab21280 ndt: add pkg_hash 2020-06-08 16:20:47 +02:00
Rahul
c2b993b494 qosmngr: improvements
- ubus call for reloading each individual service as well as all of
  qos added.
- init script modified to call ubus call and also to have a boot and
  restart section.
- to have separate uci parameters for detination mask and source mask
  make no sense, both destination/source ip and mask in tr181 should
  map to destination/source ip uci parameter, updated.
- firewall rules added by qos are moved to a separate chain, flushing
  is hence restricted to this chain only.
- the hotplug is not really required, hence removed.
2020-06-08 18:44:51 +05:30
vdutta
fbc5226978 uspd: Align operate cmd output 2020-06-08 18:32:10 +05:30
Amin Ben Ramdhane
3d5a5d4697 bbf: add Device.Hosts.Host.{i}.WANStats. object 2020-06-08 12:46:47 +01:00
Sukru Senli
0be99d1bc0 iop: select map package 2020-06-08 13:24:37 +02:00
Sukru Senli
053bfa1442 questd: 5.1.9 2020-06-07 13:58:09 +02:00
vdutta
0346ce9285 uspd: Fix table name in get output 2020-06-06 11:17:37 +05:30
Amin Ben Ramdhane
ae3b959cbf bbf: Ethernet.Interface.{i}.Stats: update stats values 2020-06-05 18:46:00 +01:00
Anjan Chanda
2e10c5845e ethmngr: 1.0.4 2020-06-05 19:29:01 +02:00
Amin Ben Ramdhane
83bb965d81 bbf:1.4-2020-06-05 2020-06-05 15:48:47 +01:00
vdutta
a80cff151d uspd: Added maxdepth and u64 conversion fix
- f101ef0 uspd: Fix conversion of u64 values
 - cf418dc uspd: Align resolve path syntax as per obuspa
 - 1355839 uspd: Added maxdepth in get method of usp object
2020-06-05 19:24:11 +05:30
vdutta
76a5df9115 uspd: Multiple fixes
* Added resolve method to verify object path
* Added check to identify the valid paths before any operation
* Align instance names as per obuspa
* Fix unit test cases as per the new instance syntax
* Fix usp freeze issue on invalid syntax in path
 - ubus call usp get '{"path":"Device.\*"}'
2020-06-05 13:51:34 +05:30
Omar Kallel
e63d9f0445 icwmp: 2020-06-04 2020-06-04 17:26:15 +01:00
Omar Kallel
0432b27f39 bbf: 2020-06-04 2020-06-04 17:19:45 +01:00
Anjan Chanda
dcae4a36ea wifimngr 2.9.0 2020-06-04 16:58:45 +02:00
Anjan Chanda
3dc00d7c04 easy-soc-libs - 3.3.0: libwifi - get wmm params and wifi meta info 2020-06-04 16:57:26 +02:00
Amin Ben Ramdhane
12a7fb224d bbf: 1.4-2020-06-03 2020-06-03 10:31:47 +01:00
Anjan Chanda
dfd2d75021 wifimngr 2.8.1 2020-06-02 13:21:15 +02:00
Anjan Chanda
0bc504232a easy-soc-libs - 3.2.1: libwifi - include noise in station info 2020-06-02 13:16:21 +02:00
Anjan Chanda
6d5bb86e58 ethmngr: 1.0.3 - change ubus methods 2020-06-02 10:58:33 +02:00
vdutta
ff47df64b8 ieee1905: Fix tlv count logic in a stream 2020-06-02 13:10:29 +05:30
Anjan Chanda
b1f86fdc3b ethmngr: 1.0.2 - add 'ethernet' ubus object 2020-06-01 15:03:34 +02:00
Anjan Chanda
a0a457cd35 easy-soc-libs: 3.1.10 - libethernet: update get rmon stats API 2020-06-01 15:00:16 +02:00
Jakob Olsson
0c5f03d50c owsd: make client connection timers configurable 2020-06-01 08:55:39 +02:00
Amin Ben Ramdhane
4c124ccd4e bbf: 1.4-2020-05-31 2020-06-01 00:06:59 +01:00
Amin Ben Ramdhane
321eb8c8e4 tr098:1.0-2020-05-31 2020-06-01 00:02:15 +01:00
Rahul
776dc46d49 qosmngr: fix start up issues
Fixes the issue related to queue setup at boot.
Also resolved classification when source port is used as the
criteria.
2020-05-31 20:36:05 +05:30
Sukru Senli
dcfbd0349a iop: config: deselect crashlog and select iopupgrade as module 2020-05-31 16:18:08 +02:00
Anjan Chanda
ed5d4e572d ethmngr: 1.0.1 - initial version 2020-05-31 12:36:11 +02:00
Anjan Chanda
22429269e2 easy-soc-libs: 3.1.9 libethernet: bcm rom stats and link status 2020-05-31 11:39:56 +02:00
Sukru Senli
eee0fcf3db easy-soc-libs: compile test platform for target iopsys-armvirt 2020-05-31 11:06:36 +02:00
Sukru Senli
9f6f39a094 iop: genconfig: allow explicitly specifying the linux target
same board/profile names might be available under different targets
2020-05-31 10:58:25 +02:00
Sukru Senli
0e0bbb2339 iop: add support for iopsys-armvirt target 2020-05-31 10:58:20 +02:00
Omar Kallel
36ded309bc bbf: 2020-05-30 2020-05-30 23:36:42 +01:00
Sukru Senli
182b08fcbf qosmngr: broadcom needs qsize set 2020-05-30 13:43:51 +02:00
Sukru Senli
17fef094df iop: remove reference to wifilife open 2020-05-30 12:48:04 +02:00
Sukru Senli
bcdbb5dae8 iop: config: select swmodd as module 2020-05-30 10:55:21 +02:00
Sukru Senli
f1be5f4ee4 questd: 5.1.8 2020-05-30 10:49:51 +02:00
Rahul
33eeedcdd7 mcastmngr: fix upstream interface generation 2020-05-29 18:15:59 +05:30
Rahul
5e41b8c3bc qosmngr: enhance support plus fix some bugs
- Enhance support to cover ipv6 rules
- Add support to differentiate between l2 and l3 rules
- Resolve bug related to source interface for output chain
2020-05-29 18:02:09 +05:30
Rohit Topno
4652ec7399 qosmngr: Added support for ip6tables and other change for ifname uci option 2020-05-29 15:24:49 +05:30
Rahul
7cccc5d048 mcastmngr: add check for valid interface
Add check to validate if the configured interface is valid or not
before writing it into the mcpd.conf.
2020-05-29 12:56:01 +05:30
Amin Ben Ramdhane
4843a8e9ff bbf: 1.4-2020-05-28 2020-05-28 20:32:50 +01:00
Amin Ben Ramdhane
a67aedda72 icwmp: 4.0-2020-05-28 2020-05-28 20:31:31 +01:00
Sukru Senli
d5a7db3a91 easy-soc-libs: use test platform for iopsys_x86 target 2020-05-28 17:41:17 +02:00
Jakob Olsson
45190fb2fd iop: add iopsys-x86 target support 2020-05-28 17:25:12 +02:00
Rahul
c8a8cda534 mcastmngr: update proxy config
- generate proxy config by default
- resolve bug in processing multiple upstream or downstream interfaces
- add hotplug script for mcast
- add default values for query interval, response interval and last
  query response interval
2020-05-28 19:48:56 +05:30
pitchaiah prakash
64e0a86b77 Peripheral Manager: Changed the project from autotools to CMake. 2020-05-28 12:39:25 +02:00
Rahul
123e2df9fa qosmngr: update qos stats as per feedback
- All params apart from ifname converted to intergers.
- Output of stats for a particular interface now available.
- The ubus call accepts qid as integer.
2020-05-28 08:44:16 +05:30
Sukru Senli
61d9885cd5 iop: select lscpu 2020-05-27 13:04:11 +02:00
Amin Ben Ramdhane
733cb365ee bbf: 1.4-2020-05-27 2020-05-27 09:07:02 +01:00
vdutta
aeba764008 map-1905: Added unit tests 2020-05-27 11:08:34 +05:30
Rahul
d0350ee279 mcastmngr: add support for snooping mode
Support for snooping mode configuration added.
2020-05-26 18:37:24 +05:30
vdutta
00b6800c2f map-1905: Improvements in map-plugin 2020-05-26 17:18:23 +05:30
vdutta
ea0079eec8 ieee1905: map plugin improvements 2020-05-26 17:11:24 +05:30
Amin Ben Ramdhane
b72d3a45b3 swmodd: clean up 2020-05-26 09:51:48 +01:00
vdutta
d71c6382d5 obuspa: Fix client freeze on SIGINT
- B#2637 Fix obuspa -c get command freeze issue
 - Obuspa stop scripts improvement to speed up stop and reload
2020-05-25 18:31:18 +05:30
Rahul
ef4570dd83 qosmngr: fix port related config issue
Bug found in specifying input port as classification criteria,
fixed with this change.
2020-05-23 19:33:11 +05:30
Rohit Topno
56273668d6 qosmngr: Simplified code for writing iptables rules 2020-05-22 16:10:39 +05:30
Rahul
413c86b854 qosmngr: fix uci param name
The uci parameter name for destination mac address is incorrect.
It should be dst_mac and dest_mac, the same is rectified with this
change.
2020-05-22 13:34:56 +05:30
Rohit Topno
53d9ff537d qosmngr: Made iptables rule addition through single function and other changes 2020-05-21 14:00:06 +05:30
Rohit Topno
024d1bf061 qosmngr: Support for mapping internal packets to queue based on packet length 2020-05-20 21:15:17 +05:30
Sukru Senli
cb5d38eb86 iop: config: remove reference to samba3 2020-05-20 15:41:29 +02:00
Rahul
9108848387 qosmngr: update ubus call for queue stats
Update the rpcd to enable fetching stats for particular queue of an
interface.
Also, move all broadcom specific functions to broadcom.sh so that the
rpcd is soc agnostic.
2020-05-20 17:12:50 +05:30
Rohit Topno
81fb5ff455 qosmngr: Support for mapping IP packets to queue based on packet length. 2020-05-20 15:12:16 +05:30
Sukru Senli
5d16d75162 obuspa: add support for configuring log destination 2020-05-20 08:40:53 +02:00
Anjan Chanda
da5b719e6d wifimngr: 2.7.2 2020-05-20 08:37:38 +02:00
Anjan Chanda
3baa8f3157 easy-soc-libs: 3.1.8 2020-05-19 16:52:39 +02:00
Yalu Zhang
27610a0305 Update package endptmngr 2020-05-19 16:30:39 +02:00
vdutta
3ef6f4b04c uspd: Multiple fixes
- 69547f8 Remove DM_USE_LIBUBUS compile defines
 - 06fbaef Add openwrt makefile
 - 6ce0cad Fix invalid use of strncpy/cat functions
 - da2d3d8 uspd: Added compile time flags
2020-05-19 19:24:35 +05:30
vdutta
0bea0f9635 obsuap: Fix segfault in case of parameter returns fault 2020-05-19 19:13:18 +05:30
Anjan Chanda
8ee10eb149 easy-soc-events: v1.1 2020-05-18 21:30:20 +02:00
Anjan Chanda
1a36a1d22a rename mapagent -> map-agent 2020-05-18 21:29:25 +02:00
Omar Kallel
4b11d665ff bbf: Device.LANConfigSecurity. object 2020-05-18 14:03:57 +01:00
Amin Ben Ramdhane
ab710068a6 change package name: opkgd -> swmodd 2020-05-18 12:36:02 +01:00
Sukru Senli
9ceec5cc0b easy-soc-libs: compile TEST modules for x86 target 2020-05-18 12:50:03 +02:00
Amin Ben Ramdhane
9161d99082 bbf: 1.3-2020-05-18 2020-05-18 10:49:07 +01:00
vdutta
fa76f6f32c uspd: Fix memory leak in get_safe method 2020-05-18 14:08:33 +05:30
Rahul
c37934cb69 mcastmngr: Fix section name issue
In the default config that is generated by the mcast manager,
after support for MLD config via bbf was added the name of section
was updated. This caused unwanted behaviour when config addition
were made by the bbf on top of default config. Updated the default
config igmp snooping section name to resolve that.
2020-05-18 09:52:32 +05:30
Rahul
53a52bc455 qosmngr: Add service trigger
The service trigger was missing from the init file, added.
2020-05-18 09:49:41 +05:30
Sukru Senli
7f58e5409d libmicroxml: update source url 2020-05-17 20:50:45 +02:00
Sukru Senli
ccad65dd89 iop: config cleanup 2020-05-17 18:18:33 +02:00
Sukru Senli
e5b8c6f46b samba3: remove package 2020-05-17 18:11:57 +02:00
Sukru Senli
7ec727e994 owsd: install uproxyd only if selected 2020-05-17 17:21:51 +02:00
Sukru Senli
52313cdaa8 iop: update config 2020-05-15 18:42:57 +02:00
Sukru Senli
da18a10782 remove deprecated and redundant packages 2020-05-15 18:38:51 +02:00
Sukru Senli
0ae10079fb wifilife: remove package 2020-05-15 17:00:54 +02:00
Omar Kallel
0e22b3d267 icwmp: 4.0-2020-05-15 2020-05-15 13:31:32 +01:00
Rahul
895cfbc4f0 qosmngr: Add support for L2 classification
* Support of the QoS.Classify object parameters is extended to cover
L2 scenarios.
* There was a mistake in the way p-bit to queue mapping was configured,
that has been corrected now.

For now, qosmngr write L2 classification rules into /tmp/qos/classify.ebtables
file and then executes this script to apply the classification rules.

Decision on whether to go for this or to add this script to firewall uci
default config will be taken at the time of integration.

Note: before enabling qosmngr in devel, firewall.qos should be removed.
All QoS handling should be done from qosmngr.
2020-05-14 16:49:39 +05:30
vdutta
85cf73c66b uspd: Added conversion of unsigned long values 2020-05-14 16:25:18 +05:30
Rohit Topno
e8ddd67747 qosmngr: 4.4.4.25: Support for DSCP mark and remark based on L3 classifier supported by the system 2020-05-14 14:40:53 +05:30
Sukru Senli
60396bad6d icwmp: 4.0-2020-05-08 2020-05-13 11:52:45 +02:00
Benjamin Larsson
568098ee0b Update feed [ iopsys ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 4851bc6 Merge branch 'production-button' into 'devel'
* 4dd5f3c Peripheral-manager: Add production mode support for button
-------------------------------------------------------------------------------
commit 4851bc6a0ee52a6f3399ac26a70e4ccced1b72cc
Author: Benjamin Larsson <benjamin.larsson@iopsys.eu>
Date: 2020-05-08 13:33:47 +0200

    Merge branch 'production-button' into 'devel'

    Peripheral-manager: Add production mode support for button

    See merge request iopsys/peripheral-manager!2
Base directory -> /
 src/button.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 118 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit 4dd5f3c38a7a4e5c7fcc5c9461f0f13a99023fb4
Author: pitchaiah prakash <pitchaiah.murugan@iopsys.eu>
Date: 2020-05-08 12:20:16 +0200

    Peripheral-manager: Add production mode support for button

Base directory -> /
 src/button.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 118 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
2020-05-13 11:45:10 +02:00
Anjan Chanda
868fece089 easy-soc-events: 1.0 2020-05-13 08:06:11 +02:00
Amin Ben Ramdhane
e0cb0e7a07 bbf: implement Device.Hosts. object 2020-05-12 16:46:40 +01:00
Amin Ben Ramdhane
49f9faa58c wifilife: TR-181 X_IOPSYS_EU_WiFiLife vendor extensions 2020-05-12 16:29:31 +01:00
Sukru Senli
30245d6dec questd-5.1.7 2020-05-12 12:07:23 +02:00
Amin Ben Ramdhane
8df424c249 bbf: 1.2-2020-05-12 2020-05-12 10:12:25 +01:00
Sukru Senli
e732109ef2 questd-5.1.6 2020-05-10 11:54:21 +02:00
Sukru Senli
0e64d6f262 libtrace: correct dependency 2020-05-09 16:46:39 +02:00
Sukru Senli
57816f3353 questd-5.1.5 2020-05-09 16:46:02 +02:00
Sukru Senli
0cb4e026c7 bbf: 1.2-2020-05-09 2020-05-09 16:45:44 +02:00
vdutta
25a6e81181 uspd: Test support with fixes
- Readme: Updated readme
 - Updated api specification and tests
 - Remove redundant code
 - Fix '==' operation for boolean type
 - Fix '!=' operation
 - Fix output of del_object method
 - Improved comparator algorithm for non integer values
 - Added unit test cases
 - Added functional api test cases
 - Fixed static analysis errors
 - Fixed cpd errors
2020-05-08 18:47:55 +05:30
Amin Ben Ramdhane
352e54af58 bbf: 1.2-2020-05-06 2020-05-06 15:54:39 +01:00
Omar Kallel
f5b4e71927 icwmp: Fix bug related to the authentication 2020-05-05 17:56:11 +01:00
Yalu Zhang
37dae0ee6f Update commitment of endptmngr: Adaptation for voice config restructure 2020-05-05 18:12:52 +02:00
Amin Ben Ramdhane
045dd954fa bbf: fix memory leak and issue related to delete object 2020-05-05 15:20:55 +01:00
yyashvardhan
ecde3a89eb ieee1905: Added 1905 stack validation tests 2020-05-05 12:26:24 +05:30
Amin Ben Ramdhane
7e5b693624 bbf: 1.2-2020-05-05 2020-05-05 01:18:14 +01:00
Amin Ben Ramdhane
7bbbfb150c icwmp: 4.0-2020-05-05 2020-05-05 01:16:53 +01:00
Amin Ben Ramdhane
317f4118e1 opkgd: Update the object name softwaremanagement -> swmodules 2020-05-05 01:14:47 +01:00
Amin Ben Ramdhane
a819c14f7d bbf: fix issue in delete object of IP.Interface 2020-05-04 17:41:34 +01:00
Amin Ben Ramdhane
f4b98bd8e9 bbf: 1.2-2020-05-04 2020-05-04 14:52:27 +01:00
Yalu Zhang
1eeb09bfa2 Remove package voice-client
The functionalites of the package will be merged to package asterisk
2020-05-04 15:29:20 +02:00
Ronny Nilsson
3e67053e9d endptmngr: source file was badly computed in Makefile. 2020-05-03 21:42:35 +02:00
Amin Ben Ramdhane
3630dd5fc1 bbf: 1.2-2020-05-03 2020-05-03 15:08:21 +01:00
Sukru Senli
29d72d64d6 remove reference to deprecated rpcd acl config option 2020-05-03 15:18:00 +02:00
Amin Ben Ramdhane
19e3f822e7 bbf: 1.2-2020-05-02 2020-05-02 13:29:42 +02:00
Sukru Senli
87969bddae iop: config: deselect out of scope juci packages 2020-05-02 13:23:21 +02:00
Sukru Senli
1f6dc0d9fb libcgroup: deprecated
procd and LXCs are used for containerization
2020-05-02 12:41:38 +02:00
Sukru Senli
c92d47953e testnet: control broadband led if wan led is not available
WAN and Broadband LED will be handled by ruleng rules when ubus switch events are ready
2020-05-01 15:09:00 +02:00
Sukru Senli
e4221b84f0 netmode: temporary testnet object to query online status 2020-04-29 13:52:43 +02:00
Suru Dissanaike
593da2e6f8 Update genconfig_min.sh 2020-04-28 10:09:26 +02:00
Jakob Olsson
d882e35820 wifilife: firewall.mibd: surpress errors when removing files 2020-04-27 15:44:01 +02:00
Sukru Senli
89e0a6ba35 license correction: endptmngr and libpicoevent 2020-04-27 14:45:05 +02:00
Ronny Nilsson
0c69245845 peripheral_manager: were sometimes built incorrectly with many cores and Broadcom 5.02L.07. 2020-04-27 14:12:47 +02:00
vdutta
a3265ea7f7 uspd: Collate all failure on get method
- 418daea get_safe: don't abort on single path failures
2020-04-27 16:59:17 +05:30
Sukru Senli
155df35229 iop: compile unusued packages as modules only 2020-04-26 17:23:08 +02:00
Sukru Senli
b477f767f3 power-management: moved to broadcom feed as it is broadcom specific 2020-04-26 17:20:03 +02:00
Sukru Senli
883023b588 questd-5.1.4 2020-04-26 15:25:26 +02:00
Amin Ben Ramdhane
96322d2a2c bbf: 1.2-2020-04-26 2020-04-26 13:53:10 +01:00
Omar Kallel
ff72d4e88b bbf: 1.2-2020-04-24 2020-04-24 11:56:31 +01:00
Jakob Olsson
4f5a1ad365 owsd: init.d: let whitelist_interface_as_origin default to 1 2020-04-23 13:32:05 +02:00
Sukru Senli
56f93e1eab voice_client: adapt to led name change 2020-04-23 12:41:08 +02:00
Jakob Olsson
57e2a69575 netmode: remove status method, depend on 'enabled' option 2020-04-23 12:25:18 +02:00
Rahul
c7f037fdd7 bbf: Update mcastmngr to handle mld config
The mcast manager can now configure mld snooping and proxy
2020-04-23 14:41:31 +05:30
Sukru Senli
ea87bfe337 owsd: disable ubus-x by default 2020-04-23 11:11:15 +02:00
Sukru Senli
df93ed2d3c netmode: deprecate config based mode switching 2020-04-23 09:59:21 +02:00
Jakob Olsson
de03c6149c owsd: remove some sections from default cfg 2020-04-23 08:42:18 +02:00
Jakob Olsson
92480328ac owsd: update default configuration 2020-04-22 13:55:48 +02:00
Jakob Olsson
02404d5f22 owsd: only include json-validator.h if flag is given 2020-04-22 12:47:32 +02:00
Jakob Olsson
bd65c9a666 owsd: update for lws-3.1.0, make one vhost per origin 2020-04-22 12:36:40 +02:00
Sukru Senli
ec443bbb91 qosmngr: remove reference to db layer2 option 2020-04-22 11:40:35 +02:00
Ronny Nilsson
0292918ef4 iop: add rsync
It is used by the sysbackup and sysrestore utilities.
2020-04-21 17:06:56 +02:00
Jakob Olsson
947d72ae96 wifilife: firewall.mbid: remove lockfile if script is interrupted 2020-04-21 13:26:41 +02:00
Suru Dissanaike
fb195d9456 IOP: added --opensdk flag, support for cloning using https, and minimalistic genconfig_min 2020-04-20 15:11:09 +02:00
Amin Ben Ramdhane
aa6ff005ea icwmp: 4.0-2020-04-17 2020-04-20 12:11:08 +01:00
Amin Ben Ramdhane
a404289e69 bbf: 1.2-2020-04-20 2020-04-20 12:09:13 +01:00
vdutta
ccb5d3108a uspd: Show fault as per cmwp specification 2020-04-20 15:26:16 +05:30
Sukru Senli
ed23fc33b4 iop: generate_tarballs script fix 2020-04-20 08:21:32 +02:00
Rahul
c1dbba3545 mcastmngr: remove max_groups section from uci
The option max_groups is not really needed in the uci, hence,
removed. Also, max_membership and max_msf are set internally
by mcpd so no need to echo them seperately.
2020-04-20 07:09:18 +05:30
Sukru Senli
ab7cf3e44a questd: 5.1.3 2020-04-19 20:18:11 +02:00
Sukru Senli
2afe82e86b qosmngr: depend on existence of tool 2020-04-19 20:08:59 +02:00
Rahul
cd4733efa9 mcastmngr: Add mcastmngr
The mcastmngr read the uci file and configures the corresponding
multicast daemon accordingly. It is for now doing this for broadcom's
mcpd utility. Here are a few examples of what UCI config gets converted
to what /var/mcpd.conf

Snooping:
config snooping 'msnoop_1'
    option enable '1'
    option proto 'igmp'
    option version '2'
    option robustness '2'
    option aggregation '0'
    option interface 'br-wan100'

root@iopsys:~# cat /var/mcpd.conf
igmp-default-version 2
igmp-robustness-value 2
igmp-max-groups 20
igmp-max-sources 10
igmp-max-members 20
igmp-snooping-enable 1
igmp-proxy-enable 0
igmp-query-interval 125
igmp-query-response-interval 100
igmp-last-member-query-interval 10
igmp-mcast-interfaces  eth5.100
igmp-snooping-interfaces br-wan100

Proxy:
config proxy 'mproxy_1'
    option enable '1'
    option proto 'igmp'
    option version '2'
    option robustness '2'
    option aggregation '0'
    option last_member_query_interval '10'
    option query_interval '120'
    option query_response_interval '100'
    list downstream_interface 'br-lan'
    list upstream_interface 'eth5.1'

root@iopsys:~# cat /var/mcpd.conf
igmp-default-version 2
igmp-robustness-value 2
igmp-max-groups 20
igmp-max-sources 10
igmp-max-members 20
igmp-snooping-enable 2
igmp-proxy-enable 1
igmp-fast-leave 1
igmp-query-interval 120
igmp-query-response-interval 100
igmp-last-member-query-interval 10
igmp-proxy-interfaces  eth5.1
igmp-mcast-interfaces  eth5.1
igmp-snooping-interfaces br-lan
2020-04-19 15:27:38 +05:30
Sukru Senli
123dcd9d87 iop: config cleanup 2020-04-18 21:21:44 +02:00
Sukru Senli
fa2f34ef58 bbf: 1.2-2020-04-17 2020-04-17 14:34:02 +02:00
Sukru Senli
f099a39137 bbf: 1.2-2020-04-16 2020-04-16 18:59:06 +02:00
Sukru Senli
011e469c8a questd: 5.1.2 2020-04-16 12:47:12 +02:00
Suru Dissanaike
f085b5552f PKG_SOURCE_URL should use HTTPS
(cherry picked from commit 70c394db7c42a268de04d20efaf1f54e6c02a15d)
2020-04-16 10:53:32 +02:00
Sukru Senli
434f0f79a5 iop: generate correct wifilife tarball for mediatek 2020-04-15 12:41:43 +02:00
Sukru Senli
59206bb37f bbf:1.2-2020-04-14 2020-04-14 19:15:10 +02:00
Yalu Zhang
b7d7b2a382 Make endptmngr and dectmngr2 stripped in the root filesystem on targets
This can totally save ~9M bytes space.
2020-04-14 14:59:49 +02:00
Sukru Senli
d7564ddf36 questd: 5.1.1 2020-04-14 10:58:34 +02:00
Ronny Nilsson
e2f238a155 busybox: add fractional sleep time.
Sleeping less than 1 second is of great usage in many shell scripts.
2020-04-13 22:36:46 +02:00
Anjan Chanda
0fe4491394 easy-soc-libs: 3.1.6 2020-04-13 19:02:36 +02:00
vdutta
c471e4b465 mapagent: Fix compilation 2020-04-13 19:53:29 +05:30
Anjan Chanda
8436c5e39a mapagent: 2.0.1 - initial version 2020-04-13 13:28:26 +02:00
Anjan Chanda
d4d7cb9ed0 wfadatad: 2.0.1 - standalone daemon and plugin mode 2020-04-13 13:24:51 +02:00
Sukru Senli
a72d39cac8 bbf: 1.2-2020-04-12 2020-04-12 12:19:26 +02:00
Sukru Senli
ccf5343e62 iup: remove package 2020-04-11 20:18:15 +02:00
Sukru Senli
28a125cc5b icwmp: remove obselete README 2020-04-11 20:18:02 +02:00
Yalu Zhang
abc791f516 voice-client: Add cdr_manager.conf.TEMPLATE and fix an error in cdr_syslog.conf.TEMPLATE 2020-04-09 15:51:01 +02:00
Anjan Chanda
e599097a22 mt76xx: fix consumer build due to removed wifi drivers 2020-04-09 12:18:10 +02:00
Rahul
71ee9e3311 qosmngr: introduce enable in queue and shaper section
Introduce enable in the queue and shaper section in qos config, if
disabled, configuration not done for that instance.

Fixed some bugs in the broadcom.sh script.

Note: The broadcom.sh script has not been updated to take into account
the fact that the board 6846 does not have enough queues available.
This script is kept so for the same of flexibility. The number of queues
per port can be controlled from the uci file now which easily available
and configurable.
2020-04-09 14:26:49 +05:30
vdutta
d7936fd7d1 uspd: Align boolean values to uci defaults 2020-04-09 13:54:50 +05:30
vdutta
70fb4a6442 uspd: Multiple fixes
4328f3a delete_object: fix memleak and endless list growing
99ddcf2 {add,del}_object: add "parameterKey" parameter
93155dc Add get_safe method
2020-04-09 11:59:34 +05:30
Sukru Senli
0e21fc2475 bbf: 1.2-2020-04-08 2020-04-09 08:13:51 +02:00
Anjan Chanda
4d5f387738 mt76xx: remove mediatek wifi drivers from iopsys feeds 2020-04-08 14:51:15 +02:00
Rahul
78bab83bed qosmngr: rename the queue section name
rename the queue section name from q<0-4? to queue numbers being per
interface, so it is now for example q<0-7>_eth<0-5>
2020-04-07 20:58:17 +05:30
Rahul
9745a16694 qosmngr: fix default queue config generation
In case there is a valid config in the uci file, the script should
do nothing.
2020-04-07 13:14:35 +05:30
Sukru Senli
158f1d94a6 qosmngr: qos init script is platform unaware 2020-04-07 08:39:05 +02:00
Rahul
bdb29afd54 qosmngr: generating queue config dynamically
Changes done to generate uci config for queue from uci-defaults script
instead of using hard coded values.
2020-04-07 12:02:36 +05:30
Sukru Senli
57d179ed01 bbf: 1.2-2020-04-06 2020-04-06 19:09:00 +02:00
Rohit Topno
2c18313c13 qosmngr: updated UCI file for eth3, eth4 and eth5 2020-04-06 18:49:24 +05:30
Ronny Nilsson
61d80f6cc5 busybox: gzip --fast is sometimes required. 2020-04-06 12:15:23 +02:00
Rohit Topno
5ddc513d5d Changed the way the UCI file is read. now using functions defined in /lib/functions.sh 2020-04-04 18:24:35 +05:30
Sukru Senli
5e4549e413 iop: config: remove snmpd from default config 2020-04-01 23:28:29 +02:00
Sukru Senli
dc36c83866 wifimngr: do not install keep config script until the issues are fixed 2020-03-29 15:49:29 +02:00
Amin Ben Ramdhane
5eeef917e6 icwmp: 4.0-2020-03-25 2020-03-29 14:35:30 +01:00
Amin Ben Ramdhane
ea5535f374 bbf-1.2-2020-03-29 2020-03-29 14:32:55 +01:00
Sukru Senli
696b4b063a port-management: move port population to uci-defaults 2020-03-29 13:51:24 +02:00
Sukru Senli
8660069566 port-management: move port population to uci-defaults 2020-03-29 13:50:48 +02:00
Ronny Nilsson
44943fdea7 Revert "wifimngr: do not install keep config script until the issues are fixed"
We don't need this patch any more. It has been implemented by feeds/openwrt_core/e3c1d70a1774380acc7bb

This reverts commit f52528f806.
2020-03-29 12:23:00 +02:00
Ronny Nilsson
70cacfbe71 sysupgrade: use a lib func for printing to syslog. 2020-03-29 12:22:47 +02:00
Ronny Nilsson
6aa2fe7749 sysupgrade: remove the first boot check. It's handled in corresponding lib func. 2020-03-29 12:22:47 +02:00
Ronny Nilsson
a01a3be0d1 sysupgrade: move UCI diff into a separate function lib
For reuse by other modules as well.
2020-03-29 12:22:47 +02:00
Sukru Senli
f52528f806 wifimngr: do not install keep config script until the issues are fixed 2020-03-28 16:31:02 +01:00
Sukru Senli
bcce414686 port-management: remove sfp management 2020-03-28 15:47:11 +01:00
Sukru Senli
579757f4d9 port-management: call db with -q 2020-03-28 15:45:13 +01:00
Sukru Senli
81841777b9 port-management: populate with correct option 2020-03-28 15:31:04 +01:00
Sukru Senli
392e014872 iop: config: select ethtool by default 2020-03-28 15:28:41 +01:00
Sukru Senli
5557c69ec4 port-management: granularize uci config 2020-03-28 15:26:45 +01:00
vdutta
614a8556d9 ieee1905: On-boarding of ieee1905 device 2020-03-27 17:53:54 +05:30
Benjamin Larsson
db110b74e7 Update feed [ iopsys ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 778735d add missing temperature call
* 87dbafa Read sfp i2c bus device from hw.board.sfpBus instead of hardcoded config in binary, enable temperature readings
* 986c088 Update README.md
* 2816e70 Add sfp data.
* 38791c3 Update README.md
* 385be13 Add empty README.md
-------------------------------------------------------------------------------
commit 778735da4e25e2075a6ecb365850a61ceb4bd515
Author: Benjamin Larsson <benjamin.larsson@iopsys.eu>
Date: 2020-03-25 18:40:58 +0100

    add missing temperature call

Base directory -> /
 src/sfp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 87dbafa7c7e14b6ea7dcd592b8779a71dab128b3
Author: Benjamin Larsson <benjamin.larsson@iopsys.eu>
Date: 2020-03-25 17:03:51 +0100

    Read sfp i2c bus device from hw.board.sfpBus instead of hardcoded config in
    binary, enable temperature readings

Base directory -> /
 src/sfp.c | 55 ++++++++++++++++---------------------------------------
 1 file changed, 16 insertions(+), 39 deletions(-)
-------------------------------------------------------------------------------
commit 986c0887197fc3410c796f2e5777b0c233ee2623
Author: Benjamin Larsson <benjamin.larsson@iopsys.eu>
Date: 2020-03-16 16:24:18 +0100

    Update README.md

Base directory -> /
 README.md | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 2816e70a9e5e68199a4864073311c4cb3cce06bb
Author: Benjamin Larsson <benjamin.larsson@iopsys.eu>
Date: 2020-03-16 15:36:56 +0100

    Add sfp data.

Base directory -> /
 README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)
-------------------------------------------------------------------------------
commit 38791c32e769c195593067d5af7d157cc6725b24
Author: Benjamin Larsson <benjamin.larsson@iopsys.eu>
Date: 2020-03-13 15:38:53 +0100

    Update README.md

Base directory -> /
 README.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)
-------------------------------------------------------------------------------
commit 385be132924cb824b25c9d7adbcaaab4126533b5
Author: Benjamin Larsson <benjamin.larsson@iopsys.eu>
Date: 2020-03-13 13:47:16 +0100

    Add empty README.md

Base directory -> /
 README.md | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
2020-03-26 18:03:15 +01:00
Yalu Zhang
533a7d68eb Fix a compiling error in libtrace for Intel platform 2020-03-26 17:49:14 +01:00
Ronny Nilsson
79f7343cb4 sysupgrade: uci wireless santity checks. 2020-03-26 16:23:07 +01:00
Anjan Chanda
61c11e2520 easy-soc-libs: 3.1.5 2020-03-25 20:58:02 +01:00
vdutta
b91bf2fa67 map-1905: ieee1905d MAP-r2 plugin 2020-03-25 15:42:17 +05:30
Sukru Senli
720e45c20e opkgd: correct Makefile 2020-03-24 08:32:37 +01:00
Amin Ben Ramdhane
08230823d5 bbf-1.2-2020-03-23 2020-03-23 23:31:58 +01:00
Amin Ben Ramdhane
52614cee38 icwmp: 4.0-2020-03-23 2020-03-23 23:21:34 +01:00
Anjan Chanda
e648f237eb wifimngr: 2.7.1 2020-03-23 15:35:51 +01:00
Anjan Chanda
3cc9a2d72e easy-soc-libs: 3.1.4 2020-03-23 15:32:15 +01:00
Sukru Senli
332b6ce7b6 netmode: testnet: use pgrep to check if tesnet is running 2020-03-21 19:42:53 +01:00
Sukru Senli
6aa3467f29 netmode: remove bcm netmodes 2020-03-21 13:07:50 +01:00
Yalu Zhang
644f9b68eb Update packages [ easy-soc-libs ] and [ dslmngr ]
Add module test and documentation of newly added features mainly on
the TEST platform.
2020-03-18 11:15:22 +01:00
vdutta
5b6e76e51c ieee1905: Configure registrar 2020-03-18 12:57:57 +05:30
vdutta
4ffaeace88 ieee1905: wfamap: Fill non 1905 neighbor info 2020-03-12 13:33:09 +05:30
Ronny Nilsson
8814788e9f Update feed [ iopsys ] package [ endptmngr ]
-------------------------------------------------------------------------------
* 156c3f0 Revert linkin with libiqctl. It doesn't build but seems to work without it.
-------------------------------------------------------------------------------
commit 156c3f01d6e48d4cc2ffdcb1eb38ff7656478dd0
Author: Ronny Nilsson <ronny.nilsson@iopsys.eu>
Date: 2020-03-11 13:45:20 +0100

    Revert linkin with libiqctl. It doesn't build but seems to work without it.

Base directory -> /
 src/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2020-03-11 13:54:45 +01:00
Amin Ben Ramdhane
c8355daac5 bbf-1.2-2020-03-10 2020-03-10 23:48:05 +01:00
Ronny Nilsson
fec9e5486c Update feed [ iopsys ] package [ endptmngr ]
-------------------------------------------------------------------------------
* a463f0a Fix compile error with 5.02L07p1 on mips.
-------------------------------------------------------------------------------
commit a463f0a33cbc470acba91782d511c8c60aa830a9
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2020-02-17 13:16:45 +0100

    Fix compile error with 5.02L07p1 on mips.

Base directory -> /
 src/Makefile     | 2 +-
 src/connection.c | 1 +
 src/line-dect.c  | 1 +
 src/line.c       | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2020-03-10 22:18:21 +01:00
Ronny Nilsson
e860576802 sysupgrade: support for diff migration of UCI named sections 2020-03-08 13:00:49 +01:00
Ronny Nilsson
d20f43a756 sdk: remove duplicated login prompts. One is enough.
Only one process at a time can read/write the console.
2020-03-05 16:17:58 +01:00
Ronny Nilsson
de730bc4f0 sdk: Disable preinit urandom seed.
It is very strange. It seeds urandom with data from urandom.
2020-03-05 13:05:39 +01:00
Ronny Nilsson
ce6946ca9b sdk: disable failsafe login during boot.
None seems to use it and it steals time and complexity during boot.
2020-03-05 13:05:39 +01:00
Ronny Nilsson
e73efef313 sdk: skip building of a rootfs tarball due to we never user it.
It only steals long time during build.
2020-03-05 13:05:39 +01:00
Ronny Nilsson
0bdd4644e5 sdk: Delay serial console login prompt until boot has finished. 2020-03-05 13:05:39 +01:00
Yalu Zhang
a2932315c3 Update packages [ easy-soc-libs ]
Fix a build error in libdsl for Intel platform
2020-03-05 11:21:36 +01:00
Yalu Zhang
af7a636751 Update packages [ easy-soc-libs ] and [ dslmngr ]
Also install more header files in libdsl to staging dir
2020-03-04 15:56:21 +01:00
Omar Kallel
a7c83c46cf bbf: Device.security 2020-03-03 16:22:11 +01:00
Ronny Nilsson
64cb92e9e9 Update feed [ iopsys ] package [ natalie-dect-h ]
-------------------------------------------------------------------------------
* f3889dc updated License from RTX
-------------------------------------------------------------------------------
commit f3889dc3f80bed10374f46430009aca24448bdcc
Author: Strhuan Blomquist <strhuan@iopsys.eu>
Date: 2019-10-10 13:28:40 +0200

    updated License from RTX

Base directory -> /
 IntenoLicenseTerms_R01_signed.pdf                      | Bin 517134 -> 0 bytes
 ...tware solutions AB_License-Terms_Oct2019_Signed.pdf | Bin 0 -> 94676 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
-------------------------------------------------------------------------------
2020-03-02 17:42:46 +01:00
Ronny Nilsson
2972baa68b Update feed [ iopsys ] package [ libpicoevent ]
-------------------------------------------------------------------------------
* f4ab03b Add LICENSE
-------------------------------------------------------------------------------
commit f4ab03b22fca57cec6c959fb5c54bcdd64c32467
Author: Sukru Senli <sukru.senli@iopsys.eu>
Date: 2019-09-11 14:40:06 +0200

    Add LICENSE

Base directory -> /
 LICENSE | 308 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 308 insertions(+)
-------------------------------------------------------------------------------
2020-03-02 17:42:24 +01:00
vdutta
3a1b07e868 obuspa: Fix compilation error on gcc-8.3.x 2020-03-02 19:41:02 +05:30
Oussama Ghorbel
f34d0abc6b uboot: update intel_mips bootloader to ugw 8.4.1.50 2020-02-28 17:49:13 +01:00
vdutta
6ad4df7ea0 ieee1905: wfamap: Multiple fixes
- Fix typos
 - Integrate libwifi
 - Integrate libeasy
 - Cleanup
 - Get APIs for tlvs
2020-02-28 13:51:47 +05:30
vdutta
d44433ed59 wfamap: APIs for perparing MAP tlvs 2020-02-26 18:31:24 +05:30
vdutta
e4a4b44719 ieee1905: APIs for perparing tlvs 2020-02-26 18:26:11 +05:30
sverma
a5c2af7a95 obuspa: SYNC commands handling as per TR181-2.13 2020-02-26 14:16:38 +05:30
Ronny Nilsson
0543036ebd sysupgrade: Migrate WiFi settings only if the system has WiFi. 2020-02-25 14:55:46 +01:00
Anjan Chanda
b2b6c19e74 easy-soc-libs: 3.1.3 2020-02-25 10:24:59 +01:00
sverma
c3ecfabfc6 obuspa: ASYNC commands handling as per TR181-2.13 2020-02-24 18:40:11 +05:30
Anjan Chanda
a2c3063520 mt7603: copy eeprom file and update default .dat 2020-02-23 14:18:34 +01:00
Anjan Chanda
c2c28d0cea mt7615: disable multi-profile and enable more features 2020-02-23 14:10:14 +01:00
Amin Ben Ramdhane
0940898f7b bbf: add support for parameter validation 2020-02-21 18:57:26 +01:00
Jonas Höglund
ea29e6bce0 Update feed [ iopsys ] package [ endptmngr ]
-------------------------------------------------------------------------------
* 1092361 Fix compilation error on 5.02L07p1.
* be0e76e Add .gitlab-ci.yml
* 756f603 Revert "Fix a bug in "ubus call endpt status" that report off-hook status wrongly"
* 179d941 Fix a bug in "ubus call endpt status" that report off-hook status wrongly
-------------------------------------------------------------------------------
commit 1092361e274147babb6f750eab3cda2c7df436a1
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2020-02-19 12:58:10 +0100

    Fix compilation error on 5.02L07p1.

Base directory -> /
 src/connection.c | 1 +
 src/line-dect.c  | 1 +
 src/line.c       | 1 +
 3 files changed, 3 insertions(+)
-------------------------------------------------------------------------------
commit be0e76ed7d423e50fd514b04cce128e038a63282
Author: Suru Dissanaike <suru.dissanaike@iopsys.eu>
Date: 2019-12-01 20:08:04 +0100

    Add .gitlab-ci.yml

Base directory -> /
 .gitlab-ci.yml | 10 ++++++++++
 1 file changed, 10 insertions(+)
-------------------------------------------------------------------------------
commit 756f6032012e1398a92f488fa0c9d69640f483ed
Author: Yalu Zhang <yalu.zhang@iopsys.eu>
Date: 2019-11-26 15:56:05 +0100

    Revert "Fix a bug in "ubus call endpt status" that report off-hook status
    wrongly"

    This reverts commit 179d9418662b9c3336cf6dba64848e9f9f680035.

Base directory -> /
 src/ubus.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
commit 179d9418662b9c3336cf6dba64848e9f9f680035
Author: Yalu Zhang <yalu.zhang@iopsys.eu>
Date: 2019-11-26 15:30:02 +0100

    Fix a bug in "ubus call endpt status" that report off-hook status wrongly

    When Tel 1 was off-hook, the ubus call reported Tel 2 was off-hook and vice
    verse.

Base directory -> /
 src/ubus.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2020-02-19 14:59:31 +01:00
vdutta
bd54ff5c52 wfamap: Added forge and parse method for MAP2 TLVs 2020-02-19 19:28:06 +05:30
Amin Ben Ramdhane
11330760dd icwmp: 4.0-2020-02-19 2020-02-19 14:56:24 +01:00
vdutta
7e82a361b5 obuspa: Added proto option in usp object methods 2020-02-19 15:56:04 +05:30
vdutta
8c55345f85 uspd: Support proto in ubus method input
- uspd can be used to perform on usp/cwmp datamodel based on proto option
2020-02-19 15:15:18 +05:30
Jonas Höglund
c29a46aeee Revert "Update feed [ iopsys ] package [ endptmngr ]"
This reverts commit 2f91b5e726.
2020-02-19 09:36:07 +01:00
jjoseph
946b5b3932 bbf: Revert Layer 2 changes 2020-02-19 10:59:02 +05:30
jjoseph
c80f64db82 Updated the commit id in Makefile for Layer 2 changes in bbf. 2020-02-18 16:19:06 +05:30
Anjan Chanda
b4d2e92cb6 iop: fix mediatek kernel generation for consumer release 2020-02-18 09:38:51 +01:00
Jonas Höglund
2f91b5e726 Update feed [ iopsys ] package [ endptmngr ]
-------------------------------------------------------------------------------
* a463f0a Fix compile error with 5.02L07p1 on mips.
* be0e76e Add .gitlab-ci.yml
* 756f603 Revert "Fix a bug in "ubus call endpt status" that report off-hook status wrongly"
* 179d941 Fix a bug in "ubus call endpt status" that report off-hook status wrongly
-------------------------------------------------------------------------------
commit a463f0a33cbc470acba91782d511c8c60aa830a9
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2020-02-17 13:16:45 +0100

    Fix compile error with 5.02L07p1 on mips.

Base directory -> /
 src/Makefile     | 2 +-
 src/connection.c | 1 +
 src/line-dect.c  | 1 +
 src/line.c       | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit be0e76ed7d423e50fd514b04cce128e038a63282
Author: Suru Dissanaike <suru.dissanaike@iopsys.eu>
Date: 2019-12-01 20:08:04 +0100

    Add .gitlab-ci.yml

Base directory -> /
 .gitlab-ci.yml | 10 ++++++++++
 1 file changed, 10 insertions(+)
-------------------------------------------------------------------------------
commit 756f6032012e1398a92f488fa0c9d69640f483ed
Author: Yalu Zhang <yalu.zhang@iopsys.eu>
Date: 2019-11-26 15:56:05 +0100

    Revert "Fix a bug in "ubus call endpt status" that report off-hook status
    wrongly"

    This reverts commit 179d9418662b9c3336cf6dba64848e9f9f680035.

Base directory -> /
 src/ubus.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
commit 179d9418662b9c3336cf6dba64848e9f9f680035
Author: Yalu Zhang <yalu.zhang@iopsys.eu>
Date: 2019-11-26 15:30:02 +0100

    Fix a bug in "ubus call endpt status" that report off-hook status wrongly

    When Tel 1 was off-hook, the ubus call reported Tel 2 was off-hook and vice
    verse.

Base directory -> /
 src/ubus.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2020-02-17 16:09:30 +01:00
Anjan Chanda
aa0fc5a7ed iop: fix mediatek wifi consumer build 2020-02-17 12:23:40 +01:00
Anjan Chanda
b4e1f18cc5 wifilife-2.7.0: use libeasy.so for common helpers 2020-02-17 09:30:19 +01:00
Anjan Chanda
8d43795c34 ifbt-0.3: fix linking against libeasy.so 2020-02-17 09:16:02 +01:00
vdutta
8e957a6c69 wfamap: Added config options 2020-02-17 12:41:48 +05:30
vdutta
db1db9da8d ieee1905: Added config options for ieee1905 2020-02-17 12:40:04 +05:30
Anjan Chanda
301d3a0cd6 mt7615, mt7603: add eeprom and sku data files 2020-02-16 21:45:22 +01:00
Anjan Chanda
39093e4b1a mt7615: rename iNic_ap.dat -> iNIC_ap.dat 2020-02-16 21:24:06 +01:00
Anjan Chanda
a58467cad0 easy-soc-libs: v3.1.2 - fix wps interfaces for mtk 2020-02-16 20:58:12 +01:00
Anjan Chanda
0a3dc9f316 wifi: mediatek driver packages for mt7603 and mt7615
add kernel module packages for following wifi drivers -
  mt7603e v4.1.2.0_20190222
  mt7615e v5.0.4.0_20190503
2020-02-16 19:35:31 +01:00
Ronny Nilsson
47a15eb231 sdk: At first boot; copy factory default to cwmp UCI. 2020-02-14 22:58:20 +01:00
Anjan Chanda
a6b66929e4 easy-soc-libs: v3.1.1, wifimngr: v2.7.0 2020-02-14 16:08:41 +01:00
vdutta
9b1a3ebc71 ieee1905: Added ieee1905 ubus methods
- 86d4406 ieee1905: Added async topology method for local al
 - 4505816 ieee1905: Added ubus methods details in Readme
 - c7a3932 ieee1905: Added multiple ieee1905* ubus methods
 - b815539 ieee1905: Cleanup message queue on exit
2020-02-14 18:36:59 +05:30
Ronny Nilsson
87ec25c82c sysupgrade: Tweak an expression to reduce potential (safe) warning messages. 2020-02-14 12:20:48 +01:00
sverma
8153cf8d74 obuspa: DataModel allignment as per TR181_2.13 2020-02-14 16:13:38 +05:30
Ronny Nilsson
766096cba4 sysupgrade: migration of anonymous section requires checking each.
It is not enough to migrate all or none anonymous section. We
need to check each one individually.
2020-02-13 15:50:51 +01:00
Rahul
dd00b7eb2e qosmngr: merging qosmngr to devel 2020-02-13 18:57:16 +05:30
Yalu Zhang
a60fa6797a Update package [easy-soc⨪libs] and [dslmngr] 2020-02-13 11:22:02 +01:00
vdutta
0f31287335 ieee1905: wfamap: Multiple fixes
- ieee1905:
  -- 439e8ce ieee1905: Updated Readme with ALME over ubus
  -- b441fca ieee1905: Multiple fixes
     --- Added alme over ubus
     --- Redesigned static 63*1024 size buffer allocation for ALME over tcp
     --- Cleanup
     --- Support of blob in DMdumpNetworkDevices API
  -- e550dcc ieee1905: Support of blob in visit_* functions
  -- b940298 ieee1905: cleanup
  -- 09f4af9 ieee1905: Added info for ieee1905 ubus object

- wfamap:
  -- 1c6b48c wfamap: Support for alme over ubus
  -- 0b45bed wfamap: Support for blob in visit_* functions
2020-02-13 13:22:37 +05:30
Ronny Nilsson
5dcde335dd wifi: As part of sysupgrade we migrate the users custom changes to the new fs. 2020-02-12 13:27:44 +01:00
Anjan Chanda
29f49ff674 easy-soc-libs-3.0.1: use consistent apis in libwifi 2020-02-11 13:45:44 +01:00
Anjan Chanda
9ddbbdfe17 wifimngr-2.6.0: use helper library 'libeasy.so' 2020-02-11 12:23:13 +01:00
Anjan Chanda
b23f81f3ba easy-soc-libs: add helper functions library 'libeasy' 2020-02-11 12:22:10 +01:00
Omar Kallel
5b5addb7fc This reverts commit 7de0b7e20d 2020-02-10 15:27:04 +01:00
Omar Kallel
1e9e7be709 Device.UPnP review code 2020-02-10 15:24:36 +01:00
vdutta
bce138d52e ieee1905: Fix race condition in intf access 2020-02-10 16:13:19 +05:30
Ronny Nilsson
7de0b7e20d libbbfdm: depends on libminiupnpc since last update. 2020-02-07 21:12:56 +01:00
Omar Kallel
376ddd4a12 bbf: Device.UPnP. object 2020-02-07 16:42:15 +01:00
Ronny Nilsson
b6399da95b sdk: Try conditional dependencies for icwmp.
The icwmp package has subcomponents which pulls in third party
librarys although they are explicity disabled in the top level
config. This in turn sometimes makes causes build failures.
2020-02-07 16:20:01 +01:00
sverma
295ee80a1a obuspa: Runtime handling for multi-instance objects 2020-02-07 17:48:21 +05:30
vdutta
ac71c9e85f ieee1905: Remove libpicoevent dependency 2020-02-04 19:04:53 +05:30
Amin Ben Ramdhane
d0fc0ffc43 bbf: Update db parameters 2020-02-04 11:37:36 +01:00
sverma
cee4575f63 obuspa: Registered nodes for Device.Services in DB
Functionality added to get object instances only
2020-02-04 15:21:16 +05:30
vdutta
4f1ad101bc obuspa: Vendor hooks for reset related operations 2020-02-04 12:13:47 +05:30
vdutta
9386ec4bc2 ieee1905: Updated readme 2020-02-03 18:38:04 +05:30
Oussama Ghorbel
84af00e784 uboot: update pkg source version
this is an update to ugw-8.4.1.30
2020-02-03 10:37:46 +01:00
vdutta
cc2d40a912 ieee1905: Multiple fixes
- Compile flag for alme tcp server
 - MAP db support in plugin
 - Modification for map lib renaming
 - Cleanup
 - Move alme server to lib1905ubus
2020-01-31 16:17:13 +05:30
vdutta
21b4c960a3 wfamap: Multiple fixes
- MAP db
 - Restoring broken functionalities after re-structuring
 - Renaming library to libwifimap-2.so
 - Cleanup
2020-01-31 16:13:03 +05:30
Roman Azarenko
89df7ce409 Fix "iop genconfig" for public builds
This introduces an extra check to avoid attempting to clone a private customer/consumer repository, when the main SDK repo is cloned via HTTPS.
2020-01-29 11:22:10 +01:00
sverma
97fd03d966 Merge branch 'devel' of dev.iopsys.eu:feed/iopsys into devel 2020-01-28 14:23:54 +05:30
sverma
bdfb498fb6 obuspa: Initialize multi-intsance objects on bootup
Add log-level UCI option
2020-01-28 14:21:03 +05:30
Jonas Höglund
b61bc3cd02 obouspa: Only set up .profile once. 2020-01-27 13:55:40 +01:00
Jonas Höglund
6223a63efe obuspa: Don't overwrite existing .profile. 2020-01-24 16:14:29 +01:00
vdutta
74df3bbd25 ieee1905: Added multiAP plugin support
- ieee1905 stack will call multiAP library functions, if
   -- /usr/lib/libwfamap.so is present in DUT
   -- uci parameter multiap_plugin is enabled in ieee1905
2020-01-24 19:28:51 +05:30
vdutta
4afaeddbda wfamap: Created runtime plugin 2020-01-24 19:28:51 +05:30
sverma
c552774826 uspd: Improve logging for uspd methods 2020-01-24 17:38:43 +05:30
sverma
1335405ccc obuspa: reduce ubus calls to uspd
- Reduce number of ubus calls to uspd on obuspa_get
 - Add uci option to enable/disable obuspa
2020-01-24 17:22:02 +05:30
Oussama Ghorbel
871a3c3907 clean up db and use new variables names 2020-01-23 14:39:32 +01:00
Oussama Ghorbel
8815e230ed questd: upgrade to version 5.0.0
- use cmake
- implement feature #1535: system object model redesign
2020-01-23 14:39:32 +01:00
Ronny Nilsson
0bf21c30c6 owsd: Workaround a bug which cases origin check to fail on LAN.
When the LAN interface has an IPv6 Unique local address owsd gets confused.
IPv4 requests arrive into the virtual IPv6 interface of owsd which makes
the origin check to fail. Workaround the problem by disabling origin check
for LAN. This shouldn't be a problem (?) due to we already has the same
check disabled on WAN by default.
2020-01-23 12:44:59 +01:00
vdutta
e6edca3137 wfamap: Added wfamap 2020-01-23 17:12:30 +05:30
vdutta
7247a2d0d4 ieee1905: Changes to support wfamap library 2020-01-23 17:12:30 +05:30
vdutta
0f62b3f2be ieee1905: Fix compilation for ex400 2020-01-23 12:44:32 +05:30
vdutta
6f2a9d0fd4 uspd: Log level support in uci 2020-01-23 11:43:53 +05:30
vdutta
2910b13325 uspd: Align with new bbfdm changes 2020-01-22 19:20:34 +05:30
vdutta
4d89930dae ieee1905: Restructuring 1905 stack 2020-01-22 18:18:41 +05:30
Amin Ben Ramdhane
c5568cc3a8 icwmp: 4.0-2020-01-21 2020-01-21 23:14:43 +01:00
Amin Ben Ramdhane
d145893c54 bbf-1.1-2020-01-21 2020-01-21 23:09:59 +01:00
Ronny Nilsson
7efa7dc06b sdk: dependency was again incorrect. This time there were issues when building for Mediatek. 2020-01-21 15:57:33 +01:00
Ronny Nilsson
dcc3b5090f sdk: dependency was again incorrect. This time there were issues when building for Mediatek. 2020-01-21 15:57:33 +01:00
Anjan Chanda
2771475f57 Update feed [ iopsys ] package [ wifilife ]
-------------------------------------------------------------------------------
* 6506026 fix CMD_GET_ASSOCLIST request struct size
* 07ca2c6 remove 'wfs_delm.h'
* 3aafa35 define steer policy for sta
-------------------------------------------------------------------------------
commit 6506026c70944cba7611c3e0ffaec3255c73eb32
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2020-01-20 14:59:31 +0100

    fix CMD_GET_ASSOCLIST request struct size

Base directory -> /
 src/agent/agent.c      | 5 ++++-
 src/comm/comm.h        | 2 +-
 src/controller/cntlr.c | 3 +--
 3 files changed, 6 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 07ca2c64287070a637e3a2f6f05f6bdb5a8b7272
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2020-01-20 11:07:26 +0100

    remove 'wfs_delm.h'

Base directory -> /
 src/wfa_delm.h | 164 ---------------------------------------------------------
 1 file changed, 164 deletions(-)
-------------------------------------------------------------------------------
commit 3aafa35aec53b1687423e5e850f553b7a54d7b7a
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2020-01-20 11:02:23 +0100

    define steer policy for sta

Base directory -> /
 src/agent/agent.c         | 32 ++++++++++++++++----------------
 src/agent/agent.h         | 15 +++++++++------
 src/agent/agent_ubus.c    |  6 +++---
 src/agent/default_steer.h | 17 +++++++++++++++--
 src/controller/cntlr.h    |  1 -
 5 files changed, 43 insertions(+), 28 deletions(-)
-------------------------------------------------------------------------------
2020-01-21 09:31:29 +01:00
vdutta
7993de3335 Ticket#434: Fix write access in cifsd init 2020-01-20 10:50:01 +01:00
vdutta
387b9fcfef Ticket#434: Added more cifsd configurabale parameters 2020-01-20 10:50:01 +01:00
Vladimir Vid
456bca5cbb cifsd: add package
* add cifsd - kernel module
* add cifsd-tools - userspace package

Reference repos:

https://github.com/namjaejeon/cifsd
https://github.com/namjaejeon/cifsd-tools

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
2020-01-20 10:50:01 +01:00
jjoseph
10337ed433 wfadatad : Makefile and init.d file changes 2020-01-17 16:54:34 +05:30
Ronny Nilsson
cab7f065f3 Samba 3 depends on the readline library for building. 2020-01-16 15:24:17 +01:00
Ronny Nilsson
e877a0c949 uboot: OpenWrt v19 har changed so /boot is cleaned every build.
Need to defer install of uboot image until after the OpenWrt clean.
2020-01-16 11:39:11 +01:00
Amin Ben Ramdhane
20ce9c5f65 icwmp: 4.0-2020-01-15 2020-01-15 14:37:42 +01:00
vdutta
fc01428650 ieee1905: Support for Openssl 1.1.x series 2020-01-14 16:01:57 +05:30
Ronny Nilsson
18008a9ec9 sdk: Remove build dependencies to bcmopen
From OpenWRT point of view no bcmopen package exist. bcmopen
is really just bcmkernel built with alternate flags.
2020-01-13 15:31:00 +01:00
Jakob Olsson
51180ef90d easy-soc-libs: api updates, fix utilization, rssi and snr 2020-01-13 14:17:59 +01:00
Jakob Olsson
3df32e7860 wifilife: refactor arp flush logic on missing disassoc ev 2020-01-13 14:16:56 +01:00
Jakob Olsson
bb51885313 wifimngr: update in accordance with libwifi api changes 2020-01-13 14:16:08 +01:00
Jonas Höglund
89b623b415 Revert "icwmp: remove unused library"
This reverts commit cb504ababe.
2020-01-09 17:24:07 +01:00
Sukru Senli
061d5c0eef icwmp: 4.0-2019-12-28 2020-01-09 14:57:52 +01:00
Sukru Senli
75869b899c tr098 1.0-2019-12-28 2020-01-09 14:55:29 +01:00
Sukru Senli
ea19916cc4 bbf-1.0-2019-12-28 2020-01-09 14:50:51 +01:00
vdutta
d416df6f86 ieee1905: Add get_topology command 2020-01-09 14:50:51 +01:00
vdutta
72c59bc2ad ieee1905: Pretty print multiAP cmdu events 2020-01-09 14:50:51 +01:00
Amin Ben Ramdhane
5f2b3a3f9b bbf: use src local if the src folder exists 2020-01-09 14:50:51 +01:00
Amin Ben Ramdhane
cb504ababe icwmp: remove unused library 2020-01-09 14:50:51 +01:00
vdutta
ab44d2383e ieee1905: Generating topology/push button event
- Generating topology change event on ubus "client" event
 - Generating push button event on ubus "wifi.wps", "in-progress" event
2020-01-09 14:50:51 +01:00
vdutta
30d72f1683 ieee1905: Added configure Discovery timer uci option 2020-01-09 14:50:51 +01:00
vdutta
45b8a62027 ieee1905: Added support for 1905 multiap extensions 2020-01-09 14:50:51 +01:00
Anjan Chanda
c476a8ec75 wifimngr: 2.5.0 2020-01-09 14:50:51 +01:00
Anjan Chanda
4a3d6e0331 easy-soc-libs: version-2.5.0 2020-01-09 14:50:51 +01:00
vdutta
a947dae5f3 meshcomms: Removing meshcomms pkg
- Removing meshcomms pkg as functionality moved in ieee1905
2020-01-09 14:50:51 +01:00
vdutta
b219be48eb ieee1905: MultiAP code segregation 2020-01-09 14:50:51 +01:00
Amin Ben Ramdhane
87fc510726 icwmp: compile icwmp-tr098d binary only if CONFIG_PACKAGE_icwmp-tr098 is selected 2020-01-09 14:50:46 +01:00
Jonas Höglund
4929ebc503 questd: Remove dependencies on libdsl,ethernet and wifi. 2020-01-09 09:50:10 +01:00
Jonas Höglund
88af9763a0 Fix dependancy error. 2020-01-08 12:00:24 +01:00
Ronny Nilsson
34343d4824 netmode: remove variables from templates which is automatically set on first boot.
In Iopsys 5 each subsystem has to take care of its own data. If netmode modifies
the hostname, SSID etc. It by it self has to generate fully valid UCI data. If
netmode needs help with that it may use the scripts in /rom/etc/uci-defaults
2020-01-07 14:18:47 +01:00
Sukru Senli
708a417086 iop: naming correction: IopsysWrt -> iopsysWrt 2019-12-23 09:56:57 +01:00
Jonas Höglund
e8ba4a8a14 Fix mediatek tarball generation for iop5. 2019-12-20 14:20:57 +01:00
Ronny Nilsson
b2523c14b6 icwmp: In Iopsys 5 each subsystem has to take care of its own data.
OUI in UCI is not created automatically for CWMP (or any
other package). Anyone who needs it has to fix it them self.
2019-12-18 15:26:49 +01:00
Jonas Höglund
2677dd57de icwmp: Remove packet with broken dependancy 2019-12-11 12:55:32 +01:00
Jonas Höglund
df919ded0c Fix dependancy warning for bcmopen 2019-12-11 12:50:03 +01:00
Ronny Nilsson
343ed3993b sdk: Redesign generation of /etc/banner. OpenWrt has built in support for it that we can use instead. 2019-12-11 12:39:42 +01:00
Ronny Nilsson
41b934575e sdk: Clenup of redundant variables. There were several with identical information.
After asking around there were no clear answer to why there were redundant
information. Thus, I'm doing cleanup all over the place to reduce complexity.
2019-12-11 12:39:42 +01:00
Ronny Nilsson
579fd3bf07 sdk: Clenup of redundant variables. There were several with identical information.
After asking around there were no clear answer to why there were redundant
information. Thus, I'm doing cleanup all over the place to reduce complexity.
2019-12-11 12:39:42 +01:00
Sukru Senli
ee30bacc15 tr098: fix compilation issue 2019-12-11 12:35:31 +01:00
Sukru Senli
06bad4b9c4 icwmp: fix compilation issue 2019-12-11 12:35:23 +01:00
Amin Ben Ramdhane
04a08815e7 tr098: 1.0-2019-12-09 2019-12-10 16:25:56 +01:00
Amin Ben Ramdhane
8397922ecd icwmp: 4.0-2019-12-07 2019-12-10 16:24:39 +01:00
Sukru Senli
4de8c13136 bbf: correct license 2019-12-10 16:19:19 +01:00
Strhuan Blomquist
b9b81709af Delete cve-check.sh 2019-12-10 16:19:19 +01:00
Amin Ben Ramdhane
b4c7eb1a3e bbf: 1.0-2019-12-10 2019-12-10 16:19:19 +01:00
Amin Ben Ramdhane
6706e94bc2 libbfdm: add tr157 files to include repo 2019-12-10 16:19:19 +01:00
Amin Ben Ramdhane
44c870e1bb bbf: 1.0-2019-12-07 2019-12-10 16:19:15 +01:00
Amin Ben Ramdhane
4f5c7623d2 opkgd: add new package 2019-12-10 16:19:15 +01:00
vdutta
5ca4ee678b ieee1905: 1905 meshcomms stack integration 2019-12-10 16:19:15 +01:00
Jakob Olsson
ebb112f264 netmode: on revert write backup cfgs prior to commiting and restart network 2019-12-10 16:19:12 +01:00
Jakob Olsson
b30aca1b27 owsd: include fix for memory leak on too many requests 2019-12-10 16:19:10 +01:00
Amin Ben Ramdhane
5d7af4f3c3 bbf: 1.0-2019-11-11 2019-12-10 16:19:06 +01:00
Anjan Chanda
e5204b2fdc Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* 0accbd7 libwifi: intel: show chan utilization instead of load
-------------------------------------------------------------------------------
commit 0accbd7266b2742ad8921edd5dab974fc384a49a
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-27 10:19:28 +0100

    libwifi: intel: show chan utilization instead of load

Base directory -> /
 libwifi/modules/intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2019-12-10 16:19:00 +01:00
Anjan Chanda
ed855b6921 Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* 429988c libwifi: mtk: implement radio info api
* 8e66b90 libwifi: add radio diagnostic struct
-------------------------------------------------------------------------------
commit 429988cbd11edab826355f01b09f0588893b550a
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-24 19:47:59 +0100

    libwifi: mtk: implement radio info api

Base directory -> /
 libwifi/modules/mtk.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++
 libwifi/modules/mtk.h | 57 ++++++++++++++++++++++++++++++++++--
 libwifi/wifi.h        | 35 ++++++++--------------
 3 files changed, 148 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit 8e66b90aeadf95dd69dfc7e067e06073039e87c0
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-22 16:45:41 +0100

    libwifi: add radio diagnostic struct

Base directory -> /
 libwifi/modules/mtk.c |  9 +++++++++
 libwifi/modules/mtk.h | 14 ++++++++++++++
 libwifi/wifi.h        | 18 +++++++++++-------
 3 files changed, 34 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2019-12-10 16:19:00 +01:00
Anjan Chanda
052823c0fd Update feed [ iopsys ] package [ wifimngr ]
-------------------------------------------------------------------------------
* 4b876cc show basic and supported rates in radio status
* aad1a26 add radio info details including diagnostics
-------------------------------------------------------------------------------
commit 4b876ccabc1df73202bfb165b35fd6464ed019aa
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-25 16:54:49 +0100

    show basic and supported rates in radio status

Base directory -> /
 wifimngr.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit aad1a26637b7a1429022d172af43847b2d28ae1c
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-24 19:54:31 +0100

    add radio info details including diagnostics

Base directory -> /
 wifimngr.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 74 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
2019-12-10 16:19:00 +01:00
Yalu Zhang
e5f389aab6 Change line/channel names from tapi/1 and tapi/2 to tapi/0 and tapi1
Unsupported lines/channes like TAPI/[2-6], BRCM/6 are also removed.

This change has the following benefits.
- To simplify the line/channel name handling in /etc/init.d/voice_client
- To have the consistent implementation both on Intel and on Broadcom platforms

(cherry picked from commit 40c426ca09)
2019-12-10 16:19:00 +01:00
vdutta
6bf2135bbc meshcomms: Optimize meshcomms library 2019-12-10 16:19:00 +01:00
vdutta
dcc58ea25a meshcomms: Remove compile time Endianness dependency 2019-12-10 16:19:00 +01:00
Anjan Chanda
8644eb21ab Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* edaace5 libwifi: intel: fix bss utilization and sta count
-------------------------------------------------------------------------------
commit edaace5a36b0dcac66a0371b40a2bc7ed99b4119
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-14 12:24:35 +0100

    libwifi: intel: fix bss utilization and sta count

Base directory -> /
 libwifi/modules/intel.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
-------------------------------------------------------------------------------
2019-12-10 16:19:00 +01:00
vdutta
170a1f6ad8 meshcomms: Add dynamic meshcomms library 2019-12-10 16:19:00 +01:00
Anjan Chanda
362b54c642 Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* d4e760c libwifi: intel: get maxassoc and hidden info in wifi_ap_info
* 703ce26 libwifi: bcm: get maxassoc and hidden info in wifi_ap_info
-------------------------------------------------------------------------------
commit d4e760c73a600749325b2cc6d5554696a6c956f8
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-11 12:25:32 +0100

    libwifi: intel: get maxassoc and hidden info in wifi_ap_info

Base directory -> /
 libwifi/modules/intel.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 703ce26a3e884937ea520c624ee27b88d0991367
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-11 11:34:53 +0100

    libwifi: bcm: get maxassoc and hidden info in wifi_ap_info

Base directory -> /
 libwifi/modules/bcm.c | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2019-12-10 16:18:26 +01:00
Jakob Olsson
d9e28aa3ca questd: print port speed when link is down #571 2019-12-10 16:18:26 +01:00
Ronny Nilsson
a942e21040 endptmngr: support parallell build. 2019-12-10 16:18:26 +01:00
Ronny Nilsson
49dd5d8e31 voice: modified dependencies again. Turns out we need both the old ones AND the new ones
Due to there are TWO dependency systems(!?). One for Kconfig and one for Make. And they
don't cooperate as good as one expects.
2019-12-10 16:18:26 +01:00
Strhuan Blomquist
86757e41a3 added RTX to licenses info 2019-12-10 16:18:26 +01:00
Strhuan Blomquist
3f86658c46 added more info to PROPRIETARY tag 2019-12-10 16:18:26 +01:00
Kenneth Johansson
7fa87aca9d genconfig: mirror var is CONFIG_LOCALMIRROR.
To get the use of the mirror to work.
2019-12-10 16:18:26 +01:00
Jakob Olsson
5259cc9edb questd: relocate locks and move dump client invokes 2019-12-10 16:18:26 +01:00
Anjan Chanda
b39000ea58 Update feed [ iopsys ] package [ wifimngr ]
-------------------------------------------------------------------------------
* 939b0ae rename 11xx_ caps to dot11xx_
* 381cd70 wifi_sta_disconnect() accepts macaddress in bytes
-------------------------------------------------------------------------------
commit 939b0ae989979a1ad1942373791fe230bc3e41ca
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-10-29 16:47:55 +0100

    rename 11xx_ caps to dot11xx_

Base directory -> /
 wifimngr.c | 144 ++++++++++++++++++-------------------------------------------
 1 file changed, 41 insertions(+), 103 deletions(-)
-------------------------------------------------------------------------------
commit 381cd70238230aa7fc56b85369f265272698165f
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-09-23 09:26:41 +0200

    wifi_sta_disconnect() accepts macaddress in bytes

Base directory -> /
 wifimngr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
2019-12-10 16:18:26 +01:00
Anjan Chanda
001d494afd Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* 3ddc5af libwifi: mtk: fix cipher type in get_security
-------------------------------------------------------------------------------
commit 3ddc5af4c29e98c14424fd5d7ef15f72d31b53dc
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-07 12:01:54 +0100

    libwifi: mtk: fix cipher type in get_security

Base directory -> /
 libwifi/modules/mtk.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2019-12-10 16:17:53 +01:00
Sukru Senli
3befafcbc1 bbf: bump version to 1.0-2019-11-05 2019-12-10 16:17:53 +01:00
vdutta
597d866204 easy_qos: Mark packets with iptables and classcfg 2019-12-10 16:17:53 +01:00
Sukru Senli
568b6785d3 easy-qos: use prerouting chain instead of output 2019-12-10 16:17:53 +01:00
Ronny Nilsson
3a7975bd9b iopupgrade: Configuration handling has been moved into the iopu_chroot script. 2019-12-04 15:18:51 +01:00
Ronny Nilsson
e54251dc24 iopupgrade: Less error prone invoke of iopupgrade. 2019-12-04 15:14:41 +01:00
Ronny Nilsson
ec2b9e76c4 iopupgrade: minor typo 2019-12-04 15:11:20 +01:00
Ronny Nilsson
d8b65da11f iopupgrade: Make the watchdog send an alarm only if it fully times out. 2019-12-04 15:10:48 +01:00
Ronny Nilsson
3f124c31f0 iopupgrade: Minor better cleanup. 2019-12-04 15:09:14 +01:00
Ronny Nilsson
b376a0b16a iopupgrade: Kill the watchdog only if it has been started. 2019-12-04 15:07:55 +01:00
Ronny Nilsson
42c0e1ecc8 iopupgrade: Prevent cleaning twice. 2019-12-04 15:06:18 +01:00
Ronny Nilsson
cdce816fd2 iopupgrade: The variables are written as integers and thus should be read as integers. 2019-12-04 15:04:31 +01:00
Ronny Nilsson
a49951ad7e iopupgrade: The post rootfs fixup need some arguments for backward compatibility. 2019-12-04 15:01:04 +01:00
Ronny Nilsson
887cef9b37 iopupgrade: Unify indentation to either space or tab, but not intermixed. 2019-12-04 14:59:30 +01:00
Ronny Nilsson
3ccdcb4140 Double verification of the string before invoking it. 2019-12-03 15:38:58 +01:00
Ronny Nilsson
0a80afc550 iopu: pass on all command line arguments as documented in the Bash manual. 2019-12-03 15:38:04 +01:00
Ronny Nilsson
c5c4a6dcbe iopu: configuration migration is handled via iopu_chroot. Like the bootloader upgrade. 2019-12-03 13:37:41 +01:00
Ronny Nilsson
6f5e41bb76 iopu: Exit with same returncode as the program we invoke. 2019-12-03 12:15:21 +01:00
Kenneth Johansson
20937718f1 iopu: prepare for configuration handling.
for now just print that it does not exist.
add some help text.
2019-12-02 17:58:39 +01:00
Kenneth Johansson
f7b13cf973 iopu: add -c option to run any command in the newroot env.
Also fix so that it is safe to ctrl-c in all cases and not get
bind mounts hanging around.

if command has arguments make the entire command a string like.

iopu -c "cat /etc/os-release"
2019-12-02 17:35:46 +01:00
Ronny Nilsson
946b7a453c busybox: add run-parts and mountpoint, for use in future sysupgrade copy config. 2019-11-29 13:41:18 +01:00
Jonas Höglund
fcf102b9d2 Use inotify-tools from openwrt-packages 2019-11-26 14:22:57 +01:00
Jonas Höglund
6355eb4b9e Remove deleted package from config. 2019-11-26 11:18:51 +01:00
Jonas Höglund
315d7b44f9 Remove deprecated wifixd 2019-11-26 10:53:32 +01:00
Jonas Höglund
6c342e930d Fix spelling error 2019-11-26 10:40:38 +01:00
Jonas Höglund
624e67df4b There is no kmod-ipv6 2019-11-26 10:21:52 +01:00
Jonas Höglund
8f2694b035 There is no libwifix 2019-11-26 10:20:40 +01:00
Jonas Höglund
776baa7c95 There is no libdatamodel 2019-11-26 10:19:26 +01:00
Jonas Höglund
baff3cf6c7 There is no libzstream package 2019-11-26 10:12:04 +01:00
Jonas Höglund
a5e007a3b6 Add shflags for icwmp 2019-11-26 10:10:07 +01:00
Jonas Höglund
23b88839a0 Define package to fix dependency issue 2019-11-25 16:13:53 +01:00
Jonas Höglund
ddc1933862 Remove deprecated package 2019-11-25 15:57:47 +01:00
Jonas Höglund
50e836e3e7 Remove unneeded packages 2019-11-25 15:18:44 +01:00
Jonas Höglund
e3f7ad9156 Fix conditional dependancy. 2019-11-25 14:22:51 +01:00
Jonas Höglund
73d9e5a6f1 Add librpc 2019-11-22 14:46:18 +01:00
Jonas Höglund
73124c3d37 Overwrite from openwrt_core 2019-11-20 15:12:48 +01:00
Jonas Höglund
be2a34fcb4 iop: Remove base-files from default packages.
Base-files extraction is broken. Apply initial commit from existing
base-files branch and modify extract_core.sh like so:

- orphan_branch tmp
+ # orphan_branch tmp
+  git checkout $repo

Then extract base-files.
2019-11-20 11:48:30 +01:00
Jonas Höglund
a3f8d33711 iop: Update extract core for iop5 2019-11-20 10:35:17 +01:00
Jonas Höglund
a500724e17 Add libmicroxml from lede-managment 2019-11-19 10:41:24 +01:00
Jonas Höglund
ab4b8f3373 Update feed [ iopsys ] package [ libtr098 ]
-------------------------------------------------------------------------------
* 65bd1d7 Fix linker issue for iop5
-------------------------------------------------------------------------------
commit 65bd1d77eb85a2d5d3d55e5c68abd38268b89ec8
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2019-11-14 15:13:16 +0100

    Fix linker issue for iop5

Base directory -> /
 tr098/wandevice.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2019-11-14 15:15:19 +01:00
Jonas Höglund
bc0452e56d Update feed [ iopsys ] package [ icwmp ]
-------------------------------------------------------------------------------
* 9cfbfa9 Resolve linker problem in iop5
-------------------------------------------------------------------------------
commit 9cfbfa9a381d372643fe18f8c258779bed3ee3bd
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2019-11-14 14:50:44 +0100

    Resolve linker problem in iop5

Base directory -> /
 event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2019-11-14 14:50:58 +01:00
Anjan Chanda
da92efc708 Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* 63f749f libwifi: intel: populate fields in ap info
* 61ab677 libwifi: intel: implement add/del vendor ie
* b9026d6 libwifi: intel: implement monitor sta
-------------------------------------------------------------------------------
commit 63f749faa67670229a5cbaf39ee0fef92d8276f3
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-04 14:48:49 +0100

    libwifi: intel: populate fields in ap info

Base directory -> /
 libwifi/modules/intel.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 61ab677a480f2bc87e117c720d1ae32ff91b665e
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-10-10 15:06:43 +0200

    libwifi: intel: implement add/del vendor ie

Base directory -> /
 libwifi/modules/intel.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
-------------------------------------------------------------------------------
commit b9026d620fba8df6f886dbb938383e1662f40ae5
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-10-09 15:02:21 +0200

    libwifi: intel: implement monitor sta

Base directory -> /
 libwifi/modules/intel.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 72 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2019-11-04 15:18:19 +01:00
Anjan Chanda
ba98d3e7aa Update feed [ iopsys ] package [ wifilife ]
-------------------------------------------------------------------------------
* 878ad93 agent: do not trigger scan when ssid is blank
* 0172e3e Add LICENSE
* 2884e00 cppcheck: add 'check' target in Makefile
-------------------------------------------------------------------------------
commit 878ad93c0f1ad49bd187f776808e0b86402b2238
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-04 14:43:09 +0100

    agent: do not trigger scan when ssid is blank

Base directory -> /
 src/agent/agent.c | 67 ++++++++++++++++++++++++++++++-------------------------
 1 file changed, 37 insertions(+), 30 deletions(-)
-------------------------------------------------------------------------------
commit 0172e3e0ae6872f5568b02a820b0583f6d3b93af
Author: Strhuan Blomquist <strhuan@iopsys.eu>
Date: 2019-10-31 10:31:27 +0100

    Add LICENSE

Base directory -> /
 LICENSE | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
-------------------------------------------------------------------------------
commit 2884e003560880aec1b7264db8a653d718aaa047
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-10-29 16:33:02 +0100

    cppcheck: add 'check' target in Makefile

Base directory -> /
 src/Makefile           | 14 ++++++++++++++
 src/agent/agent.c      | 14 +++++++-------
 src/controller/cntlr.c |  6 +++++-
 src/utils/alloctrace.c |  4 ++--
 4 files changed, 28 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
2019-11-04 15:16:02 +01:00
Reidar Cederqvist
019a02fa7f asterisk: fix No call logs for internal calls
Remove the check of sip user so that the internal call can be parsed as call log.
2019-11-04 10:26:02 +01:00
Amin Ben Ramdhane
42d496107e bbf: 1.0-2019-11-02 2019-11-02 12:23:19 +01:00
vdutta
549378ecbd uspd: Updated readme document 2019-11-01 19:19:19 +05:30
vdutta
c0bef6ce70 meshcomms: Add lan in interface list 2019-11-01 17:26:09 +05:30
vdutta
97853638bf meshcomms: Broadcast received CMDUs as ubus event
Description:
 - Broadcast event format
   `{"address": "String", "version":Integer, "type":Integer, "mid":Integer, "relay":Integer, "data":"String"}`
 - Example event
 `{ "meshcomms": {"address":"34:e3:80:76:01:21","version":0,"type":2,"mid":24104,"relay":0,"data":"000000025e280080000000"} }`
 - Address in broadcast event is the received macaddress of CMDU
2019-11-01 15:16:20 +05:30
yyashvardhan
a968641bd1 ieee1905: Broadcast meshcomms event on ieee1905.event 2019-11-01 13:52:06 +05:30
Strhuan Blomquist
e7c8c56819 added licenses tag in the right place 2019-10-31 16:35:42 +01:00
Strhuan Blomquist
f4b1bf345c Update Makefile 2019-10-31 10:57:05 +01:00
Strhuan Blomquist
6d212ecea3 Updated packages in iopsys feeds to have licenses info 2019-10-31 10:34:16 +01:00
yyashvardhan
444a5a0c82 ieee1905: Added package dependencies 2019-10-31 12:48:36 +05:30
yyashvardhan
b2fce09a7f ieee1905: Added new package 2019-10-31 12:34:45 +05:30
Strhuan Blomquist
6fe9ad271e libpicoevent:added licenses info. 2019-10-30 16:36:50 +01:00
Ronny Nilsson
7677e51aeb Endptmngr: rework dependencies of the Broadcom kernel
Due to OpenWRT tries to be smart with them, but fails.
2019-10-30 15:20:51 +01:00
Strhuan Blomquist
9724913f14 iop: added option to create a license report after a build 2019-10-30 13:49:46 +01:00
vdutta
99925c9360 meshcomms: Added Package 2019-10-30 17:25:16 +05:30
Ronny Nilsson
621ca1c23a icwmp: clean a recursive make dependency. 2019-10-30 11:05:01 +01:00
vdutta
316e7d1d47 uspd: Fixed signedness related warnings 2019-10-30 12:54:13 +05:30
Ronny Nilsson
8ebe2c7f5a ated: Convert improper C-comments to Make-comments. 2019-10-29 17:30:07 +01:00
Ronny Nilsson
0b4be48bf3 voice applications: add build dependency of generic voice support. 2019-10-29 16:31:56 +01:00
Ronny Nilsson
f680ff2229 Dect: add build dependency for the endptmngr application which is needed in runtime. 2019-10-29 16:31:56 +01:00
Sachin Singla
60034eab91 ifbt: fix issue when key name is same 2019-10-29 14:59:32 +01:00
vdutta
6d539c17a7 obuspa: Fix output of async command for Controller 2019-10-22 19:48:24 +05:30
Anjan Chanda
2c06bbeaf0 Update feed [ iopsys ] package [ wifilife ]
-------------------------------------------------------------------------------
* daa3db5 cppcheck: fix errors and important warnings
* 339f2ee README: update for new wifilife config
-------------------------------------------------------------------------------
commit daa3db5baf7336a4ddd6fa57af944e2fd131396b
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-10-21 15:56:56 +0200

    cppcheck: fix errors and important warnings

Base directory -> /
 src/agent/agent.c                | 26 ++++++++++++++++++++------
 src/controller/cntlr.c           | 10 +++++-----
 src/controller/cntlr_comm_ubus.c |  6 ++++--
 src/utils/utils.c                |  2 +-
 4 files changed, 30 insertions(+), 14 deletions(-)
-------------------------------------------------------------------------------
commit 339f2eefe9117eac3d20c7e1b86c7540cefedacf
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-10-21 09:49:08 +0200

    README: update for new wifilife config

Base directory -> /
 README.md | 269 ++++++++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 193 insertions(+), 76 deletions(-)
-------------------------------------------------------------------------------
2019-10-22 10:39:15 +02:00
Suru Dissanaike
d36147601b wifilife: remove -Og optimization 2019-10-18 09:20:05 +02:00
Suru Dissanaike
cb3c2d4b0e json-editor: update copyright 2019-10-18 09:02:30 +02:00
Jakob Olsson
e11950b9a1 json-editor: add pkg to simulate javascript style json api 2019-10-18 08:57:42 +02:00
Amin Ben Ramdhane
901c2df5cf bbf: 1.0-2019-10-17 2019-10-17 16:11:15 +01:00
Amin Ben Ramdhane
504621b64b icwmp: 4.0-2019-10-17 2019-10-17 16:08:51 +01:00
Amin Ben Ramdhane
916ac0eea7 Add json folder under /etc/bbfdm/ 2019-10-17 16:03:23 +01:00
yyashvardhan
d7859ebe06 obuspa: Registered some more datamodel nodes 2019-10-17 17:55:36 +05:30
vdutta
c96e9c170a obuspa: Rebase with v2.0.0
Description:
 - Rebase with obuspa v2.0.0
 - Added more configurable options in obuspa uci
 - Optimized default db generation from uci
 - moved interface from connection to global obuspa context in uci
2019-10-16 17:10:43 +05:30
Reidar Cederqvist
9cb726d649 voice-client: do not overwrite tx/rx gain 2019-10-16 09:44:33 +02:00
Reidar Cederqvist
c3bb2895dc Endptmngr: unset patch_dir for open builds
to avoid patching the binaries downloaded when building open builds
2019-10-15 16:24:45 +02:00
Ronny Nilsson
f9f19d1e0c add workaround for EG400 endpt status call
fix for the GUI when board-profile has dect but
dect card is unpopulated
2019-10-15 14:16:23 +02:00
Strhuan Blomquist
df03c86b1d buildsystem iop:add support to generate CVE reports to iop 2019-10-15 09:54:18 +02:00
Jakob Olsson
72aba70aaf wifilife: poll for wifimngr status till success 2019-10-15 09:47:35 +02:00
Jakob Olsson
09e20e451a owsd: allow ubus.object.* events if access specified to affected obj in acl #267 2019-10-14 12:38:16 +02:00
Jakob Olsson
743a9fb0ac wifilife: get mobid & oui on new proxy obj 2019-10-11 15:50:45 +02:00
vdutta
605d816076 uspd: Added support for add/delete of objects 2019-10-10 18:50:30 +05:30
vdutta
7319e7d6aa obuspa: Add support for add/delete of objects 2019-10-10 18:49:43 +05:30
Anjan Chanda
e89954c0c0 easy-soc-libs: libwifi: implement 11k and 11v apis for intel wifi 2019-10-09 10:52:53 +02:00
Jakob Olsson
dcc6644b6e questd: on intel always explicitly show port speed when not 1000mbps autoneg #571 2019-10-08 14:56:31 +02:00
Anjan Chanda
26a5a54673 wifilife: meld misc bugfixes and cleanups from 4.3 2019-10-04 15:03:38 +02:00
Anjan Chanda
a5d00e28d6 easy-soc-libs: libwifi: remove nbr_header from struct nbr 2019-10-04 14:35:16 +02:00
yyashvardhan
d5ab22bcbf obuspa: Added support for IP Diagnostic commands 2019-10-04 16:06:08 +05:30
267 changed files with 5561 additions and 16611 deletions

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2019 iopsys Software Solutions AB. All rights reserved.
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#
# Copyright (C) 2019 iopsys Software Solutions AB. All rights reserved.
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

View File

@@ -1,41 +1,59 @@
#
# Copyright (C) 2019 Iopsys
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=1.0-2019-10-01
PKG_VERSION:=1.6-2020-08-25
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b3bae9df19df35075ac52f53758288d8e0573790
PKG_SOURCE_VERSION:=bfe14a431d408614ed30e2d831ebd927eab719e2
PKG_RELEASE=$(PKG_SOURCE_VERSION)
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)
PKG_LICENSE:=GPLv2
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/libbbf_api
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for libbbfdm API
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
endef
define Package/libbbfdm
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for broadband-forum data model
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libbbf_api +libopenssl +libmbedtls
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
define Package/libbbfdm/description
Test description will update later.
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, TR143, TR157 and TR064 data models
endef
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_LIBBBFDM_VENDOR_PREFIX)\\\"
TARGET_CFLAGS += \
@@ -66,22 +84,43 @@ CONFIGURE_ARGS += \
--enable-tr064
endif
ifeq ($(CONFIG_PACKAGE_libopenssl),y)
CONFIGURE_ARGS += \
--enable-libopenssl
endif
ifeq ($(CONFIG_PACKAGE_libmbedtls),y)
CONFIGURE_ARGS += \
--enable-libmbedtls
endif
define Package/libbbf_api/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbf_api.so* $(1)/lib/
endef
define Package/libbbfdm/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
$(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
$(CP) $(PKG_BUILD_DIR)/dmtree/tr181/*.h $(1)/usr/include/libbbfdm/
$(CP) $(PKG_BUILD_DIR)/dmtree/tr157/*.h $(1)/usr/include/libbbfdm/
$(CP) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbf_api.{a,so*} $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libbbf_api))
$(eval $(call BuildPackage,libbbfdm))

53
cifsd-tools/Makefile Normal file
View File

@@ -0,0 +1,53 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=cifsd-tools
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/namjaejeon/cifsd-tools.git
PKG_SOURCE_DATE:=2019-02-14
PKG_SOURCE_VERSION:=a7d7dfc40524b88dbcb2052034a75f446b3cefdd
PKG_MIRROR_HASH:=a74f95a79c3cdcc78e66c080729141abee0d821e21a326d88b11d849738314fb
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/cifsd-tools
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
TITLE:=Kernel CIFS/SMB server support and userspace tools
DEPENDS:=+kmod-fs-cifsd +glib2 +libnl-core +libnl-genl $(ICONV_DEPENDS)
endef
define Package/cifsd-tools/description
Userspace tools (cifsd, cifsadmin) for the CIFS/SMB kernel fileserver.
The config file location is /etc/cifs/smb.conf
endef
define Package/cifsd-tools/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcifsdtools.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/cifs
$(INSTALL_CONF) $(PKG_BUILD_DIR)/smb.conf.example $(1)/etc/cifs
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/cifsd.config $(1)/etc/config/cifsd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/cifsd.init $(1)/etc/init.d/cifsd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{cifsadmin,cifsd} $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,cifsd-tools))

View File

@@ -0,0 +1,9 @@
config global 'global'
option server_string 'CIFSD on OpenWRT'
option ipc_timeout '8' # IPC timeout is used as a workaround for uninterruptible sleep until this is fixed upstream.
config share
option name 'share'
option comment 'Default guest share'
option path '/mnt'
option guest_ok 'yes'

View File

@@ -0,0 +1,161 @@
#!/bin/sh /etc/rc.common
START=90
USE_PROCD=1
PROG=/usr/sbin/cifsd
USER_DB=/etc/cifs/cifsdpwd.db
CIFS_ADMIN=cifsadmin
EXTRA_COMMANDS="users"
EXTRA_HELP=" users Show list of users created by cifsadmin"
users() {
[ -f "$USER_DB" ] && cut -d ':' $USER_DB -f1 || \
printf "No users available.\n"
}
validate_cifsd_global() {
uci_validate_section cifsd global global \
'server_string:string' \
'workgroup:string' \
'netbios_name:string' \
'interface:string' \
'ipc_timeout:uinteger'
}
validate_cifsd_share() {
uci_validate_section cifsd share "${1}" \
'name:string' \
'comment:string' \
'path:string' \
'guest_ok:bool' \
'read_only:bool' \
'allow_hosts:list' \
'deny_hosts:list' \
'users:string' \
'invalid_users:string' \
'create_mask:string' \
'dir_mask:string' \
'max_connections:uinteger' \
'veto_files:list'
}
validate_cifsd_users() {
uci_validate_section cifsd users "${1}" \
'user:string' \
'password:string' \
'desc:string'
}
load_cifsd_global() {
local server_string
local workgroup
local netbios_name
local ipc_timeout
validate_cifsd_global
echo -e "[global]" >> /var/etc/cifsd.conf
[ -n "$server_string" ] && echo -e "\tserver string = $server_string" >> /var/etc/cifsd.conf
[ -n "$workgroup" ] && echo -e "\tworkgroup = $workgroup" >> /var/etc/cifsd.conf
[ -n "$netbios_name" ] && echo -e "\tnetbios name = $netbios_name" >> /var/etc/cifsd.conf
[ -n "$ipc_timeout" ] && echo -e "\tipc timeout name = $ipc_timeout" >> /var/etc/cifsd.conf || \
echo -e "\tipc timeout name = 8" >> /var/etc/cifsd.conf
}
load_cifsd_share() {
local name
local comment
local path
local guest_ok
local allow_hosts
local deny_hosts
local users
local invalid_users
local max_connections
local veto_files
local dir_mask
local create_mask
local read_only
validate_cifsd_share ${1}
if [ -z "$name" -o -z "$path" ]; then
logread -t ${0} "Missing name or path."
return
fi
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/cifsd.conf
[ -n "$comment" ] && echo -e "\tcomment = $comment" >> /var/etc/cifsd.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/cifsd.conf
[ -n "$allow_hosts" ] && echo -e "\tallow hosts = $allow_hosts" >> /var/etc/cifsd.conf
[ -n "$deny_hosts" ] && echo -e "\tdeny hosts = $deny_hosts" >> /var/etc/cifsd.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/cifsd.conf
[ -n "$invalid_users" ] && echo -e "\tinvalid users = $invalid_users" >> /var/etc/cifsd.conf
[ -n "$max_connections" ] && echo -e "\tmax connections = $max_connections" >> /var/etc/cifsd.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/cifsd.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/cifsd.conf
if [ -n "$read_only" ]; then
echo -e "\tread only = $read_only" >> /var/etc/cifsd.conf
if [ "${read_only}" -eq "0" ]; then
echo -e "\twrite ok = 1" >> /var/etc/cifsd.conf
fi
else
echo -e "\twrite ok = 1" >> /var/etc/cifsd.conf
fi
[ -n "$veto_files" ] && echo -e "\tveto files = $veto_files" >> /var/etc/cifsd.conf
}
load_cifsd_users() {
local user
local password
local desc
validate_cifsd_users ${1}
[ $(which ${CIFS_ADMIN}) ] || {
logread -t ${0} "${CIFS_ADMIN} tools is not available"
return;
}
cifsadmin -a "${user}" -p "${password}"
if [ "$?" -ne 0 ]; then
logread -t ${0} "Failed to create/update ${user}"
fi
}
service_triggers()
{
procd_add_config_trigger "config.change" "cifsd" /etc/init.d/cifsd restart
}
init_config() {
[ -f "/var/etc/cifsd.conf" ] && rm /var/etc/cifsd.conf
config_load cifsd
load_cifsd_global
# Delete existing users
[ -f "${USER_DB}" ] && {
rm -f "${USER_DB}"
}
config_foreach load_cifsd_users users
config_foreach load_cifsd_share share
}
start_service() {
. /lib/functions.sh
init_config
[ ! "$(grep cifsd /proc/modules)" ] && modprobe cifsd
procd_open_instance
procd_set_param command /usr/bin/env LANG=en_US.UTF-8 $PROG -c /var/etc/cifsd.conf
procd_set_param respawn
procd_close_instance
}
stop_service() {
killall cifsd
# IPC timeout will kill the remaining processes.
}

View File

@@ -0,0 +1,73 @@
For some reason, fs.h on Inteno kernel is missing inode->i_mutex nesting subclasses for the lock validator
which is triggering implicit declaration error. To workaround this hardcore use of mutex_lock by removing
kernel version check.
---
--- a/vfs.c
+++ b/vfs.c
@@ -544,15 +544,9 @@ int cifsd_vfs_setattr(struct cifsd_work
attrs->ia_valid |= ATTR_CTIME;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_lock(inode);
- err = notify_change(dentry, attrs, NULL);
- inode_unlock(inode);
-#else
mutex_lock(&inode->i_mutex);
err = notify_change(dentry, attrs, NULL);
mutex_unlock(&inode->i_mutex);
-#endif
if (update_size)
put_write_access(inode);
@@ -753,11 +747,8 @@ int cifsd_vfs_remove_file(char *name)
if (!dir->d_inode)
goto out;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_lock_nested(dir->d_inode, I_MUTEX_PARENT);
-#else
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
-#endif
+
dentry = lookup_one_len(last, dir, strlen(last));
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
@@ -783,11 +774,7 @@ int cifsd_vfs_remove_file(char *name)
dput(dentry);
out_err:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_unlock(dir->d_inode);
-#else
mutex_unlock(&dir->d_inode->i_mutex);
-#endif
out:
path_put(&parent);
return err;
@@ -1302,11 +1289,8 @@ int cifsd_vfs_unlink(struct dentry *dir,
int err = 0;
dget(dentry);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_lock(dir->d_inode);
-#else
mutex_lock(&dir->d_inode->i_mutex);
-#endif
+
if (!dentry->d_inode || !dentry->d_inode->i_nlink) {
err = -ENOENT;
goto out;
@@ -1318,11 +1302,8 @@ int cifsd_vfs_unlink(struct dentry *dir,
err = vfs_unlink(dir->d_inode, dentry, NULL);
out:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_unlock(dir->d_inode);
-#else
mutex_unlock(&dir->d_inode->i_mutex);
-#endif
+
dput(dentry);
if (err)
cifsd_debug("failed to delete, err %d\n", err);

60
cifsd/Makefile Normal file
View File

@@ -0,0 +1,60 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=cifsd
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/namjaejeon/cifsd.git
PKG_SOURCE_DATE:=2019-03-05
PKG_SOURCE_VERSION:=e1715ce125d55b125b1b58a6f1819ef8e54cc3ba
PKG_MIRROR_HASH:=521585ebfda0ecc02372b1a38ebf762fbbcead6d0b754a47599a5bf6bfdb3fb6
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define KernelPackage/fs-cifsd
SUBMENU:=Filesystems
TITLE:=CIFS/SMB kernel server support
FILES:=$(PKG_BUILD_DIR)/cifsd.$(LINUX_KMOD_SUFFIX)
DEPENDS+= \
+kmod-nls-base \
+kmod-nls-utf8 \
+kmod-crypto-md4 \
+kmod-crypto-md5 \
+kmod-crypto-hmac \
+kmod-crypto-ecb \
+kmod-crypto-des \
+kmod-crypto-sha256 \
+kmod-crypto-cmac \
+kmod-crypto-sha512 \
+kmod-crypto-aead \
+kmod-crypto-ccm
KCONFIG:= \
CONFIG_KEYS=y \
CONFIG_CRYPTO_ARC4=y
endef
define KernelPackage/fs-cifsd/description
Kernel module for a CIFS/SMBv2,3 fileserver.
endef
TARGET_CFLAGS+= -DCONFIG_CIFSD_ACL
MAKE_OPTS:=\
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
M="$(PKG_BUILD_DIR)"
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CONFIG_CIFS_SERVER=m \
modules
endef
$(eval $(call KernelPackage,fs-cifsd))

View File

@@ -0,0 +1,69 @@
--- a/vfs.c
+++ b/vfs.c
@@ -544,15 +544,9 @@ int cifsd_vfs_setattr(struct cifsd_work
attrs->ia_valid |= ATTR_CTIME;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_lock(inode);
- err = notify_change(dentry, attrs, NULL);
- inode_unlock(inode);
-#else
mutex_lock(&inode->i_mutex);
err = notify_change(dentry, attrs, NULL);
mutex_unlock(&inode->i_mutex);
-#endif
if (update_size)
put_write_access(inode);
@@ -753,11 +747,8 @@ int cifsd_vfs_remove_file(char *name)
if (!dir->d_inode)
goto out;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_lock_nested(dir->d_inode, I_MUTEX_PARENT);
-#else
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
-#endif
+
dentry = lookup_one_len(last, dir, strlen(last));
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
@@ -783,11 +774,7 @@ int cifsd_vfs_remove_file(char *name)
dput(dentry);
out_err:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_unlock(dir->d_inode);
-#else
mutex_unlock(&dir->d_inode->i_mutex);
-#endif
out:
path_put(&parent);
return err;
@@ -1302,11 +1289,8 @@ int cifsd_vfs_unlink(struct dentry *dir,
int err = 0;
dget(dentry);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_lock(dir->d_inode);
-#else
mutex_lock(&dir->d_inode->i_mutex);
-#endif
+
if (!dentry->d_inode || !dentry->d_inode->i_nlink) {
err = -ENOENT;
goto out;
@@ -1318,11 +1302,8 @@ int cifsd_vfs_unlink(struct dentry *dir,
err = vfs_unlink(dir->d_inode, dentry, NULL);
out:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
- inode_unlock(dir->d_inode);
-#else
mutex_unlock(&dir->d_inode->i_mutex);
-#endif
+
dput(dentry);
if (err)
cifsd_debug("failed to delete, err %d\n", err);

View File

@@ -4,16 +4,15 @@ 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)
nr=$(db get hw.board.serial_number)
hw=$(db get hw.board.model_name)
fam=$(db get hw.board.iopVerFam)
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}
scp -S /usr/sbin/logssh /proc/last_kmsg log@${server}:log/${fam}_${hw}_${sw}_${nr}
if [ $? == 0 ]
then
break;
@@ -28,7 +27,7 @@ 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 set system.crashlog.server="crashlog.iopsys.eu"
/sbin/uci commit
}

View File

@@ -20,7 +20,7 @@ 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 set system.corelog.server="corelog.iopsys.eu"
/sbin/uci commit
}
@@ -50,12 +50,11 @@ cat >$TMP_CORE
# 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)
nr=$(db get hw.board.serial_number)
hw=$(db get hw.board.model_name)
fam=$(hw.board.iopVerFam)
sw=$(db get hw.board.iopVersion)
scp -S /usr/sbin/logssh $TMP_CORE log@${server}:log/core_${1}_${2}_${bid}_${hwv}_${hw}_${sw}_${nr}
scp -S /usr/sbin/logssh $TMP_CORE log@${server}:log/core_${1}_${2}_${fam}_${hw}_${sw}_${nr}
rm $TMP_CORE

View File

@@ -16,7 +16,6 @@ PKG_NAME:=dectmngr2
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -30,7 +29,7 @@ define Package/dectmngr2
CATEGORY:=Utilities
TITLE:=Dectmngr2
URL:=
DEPENDS:= +natalie-dect-h bcmkernel +libubox +ubus +libpicoevent
DEPENDS:= +natalie-dect-h bcmkernel +libubox +ubus +libpicoevent endptmngr
endef
define Package/dectmngr2/description

View File

@@ -12,7 +12,7 @@ if [ -e "/proc/nvram/BoardId" ]; then
echo "0xfffffff2" >/proc/nvram/ulBoardStuffOption
db -q batch <<-EOT
set hw.board.hasDect=1
set hw.board.has_dect=1
commit hw.board
EOT
fi

View File

@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.0.0
PKG_VERSION:=1.0.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=7522faab4142fe2c0ac8cbf71bb0cc5bd49f0750
PKG_SOURCE_VERSION:=63525fe43aa57a710bb097e4c0ed496c4032db6d
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
endif
@@ -45,7 +45,7 @@ define Package/dslmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=XDSL status and configration utility
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +easy-soc-libs
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl
endef
define Package/dslmngr/description
@@ -56,6 +56,7 @@ 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 += \

View File

@@ -4,6 +4,7 @@ START=99
USE_PROCD=1
RULE_LIST="/tmp/easy_qos_rule.list"
CLIENT_LIST="/tmp/easy_qos_class_client.list"
BRIDGE_INTF=""
[ -f /etc/profile.d/intel.sh ] && {
@@ -16,6 +17,13 @@ log() {
}
exec_log() {
${@}
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
fi
}
exec_class_log() {
${@} |grep -i successful
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
@@ -46,6 +54,114 @@ get_priority() {
esac
}
get_mark() {
local prio=$(echo $1|tr [A-Z] [a-z]);
case "${prio}" in
"lowest")
echo "0x41/0x3df";;
"low")
echo "0x82/0x3df";;
"besteffort")
echo "0xc3/0x3df";;
"normal")
echo "0x104/0x3df";;
"video")
echo "0x145/0x3df";;
"medium")
echo "0x186/0x3df";;
"high")
echo "0x1c7/0x3df";;
"highest")
echo "0x208/0x3df";;
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
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"
}
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_ip_rule() {
local proto=$1; shift
local src_ip=$1; shift
local mark=$1; shift
local ports=$1;
local cmd="";
cmd="-j EXTMARK --set-mark ${mark}";
if [ "${proto}" != "icmp" ]; then
if [ -n "${ports}" ]; then
cmd="--match multiport --dports ${ports} ${cmd}";
fi
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}
}
is_lan_bridge() {
local _section=$1
local _type
@@ -67,10 +183,10 @@ get_bridge_interface() {
validate_rule_section()
{
uci_validate_section easy_qos rule "${1}" \
'priority:string:none' \
'macaddr:string:none' \
'priority:string' \
'macaddr:string' \
'proto:string:none' \
'port:list(uinteger):none' \
'port:list(uinteger)' \
'comment:string:none'
}
@@ -82,8 +198,14 @@ clear_existing_rules() {
while read line
do
log "Deleting old classification rules"
exec_log classcfg -D ${line} -i ${BRIDGE_INTF}
exec_class_log classcfg -D ${line} -i ${BRIDGE_INTF}
done <${RULE_LIST}
local rule=$(iptables -t mangle -S PREROUTING|grep -m 1 EXTMARK |sed 's/-A/-D/1')
while [ -n "${rule}" ]; do
exec_log iptables -t mangle ${rule}
rule=$(iptables -t mangle -S PREROUTING|grep -m 1 EXTMARK |sed 's/-A/-D/1')
done
sync
[ -f ${RULE_LIST} ] && rm ${RULE_LIST}
@@ -104,13 +226,16 @@ create_rule() {
if [ "${mac_addr}" != "none" ]; then
cmd="--smac ${mac_addr} ${cmd}";
fi
if [ "${ports}" != "none" ]; then
IFS=","
for port in ${ports};
do
cmd="--dport ${port}:${port} ${cmd}";
done
IFS=' '
if [ "${proto}" != "icmp" ]; then
if [ "${ports}" != "none" ]; then
IFS=","
for port in ${ports};
do
cmd="--dport ${port}:${port} ${cmd}";
done
IFS=' '
fi
fi
if [ "${proto}" != "none" ]; then
cmd="-p ${proto} $cmd"
@@ -119,14 +244,14 @@ create_rule() {
cmd="-A ${rule_name} $cmd"
# Store the rule_names for cleanup on reload
exec_log classcfg ${cmd}
exec_class_log classcfg ${cmd}
[ $? -eq 0 ] && \
echo ${rule_name} >> ${RULE_LIST}
}
manage_rule() {
local cfg="$1"
local priority macaddr proto port comment prio_num port_list
local priority macaddr proto port comment prio_num port_list ip ipmark
validate_rule_section "${1}" || {
log "Validation of section failed"
@@ -135,22 +260,33 @@ manage_rule() {
prio_num=$(get_priority ${priority})
port_list=$(echo ${port}|sed 's/ /,/g')
ipmark=$(get_mark ${priority})
ip=$(get_ipaddress ${macaddr})
if [ -n "${prio_num}" ]; then
if [ "${proto}" == "none" -o "${proto}" == "tcpudp" ]; then
create_rule tcp ${macaddr} ${prio_num} ${port_list}
create_rule udp ${macaddr} ${prio_num} ${port_list}
if [ -n "${ip}" ]; then
create_ip_rule tcp ${ip} ${ipmark} ${port_list}
create_ip_rule udp ${ip} ${ipmark} ${port_list}
fi
else
create_rule ${proto} ${macaddr} ${prio_num} ${port_list}
if [ -n "${ip}" ]; then
create_ip_rule ${proto} ${ip} ${ipmark} ${port_list}
fi
fi
fi
}
reload_service() {
get_bridge_interface
map_client_entries
clear_existing_rules
config_load easy_qos
config_foreach manage_rule rule
clean_client_entries
}
start_service() {

View File

@@ -103,18 +103,18 @@ validate_rule_section()
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(iptables -t mangle -S OUTPUT|grep -m 1 MARK |sed 's/-A/-D/1')
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 OUTPUT|grep -m 1 MARK |sed 's/-A/-D/1')
rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
done
}
check_and_create() {
iptables -t mangle -C OUTPUT ${@} 2>/dev/null
iptables -t mangle -C PREROUTING ${@} 2>/dev/null
# Create rule if not exists
if [ ${?} -ne 0 ]; then
exec_log iptables -t mangle -A OUTPUT ${@}
exec_log iptables -t mangle -A PREROUTING ${@}
else
log "Rule exists for ${@}"
fi

View File

@@ -4,7 +4,5 @@ uci -q batch <<-EOT
set firewall.easyqos=include
set firewall.easyqos.path=/etc/firewall.easyqos
set firewall.easyqos.reload=1
uci del_list firewall.easyqos._access_w="root"
uci add_list firewall.easyqos._access_w="root"
commit firewall
EOT

109
easy-soc-events/Makefile Executable file
View File

@@ -0,0 +1,109 @@
# 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_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,10 +0,0 @@
if (PACKAGE_libwifix)
menu "configurations"
config LIBWIFIX_DEBUG
depends on PACKAGE_libwifix
bool "Enable wifi debugging"
default n
endmenu
endif

View File

@@ -1,108 +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-soc-libs.deprecated
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b88afddd2f4cb216bfcd190f9096c138299c28e2
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_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.deprecated
SECTION:=libs
CATEGORY:=Libraries
TITLE:=IOPSYS easy SoC libraries (deprecated)
SUBMENU:=IOPSYS easy SoC libraries (deprecated)
DEPENDS:=+libopenssl
MENU:=1
endef
define Package/libwifix/config
source "$(SOURCE)/Config.in"
endef
define Package/libwifix
$(call Package/easy-soc-libs.deprecated)
TITLE:= WiFi library for wifix (deprecated)
DEPENDS+=+libnl +libnl-route
endef
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
TARGET_PLATFORM=BROADCOM
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCONFIG_BCM963138 \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
KERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
TARGET_PLATFORM=BROADCOM
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCONFIG_BCM963138 \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_PLATFORM=MEDIATEK
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
TARGET_PLATFORM=MARVELL
TARGET_CFLAGS +=-DIOPSYS_MARVELL
else ifeq ($(CONFIG_TARGET_intel_mips),y)
TARGET_PLATFORM=INTEL
TARGET_CFLAGS +=-DIOPSYS_INTEL
else
$(info Unexpected CONFIG_TARGET)
endif
export TARGET_PLATFORM
ifdef CONFIG_LIBWIFIX_DEBUG
TARGET_CFLAGS += -DIOP_LLA_LIBS_DEBUG
endif
subdirs := \
$(if $(CONFIG_PACKAGE_libwifix),libwifix)
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)" \
PLATFORM="$(TARGET_PLATFORM)" \
subdirs="$(subdirs)"
define Build/InstallDev/libwifix
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifix/wifi.h $(1)/usr/include/wifix.h
$(CP) $(PKG_BUILD_DIR)/libwifix/libwifi*.so* $(1)/usr/lib/
endef
define Build/Compile
$(call Build/Compile/Default)
endef
define Build/InstallDev
$(foreach dir,$(subdirs),$(call Build/InstallDev/$(dir),$(1),$(2));)
endef
define Package/libwifix/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifix/libwifi*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libwifix))

View File

@@ -1,19 +1,19 @@
#
# Copyright (C) 2019 iopsys Software Solutions AB
# 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:=2.4.0
PKG_VERSION:=3.3.12
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=30f5527ae724d54537c803127e11992d1a5ae154
PKG_SOURCE_VERSION:=f508577fae01c4820fad884a5a0847d26104721c
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
@@ -39,16 +39,22 @@ define Package/libwifi/config
source "$(SOURCE)/Config.in"
endef
define Package/libeasy
$(call Package/easy-soc-libs)
TITLE:= Common helper functions library (libeasy)
DEPENDS+=+libnl +libnl-route
endef
define Package/libwifi
$(call Package/easy-soc-libs)
TITLE:= WiFi library (libwifi)
DEPENDS+=+libnl +libnl-route
DEPENDS+=+libnl +libnl-route +libeasy
endef
define Package/libethernet
$(call Package/easy-soc-libs)
TITLE:= Ethernet library (libethernet)
DEPENDS+=+TARGET_iopsys_ramips:swconfig
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_iopsys_ramips:swconfig
endef
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
@@ -58,8 +64,17 @@ ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
KERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
TARGET_PLATFORM=BROADCOM
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCONFIG_BCM963138 \
TARGET_CFLAGS +=-DIOPSYS_BROADCOM \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm_panther),y)
TARGET_CFLAGS +=-DCONFIG_BCM96846
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm_tiger),y)
TARGET_CFLAGS +=-DCONFIG_BCM96858
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm_eagle),y)
TARGET_CFLAGS +=-DCONFIG_BCM963178
else
TARGET_CFLAGS +=-DCONFIG_BCM963138
endif
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_PLATFORM=MEDIATEK
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
@@ -69,6 +84,12 @@ else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
else ifeq ($(CONFIG_TARGET_intel_mips),y)
TARGET_PLATFORM=INTEL
TARGET_CFLAGS +=-DIOPSYS_INTEL
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)
endif
@@ -86,6 +107,7 @@ define Package/libdsl
endef
subdirs := \
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
$(if $(CONFIG_PACKAGE_libethernet),libethernet)
@@ -108,6 +130,15 @@ define Build/Prepare
endef
endif
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/libeasy*.so* $(1)/usr/lib/
endef
define Build/InstallDev/libwifi
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
@@ -116,9 +147,11 @@ define Build/InstallDev/libwifi
endef
define Build/InstallDev/libdsl
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/xdsl
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libdsl/xdsl.h $(1)/usr/include/
$(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
@@ -140,6 +173,11 @@ define Build/InstallDev
$(foreach dir,$(subdirs),$(call Build/InstallDev/$(dir),$(1),$(2));)
endef
define Package/libeasy/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
endef
define Package/libwifi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
@@ -159,6 +197,11 @@ ifeq ($(CONFIG_LIBDSL_TEST),y)
endif
endef
define Package/easy-soc-libs/install
:
endef
$(eval $(call BuildPackage,libeasy))
$(eval $(call BuildPackage,libwifi))
$(eval $(call BuildPackage,libdsl))
$(eval $(call BuildPackage,libethernet))

View File

@@ -7,30 +7,28 @@
include $(TOPDIR)/rules.mk
PKG_RELEASE:=1
PKG_VERSION:=0.2
PKG_SOURCE_VERSION:=631e61b7ab5d86f2f4c86756a117badff9fb0f2c
PKG_VERSION:=0.3
PKG_SOURCE_VERSION:=34ae1996beda98691d779e49f231bd662fc87cda
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
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://download.iopsys.eu/iopsys/opensdk/
PKG_NAME:=endptmngr-open
PATCH_DIR:=
else
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/endptmngr
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_NAME:=endptmngr
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
endif
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
@@ -44,7 +42,7 @@ define Package/endptmngr
CATEGORY:=Utilities
TITLE:=Brcmslic
URL:=
DEPENDS:= +libubox +ubus +libpicoevent +PACKAGE_bcmkernel:bcmkernel +PACKAGE_bcmopen:bcmopen
DEPENDS:= +libubox +ubus +libpicoevent +bcmkernel @TARGET_HAS_VOICE
endef
define Package/endptmngr/description

45
ethmngr/Makefile Normal file
View File

@@ -0,0 +1,45 @@
#
# Copyright (C) 2020 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=1.0.4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b7135381aedf1bde6f7ab10b41be372a9bd7d155
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
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,15 +1,14 @@
#!/bin/sh /etc/rc.common
START=96
START=95
STOP=10
USE_PROCD=1
PROG=/usr/sbin/wifixd
PROG=/usr/sbin/ethmngr
start_service() {
procd_open_instance
procd_set_param command ${PROG}
# procd_set_param env IOP_LLA_LIBS_DEBUG=3 #for debugging only
procd_set_param respawn
procd_close_instance
}

View File

@@ -1,54 +0,0 @@
#
# 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))

View File

@@ -1,46 +0,0 @@
#
# Copyright (C) 2019 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:=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))

View File

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

@@ -1,48 +0,0 @@
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

View File

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

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=4.0-2019-10-01
PKG_VERSION:=4.0-2020-06-25
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ed781436f96f2dc3cf58b35adc640c6f9f6783d1
PKG_SOURCE_VERSION:=7a6da73ae20abc27baf3aa4c1b2c1c0c0ecac82e
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -33,45 +33,52 @@ CWMP_REVISION=$(shell svnversion ./src/ -n|cut -f2 -d:)
include $(INCLUDE_DIR)/package.mk
define Package/icwmp_stun
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 stun Client
DEPENDS:=+libubus +libuci +libubox +libjson-c +libopenssl +libblobmsg-json
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 stun Client
DEPENDS:=+PACKAGE_icwmp_stun:libubus +PACKAGE_icwmp_stun:libuci +PACKAGE_icwmp_stun:libubox +PACKAGE_icwmp_stun:libjson-c +PACKAGE_icwmp_stun:libopenssl +PACKAGE_icwmp_stun:libblobmsg-json
endef
define Package/icwmp_xmpp
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 xmpp feature
DEPENDS:=+libuci +libubox +libexpat +libstrophe
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 xmpp feature
DEPENDS:=+PACKAGE_icwmp_xmpp:libuci +PACKAGE_icwmp_xmpp:libubox +PACKAGE_icwmp_xmpp:libexpat +PACKAGE_icwmp_xmpp:libstrophe
endef
define Package/icwmp_twamp
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 twamp feature
DEPENDS:=+libuci
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 twamp feature
DEPENDS:=+PACKAGE_icwmp_twamp:libuci
endef
define Package/icwmp_udpechoserver
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 udpechoserver feature
DEPENDS:=+libuci
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 udpechoserver feature
DEPENDS:=+PACKAGE_icwmp_udpechoserver:libuci
endef
define Package/icwmp_bulkdata
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +curl +libblobmsg-json +libbbfdm
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 BulkData Collection
DEPENDS:=+PACKAGE_icwmp_bulkdata:libubus +PACKAGE_icwmp_bulkdata:libuci +PACKAGE_icwmp_bulkdata:libubox +PACKAGE_icwmp_bulkdata:libjson-c +PACKAGE_icwmp_bulkdata:libcurl +PACKAGE_icwmp_bulkdata:curl +PACKAGE_icwmp_bulkdata:libblobmsg-json +PACKAGE_icwmp_bulkdata:libbbfdm
endef
define Package/icwmp-tr098
SECTION:=utils
CATEGORY:=Utilities
TITLE:=CWMP client for TR-098 Data Model
DEPENDS:=+PACKAGE_icwmp-tr098:libuci +PACKAGE_icwmp-tr098:libmicroxml +PACKAGE_icwmp-tr098:libubox +PACKAGE_icwmp-tr098:jshn +PACKAGE_icwmp-tr098:libubus +PACKAGE_icwmp-tr098:libblobmsg-json +PACKAGE_icwmp-tr098:libpthread +PACKAGE_icwmp-tr098:ubusd +PACKAGE_icwmp-tr098:shflags +PACKAGE_icwmp-tr098:getopt +PACKAGE_icwmp-tr098:zlib +PACKAGE_icwmp-tr098:libjson-c +PACKAGE_icwmp-tr098:libopenssl +PACKAGE_icwmp-tr098:curl +PACKAGE_icwmp-tr098:libcurl +PACKAGE_icwmp-tr098:libtr098
endef
define Package/icwmp/Default
SECTION:=utils
CATEGORY:=Utilities
TITLE:=CWMP client
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libbbfdm +(PACKAGE_libtr098):libtr098
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libbbfdm +libbbf_api
endef
define Package/icwmp/description
@@ -81,18 +88,18 @@ endef
define Package/icwmp-curl
$(call Package/icwmp/Default)
TITLE+= (using libcurl)
DEPENDS+= +libcurl
DEPENDS+= +PACKAGE_icwmp-curl:libcurl
VARIANT:=curl
endef
define Package/icwmp-zstream
$(call Package/icwmp/Default)
TITLE+= (using libzstream)
DEPENDS+= +libzstream
DEPENDS+= +PACKAGE_icwmp-zstream:libzstream
VARIANT:=zstream
endef
define Package/icwmp-zstream/config
define Package/icwmp-curl/config
source "$(SOURCE)/Config_cwmp.in"
endef
@@ -103,13 +110,39 @@ define Build/Prepare
endef
endif
ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_CFLAGS += -DEX400
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE -D_AADJ
ifeq ($(CONFIG_PACKAGE_icwmp-tr098),y)
CONFIGURE_ARGS += \
--enable-icwmp_tr098
endif
ifeq ($(CONFIG_PACKAGE_icwmp_xmpp),y)
CONFIGURE_ARGS += \
--enable-icwmp_xmpp
endif
ifeq ($(CONFIG_PACKAGE_icwmp_stun),y)
CONFIGURE_ARGS += \
--enable-icwmp_stun
endif
ifeq ($(CONFIG_PACKAGE_icwmp_udpechoserver),y)
CONFIGURE_ARGS += \
--enable-icwmp_udpechoserver
endif
ifeq ($(CONFIG_PACKAGE_icwmp_twamp),y)
CONFIGURE_ARGS += \
--enable-icwmp_twamp
endif
ifeq ($(CONFIG_PACKAGE_icwmp_bulkdata),y)
CONFIGURE_ARGS += \
--enable-icwmp_bulkdata
endif
ifneq ($(CWMP_REVISION)_,_)
ifneq ($(CWMP_REVISION),exported)
ifneq ($(CWMP_REVISION),Unversioned directory)
@@ -158,28 +191,17 @@ CONFIGURE_ARGS += \
--enable-devel
endif
ifeq ($(CONFIG_PACKAGE_libtr098),y)
CONFIGURE_ARGS += \
--enable-tr098
endif
CONFIGURE_ARGS += \
--enable-tr181
define Package/icwmp-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/etc/icwmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/bin/icwmpd $(1)/usr/sbin
ifeq ($(CONFIG_PACKAGE_libtr098),y)
$(CP) $(PKG_BUILD_DIR)/bin/icwmp_tr098d $(1)/usr/sbin
endif
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/firewall.cwmp $(1)/etc/firewall.cwmp
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_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
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-defaults/* $(1)/etc/uci-defaults/
ifeq ($(CONFIG_CWMP_SCRIPTS_FULL),y)
$(INSTALL_DIR) $(1)/usr/share/icwmp
$(CP) $(PKG_BUILD_DIR)/scripts/defaults $(1)/usr/share/icwmp
@@ -190,6 +212,11 @@ endif
$(CP) ./files/* $(1)/
endef
define Package/icwmp-tr098/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/bin/icwmp_tr098d $(1)/usr/sbin
endef
define Package/icwmp_stun/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/icwmp_stund $(1)/usr/sbin/icwmp_stund
@@ -261,4 +288,5 @@ $(eval $(call BuildPackage,icwmp_xmpp))
$(eval $(call BuildPackage,icwmp_udpechoserver))
$(eval $(call BuildPackage,icwmp_twamp))
$(eval $(call BuildPackage,icwmp_bulkdata))
$(eval $(call BuildPackage,icwmp-zstream))
$(eval $(call BuildPackage,icwmp-tr098))
#$(eval $(call BuildPackage,icwmp-zstream))

View File

@@ -1,136 +0,0 @@
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

@@ -0,0 +1,24 @@
# Copy defaults by the factory to the cwmp UCI user section.
# Get factory base MAC.
baseMac=$(db -q get hw.board.basemac)
# Erase colon and space characters.
baseMac=${baseMac//:/}
baseMac=${baseMac// /}
# Caseing and fixed length string.
mac=$(printf "%12.12X" $((0x$baseMac)))
# Get system serial number.
serial=$(db -q get hw.board.serial_number)
uci -q batch <<-EOF
set cwmp.acs.userid="${mac:0:6}-${serial}"
set cwmp.cpe.userid="${mac:0:6}-${serial}"
EOF
# No need for commit here, it is done by uci_apply_defaults().

29
ieee1905/Config.in Normal file
View File

@@ -0,0 +1,29 @@
if PACKAGE_ieee1905 || PACKAGE_lib1905al
menu "developer/debug options"
config IEEE1905_MAP_COMPLETE_NETWORK
bool "Create network topology for complete network"
default n
config IEEE1905_SPEED_UP_DISCOVERY
bool "Speed up discovery of an AL in network"
default y
config IEEE1905_DO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS
bool "Do not accept M1/M2 messages from unknown AL(s)"
default y
choice
prompt "Select ALME support"
default IEEE1905_ALME_OVER_UBUS
config IEEE1905_ALME_OVER_UBUS
bool "ALME methods supported over ubus"
config IEEE1905_ALME_OVER_TCP
bool "ALME server over TCP port"
endchoice
endmenu
endif

113
ieee1905/Makefile Normal file
View File

@@ -0,0 +1,113 @@
#
# Copyright (C) 2019 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=2.0.18
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=44035a3bb0dd7e9fc1feb037c72c2c0d33692a98
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/ieee1905
SECTION:=utils
CATEGORY:=Utilities
TITLE:=IEEE1905 daemon
DEPENDS:= +libuci +libjson-c +lib1905 +ubox +libpcap +libopenssl +libwifi +libeasy
endef
define Package/ieee1905/config
source "$(SOURCE)/Config.in"
endef
define Package/ieee1905/description
IEEE1905 stack with extended functionalities.
endef
define Package/lib1905
SECTION:=utils
CATEGORY:=Utilities
TITLE:=IEEE1905 cmdu tlv utility library
endef
define Package/lib1905hle
SECTION:=utils
CATEGORY:=Utilities
TITLE:=IEEE1905 hle stack library
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE \
-fstrict-aliasing \
-Wall \
-Wextra
ifeq ($(CONFIG_IEEE1905_SPEED_UP_DISCOVERY),y)
TARGET_CFLAGS += -DSPEED_UP_DISCOVERY
endif
ifeq ($(CONFIG_IEEE1905_DO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS),y)
TARGET_CFLAGS += -DDO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS
endif
ifeq ($(CONFIG_IEEE1905_ALME_OVER_TCP),y)
TARGET_CFLAGS += -DALME_OVER_TCP
endif
ifeq ($(CONFIG_IEEE1905_ALME_OVER_UBUS),y)
TARGET_CFLAGS += -DALME_OVER_UBUS
endif
ifeq ($(CONFIG_IEEE1905_MAP_COMPLETE_NETWORK),y)
TARGET_CFLAGS += -DIEEE1905_MAP_COMPLETE_NETWORK
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/ieee1905/* $(PKG_BUILD_DIR)/
endef
endif
define Package/ieee1905/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/usr/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/etc/init.d/ieee1905 $(1)/etc/init.d/ieee1905
$(INSTALL_DATA) ./files/etc/config/ieee1905 $(1)/etc/config/ieee1905
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ieee1905d $(1)/usr/sbin/
endef
define Package/lib1905hle/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/lib1905hle.so $(1)/usr/lib/lib1905hle.so
endef
define Package/lib1905/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/lib1905.so $(1)/usr/lib/lib1905.so
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/lib1905
$(INSTALL_DIR) $(1)/usr/include/ieee1905
$(INSTALL_DIR) $(1)/usr/include/lib1905hle
$(CP) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/ieee1905/
$(CP) $(PKG_BUILD_DIR)/lib1905/include/*.h $(1)/usr/include/lib1905/
$(CP) $(PKG_BUILD_DIR)/lib1905hle/include/*.h $(1)/usr/include/lib1905hle/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/lib1905.so $(1)/usr/lib
endef
$(eval $(call BuildPackage,lib1905))
$(eval $(call BuildPackage,lib1905hle))
$(eval $(call BuildPackage,ieee1905))

View File

@@ -0,0 +1,20 @@
config ieee1905 'ieee1905'
option enabled '1'
option debug true
option debug_level 2
option macaddress 'auto'
option registrar 0
option cmdu_event 1
option map_plugin 0
config security 'security'
list method 'PBC'
option ssid ''
option encryption ''
option key 'TESTPASSWORD'
config al-iface
option enabled 1
option ifname 'br-lan'
option media 'bridge'

View File

@@ -0,0 +1,64 @@
#!/bin/sh /etc/rc.common
START=99
STOP=10
USE_PROCD=1
PROG=/usr/sbin/ieee1905d
validate_ieee1905_section()
{
uci_validate_section ieee1905 ieee1905 "${1}" \
'debug:bool:false' \
'enabled:bool:false'
}
configure_ieee1905()
{
local enabled debug
validate_ieee1905_section ${1} || {
echo "Validation of ieee1905 section failed"
exit 1;
}
if [ ${debug} -eq 1 ]; then
# Forward stdout of the command to logd
procd_set_param stdout 1
# Same for stderr
procd_set_param stderr 1
fi
if [ ${enabled} -ne 1 ]; then
exit 0;
fi
}
configure_network()
{
ebtables -L FORWARD|grep -iqE "1:80:C2:(0)+:(0)+:13.*-j.*DROP"
if [ "$?" -ne 0 ]; then
echo "Applying drop rule to drop pkts forwared by kernel to 1905.1 multicast mac"
ebtables -A FORWARD -d 01:80:c2:00:00:13 -j DROP
fi
}
start_service() {
procd_open_instance ieee1905
procd_set_param command ${PROG}
configure_ieee1905 "ieee1905"
configure_network
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "network"
procd_add_reload_trigger "wireless"
procd_add_reload_trigger "netmode"
}

View File

@@ -1,55 +0,0 @@
#
# Copyright (C) 2018 iopsys Software Solutions AB
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ifbt
PKG_VERSION:=0.2
PKG_SOURCE_VERSION:=f6edff47b6c0a154ab892301acf767d19ac8ad73
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ifbt.git
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)
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=README
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
TARGET_PLATFORM:=-DIOPSYS_BROADCOM
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
TARGET_PLATFORM:=-DIOPSYS_BROADCOM
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
TARGET_PLATFORM:=-DIOPSYS_MARVELL
else ifeq ($(CONFIG_TARGET_intel_mips),y)
TARGET_PLATFORM:=-DIOPSYS_INTEL
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_PLATFORM:=-DIOPSYS_MEDIATEK
else
$(info (UNEXPECTED CONFIG TARGET))
endif
export TARGET_PLATFORM
define Package/ifbt
CATEGORY:=Utilities
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libwifi +libjson-c
TITLE:=Fast BSS Transition
endef
define Package/ifbt/description
ifbt is Iopsys application for fast BSS transition
endef
define Package/ifbt/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ifbt $(1)/sbin/
endef
$(eval $(call BuildPackage,ifbt))

View File

@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=inbd
PKG_VERSION:=1.0.0
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=53ca7f58edb87976b5897ccaf487bb0cbbf39d07
PKG_SOURCE_VERSION:=3135944f3357a7a2c1c206be7b65bbb7ac6d1e58
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd

View File

@@ -1,60 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=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)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
# 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

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

View File

@@ -11,18 +11,16 @@ CONFIG_PACKAGE_chat=y
CONFIG_PACKAGE_comgt=y
CONFIG_PACKAGE_comgt-directip=y
CONFIG_PACKAGE_comgt-ncm=y
CONFIG_PACKAGE_crashlog=y
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_ds-lite=y
CONFIG_PACKAGE_easy-qos=y
CONFIG_PACKAGE_ethtool=y
CONFIG_PACKAGE_gdb=m
CONFIG_PACKAGE_getopt=y
CONFIG_PACKAGE_glib2=y
CONFIG_PACKAGE_icwmp-curl=y
CONFIG_PACKAGE_ifbt=y
CONFIG_PACKAGE_imonitor=y
CONFIG_PACKAGE_imonitor=m
CONFIG_PACKAGE_inbd=y
CONFIG_PACKAGE_iopupgrade=y
CONFIG_PACKAGE_iopupgrade=m
CONFIG_PACKAGE_ip-full=y
CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_ipset=y
@@ -32,47 +30,23 @@ CONFIG_PACKAGE_iptables-mod-filter=y
CONFIG_PACKAGE_iptables-mod-ipopt=y
# CONFIG_PACKAGE_iwatchdog is not set
CONFIG_PACKAGE_juci=y
CONFIG_PACKAGE_juci-config-backup=y
CONFIG_PACKAGE_juci-ddns=y
CONFIG_PACKAGE_juci-diagnostics=y
CONFIG_PACKAGE_juci-dnsmasq-dhcp=y
CONFIG_PACKAGE_juci-dropbear=y
CONFIG_PACKAGE_juci-easyqos=y
CONFIG_PACKAGE_juci-event=y
CONFIG_PACKAGE_juci-firewall-fw3=y
CONFIG_PACKAGE_juci-icwmp=y
CONFIG_PACKAGE_juci-igmpinfo=y
CONFIG_PACKAGE_juci-minidlna=y
CONFIG_PACKAGE_juci-mod-status=y
CONFIG_PACKAGE_juci-mod-system=y
CONFIG_PACKAGE_juci-mwan3=y
CONFIG_PACKAGE_juci-netmode=y
CONFIG_PACKAGE_juci-network-device=y
CONFIG_PACKAGE_juci-network-dsl=y
CONFIG_PACKAGE_juci-network-netifd=y
CONFIG_PACKAGE_juci-network-port=y
CONFIG_PACKAGE_juci-openvpn=y
CONFIG_PACKAGE_juci-owsd=y
CONFIG_PACKAGE_juci-realtime-graphs=y
CONFIG_PACKAGE_juci-samba=y
CONFIG_PACKAGE_juci-snmpd=y
CONFIG_PACKAGE_juci-sysupgrade=y
CONFIG_PACKAGE_juci-upnp=y
CONFIG_PACKAGE_juci-usb=y
CONFIG_PACKAGE_juci-voice-client=y
CONFIG_PACKAGE_juci-wifilife=y
CONFIG_PACKAGE_juci-wireless=y
CONFIG_PACKAGE_juci-theme-iopsys=y
CONFIG_PACKAGE_kmod-siit=y
CONFIG_PACKAGE_libcgroup-daemon=y
CONFIG_PACKAGE_libcgroup=y
# CONFIG_PACKAGE_libcgroup-utils is not set
CONFIG_PACKAGE_libdaemon=y
CONFIG_PACKAGE_libffmpeg-mini=y
CONFIG_PACKAGE_libgmp=y
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_libwifi=y
CONFIG_PACKAGE_loop-detector=m
CONFIG_PACKAGE_minidlna=y
CONFIG_PACKAGE_lscpu=y
CONFIG_PACKAGE_map=y
CONFIG_PACKAGE_miniupnpd=y
CONFIG_PACKAGE_mwan3=y
CONFIG_PACKAGE_nand-utils=y
@@ -89,7 +63,6 @@ CONFIG_PACKAGE_openvpn-easy-rsa=y
CONFIG_PACKAGE_openvpn-openssl=y
CONFIG_PACKAGE_peripheral_manager=y
CONFIG_PACKAGE_port-management=y
CONFIG_PACKAGE_power-management=y
CONFIG_PACKAGE_ppp-mod-pppoa=y
CONFIG_PACKAGE_ppp-mod-pppoe=y
CONFIG_PACKAGE_ppp-mod-pppol2tp=y
@@ -103,15 +76,14 @@ CONFIG_PACKAGE_rdnssd=y
CONFIG_PACKAGE_relayd=y
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-rpcsys=y
CONFIG_PACKAGE_rsync=y
CONFIG_PACKAGE_rulengd=y
CONFIG_PACKAGE_samba3=y
CONFIG_PACKAGE_samba3-nmbd=y
CONFIG_PACKAGE_snmpd=y
CONFIG_PACKAGE_strace=y
CONFIG_PACKAGE_swmodd=m
CONFIG_PACKAGE_tc=y
CONFIG_PACKAGE_tcpdump=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_tptest=y
CONFIG_PACKAGE_traceroute6=y
CONFIG_PACKAGE_umbim=y
CONFIG_PACKAGE_uqmi=y
@@ -120,16 +92,11 @@ CONFIG_PACKAGE_usbreset=y
CONFIG_PACKAGE_uspd=y
CONFIG_PACKAGE_wget=y
CONFIG_PACKAGE_wwan=y
CONFIG_PACKAGE_libwifi=y
CONFIG_PACKAGE_wifilife=y
CONFIG_PACKAGE_wifimngr=y
CONFIG_PACKAGE_libwifix=y
CONFIG_PACKAGE_wifixd=y
CONFIG_PACKAGE_xl2tpd=y
CONFIG_PACKAGE_zoneinfo-core=y
CONFIG_PACKAGE_zoneinfo-europe=y
CONFIG_TARGET_CUSTOMER="IOPSYS"
CONFIG_TARGET_ROOTFS_TARGZ=y
# CONFIG_USE_SSTRIP is not set
CONFIG_USE_STRIP=y
CONFIG_BUILD_LOG=y
@@ -185,14 +152,48 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
# CONFIG_BUSYBOX_CONFIG_PAM is not set
# CONFIG_BUSYBOX_CONFIG_TFTP_DEBUG is not set
# CONFIG_BUSYBOX_CONFIG_NTPD is not set
CONFIG_BUSYBOX_CONFIG_MOUNTPOINT=y
CONFIG_BUSYBOX_CONFIG_RUN_PARTS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_RUN_PARTS_FANCY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_GZIP_LEVELS=y
CONFIG_BUSYBOX_CONFIG_GZIP_FAST=2
CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP=y
CONFIG_BUSYBOX_CONFIG_FLOAT_DURATION=y
CONFIG_BUSYBOX_CONFIG_USLEEP=y
CONFIG_BUSYBOX_CONFIG_REALPATH=y
CONFIG_BUSYBOX_CONFIG_TTY=y
CONFIG_LIBCURL_CRYPTO_AUTH=y
# CONFIG_LIBCURL_MBEDTLS is not set
CONFIG_LIBCURL_OPENSSL=y
CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y
# CONFIG_SAMBA3_CONFIG_NO_PRINTING is not set
# CONFIG_SIGNED_PACKAGES is not set
CONFIG_KERNEL_DEVTMPFS=y
CONFIG_KERNEL_DEVTMPFS_MOUNT=y
# CONFIG_BUSYBOX_CONFIG_IP is not set
LOCAL_MIRROR="http://download.iopsys.eu/iopsys/mirror/"
CONFIG_LOCALMIRROR="http://download.iopsys.eu/iopsys/mirror/"
# Generation of /etc/banner.
CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_MANUFACTURER="iopsysWrt"
CONFIG_VERSION_MANUFACTURER_URL="https://iopsys.eu/"
# Disable as much as possible of OpenWrt messy "pre-init" stuff.
CONFIG_PREINITOPT=y
# CONFIG_TARGET_PREINIT_SUPPRESS_STDERR is not set
CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE=y
CONFIG_TARGET_PREINIT_TIMEOUT=1
# CONFIG_TARGET_PREINIT_SHOW_NETMSG is not set
# CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG is not set
CONFIG_TARGET_PREINIT_IFNAME=""
CONFIG_TARGET_PREINIT_IP=""
CONFIG_TARGET_PREINIT_NETMASK=""
CONFIG_TARGET_PREINIT_BROADCAST=""
# The urandom-seed package is very strange. It seeds urandom with urandom...
# Disable it. Most SoCs nowadays has HW random generators anyway.
# CONFIG_PACKAGE_urandom-seed is not set
# CONFIG_PACKAGE_urngd is not set

View File

@@ -6,13 +6,9 @@ function extract_core {
topdir=$(pwd)
# Paths to packages that should be exported.
paths+='package/network/services/dnsmasq '
paths+='package/network/config/firewall '
paths+='package/network/config/netifd '
paths+='package/network/config/qos-scripts '
paths+='package/utils/busybox '
paths+='package/base-files '
paths+='package/system/procd '
paths+='package/system/rpcd '
paths+='package/network/services/openvpn '
@@ -24,7 +20,13 @@ function extract_core {
echo ""
echo "Example: $0 extract_core"
echo " -p package/utils/busybox"
echo " -r feeds/lede_core"
echo " -r feeds/openwrt_core"
echo " -b devel"
echo ""
echo "Extract all default packages:"
echo "$0 extract_core"
echo " -p default"
echo " -r feeds/openwrt_core"
echo " -b devel"
}

View File

@@ -28,11 +28,11 @@ function feeds_update {
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p lede_core -a
./scripts/feeds install -f -p openwrt_core -a
fi
# targets need to be installed explicitly
targets="iopsys-brcm63xx-mips iopsys-brcm63xx-arm iopsys-ramips intel_mips"
targets="iopsys-brcm63xx-mips iopsys-brcm63xx-arm iopsys-ramips intel_mips iopsys-x86 iopsys-armvirt"
for target in $targets
do
rm -f target/linux/$target
@@ -57,6 +57,3 @@ function feeds_update {
register_command "feeds_update" "Update feeds to point to commit hashes from feeds.conf"

View File

@@ -18,6 +18,8 @@ function genconfig {
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
ramips="target/linux/iopsys-ramips"
intel_mips="target/linux/intel_mips"
x86="target/linux/iopsys-x86"
armvirt="target/linux/iopsys-armvirt"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
@@ -79,8 +81,33 @@ function genconfig {
# Takes a board name and returns the target name in global var $target
set_target() {
local profile=$1
local profile=$1
[ -n "$profile" ] || return
if [ -n "$TARGET" -a -d "./target/linux/$TARGET" ]; then
local targetpath="./target/linux/$TARGET"
local profiles=
local pfound=0
if [ -e "$targetpath/genconfig" ]; then
profiles=$(cd $targetpath; ./genconfig)
for p in $profiles; do
if [ $p == $profile ]; then
pfound=1
break
fi
done
fi
if [ $pfound -eq 1 ]; then
target="$(echo $TARGET | tr '-' '_')"
config_path="$targetpath/config"
fi
return
fi
[ -e $brcm63xx_mips/genconfig ] &&
iopsys_brcm63xx_mips=$(cd $brcm63xx_mips; ./genconfig)
@@ -90,9 +117,13 @@ function genconfig {
iopsys_ramips=$(cd $ramips; ./genconfig)
[ -e $intel_mips/genconfig ] &&
iopsys_intel_mips=$(cd $intel_mips; ./genconfig)
[ -e $x86/genconfig ] &&
iopsys_x86=$(cd $x86; ./genconfig)
[ -e $armvirt/genconfig ] &&
iopsys_armvirt=$(cd $armvirt; ./genconfig)
if [ "$profile" == "LIST" ]; then
for list in iopsys_brcm63xx_mips iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips; do
for list in iopsys_brcm63xx_mips iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips iopsys_x86 iopsys_armvirt; do
echo "$list based boards:"
for b in ${!list}; do
echo -e "\t$b"
@@ -133,6 +164,22 @@ function genconfig {
fi
done
for p in $iopsys_x86; do
if [ $p == $profile ]; then
target="iopsys_x86"
config_path="$x86/config"
return
fi
done
for p in $iopsys_armvirt; do
if [ $p == $profile ]; then
target="iopsys_armvirt"
config_path="$armvirt/config"
return
fi
done
}
git remote -v | grep -q http || {
@@ -142,13 +189,11 @@ function genconfig {
endptAllowed=0
natalieAllowed=0
mediatekAllowed=0
wifilifeAllowed=0
git ls-remote git@dev.iopsys.eu:broadcom/bcmcreator.git -q 2>/dev/null && bcmAllowed=1
git ls-remote git@dev.iopsys.eu:mediatek/linux.git -q 2>/dev/null && mediatekAllowed=1
git ls-remote git@dev.iopsys.eu:dialog/natalie-dect-12.26.git -q 2>/dev/null && natalieAllowed=1
git ls-remote git@dev.iopsys.eu:iopsys/endptmngr.git -q 2>/dev/null && endptAllowed=1
git ls-remote git@dev.iopsys.eu:iopsys/wifilife.git -q 2>/dev/null && wifilifeAllowed=1
}
v() {
@@ -162,6 +207,7 @@ function genconfig {
echo -e " -c|--clean\t\tRemove all files under ./files and import from config "
echo -e " -v|--verbose\t\tVerbose"
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
echo -e " -t|--target\t\tExplicitly specify the linux target to build the board profile from"
echo -e " -s|--override\t\tEnable 'Package source tree override'"
echo -e " -S|--brcmsingle\tForce build of bcmkernel to use only one thread"
echo -e " -h|--help\t\tShow this message"
@@ -169,7 +215,7 @@ function genconfig {
echo -e " -a|--list-all\t\tList all Customers and their board types"
echo -e " -b|--boards\t\tList all board types"
echo
echo "Example ./iop genconfig dg200 TELIA"
echo "Example ./iop genconfig eg400 OPERATORX"
echo "(if no customerconfig is chosen, iopsys config will be used)"
echo
exit 0
@@ -220,28 +266,30 @@ function genconfig {
generate_config()
{
DIFFFILE="$1"
MASTERFILE="$2"
while read p; do
v "$p"
sed -r -i "$p" $MASTERFILE
done < $DIFFFILE
DIFFFILE="$1"
MASTERFILE="$2"
while read p; do
v "$p"
sed -r -i "$p" $MASTERFILE
done < $DIFFFILE
}
setup_dirs()
{
if git ls-remote $CUSTREPO -q 2>/dev/null; then
if [ ! -d "$CUSTPATH" ]; then
git clone "$CUSTREPO" "$CUSTPATH"
elif [ $IMPORT -eq 1 ]; then
cd $CUSTPATH
v "git pull"
git pull
cd - >/dev/null #go back
git remote -v | grep -q http || {
if git ls-remote $CUSTREPO -q 2>/dev/null; then
if [ ! -d "$CUSTPATH" ]; then
git clone "$CUSTREPO" "$CUSTPATH"
elif [ $IMPORT -eq 1 ]; then
cd $CUSTPATH
v "git pull"
git pull
cd - >/dev/null #go back
fi
else
echo "You do not have access to $CUSTREPO"
fi
else
echo "You do not have access to $CUSTREPO"
fi
}
if [ ! -d "$FILEDIR" ]; then
mkdir -p $FILEDIR
@@ -298,7 +346,7 @@ function genconfig {
cat $config_path/$BOARDTYPE/config >> .config
fi
#special handling for intel_mips which use TARGET_DEVICES
#special handling for intel_mips/iopsys_ramips which use TARGET_DEVICES
if [ "$target" = "intel_mips" ]; then
subtarget="xrx500"
echo "CONFIG_TARGET_${target}=y" >> .config
@@ -307,6 +355,11 @@ function genconfig {
echo "CONFIG_TARGET_PER_DEVICE_ROOTFS=y" >> .config
device=$(echo $BOARDTYPE | tr a-z A-Z)
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${device}=y" >> .config
elif [ "$target" = "iopsys_ramips" ]; then
subtarget="mt7621"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
else
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
@@ -344,6 +397,8 @@ function genconfig {
# Set target version
local GIT_TAG=$(git describe --abbrev=0 --tags)
echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${GIT_TAG}\"" >> .config
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
# Enable Pckage source tree override if selected
[ $SRCTREEOVERR -eq 1 ] && echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
@@ -357,14 +412,12 @@ function genconfig {
[ $endptAllowed -eq 0 ] && echo "CONFIG_ENDPT_OPEN=y" >> .config
[ $natalieAllowed -eq 0 ] && echo "CONFIG_NATALIE_OPEN=y" >> .config
[ $mediatekAllowed -eq 0 ] && echo "CONFIG_MEDIATEK_OPEN=y" >> .config
[ $wifilifeAllowed -eq 0 ] && echo "CONFIG_WIFILIFE_OPEN=y" >> .config
else
echo "# CONFIG_GITMIRROR_REWRITE is not set" >>.config
echo "CONFIG_BCM_OPEN=y" >> .config
echo "CONFIG_ENDPT_OPEN=y" >> .config
echo "CONFIG_NATALIE_OPEN=y" >> .config
echo "CONFIG_MEDIATEK_OPEN=y" >> .config
echo "CONFIG_WIFILIFE_OPEN=y" >> .config
fi
if [ -n "$BRCM_MAX_JOBS" ]
@@ -417,6 +470,7 @@ function genconfig {
-c|--clean) export CLEAN=1;;
-n|--no-update) export IMPORT=0;;
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
-t|--target) export TARGET="$2"; shift;;
-p|--profile) export PROFILE="$2"; shift;;
-r|--repo) export CUSTREPO="$2"; shift;;
-s|--override) export SRCTREEOVERR=1;;

View File

@@ -0,0 +1,453 @@
#!/bin/bash
function genconfig_min {
export CLEAN=0
export SRCTREEOVERR=0
export FILEDIR="files/"
CURRENT_CONFIG_FILE=".current_config_file"
export CONFIGPATH="package/feeds/iopsys/iop"
CUSTPATH="customerconfigs"
export CUSTCONF="customerconfigs/customers"
export VERBOSE=0
#always use the mirror
export DEVELOPER=0
target="bogus"
config_path=""
brcm63xx_mips="target/linux/iopsys-brcm63xx-mips"
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
ramips="target/linux/iopsys-ramips"
intel_mips="target/linux/intel_mips"
x86="target/linux/iopsys-x86"
armvirt="target/linux/iopsys-armvirt"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
Yellow='\033[0;33m' # Yellow
function find_last {
egrep "^[ #]*${1}[ =]" $2 | tail -n1
}
function is_new {
for opt in $conf_warned
do
if [ "$opt" == "$1" ]
then
return 1
fi
done
# option not found return true
return 0
}
function verify_config {
IFS=$'\n'
org=$(<.genconfig.config)
unset IFS
local num
local conf_opt
local conf_org
local conf_new
#echo "lines to check $tot_lines"
num=0
for line in $org
do
conf_opt=$(echo $line | grep CONFIG_ | sed 's|.*\(CONFIG_[^ =]*\)[ =].*|\1|')
if [ -n "${conf_opt}" ]
then
conf_org=$(find_last ${conf_opt} .genconfig.config)
conf_new=$(find_last ${conf_opt} .config)
if [ "$conf_org" != "$conf_new" ]
then
if is_new $conf_opt
then
echo -e "config option [${Red}$conf_opt${Color_Off}] is not set correctly in .config"
echo -e "got value [${Yellow}$conf_new${Color_Off}] but wanted [${Yellow}$conf_org${Color_Off}]"
echo "This is a real problem somebody needs to investigate"
echo ""
conf_warned="$conf_warned $conf_opt"
fi
else
true
# for debug to see all options
#echo -e "wanted [$conf_org] got [$conf_new]"
fi
fi
num=$((num+1))
done
}
# Takes a board name and returns the target name in global var $target
set_target() {
local profile=$1
[ -n "$profile" ] || return
if [ -n "$TARGET" -a -d "./target/linux/$TARGET" ]; then
local targetpath="./target/linux/$TARGET"
local profiles=
local pfound=0
if [ -e "$targetpath/genconfig" ]; then
profiles=$(cd $targetpath; ./genconfig)
for p in $profiles; do
if [ $p == $profile ]; then
pfound=1
break
fi
done
fi
if [ $pfound -eq 1 ]; then
target="$(echo $TARGET | tr '-' '_')"
config_path="$targetpath/config"
fi
return
fi
[ -e $brcm63xx_mips/genconfig ] &&
iopsys_brcm63xx_mips=$(cd $brcm63xx_mips; ./genconfig)
[ -e $brcm63xx_arm/genconfig ] &&
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
[ -e $ramips/genconfig ] &&
iopsys_ramips=$(cd $ramips; ./genconfig)
[ -e $intel_mips/genconfig ] &&
iopsys_intel_mips=$(cd $intel_mips; ./genconfig)
[ -e $x86/genconfig ] &&
iopsys_x86=$(cd $x86; ./genconfig)
[ -e $armvirt/genconfig ] &&
iopsys_armvirt=$(cd $armvirt; ./genconfig)
if [ "$profile" == "LIST" ]; then
for list in iopsys_brcm63xx_mips iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips iopsys_x86 iopsys_armvirt; do
echo "$list based boards:"
for b in ${!list}; do
echo -e "\t$b"
done
done
return
fi
for p in $iopsys_brcm63xx_mips; do
if [ $p == $profile ]; then
target="iopsys_brcm63xx_mips"
config_path="$brcm63xx_mips/config"
return
fi
done
for p in $iopsys_brcm63xx_arm; do
if [ $p == $profile ]; then
target="iopsys_brcm63xx_arm"
config_path="$brcm63xx_arm/config"
return
fi
done
for p in $iopsys_ramips; do
if [ $p == $profile ]; then
target="iopsys_ramips"
config_path="$ramips/config"
return
fi
done
for p in $iopsys_intel_mips; do
if [ $p == $profile ]; then
target="intel_mips"
config_path="$intel_mips/config"
return
fi
done
for p in $iopsys_x86; do
if [ $p == $profile ]; then
target="iopsys_x86"
config_path="$x86/config"
return
fi
done
for p in $iopsys_armvirt; do
if [ $p == $profile ]; then
target="iopsys_armvirt"
config_path="$armvirt/config"
return
fi
done
}
git remote -v | grep -q http || {
DEVELOPER=1
bcmAllowed=0
endptAllowed=0
natalieAllowed=0
mediatekAllowed=0
git ls-remote git@dev.iopsys.eu:broadcom/bcmcreator.git -q 2>/dev/null && bcmAllowed=1
git ls-remote git@dev.iopsys.eu:mediatek/linux.git -q 2>/dev/null && mediatekAllowed=1
git ls-remote git@dev.iopsys.eu:dialog/natalie-dect-12.26.git -q 2>/dev/null && natalieAllowed=1
git ls-remote git@dev.iopsys.eu:iopsys/endptmngr.git -q 2>/dev/null && endptAllowed=1
}
v() {
[ "$VERBOSE" -ge 1 ] && echo "$@"
}
usage() {
echo
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer [customer2 ]...]"
echo
echo -e " -c|--clean\t\tRemove all files under ./files and import from config "
echo -e " -v|--verbose\t\tVerbose"
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
echo -e " -t|--target\t\tExplicitly specify the linux target to build the board profile from"
echo -e " -s|--override\t\tEnable 'Package source tree override'"
echo -e " -S|--brcmsingle\tForce build of bcmkernel to use only one thread"
echo -e " -h|--help\t\tShow this message"
echo -e " -l|--list [customer]\tList all Customers or all boards for one customer"
echo -e " -a|--list-all\t\tList all Customers and their board types"
echo -e " -b|--boards\t\tList all board types"
echo
echo "Example ./iop genconfig dg400prime IOPSYS"
echo
exit 0
}
list_customers()
{
local ALL="$1"
local CUSTOMER="$2"
if [ "$CUSTOMER" -a -d "$CUSTCONF/$CUSTOMER" ]; then
local boards="$(ls -1 "$CUSTCONF/$CUSTOMER" | grep -v common )"
if [ "$boards" ]; then
echo "$CUSTOMER has following boards:"
for board in $boards; do
echo -e "\t$board"
done
else
echo "No boards found for $CUSTOMER"
fi
elif [ "$CUSTOMER" ]; then
echo "No customer called $CUSTOMER"
exit 1
elif [ -d $CUSTCONF ]; then
local customers="$(ls -1 $CUSTCONF)"
if [ "$customers" -a "$ALL" == 1 ]; then
for customer in $customers; do
echo $customer
local boards="$(ls -1 $CUSTCONF/$customer | grep -v common )"
if [ "$boards" ]; then
for board in $boards; do
echo -e "\t$board"
done
else
echo "has no boards"
fi
done
elif [ "$customers" ]; then
echo -e "$customers"
else
echo "no customers found"
fi
else
echo "No $CUSTCONF folder found"
fi
exit 0
}
generate_config()
{
DIFFFILE="$1"
MASTERFILE="$2"
while read p; do
v "$p"
sed -r -i "$p" $MASTERFILE
done < $DIFFFILE
}
setup_dirs()
{
if [ ! -d "$FILEDIR" ]; then
mkdir -p $FILEDIR
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
v "rm -rf $FILEDIR*"
rm -rf $FILEDIR*
fi
}
create_and_copy_files()
{
local BOARDTYPE=$1
shift
local CUSTOMERS=$@
# Validate seleced board and customers
set_target $BOARDTYPE
if [ $target == "bogus" ]; then
echo "Hardware profile does not exist"
exit 1
elif [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ ! -d "$CUSTCONF/$CUSTOMER/" ]; then
echo "Customer profile for '$CUSTOMER' does not exist"
exit 1
elif [ ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
echo "'$BOARDTYPE' board profile does not exist for customer '$CUSTOMER'"
if [ -f "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
echo "Common profile configuration will be used"
else
exit 1
fi
fi
done
fi
# Generate base config
rm -f .config
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/config .config"
cp $CONFIGPATH/config .config
if [ -f $config_path/config ]; then
cat $config_path/config >> .config
fi
if [ -f $config_path/$BOARDTYPE/config ]; then
cat $config_path/$BOARDTYPE/config >> .config
fi
#special handling for intel_mips/iopsys_ramips which use TARGET_DEVICES
if [ "$target" = "intel_mips" ]; then
subtarget="xrx500"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_MULTI_PROFILE=y" >> .config
echo "CONFIG_TARGET_PER_DEVICE_ROOTFS=y" >> .config
device=$(echo $BOARDTYPE | tr a-z A-Z)
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${device}=y" >> .config
elif [ "$target" = "iopsys_ramips" ]; then
subtarget="mt7621"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
else
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
fi
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
# Add customerconfig diff if a customer is selected
if [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
fi
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
fi
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
fi
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
fi
done
fi
# Set target version
local GIT_TAG=$(git describe --abbrev=0 --tags)
echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${GIT_TAG}\"" >> .config
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
# Enable Package source tree override if selected
[ $SRCTREEOVERR -eq 1 ] && echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
# developer mode selected ?
echo "CONFIG_DEVEL=y" >>.config
if [ -n "$BRCM_MAX_JOBS" ]
then
echo "CONFIG_BRCM_MAX_JOBS=\"1\"" >>.config
fi
# Force regeneration of kernel Makefile
# Needed to disable kmods for iopsys-brcm targets
touch package/kernel/linux/Makefile
# we need to signal to bradcom SDK that we have changed the board id
# currently boardparms.c and boardparms_voice.c is the only place that is depending on inteno boardid name
# so just touch that file.
[ -d ./build_dir ] && find build_dir/ -name "boardparms*c" -print0 2>/dev/null | xargs -0 touch 2>/dev/null
# Store generated config
cp .config .genconfig.config
# Set default values based on selected parameters
v "$(make defconfig 2>&1)"
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
# Clean base-file package to force rebuild when changing profile
v "$(make package/base-files/clean 2>&1)"
verify_config
}
####### main #####
if [ ! -e tmp/.iop_bootstrap ]; then
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
echo "Run: iop feeds_update"
exit 0
fi
if [ $# -eq 0 ]; then
echo Current profile:
cat $CURRENT_CONFIG_FILE
echo "Try ./iop genconfig -h' to get instructions if you want to change current config"
exit 0
else
while [ -n "$1" ]; do
case "$1" in
-c|--clean) export CLEAN=1;;
-n|--no-update) export IMPORT=0;;
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
-t|--target) export TARGET="$2"; shift;;
-p|--profile) export PROFILE="$2"; shift;;
-r|--repo) export CUSTREPO="$2"; shift;;
-s|--override) export SRCTREEOVERR=1;;
-S|--brcmsingel) export BRCM_MAX_JOBS=1;;
-h|--help) usage;;
-l|--list) list_customers 0 $2;;
-a|--list-all)list_customers 1;;
-b|--boards)set_target LIST;exit 0;;
-*)
echo "Invalid option: $1 "
echo "Try -h or --help for more information."
exit 1
;;
*) break;;
esac
shift;
done
setup_dirs
create_and_copy_files "$@"
fi
}
register_command "genconfig_min" "Generate configuration for customer with manual board configuration"

View File

@@ -59,45 +59,19 @@ build_endptmngr_consumer() {
cd "$curdir"
}
build_wifilife_consumer() {
local ver commit
ver=$(grep -w "PKG_VERSION:" ./feeds/iopsys/wifilife/Makefile | cut -d'=' -f2)
commit=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/iopsys/wifilife/Makefile | cut -d'=' -f2)
[ -n "$ver" -a -n "$commit" ] || return
ssh $SERVER "test -f $FPATH/wifilife-$target-${ver}_${commit}.tar.xz" && return
cd ./build_dir/target-*/wifilife-$ver/ipkg-* || cd ./build_dir/target-mips*musl-*/wifilife-$ver/ipkg-*
mkdir -p wifilife-$ver/src
cp -rf wifilife/usr/sbin/* wifilife-$ver/src/
tar Jcf wifilife-${target}-${ver}_${commit}.tar.xz wifilife-$ver
scp -pv wifilife-$target-${ver}_${commit}.tar.xz $SERVER:$FPATH/
cp wifilife-${target}-${ver}_${commit}.tar.xz $curdir/
rm -rf wifilife-$ver
rm -f wifilife-${target}-${ver}_${commit}.tar.xz
cd "$curdir"
}
build_mediatek_kernel() {
local mediatek_commit kernel_version kernel
local mediatek_commit kernel
mediatek_commit=$(grep CONFIG_KERNEL_GIT_COMMIT .config | cut -d '=' -f2 | tr -d '"')
kernel_version=$(grep KERNEL_PATCHVER target/linux/iopsys-ramips/Makefile | cut -d '=' -f2)
kernel=linux-${kernel_version}.*
kernel=linux-git*
[ -n "$mediatek_commit" ] || return
ssh $SERVER "test -f $FPATH/mediatek-kernel-open-$mediatek_commit.tar.gz" && return
echo "Building mediatek kernel tarball from kernel commit:"
echo $mediatek_commit
cd build_dir/target-mipsel_1004kc*/linux-iopsys-ramips*/$kernel
# Save Kconfig files to recreate the same kernel config,
# delete everyting else.
find drivers/net/wireless/mt_wifi -type f ! -name Kconfig | xargs rm
find drivers/net/wireless/rlt_wifi -type f ! -name Kconfig | xargs rm
cd build_dir/target-mipsel_1004kc*/linux-iopsys-ramips*/linux-git*
# remove git repo
rm -rf .git
# patch kernel for openstk
ls consumer_release | while read line; do patch -p1 < consumer_release/$line; done
cd ..
tar -czv $kernel -f mediatek-kernel-open-$mediatek_commit.tar.gz
@@ -105,6 +79,26 @@ build_mediatek_kernel() {
cd "$curdir"
}
build_mediatek_wifi_consumer() {
local ver commit
local chip=$1
ver=$(grep -w "PKG_VERSION:" ./feeds/mediatek/mt${chip}/Makefile | cut -d'=' -f2)
commit=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/mediatek/mt${chip}/Makefile | cut -d'=' -f2)
[ -n "$ver" -a -n "$commit" ] || return
ssh $SERVER "test -f $FPATH/mtk${chip}e-${ver}_${commit}.tar.xz" && return
cd build_dir/target-mipsel_1004kc*/linux-iopsys-ramips*/mtk${chip}e-$ver/ipkg-*
mkdir -p mtk${chip}e-$ver/src
cp -rf kmod-mtk${chip}e/etc mtk${chip}e-$ver/src/
cp -rf kmod-mtk${chip}e/lib mtk${chip}e-$ver/src/
tar Jcf mtk${chip}e-${ver}_${commit}.tar.xz mtk${chip}e-$ver
scp -pv mtk${chip}e-${ver}_${commit}.tar.xz $SERVER:$FPATH/
cp mtk${chip}e-${ver}_${commit}.tar.xz $curdir/
rm -rf mtk${chip}e-$ver
rm -f mtk${chip}e-${ver}_${commit}.tar.xz
cd "$curdir"
}
function print_usage {
echo "Usage: $0 generate_tarballs"
echo " -t <target>"
@@ -119,7 +113,7 @@ function generate_tarballs {
git remote -v | grep -q http && return # do not continue if this is an open SDK environment
target=$(grep CONFIG_TARGET_BOARD .config | cut -d'=' -f2 | tr -d '"')
board=$(grep CONFIG_TARGET_IBOARDID .config | cut -d'=' -f2 | tr -d '"')
board=$(grep CONFIG_TARGET_FAMILY .config | cut -d'=' -f2 | tr -d '"')
profile=$(grep CONFIG_BCM_KERNEL_PROFILE .config | cut -d'=' -f2 | tr -d '"')
majver=$(grep CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"' | cut -f1 -d .)
minver=$(grep CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"' | cut -f2 -d .)
@@ -152,10 +146,10 @@ function generate_tarballs {
build_bcmkernel_consumer
build_natalie_consumer
build_endptmngr_consumer
build_wifilife_consumer
elif [ "$stk_target" == "mediatek" ]; then
build_mediatek_kernel
build_wifilife_consumer
build_mediatek_wifi_consumer 7603
build_mediatek_wifi_consumer 7615
else
echo "Invalid target: $stk_target"
print_usage

View File

@@ -9,8 +9,7 @@ function install_key {
echo "::sysinit:/etc/init.d/rcS S boot" >files/etc/inittab
echo "::shutdown:/etc/init.d/rcS K shutdown" >>files/etc/inittab
echo "tty/0::askfirst:/bin/ash --login" >>files/etc/inittab
echo "console::askfirst:/bin/cttyhack /bin/ash --login" >>files/etc/inittab
echo "console::askconsolelate:/bin/cttyhack /bin/ash --login" >>files/etc/inittab
echo Done
}

View File

@@ -0,0 +1,35 @@
#!/bin/sh
function license_report {
LICDIR="/tmp/licenses-generator/"
LICBIN="${LICDIR}/bin"
dpkg -s python3 python3-requests python3-yaml python3-mako python3-six &> /dev/null
if [ $? -ne 0 ]
then
echo "Missing dependencies"
sudo apt-get update
sudo apt-get install python3 python3-requests python3-yaml python3-mako python3-six
else
echo "Dependecy check passed"
fi
if [ -d "$LICDIR" ]; then
### Take action if $DIR exists ###
echo "Creating json licences file and html formated report"
else
### Control will jump here if $DIR does NOT exists ###
echo "Error: licenses-generator not found. getting from iopsys repo"
git clone git@dev.iopsys.eu:iopsys/licenses-generator.git $LICDIR
fi
LICGET=`${LICBIN}/licenses-generator gen-License bin/`
echo $LICGET
${LICBIN}/licenses-generator gen-licrprt $LICGET
exit 0
}
register_command "license_report" "Generate a Licence report on latest build in json format and html under reports"

View File

@@ -25,6 +25,7 @@ log_stdout=1 # set to 0 to prevent the log to also print to stdout
upd_noreboot=0 # set to 1 if we should not reboot after programming
upd_forceimage=0 # set this to force upgrade even if image is for wrong board.
upd_forceboot=0 # set this to force upgrade of boot loader
upd_keepconfig=0 # set this to keep the current configuration.
###############################################################################
# import external functions
source /lib/upgrade/iopsys.sh
@@ -51,25 +52,41 @@ function log {
# anyhting it calls as stdout/stderr might no longer exist
function finish {
if [ "$run_cleanup" == "1" ]
if [ $run_cleanup -eq 1 ]
then
function_call upd_cleanup
run_cleanup=0
log ""
fi
if [ "$run_mount_cleanup" == "1" ]
if [ $run_mount_cleanup -eq 1 ]
then
log "Cleaning up after mount"
umount_newroot
fi
# always kill the timeout process, will leave the sleep but that is harmless
# as long as the kill will nerver be run.
kill $TIMEOUT_PID 2>/dev/null
if [ -n "$TIMEOUT_PID" ]; then
kill $TIMEOUT_PID 2>/dev/null
TIMEOUT_PID=""
fi
lock -u /tmp/iopu.lock
}
function ctrl_c {
# on ctrl-c we remove the exit handler as it is called directly.
trap - EXIT
# call cleanup function
finish
# do not continue program
exit 1
}
function sig_pipe {
log_stdout=0 # stdin,stdout,stderr do not exist anymore
log "Got sigpipe. Turning of log printing to stdout"
@@ -77,7 +94,6 @@ function sig_pipe {
# if a timout happens terminate
function timeout {
finish
exit 1
}
@@ -133,6 +149,7 @@ function umount_newroot {
umount /tmp/newroot_overlay/rom
umount /tmp/newroot_overlay
umount /tmp/newroot
rmdir /tmp/newroot_overlay /tmp/newroot
run_mount_cleanup=0
}
@@ -141,11 +158,23 @@ function usage {
echo ""
echo "opts:"
echo ""
echo " -n Do not do the final reboot of the target board"
echo " -c Keep configuration"
echo " -x Force install even if firmware is not for this board"
echo " -b Force install of bootloader regardless of version installed"
echo " -r Jump into chroot env of other system"
echo " -n Do not do the final reboot of the target board"
echo " -c Keep configuration"
echo " -x Force install even if firmware is not for this board"
echo " -b Force install of bootloader regardless of version installed"
echo " -r Jump into chroot env of other system"
echo " -C \"command\" Execute command in chroot env of other system"
}
# Execute command in newroot(other system root)
function newroot_exec {
upd_vol=$(get_flashbank_next)
mount_newroot
(ENV=/sbin/iopu_chroot_env chroot /tmp/newroot_overlay "$@")
echo ""
umount_newroot
}
###############################################################################
@@ -161,10 +190,11 @@ then
fi
trap finish EXIT
trap ctrl_c INT
trap timeout SIGALRM
trap sig_pipe SIGPIPE
while getopts "nrxbh" opt; do
while getopts "nrxbhcC:" opt; do
case $opt in
n)
upd_noreboot=1
@@ -175,13 +205,16 @@ while getopts "nrxbh" opt; do
b)
upd_forceboot=1
;;
c)
upd_keepconfig=1
;;
r)
upd_vol=$(get_flashbank_next)
mount_newroot
(ENV=/sbin/iopu_chroot_env chroot /tmp/newroot_overlay /bin/sh)
echo ""
umount_newroot
exit 0
newroot_exec /bin/sh
exit
;;
C)
newroot_exec "${OPTARG}"
exit
;;
h)
usage
@@ -193,8 +226,7 @@ done
# put a timeout on this if it takes longer than 120 seconds we should abort
# and clean up
(
sleep 120 # if 2 minutes pass
kill -ALRM $$ 2>/dev/null # send it a SIGALRM signal
sleep 120 && kill -ALRM $$ 2>/dev/null # send it a SIGALRM signal
)&
TIMEOUT_PID=$!
@@ -211,7 +243,7 @@ fi
cur_vol=$(get_flashbank_current)
upd_vol=$(get_flashbank_next)
# convert volume name "rootfs_$upd_vol" into ubifs volume id
# convert volume name "rootfs_$upd_vol" into ubi volume id
upd_ubi_id=$(ubinfo -d 0 -N rootfs_$upd_vol | awk "/Volume ID:/ {print \$3}")
log "installing Root Fileystem into UBI volume rootfs_$upd_vol"
@@ -227,29 +259,32 @@ function_call upd_conf_kernel
log "now starting writing data to flash with [ iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id ]"
run_cleanup=1 # When we start to actually write data there might be some
# things that need cleanup if we get an error/crash
iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id
# in case of any error we abort
if [ $? -ne 0 ]; then
log "iopupgrade program Failed"
exit 1
if ! iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id; then
log "iopupgrade program Failed"
exit 1
fi
log "Firmware programmed to flash."
log "Transfering configuration to new system."
# Force upgrade of boot loader
[ $upd_forceboot -eq 1 ] && chroot_cmdline="$chroot_cmdline -b"
if [ $upd_keepconfig -eq 1 ]; then
log "Transfering configuration to new system."
chroot_cmdline="$chroot_cmdline -c"
fi
mount_newroot
chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline
if ! chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline; then
log "Configuration migration failed!"
exit 1
fi
umount_newroot
log "Update fully installed."
log "New firmware fully installed."
run_cleanup=0
# Now make sure that we actually boot the new system on the next reboot
upd_finnish
@@ -271,8 +306,3 @@ else
fi

View File

@@ -14,6 +14,7 @@
# by functions declared in this script
upd_forceboot=0
log_stdout=1 # set to 0 to prevent the log to also print to stdout
upd_keepconfig=0 # set this to keep the current configuration.
###############################################################################
# import external functions
@@ -24,33 +25,36 @@ source /lib/upgrade/iopsys.sh
# only call function if it exists
function_call() {
if type "$1" 2>/dev/null >/dev/null
then
$1 $@
fi
if [ -n "$1" ] && type "$1" 2>/dev/null >/dev/null
then
$1 "$@" || exit
fi
}
# Cleanup and error handling functions.
function log {
TIME=$(date)
[ $log_stdout -eq 1 ] && echo "$@"
echo "[$TIME] $@" >>/root/upd_log
TIME=$(date)
[ $log_stdout -eq 1 ] && echo "$@"
echo "[$TIME] $@" >>/root/upd_log
}
while getopts "hb" opt; do
case $opt in
h)
upd_usage
exit 1
;;
b)
upd_forceboot=1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
while getopts "hbc" opt; do
case $opt in
h)
upd_usage
exit 1
;;
c)
upd_keepconfig=1
;;
b)
upd_forceboot=1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
# copy old install log over
@@ -59,3 +63,9 @@ cp /tmp/oldroot/tmp/upd_log /root/upd_log
# Upgrade boot loader if needed.
function_call upd_program_boot
# Let the new upgrade do whatever it needs,
# such as configuration migration etc.
if [ $upd_keepconfig -eq 1 -a -x /lib/upgrade/post-rootfs-fixup ]; then
(/lib/upgrade/post-rootfs-fixup /dev/null /tmp/oldroot) || exit
fi

View File

@@ -1,36 +0,0 @@
#
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=iup
PKG_VERSION:=0.0.1
PKG_RELEASE:=0
include $(INCLUDE_DIR)/package.mk
define Package/iup
SECTION:=net
CATEGORY:=Network
TITLE:=iup client
DEPENDS:=+libuci +uci +busybox
endef
define Package/iup/description
This package contains Inteno's IUP Client
endef
define Build/Compile
true
endef
define Package/iup/install
$(INSTALL_DIR) $(1)/sbin
cp -r ./files/* $(1)/
endef
$(eval $(call BuildPackage,iup))

View File

@@ -1,17 +0,0 @@
package 'provisioning'
config 'general' 'polling'
option 'enabled' 'on'
option 'starttime' '03'
option 'interval' 'daily'
config 'server' 'configserver'
option enabled 'off'
config 'server' 'iup'
option 'enabled' 'on'
config software 'uppgradeserver'
option enabled 'off'

View File

@@ -1,133 +0,0 @@
#!/bin/sh /etc/rc.common
# iup at boot
# Copyright (C) 2007 OpenWrt.org
START=98
STOP=15
USE_PROCD=1
. /lib/functions.sh
include /lib/network
CRONPATH="/etc/crontabs/root"
RANGE=60
management_interfaces() {
local DHCP_IFACES=""
is_notbridged_dhcp() {
local config="$1"
local proto="$(uci -q get network.$config.proto)"
local typ="$(uci -q get network.$config.type)"
if [ "$proto" == "dhcp" -a "$typ" != "bridge" ]; then
DHCP_IFACES="$DHCP_IFACES $config"
fi
}
config_load network
config_foreach is_notbridged_dhcp interface
echo $DHCP_IFACES
}
init_iup() {
local polling_enabled
local interval
local starttime
local nummber
number=$RANDOM
[ -f $CRONPATH ] || touch $CRONPATH
config_load provisioning
config_get polling_enabled polling enabled on
config_get interval polling interval
config_get starttime polling starttime
### Ask for IUP related DHCP options only if IUP is enabled ###
new_reqopts() {
local net=$1
local enabled
local newreqopts=
local baseopts=
local reqopts="$(uci -q get network.$net.reqopts)"
local iupopts="66 67 128 224 225 226"
local ropt iopt
config_get enabled iup enabled "on"
for ropt in $reqopts; do
case $ropt in
66|67|128|224|225|226) ;;
*) baseopts="$baseopts $ropt" ;;
esac
done
ropt=""
reqopts="$baseopts $iupopts"
for ropt in $reqopts; do
case $ropt in
66|67|128|224|225|226) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
*) newreqopts="$newreqopts $ropt" ;;
esac
done
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
echo "$newreqopts"
}
for net in $(management_interfaces); do
uci -q set network.$net.reqopts="$(new_reqopts $net)"
done
uci commit network
ubus call network reload
#################################################################
if [ $polling_enabled == "off" ]; then
sed -i "/\/sbin\/iup/d" $CRONPATH
logger -s -t /etc/init.d/iup[$$] "Provisioning polling unscheduled" 2>/dev/console
return
fi
local log_hour=$starttime
local log_minute
local log_interval=$interval
if [ $interval == "weekly" ]; then
interval="0"
log_interval="$log_interval/sunday"
elif [ $interval == "hourly" ]; then
interval='*'
starttime='*'
else
interval='*'
fi
let "number %= $RANGE"
if ! grep -q "$starttime \* \* \\$interval /sbin/iup" "$CRONPATH" ; then
if grep -q "iup" "$CRONPATH" ; then
sed -i "/iup/d" $CRONPATH
fi
echo "$number $starttime * * $interval /sbin/iup -v > /dev/null 2>&1" >> $CRONPATH
fsync $CRONPATH
/etc/init.d/cron restart
fi
log_minute=$(awk '/\/sbin\/iup/ {print $1}' /etc/crontabs/root)
logger -s -t /etc/init.d/iup[$$] "Provisioning is scheduled at $log_hour:$log_minute $log_interval" 2>/dev/console
}
start_service() {
init_iup
/sbin/iup -v &
}
stop_service() {
if [ -f "/tmp/run/iup.pid" ]; then
kill -9 $(cat /tmp/run/iup.pid)
rm -rf /tmp/run/iup.pid
fi
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger provisioning
}

View File

@@ -1,57 +0,0 @@
#!/bin/sh
. /lib/functions.sh
management_interfaces() {
local DHCP_IFACES=""
is_notbridged_dhcp() {
local config="$1"
local proto="$(uci -q get network.$config.proto)"
local typ="$(uci -q get network.$config.type)"
if [ "$proto" == "dhcp" -a "$typ" != "bridge" ]; then
DHCP_IFACES="$DHCP_IFACES $config"
fi
}
config_load network
config_foreach is_notbridged_dhcp interface
echo $DHCP_IFACES
}
set_iup_reqopts() {
### Ask for IUP related DHCP options only if IUP is enabled ###
new_reqopts() {
local net=$1
local enabled="$(uci -q get provisioning.iup.enabled)"
enabled="${enabled:-on}"
local newreqopts=
local baseopts=
local reqopts="$(uci -q get network.$net.reqopts)"
local iupopts="66 67 128 224 225 226"
local ropt iopt
local net
for ropt in $reqopts; do
case $ropt in
66|67|128|224|225|226) ;;
*) baseopts="$baseopts $ropt" ;;
esac
done
ropt=""
reqopts="$baseopts $iupopts"
for ropt in $reqopts; do
case $ropt in
66|67|128|224|225|226) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
*) newreqopts="$newreqopts $ropt" ;;
esac
done
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
echo "$newreqopts"
}
for net in $(management_interfaces); do
uci -q set network.$net.reqopts="$(new_reqopts $net)"
done
uci commit network
}
set_iup_reqopts

View File

@@ -1,219 +0,0 @@
#!/bin/sh
# functions that take dhcp options received on the wan interface
# and relay/repeat them for specific clients
#config dhcp_option_relay
# option enable 1
# list dhcp_option 43
# list from_interface wan
# option vendorclass '*SDX*'
# where:
# dhcp_option_relay is the name of the section parsed by this script
# enable/enabled - option, enable the uci section [default on]
# dhcp_option/dhcp_options - list of dhcp options (0-255) to be relayed/repeated
# overwrite - if same dhcp_option already exists in /etc/config/dhcp, overwrite it with this option [default off]
# from_interface - list of interfaces (e.g. wan) to get the dhcp options from
. /lib/functions.sh
interface=""
opt224=""
opt225=""
opt226=""
opt43=""
opt128=""
opt66=""
opt67=""
opt132=""
opt133=""
newsectionid="0"
function parse_the_json()
{
local the_json="$@"
json_load "$the_json"
json_get_var interface interface
json_get_var opt224 privopt224
json_get_var opt225 privopt225
json_get_var opt226 privopt226
json_get_var opt43 vendorspecinf # option 43
json_get_var opt128 httpurl128
json_get_var opt66 tftp # option 66
json_get_var opt67 bootfile #option 67
json_get_var opt132 vlanid # option 132
json_get_var opt133 vlanpriority # option 133
}
function add_section_dhcp_vendorclass()
{
local dhcp_option=$1
local dhcp_option_value=$2
local vendorclass=$3
local new=
newsectionid=$((newsectionid+1))
#echo "add_section_dchp_vendorclass $dhcp_option ${dhcp_option_value} $vendorclass"
new=$(uci add dhcp vendorclass)
uci set dhcp.$new.vendorclass="$vendorclass"
uci set dhcp.$new.networkid="dhcp_option_relay_$newsectionid"
uci add_list dhcp.$new.dhcp_option=$dhcp_option,\"${dhcp_option_value}\"
uci commit dhcp
}
function dhcp_option_relay()
{
local section="$1"
local enable="" enabled=""
local dhcp_option="" dhcp_option_value=""
local vendorclass=""
#local overwrite=""
local from_interface
#echo "section: $section"
# parse only enabled sections
config_get_bool enabled $section enabled 1
config_get_bool enable $section enable 1
#echo "enabled: $enabled"
#echo "enable : $enable"
if [ "$enable" == "0" -o "$enabled" == "0" ] ; then
#echo "section $section is not enabled"
return
fi
# todo: for disabled sections: run only the removal of the dhcp options
# option overwrite 1
#config_get_bool overwrite $section overwrite 0
config_get vendorclass $section vendorclass
if [ ${#vendorclass} -le 1 ]; then
#echo "vendorclass must not be empty"
return
fi
# list to_interface lan
# to_interface - list of interfaces (e.g. lan, guest) to advertise the dhcp options to
#foreach_to_interface() {
# local to_interface=$1
# echo ""
# echo " from_interface $from_interface"
# echo " dhcp_option $dhcp_option"
# echo " dhcp_option_value $dhcp_option_value"
# echo " overwrite $overwrite"
# echo " to_interface $to_interface"
#
# if [ ! $(uci -q get dhcp.$to_interface) ] ; then
# echo "to_interface $to_interface does not exist in dhcp uci config"
# return
# fi
#
#}
foreach_dhcp_option() {
dhcp_option=$1
echo "dhcp_option: $dhcp_option"
case $dhcp_option in
43) dhcp_option_value=$opt43 ;;
66) dhcp_option_value=$opt66 ;;
67) dhcp_option_value=$opt67 ;;
128) dhcp_option_value=$opt128 ;;
132) dhcp_option_value=$opt132 ;;
133) dhcp_option_value=$opt133 ;;
224) dhcp_option_value=$opt224 ;;
225) dhcp_option_value=$opt225 ;;
226) dhcp_option_value=$opt226 ;;
*) dhcp_option_value="unsupported" ;;
esac
if [ "${dhcp_option_value}" == "unsupported" ] ; then
echo "dhcp_option $dhcp_option is unsupported"
return
fi
if [ "${dhcp_option_value}" == "" ] ; then
echo "dhcp_option $dhcp_option is empty"
return
fi
#echo "dhcp_option: $dhcp_option dhcp_option_value: ${dhcp_option_value}"
#config_list_foreach $section to_interface foreach_to_interface
add_section_dhcp_vendorclass $dhcp_option ${dhcp_option_value} $vendorclass
}
foreach_from_interface() {
from_interface="$1"
#echo "from_interface: $from_interface"
if [ "$from_interface" != "$interface" ]; then
return
fi
dhcp_option=""
config_list_foreach $section dhcp_option foreach_dhcp_option
#config_list_foreach $section dhcp_options foreach_dhcp_option
}
from_interface=""
config_list_foreach $section from_interface foreach_from_interface
}
# in uci dhcp config:
# remove all the vendorclass sections
# that have previosly been configured by this script.
# all are identified by "option networkid dhcp_option_relay_*"
function dhcp_option_relay_clear_prev()
{
local to_remove=""
foreach_vendorclass() {
local section="$1"
local networkid
config_get networkid $section networkid
case "$networkid"
in dhcp_option_relay*)
to_remove="$to_remove $section"
;;
esac
}
config_load dhcp
config_foreach foreach_vendorclass vendorclass
local sect
for sect in $to_remove ; do
uci_remove dhcp $sect
done
uci_commit dhcp
}
# the main function
function dhcp_option_relay_parse()
{
local the_json="$@"
parse_the_json "$the_json"
dhcp_option_relay_clear_prev
newsectionid="0"
config_load provisioning
config_foreach dhcp_option_relay dhcp_option_relay
#config_foreach dhcp_option_relay dhcp_options_relay
#config_foreach dhcp_option_relay dhcpoption_relay
#config_foreach dhcp_option_relay dhcpoptions_relay
#config_foreach dhcp_option_relay dhcp_optionrelay
#config_foreach dhcp_option_relay dhcp_optionsrelay
#config_foreach dhcp_option_relay dhcpoptionrelay
#config_foreach dhcp_option_relay dhcpoptionsrelay
}
#dhcp_option_relay_parse

View File

@@ -1,595 +0,0 @@
#!/bin/sh
echo $$ > /var/run/iup.pid
. /lib/functions.sh
. /lib/functions/network.sh
. /lib/functions/savecfg.sh
. /lib/functions/dhcp_option_relay.sh
. /usr/share/libubox/jshn.sh
include /lib/upgrade
include /lib/network
export IUPCONFFILES=/tmp/iup/sysupgrade.conffiles.tar.gz
export IUPMD5=/etc/configchecksums
export CONFILESLURP='/tmp/iup/*.conf'
export IUPTEMP="/tmp/iup"
export INTERACTIVE=0
export VERBOSE=0
export CONF=1
export DESKEY=
export MAC=
export RANGE=10
export RETRYSTOP=5
export SLEEP=10
json_load "$(ubus call router.system info)"
json_select system
json_get_var MAC basemac
json_select ..
json_select keys
json_get_var DESKEY des
json_select ..
# MAC lowercase to uppercase and remove ':'
MAC=$(echo $MAC | tr '[a-z]' '[A-Z]' | tr -d ':')
# Convert DESKEY to HEX format
DESKEY=$(echo $DESKEY | tr -d '\n' | hexdump -e '16/1 "%02x"')
# no verbose: no output
# -v log to system log
# -v -v log to system log and console
# -v -v -v log to system log, console and stderr
v() {
[ "$VERBOSE" -eq 0 ] && return
[ "$VERBOSE" -eq 1 ] && logger -t $0[$$] "$@" && return
[ "$VERBOSE" -eq 2 ] && logger -s -t $0[$$] "$@" >/dev/console 2>&1 && return
[ "$VERBOSE" -eq 3 ] && logger -s -t $0[$$] "$@" 2>&1 | tee /dev/console && return
}
vv() {
VERBOSE="$(($VERBOSE + 1))"
v "$@"
VERBOSE="$(($VERBOSE - 1))"
}
get_packages()
{
local pack
pack=$(grep -w 'package' $1)
pack=${pack//package/}
#pack=${pack//[\'|\"]/}
echo $pack | tr -d '\"' | tr -d "'"
}
reload ()
{
local pack
pack=$(get_packages $1)
v "Calling ubus call uci commit for $pack"
for packname in $pack
do
ubus call uci commit '{"config":"'$packname'"}'
sleep 1
done
}
save_usercfg()
{
savecfg_save_config fw_redirect fw_parental wifi
}
apply_usercfg()
{
# decide to save the user changes based on keepuserconfig received through provisioning
local keep
config_load provisioning
config_get_bool keep configserver keepuserconfig "0"
v "apply_usercfg(): keepuserconfig = $keep"
if [ "$keep" != "1" ] ; then
savecfg_rm_files
return
fi
savecfg_apply_config fw_redirect fw_parental wifi
}
handle_provisioning() {
local config="$1"
local default="$2"
local enabled
local url
local tftpfile
local host
local md5
local defaultreset
local pack
local packname
local number=$RANDOM
local retry=1
local number
local incsleep=$SLEEP
let "number %= $RANGE"
if [[ ! -e $IUPTEMP ]]; then
mkdir $IUPTEMP
fi
touch $IUPCONFFILES
config_get_bool enabled "$config" enabled "$default"
config_get_bool defaultreset "$config" defaultreset
config_get deckey "$config" deckey
if [ "$enabled" -eq 1 ]; then
if [ "$config" == "iup" ]; then
v "Using url received in dhcp options"
config_get url "$config" urliup
else
config_get url "$config" url
fi
url=${url//\$MAC/$MAC}
v "Downloading from url \"$url\""
while [ $retry -le $RETRYSTOP ]
do
if [ ${url%%:*} == "tftp" ]; then
tftpfile=${url#*\/\/}
host=${tftpfile%%\/*}
tftpfile=${tftpfile#*\/}
/usr/bin/tftp -l $IUPCONFFILES -r "$tftpfile" -g "$host"
else
get_image "$url" "cat" > $IUPCONFFILES
fi
if [ -s $IUPCONFFILES ]; then
v "Download finished"
retry=$((RETRYSTOP + 1))
else
v "Download failed, retrying in $incsleep seconds"
sleep $incsleep
incsleep=$((incsleep * retry + number))
retry=$((retry+1))
fi
done
fi
if [ ! -s "$IUPCONFFILES" ] && [ "$enabled" -eq 1 ]; then
echo "File not Found"
reboot="off"
CONF=0
else
handle_Downloaded_file $deckey
fi
}
handle_Downloaded_file()
{
local DECKEY
local KEY
[ -n "$1" ] && DECKEY=$(echo $1 | tr -d '\n' | hexdump -e '16/1 "%02x"')
KEY=${DECKEY:-$DESKEY}
local img_type
case "$(get_image_type "$IUPCONFFILES")" in
"INTENO") img_type=2 ;;
"CFE+FS") img_type=1 ;;
"FS") img_type=0 ;;
*) img_type="UNKNOWN";;
esac
if [ "$img_type" == "UNKNOWN" ] ; then
case "$(hexdump -v -n 2 -e '1/1 "%02x"' $IUPCONFFILES)" in
1f8b)
v "Downloaded file is an unencrypted config"
md5=$(md5sum $IUPCONFFILES)
md5="${md5%% *}" # remove the first space and everything after it
md5sum "$IUPCONFFILES" >> "$IUPMD5.temp"
if grep -q "$md5" "$IUPMD5"; then
v "Config is already up to date, nothing to do"
#because config is up to date we need to disable last step reboot if set
reboot="off"
rm -rf $IUPTEMP
else
save_usercfg
cd $IUPTEMP
tar xvzf $IUPCONFFILES
for f in $CONFILESLURP
do
v "File to be applied $f and config $(cat $f)"
uci -f $f import
done
pack=$(get_packages $CONFILESLURP)
v "Packages to be commited: $pack"
for packname in $pack
do
uci commit $packname
done
apply_usercfg
reboot=`uci -q get provisioning.configserver.reboot`
if [ "$reboot" != "on" ]; then
sync
reload $CONFILESLURP
fi
rm -rf $IUPTEMP
cp /rom/etc/uci-defaults/* /etc/uci-defaults/
sync
fi
;;
*)
v "Downloaded file is an encrypted config"
if [ $KEY ]; then
openssl enc -d -des-ede -nosalt -K $KEY -iv "0000000000000000" -in $IUPCONFFILES -out $IUPCONFFILES.tmp
if [ $? -eq 0 ]; then
v "Decryption successful"
mv $IUPCONFFILES.tmp $IUPCONFFILES
handle_Downloaded_file
else
v "Decryption Failed! Exiting"
rm -rf $IUPTEMP
exit 1
fi
else
v "No Key Defined"
rm -rf $IUPTEMP
exit 1
fi
;;
esac
else
v "Downloaded file is a firmware, will start reflashing"
if [ "$defaultreset" -eq 1 ]; then
v "Not saving configuration over reflash"
/sbin/sysupgrade -v -n $IUPCONFFILES
else
v "Saving configuration over reflash"
/sbin/sysupgrade -v $IUPCONFFILES
fi
fi
}
# function: change_to_vlan
# arg 1 = vlan id
# arg 2 = vlan priority
# arg 3 = $INTERFACE
change_to_vlan() {
# local variables.
local name="vlan$1" # construct name = vlan + vlanid.
local base_dev # varible holding device name of wan port.
local wan_if # variable holding wan interfaces.
local new_wan_if #
# extract device name.
network_get_device base_dev $3
# bring down old interface/device.
ifdown "${base_dev}"
v "option 132: bringing down old if: ${base_dev}"
# extract base name of device.
base_dev=$(echo ${base_dev} | cut -d. -f1)
# add "VLAN interface" to the "end of the file".
uci add network device
uci rename network.@device[-1]=${name}
uci set network.@device[-1].type=8021q
uci set network.@device[-1].ifname=${base_dev}
uci set network.@device[-1].name="${base_dev}.${1}"
uci set network.@device[-1].vid=${1}
uci set network.@device[-1].priority=${2}
# and commit the change.
uci commit network
v "option 132: committed update to file network"
# reload configuration files.
ubus call network reload
v "option 132: reload network config"
# replace old interface (like eth0.1 with new eth0.101).
wan_if=$(uci get network.$3.ifname)
v "option 132: old network.${3}.ifname: $wan_if"
# loop through the string, remove any word close to "base_dev".
for word in ${wan_if}; do
#echo $word
case $word in
${base_dev}*) # don't add if.
;;
*) new_wan_if=${word}' '${new_wan_if} # add if.
#new_wan_if+=" ${word}" # probably not working in ash.
;;
esac
done
# append new interface.
new_wan_if=${new_wan_if}${base_dev}.${1}
uci set network.wan.ifname="${new_wan_if}"
# and commit the change.
uci commit network
v "option 132: committed update to file network: ifname=${new_wan_if}"
# reboot into new if configuration.
vv "Rebooting"
export REBOOT_REASON=iup
/sbin/reboot
}
handle_option224()
{
if [ -z "$1" ] ; then
echo "No argument"
return 1
fi
if [ $(echo $1|grep -o "," | wc -l) -eq 0 ] ; then
url=$1
else
url=$(echo $1|cut -d',' -f1)
a=$(echo $1|cut -d',' -f2)
b=$(echo $1|cut -d',' -f3)
c=$(echo $1|cut -d',' -f4)
fi
currdate=$(date +"%Y-%m-%d")
active=0
if [ -z $a ] ; then
active=1
elif [ $a ] && [ $b ] && [ $a -lt 25 ] ; then
#Time
begin=$(date +%s -d"$currdate $a")
now=$(date +%s)
end=$((begin+3600*$b))
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
active=1
fi
elif [ $a ] && [ $b ] && [ $c ] && [ $a -gt 25 ] ; then
#Date
y=$(echo $a| cut -c1-4)
m=$(echo $a| cut -c5-6)
d=$(echo $a| cut -c7-8)
begin=$(date +%s -d"$y-$m-$d $b")
now=$(date +%s)
end=$((begin+3600*$c))
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
active=1
fi
else
echo "Bad format"
return 1
fi
softwareminuspath=${url##*/}
if [ $url ] && [ $active -eq 1 ]; then
v "Software version to download \"$softwareminuspath\""
local sysinfo=$(ubus call router.system info)
json_load "$sysinfo"
json_select system
json_get_var firmware firmware
local firmware_new=${softwareminuspath%.*} # remove extension (.w, .y or .y2) from filename
if [ "$firmware_new" != "$firmware" ] ; then
v "Firmware found $url will start flashing"
v "Currently running firmware: \"$firmware\""
v "Newly received firmware: \"$firmware_new\""
wait_for_dns $url
v "Start flashing"
/sbin/sysupgrade -v $url &
return 1
else
v "Firmware is up to date, nothing to do"
return 0
fi
fi
}
parse_dhcp_options()
{
local the_json="$@"
# process the dhcp_option_relay sections
dhcp_option_relay_parse "$the_json"
# Process IUP related DHCP options #
local privopt224 privopt225 privopt226 vendorspecinf httpurl128
local tftp bootfile vlanid vlanpriority interface
json_load "$the_json"
json_get_var interface interface
json_get_var privopt224 privopt224
json_get_var privopt225 privopt225
json_get_var privopt226 privopt226
json_get_var vendorspecinf vendorspecinf # option 43
json_get_var httpurl128 httpurl128
json_get_var tftp tftp # option 66
json_get_var bootfile bootfile #option 67
json_get_var vlanid vlanid # option 132
json_get_var vlanpriority vlanpriority # option 133
if [ $privopt224 ]; then
v "dhcp option 224 firmware url $privopt224"
handle_option224 $privopt224
[ $? -eq 1 ] && exit
fi
if [ $vendorspecinf ]; then
v "dhcp option 43 tr69 url $vendorspecinf"
url=${vendorspecinf%%,*}; rest=${vendorspecinf#*,}
provisioningcode=${rest%%,*};
[ -f /etc/config/cwmp ] && uci_set_state cwmp acs dhcp_url "$url"
uci_set_state provisioning iup urlcwmp "$url"
uci_set_state provisioning iup url "$url"
uci_set_state provisioning iup provisioningcode "$provisioningcode"
elif [ $httpurl128 ]; then
v "dhcp option 128 http config url $httpurl128"
uci_set_state provisioning iup urliup "$httpurl128"
elif [ $tftp ]; then
v "dhcp option 66 tftp config url $tftp"
if [ ${bootfile:0:1} == '/' ]; then
uci_set_state provisioning iup urliup "tftp://$tftp$bootfile"
else
uci_set_state provisioning iup urliup "tftp://$tftp/$bootfile"
fi
fi
# vlanid (and vlanpriority)
if [ -n "$vlanid" -a -n "$vlanpriority" ]; then
v "dhcp option 132 vlanid: ${vlanid} vlanpriority: ${vlanpriority}"
change_to_vlan ${vlanid} ${vlanpriority} ${interface}
elif [ -n "$vlanid" ]; then
v "dhcp option 132 vlanid: ${vlanid}"
change_to_vlan ${vlanid} 0 ${interface}
elif [ -n "$privopt225" ] || [ -n "$privopt226" ]; then
# opt225 and opt226 can be used together or separatly
if [ -n "$privopt225" ]; then
v "dhcp option 225: $privopt225"
# option225 is allowd to change only once per CPE
if [ "$(uci get -q ice.cloud.frozen)" != "1" ] ; then
uci set ice.cloud.frozen="1"
uci set ice.cloud.enabled="1"
uci set ice.cloud.server="$privopt225"
fi
fi
if [ -n "$privopt226" ]; then
v "dhcp option 226: $privopt226"
[ -z "$(uci get -q ice.dhcp)" ] && uci set ice.dhcp="dhcp"
uci set ice.dhcp.opt226connectionid="$privopt226"
ubus send dhcp.opt226connectionid '{"opt226connectionid":"","value":"'$privopt226'"}'
fi
uci commit
fi
}
# wait_for_default_gateway to become reachable
# return 0 if the default gateway is reachable
# return 1 if the default gateway is not reachable after $wait_time
wait_for_default_gateway()
{
local gateway
local device
local wait_time=120
local wait_interval=10
while [ true ] ; do
gateway=""
device=""
network_flush_cache
network_get_gateway gateway wan #true
network_get_device device wan
device="${device:+-I }$device"
if ping -q -w 1 -c 1 $device $gateway >/dev/null 2>&1 ; then
[ "$wait_time" -lt "60" ] && v "Default gateway $gateway is reachable"
sleep $wait_interval
return 0
fi
# try the nameservers too
for ns in $(grep nameserver /var/resolv.conf.auto | awk '{print $2}'); do
if ping -q -w 1 -c 1 $device $ns >/dev/null 2>&1 ; then
[ "$wait_time" -lt "60" ] && v "Name server $ns is reachable"
sleep $wait_interval
return 0
fi
done
v "Waiting for default gateway or name server. Countdown $wait_time seconds"
sleep $wait_interval
wait_time=$((wait_time - wait_interval))
[ "$wait_time" -le "0" ] && break # timer expired
done
return 1 # default gateway and name server are not reachable
}
main()
{
while [ -n "$1" ]; do
case "$1" in
-v) export VERBOSE="$(($VERBOSE + 1))";;
-q) export VERBOSE="$(($VERBOSE - 1))";;
--dhcp-options)
shift
parse_dhcp_options "$@"
exit 0
;;
-*)
echo "Invalid option: $1"
exit 1
;;
*) break;;
esac
shift;
done
if ! wait_for_default_gateway ; then
v "Neither default gateway nor name server are reachable. Aborting iup."
exit 1
fi
if [ ! -f $IUPMD5 ]; then
v "Creating file $IUPMD5"
touch $IUPMD5
fi
local iupurl
local configurl
local software
local sofwareminuspath
config_load provisioning
#check if iup should be used or if its overridden by /etc/config
config_get configurl configserver url
config_get reboot configserver reboot
config_get iupurl iup urliup
if [ $configurl ]; then
handle_provisioning configserver "0"
elif [ $iupurl ]; then
handle_provisioning iup "1"
else
v "No provisioning server configured"
exit
fi
config_load provisioning
config_foreach handle_provisioning subconfig "0"
config_get software uppgradeserver url
sofwareminuspath=${software##*/}
if [ $software ]; then
v "Software version to download \"$sofwareminuspath\""
local sysinfo=$(ubus call router.system info)
json_load "$sysinfo"
json_select system
json_get_var firmware firmware
json_get_var filesystem filesystem
if [ "$filesystem" == "JFFS2" ] ; then
firmware=$firmware.w
else
firmware=$firmware.y3
fi
if [ "$sofwareminuspath" == "${sofwareminuspath/$firmware/}" ] ; then
v "Software \"$software\""
handle_provisioning uppgradeserver "0"
else
v "Will not update software, already up to date"
fi
fi
if [ $CONF -eq 1 ]; then
mv "$IUPMD5.temp" $IUPMD5
fi
if [ "$reboot" == "on" ]; then
vv "Rebooting"
export REBOOT_REASON=iup
/sbin/reboot
fi
rm -rf /var/run/iup.pid
}
main $@

View File

@@ -1,8 +1,5 @@
#
# Copyright (C) 2008-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
@@ -20,7 +17,7 @@ include $(INCLUDE_DIR)/cmake.mk
define Package/json-editor
SECTION:=base
CATEGORY:=Libraries
DEPENDS:=+libjson-c +libblobmsg_json
DEPENDS:=+libjson-c +libblobmsg-json
TITLE:=JSON-editor
endef

View File

@@ -1,105 +0,0 @@
#
# Copyright (C) 2016 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:=libcgroup
PKG_VERSION:=0.41
PKG_RELEASE:=1
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE_VERSION:=2186c97f60df7efe86ddadd5e3d9d36dd4923b98
PKG_SOURCE_URL:=git://git.code.sf.net/p/libcg/libcg
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)+git$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
#PKG_BUILD_PARALLEL:=1
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/libcgroup
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libpthread
TITLE:=Control group configuration library
URL:=https://sourceforge.net/p/libcg/
endef
define Package/libcgroup/description
Control groups, a new kernel feature in Linux 2.6.24 provides a file system
interface to manipulate and control the details on task grouping including
creation of new task groups (control groups), permission handling and task
assignment.
endef
define Package/libcgroup-daemon
SECTION:=base
CATEGORY:=Base system
DEPENDS:=+libcgroup +librt
TITLE:=Control group management daemon
URL:=https://sourceforge.net/p/libcg/
endef
define Package/libcgroup-utils
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libcgroup
TITLE:=Control group configuration utilities
URL:=https://sourceforge.net/p/libcg/
endef
#define Package/libcgroup/conffiles
# /etc/config/cgroups
#endef
CONFIGURE_ARGS += \
--disable-bindings \
--disable-pam \
--enable-static \
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libcgroup
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libcgroup/*.h $(1)/usr/include/libcgroup/
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.* $(1)/usr/lib/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcgroup.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libcgroup/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.so* $(1)/usr/lib/
endef
define Package/libcgroup-daemon/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
# move to its own package?
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
$(INSTALL_CONF) ./files/cgroups.config $(1)/etc/config/cgroups
$(INSTALL_BIN) ./files/cgroups.init $(1)/etc/init.d/cgroups
endef
define Package/libcgroup-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
endef
$(eval $(call BuildPackage,libcgroup))
$(eval $(call BuildPackage,libcgroup-daemon))
$(eval $(call BuildPackage,libcgroup-utils))

View File

@@ -1,40 +0,0 @@
config cgroups cgroups
option enabled 1
option defgroup iopsys/normal
config cgroup _root_
list option memory.move_charge_at_immigrate=1
config cgroup iopsys
list option cpu.shares=4096
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 memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_high
list option cpu.shares=4096
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 memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_normal
list option cpu.shares=1024
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 memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config procmap procmap
list procmap minidlna=3prt/normal

View File

@@ -1,123 +0,0 @@
#!/bin/sh /etc/rc.common
START=01
USE_PROCD=1
#PROCD_DEBUG=1
NAME=cgrulesengd
CGBASEDIR=/sys/fs/cgroup
CGCONFIG="cgroups"
CGRULESCONF=/tmp/cgrules.conf
CGCONFIGCONF=/tmp/cgconfig.conf
cgroupinit_add_knob_val_to_list () {
CG_KNOB_VAL_LIST="$CG_KNOB_VAL_LIST
$1"
}
cgroupinit_create_group () {
local cgrp=$1
local dir curr
if [ "$cgrp" == "_root_" ]; then
dir=.
else
dir=$(echo $cgrp |tr '_' '/')
fi
echo -e "group $dir {" >> $CGCONFIGCONF
CG_KNOB_VAL_LIST=
config_list_foreach $cgrp option cgroupinit_add_knob_val_to_list
CG_KNOB_VAL_LIST=$(echo "$CG_KNOB_VAL_LIST" |sort)
curr="_none_"
for knob_val in $CG_KNOB_VAL_LIST ; do
local ctrlr knob val
knob=$(echo $knob_val |awk -F= '{print $1}')
ctrlr=$(echo $knob |awk -F. '{print $1}')
val=$(echo $knob_val |awk -F= '{print $2}')
if [ "$curr" != "$ctrlr" ]; then
[ "$curr" == "_none_" ] || echo -e "\t}" >> $CGCONFIGCONF
curr=$ctrlr
echo -e "\t$curr {" >> $CGCONFIGCONF
fi
echo -e "\t\t$knob = \"$val\";" >> $CGCONFIGCONF
done
[ "$curr" == "_none_" ] || echo -e "\t}" >> $CGCONFIGCONF
echo -e "}\n" >> $CGCONFIGCONF
}
cgroupinit_add_to_rules () {
local name_grp=$1
local name grp
name=$(echo $name_grp |awk -F= '{print $1}')
grp=$(echo $name_grp |awk -F= '{print $2}')
echo -e "*:$name\t*\t$grp" >> $CGRULESCONF
}
cgroupinit_generate_config () {
local enab defgrp
config_load $CGCONFIG
config_get enab cgroups enabled "1"
[ $enab -eq 0 ] && return 1
config_get defgrp cgroups defgroup "_undef_"
[ "$defgrp" == "_undef_" ] && return 1
# mount here instead of in cgconfigparser to get all options right
# mounting without any controllers listed means mount all available
if ! grep -q " $CGBASEDIR cgroup " /proc/mounts; then
mount -t cgroup -o nodev,noexec,nosuid cgroup $CGBASEDIR
[ $? -eq 0 ] || return 1
fi
echo -n '' > $CGCONFIGCONF
config_foreach cgroupinit_create_group cgroup
echo -n '' > $CGRULESCONF
config_list_foreach procmap procmap cgroupinit_add_to_rules
echo -e "*\t*\t$defgrp" >> $CGRULESCONF
return 0
}
# cgrulesengd has hardcoded paths for configuration files
# use symlinks to point to generated config files
cgroupinit_cgrulesengd_fixup () {
[ -r /etc/cgrules.conf ] || ln -s $CGRULESCONF /etc/cgrules.conf
[ -r /etc/cgconfig.conf ] || ln -s $CGCONFIGCONF /etc/cgconfig.conf
[ -d /etc/cgconfig.d ] || mkdir /etc/cgconfig.d
}
start_service () {
cgroupinit_generate_config
[ $? -eq 0 ] || return
cgroupinit_cgrulesengd_fixup
/usr/sbin/cgconfigparser -l $CGCONFIGCONF || return
procd_open_instance
procd_set_param command /usr/sbin/cgrulesengd --nodaemon --syslog
procd_set_param respawn
procd_close_instance
}
stop_service () {
/usr/sbin/cgclear
}
service_triggers() {
procd_add_reload_trigger $CGCONFIG
}

56
libmicroxml/Makefile Normal file
View File

@@ -0,0 +1,56 @@
#
# Copyright (C) 2012-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libmicroxml
PKG_VERSION:=2012-06-11
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/mirror/microxml.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=72965423184f24cc0b963d91c2d1863cdb01b6aa
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_LICENSE:=LGPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/libmicroxml
SECTION:=libs
CATEGORY:=Libraries
TITLE:=XML library
MAINTAINER:=Luka Perkov <luka@openwrt.org>
endef
define Package/libmicroxml/description
A micro sized XML library
endef
CONFIGURE_ARGS += \
--disable-threads \
--enable-static \
--enable-shared
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_BUILD_DIR)/microxml.h $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmicroxml.so* $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_BUILD_DIR)/microxml.pc $(1)/usr/lib/pkgconfig
endef
define Package/libmicroxml/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmicroxml.so* $(1)/usr/lib
endef
$(eval $(call BuildPackage,libmicroxml))

View File

@@ -0,0 +1,130 @@
diff --git a/mxml-file.c b/mxml-file.c
index 02eca9d..f10d202 100644
--- a/mxml-file.c
+++ b/mxml-file.c
@@ -363,9 +363,12 @@ mxmlSaveFile(mxml_node_t *node, /* I - Node to write */
* Write the node...
*/
- if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0)
+ if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0){
+ global_free(global);
return (-1);
-
+ }
+
+ global_free(global);
if (col > 0)
if (putc('\n', fp) < 0)
return (-1);
@@ -1448,6 +1451,7 @@ mxml_load_data(
if ((buffer = malloc(64)) == NULL)
{
mxml_error("Unable to allocate string buffer!");
+ global_free(global);
return (NULL);
}
@@ -2083,11 +2087,12 @@ mxml_load_data(
node->parent ? node->parent->value.element.name : "(null)");
mxmlDelete(first);
-
+ global_free(global);
return (NULL);
}
}
+ global_free(global);
if (parent)
return (parent);
else
@@ -2102,7 +2107,7 @@ error:
mxmlDelete(first);
free(buffer);
-
+ global_free(global);
return (NULL);
}
diff --git a/mxml-private.c b/mxml-private.c
index 4378ca3..ea6e452 100644
--- a/mxml-private.c
+++ b/mxml-private.c
@@ -41,6 +41,32 @@
* This code currently supports AIX, HP-UX, Linux, Mac OS X, Solaris, and
* Windows. It might work on the BSDs and IRIX, but I haven't tested that.
*/
+void *global_mem[16] = {0};
+
+static void *global_calloc(int x, int size)
+{
+ int i;
+ void *m = calloc(x, size);
+ for (i = ((sizeof(global_mem)/sizeof(global_mem[0])) - 1); i > 0; i--) {
+ global_mem[i] = global_mem[i-1];
+ }
+ global_mem[0] = m;
+ return m;
+}
+
+void global_free(void *m)
+{
+ int i;
+ if (m == NULL)
+ return;
+ for (i = ((sizeof(global_mem)/sizeof(global_mem[0])) - 1); i >= 0; i--) {
+ if (global_mem[i] == m) {
+ global_mem[i] = NULL;
+ free(m);
+ break;
+ }
+ }
+}
#if defined(__sun) || defined(_AIX)
# pragma fini(_mxml_fini)
@@ -148,7 +174,6 @@ mxml_real_cb(mxml_node_t *node) /* I - Current node */
return (MXML_REAL);
}
-
#ifdef HAVE_PTHREAD_H /**** POSIX threading ****/
# include <pthread.h>
@@ -190,7 +215,6 @@ _MXML_FINI(void)
}
}
-
/*
* '_mxml_global()' - Get global data.
*/
@@ -205,7 +229,7 @@ _mxml_global(void)
if ((global = (_mxml_global_t *)pthread_getspecific(_mxml_key)) == NULL)
{
- global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t));
+ global = (_mxml_global_t *)global_calloc(1, sizeof(_mxml_global_t));
pthread_setspecific(_mxml_key, global);
global->num_entity_cbs = 1;
@@ -288,7 +312,7 @@ _mxml_global(void)
if ((global = (_mxml_global_t *)TlsGetValue(_mxml_tls_index)) == NULL)
{
- global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t));
+ global = (_mxml_global_t *)global_calloc(1, sizeof(_mxml_global_t));
global->num_entity_cbs = 1;
global->entity_cbs[0] = _mxml_entity_cb;
diff --git a/mxml-private.h b/mxml-private.h
index c591208..72ed338 100644
--- a/mxml-private.h
+++ b/mxml-private.h
@@ -43,3 +43,4 @@ typedef struct _mxml_global_s
extern _mxml_global_t *_mxml_global(void);
extern int _mxml_entity_cb(const char *name);
+extern void global_free(void *m);

View File

@@ -8,12 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_RELEASE:=1
PKG_VERSION:=0.2
PKG_VERSION:=0.3
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libpicoevent.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=7875222706cb6999af0361ef0aebdc85cd75c127
PKG_SOURCE_VERSION:=f4ab03b22fca57cec6c959fb5c54bcdd64c32467
PKG_NAME:=libpicoevent
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

33
librpc/Makefile Normal file
View File

@@ -0,0 +1,33 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=librpc
PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/librpc-uclibc.git
PKG_SOURCE_DATE:=2015-11-04
PKG_SOURCE_VERSION:=a921e3ded051746f9f7cd5e5a312fb6771716aac
PKG_MIRROR_HASH:=22c8dc55e1c4e8e31635a37708a3ce622a6ca33ebd918a4321b0be6ffce89b21
CMAKE_INSTALL:=1
PKG_USE_MIPS16:=0
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/librpc
SECTION:=libs
CATEGORY:=Libraries
TITLE:=uClibc RPC library
endef
define Package/librpc/install
$(INSTALL_DIR) $(1)/lib/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/librpc.so $(1)/lib/
endef
$(eval $(call BuildPackage,librpc))

View File

@@ -18,9 +18,10 @@ PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
CXX_DEPENDS:=libstdcpp
define Package/libtrace/Default
SECTION:=net
CATEGORY:=Network
@@ -33,7 +34,7 @@ define Package/libtrace
CATEGORY:=Libraries
TITLE:=Libtrace library for packet trace processing
URL:=http://research.wand.net.nz/software/libtrace.php
DEPENDS:=+libpcap +libpthread +zlib +libbz2 +liblzo +librt $(CXX_DEPENDS)
DEPENDS:=+libpcap +libpthread +zlib +libbz2 +liblzo +librt +liblzma +$(CXX_DEPENDS)
endef
define Package/libtrace/description

View File

@@ -1,50 +0,0 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=logrotate
PKG_VERSION:=3.7.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/l/logrotate
PKG_MD5SUM:=552639142e163745f6bcd4f1f3816d8a
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/logrotate
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libpopt
TITLE:=rotates, compresses, and mails system logs
endef
define Build/Compile
$(call Build/Compile/Default, \
RPM_OPT_FLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \
LDFLAGS="$(EXTRA_LDFLAGS)" \
logrotate \
)
endef
define Package/logrotate/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(CP) ./files/logrotate.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/logrotate.d
endef
$(eval $(call BuildPackage,logrotate))

View File

@@ -1,30 +0,0 @@
# rotate log files weekly
weekly
#daily
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
notifempty
nomail
#olddir /var/log/backup/
missingok
#dateext
# uncomment this if you want your log files compressed
#compress
# packages can drop log rotation information into this directory
include /etc/logrotate.d
# no packages own lastlog or wtmp -- we'll rotate them here
#/var/log/wtmp {
# monthly
# create 0664 root utmp
# rotate 1
#}
# system-specific logs may be also be configured here.

View File

@@ -1,433 +0,0 @@
diff -u -ruN logrotate-3.7.1.orig/config.c logrotate-3.7.1/config.c
--- logrotate-3.7.1.orig/config.c 2003-08-07 07:13:14.000000000 -0400
+++ logrotate-3.7.1/config.c 2005-05-24 12:21:09.000000000 -0400
@@ -511,6 +511,14 @@
newlog->flags &= ~LOG_FLAG_IFEMPTY;
*endtag = oldchar, start = endtag;
+ } else if (!strcmp(start, "dateext")) {
+ newlog->flags |= LOG_FLAG_DATEEXT;
+
+ *endtag = oldchar, start = endtag;
+ } else if (!strcmp(start, "nodateext")) {
+ newlog->flags &= ~LOG_FLAG_DATEEXT;
+
+ *endtag = oldchar, start = endtag;
} else if (!strcmp(start, "noolddir")) {
newlog->oldDir = NULL;
@@ -670,6 +678,21 @@
}
*endtag = oldchar, start = endtag;
}
+ } else if (!strcmp(start, "maxage")) {
+ *endtag = oldchar, start = endtag;
+
+ if (!isolateValue(configFile, lineNum, "maxage count", &start,
+ &endtag)) {
+ oldchar = *endtag, *endtag = '\0';
+
+ newlog->rotateAge = strtoul(start, &chptr, 0);
+ if (*chptr || newlog->rotateAge < 0) {
+ message(MESS_ERROR, "%s:%d bad maximum age '%s'\n",
+ configFile, lineNum, start);
+ return 1;
+ }
+ *endtag = oldchar, start = endtag;
+ }
} else if (!strcmp(start, "errors")) {
message(MESS_DEBUG, "%s: %d: the errors directive is deprecated and no longer used.\n",
configFile, lineNum);
diff -u -ruN logrotate-3.7.1.orig/logrotate.8 logrotate-3.7.1/logrotate.8
--- logrotate-3.7.1.orig/logrotate.8 2003-08-07 07:13:14.000000000 -0400
+++ logrotate-3.7.1/logrotate.8 2005-05-24 12:21:09.000000000 -0400
@@ -200,6 +200,11 @@
Log files are rotated every day.
.TP
+\fBdateext\fR
+Archive old versions of log files adding a daily extension like YYYYMMDD
+instead of simply adding a number.
+
+.TP
\fBdelaycompress\fR
Postpone compression of the previous log file to the next rotation cycle.
This has only effect when used in combination with \fBcompress\fR.
@@ -246,6 +251,12 @@
instead of the just-rotated file (this is the default).
.TP
+\fBmaxage\fR \fIcount\fR
+Remove rotated logs older than <count> days. The age is only checked
+if the logfile is to be rotated. The files are mailed to the
+configured address if \fBmaillast\fR and \fBmail\fR are configured.
+
+.TP
\fBmissingok\fR
If the log file is missing, go on to the next one without issuing an error
message. See also \fBnomissingok\fR.
diff -u -ruN logrotate-3.7.1.orig/logrotate.c logrotate-3.7.1/logrotate.c
--- logrotate-3.7.1.orig/logrotate.c 2004-10-19 17:41:24.000000000 -0400
+++ logrotate-3.7.1/logrotate.c 2005-05-24 12:21:09.000000000 -0400
@@ -11,6 +11,7 @@
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
+#include <glob.h>
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
@@ -22,6 +23,10 @@
#include "log.h"
#include "logrotate.h"
+#if !defined(GLOB_ABORTED) && defined(GLOB_ABEND)
+#define GLOB_ABORTED GLOB_ABEND
+#endif
+
typedef struct {
char * fn;
struct tm lastRotated; /* only tm.mon, tm_mday, tm_year are good! */
@@ -42,6 +47,14 @@
char * mailCommand = DEFAULT_MAIL_COMMAND;
time_t nowSecs = 0;
+static int globerr(const char * pathname, int theerr) {
+ message(MESS_ERROR, "error accessing %s: %s\n", pathname,
+ strerror(theerr));
+
+ /* We want the glob operation to continue, so return 0 */
+ return 1;
+}
+
static logState * findState(const char * fn, struct stateSet * sip) {
int i;
logState * states = sip->states;
@@ -49,9 +62,11 @@
struct tm now = *localtime(&nowSecs);
time_t lr_time;
+ /* find the filename fn in the statesPtr list */
for (i = 0; i < numStates; i++)
if (!strcmp(fn, states[i].fn)) break;
+ /* not in statesPtr list, so add new entry */
if (i == numStates) {
i = numStates++;
states = realloc(states, sizeof(*states) * numStates);
@@ -121,6 +136,17 @@
return rc;
}
+static int removeLogFile(char * name) {
+ message(MESS_DEBUG, "removing old log %s\n", name);
+
+ if (!debug && unlink(name)) {
+ message(MESS_ERROR, "Failed to remove old log %s: %s\n",
+ name, strerror(errno));
+ return 1;
+ }
+ return 0;
+}
+
static int compressLogFile(char * name, logInfo * log, struct stat *sb) {
char * compressedName;
const char ** fullCommand;
@@ -265,6 +291,25 @@
return rc;
}
+static int mailLogWrapper (char * mailFilename, char * mailCommand, int logNum, logInfo * log) {
+ /* if the log is compressed (and we're not mailing a
+ * file whose compression has been delayed), we need
+ * to uncompress it */
+ if ((log->flags & LOG_FLAG_COMPRESS) &&
+ !((log->flags & LOG_FLAG_DELAYCOMPRESS) &&
+ (log->flags & LOG_FLAG_MAILFIRST))) {
+ if (mailLog(mailFilename, mailCommand,
+ log->uncompress_prog, log->logAddress,
+ log->files[logNum]))
+ return 1;
+ } else {
+ if (mailLog(mailFilename, mailCommand, NULL,
+ log->logAddress, mailFilename))
+ return 1;
+ }
+ return 0;
+}
+
static int copyTruncate(char * currLog, char * saveLog, struct stat * sb, int flags) {
char buf[BUFSIZ];
int fdcurr = -1, fdsave = -1;
@@ -479,6 +524,9 @@
char * baseName;
char * dirName;
char * firstRotated;
+ char * glob_pattern;
+ glob_t globResult;
+ int rc;
size_t alloc_size;
int rotateCount = log->rotateCount ? log->rotateCount : 1;
int logStart = (log->logStart == -1) ? 1 : log->logStart;
@@ -509,7 +557,7 @@
alloc_size = strlen(dirName) + strlen(baseName) +
strlen(log->files[logNum]) + strlen(fileext) +
- strlen(compext) + 10;
+ strlen(compext) + 18;
oldName = alloca(alloc_size);
newName = alloca(alloc_size);
@@ -531,16 +579,116 @@
/* First compress the previous log when necessary */
if (log->flags & LOG_FLAG_COMPRESS &&
log->flags & LOG_FLAG_DELAYCOMPRESS) {
- struct stat sbprev;
-
- sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
- if (stat(oldName, &sbprev)) {
- message(MESS_DEBUG, "previous log %s does not exist\n",
- oldName);
- } else {
- hasErrors = compressLogFile(oldName, log, &sbprev);
+ if (log->flags & LOG_FLAG_DATEEXT) {
+ /* glob for uncompressed files with our pattern */
+ glob_pattern = malloc(strlen(dirName) + strlen(baseName)
+ + strlen(fileext) + 44 );
+ sprintf(glob_pattern,
+ "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s",
+ dirName, baseName, fileext);
+ rc = glob(glob_pattern, 0, globerr, &globResult);
+ if (!rc && globResult.gl_pathc > 0) {
+ for (i = 0; i < globResult.gl_pathc && !hasErrors; i++) {
+ struct stat sbprev;
+ sprintf(oldName,"%s",(globResult.gl_pathv)[i]);
+ if (stat(oldName, &sbprev)) {
+ message(MESS_DEBUG, "previous log %s does not exist\n", oldName);
+ } else {
+ hasErrors = compressLogFile(oldName, log, &sbprev);
+ }
+ }
+ } else {
+ message (MESS_DEBUG, "glob finding logs to compress failed\n");
+ /* fallback to old behaviour */
+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ }
+ globfree(&globResult);
+ free(glob_pattern);
+ } else {
+ struct stat sbprev;
+
+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ if (stat(oldName, &sbprev)) {
+ message(MESS_DEBUG, "previous log %s does not exist\n",
+ oldName);
+ } else {
+ hasErrors = compressLogFile(oldName, log, &sbprev);
+ }
}
}
+
+ firstRotated = alloca(strlen(dirName) + strlen(baseName) +
+ strlen(fileext) + strlen(compext) + 30);
+
+ if(log->flags & LOG_FLAG_DATEEXT) {
+ /* glob for compressed files with our pattern
+ * and compress ext */
+ glob_pattern = malloc(strlen(dirName)+strlen(baseName)
+ +strlen(fileext)+strlen(compext)+44);
+ sprintf(glob_pattern,
+ "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s%s",
+ dirName, baseName, fileext, compext);
+ rc = glob(glob_pattern, 0, globerr, &globResult);
+ if (!rc) {
+ /* search for files to drop, if we find one remember it,
+ * if we find another one mail and remove the first and
+ * remember the second and so on */
+ struct stat fst_buf;
+ int mail_out = -1;
+ /* remove the first (n - rotateCount) matches
+ * no real rotation needed, since the files have
+ * the date in their name */
+ for (i = 0; i < globResult.gl_pathc; i++) {
+ if( !stat((globResult.gl_pathv)[i],&fst_buf) ) {
+ if ((i <= ((int)globResult.gl_pathc - rotateCount))
+ || ((log->rotateAge > 0)
+ && (((nowSecs - fst_buf.st_mtime)/60/60/24)
+ > log->rotateAge))) {
+ if ( mail_out != -1 ) {
+ if (!hasErrors && log->logAddress) {
+ char * mailFilename = (globResult.gl_pathv)[mail_out];
+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log);
+ if (!hasErrors)
+ hasErrors = removeLogFile(mailFilename);
+ }
+ }
+ mail_out = i;
+ }
+ }
+ }
+ if ( mail_out != -1 ) {
+ /* oldName is oldest Backup found (for unlink later) */
+ sprintf(oldName, "%s", (globResult.gl_pathv)[mail_out]);
+ strcpy(disposeName, oldName);
+ } else
+ disposeName = NULL;
+ } else {
+ message (MESS_DEBUG, "glob finding old rotated logs failed\n");
+ disposeName = NULL;
+ }
+ /* firstRotated is most recently created/compressed rotated log */
+ sprintf(firstRotated, "%s/%s-%04d%02d%02d%s%s",
+ dirName, baseName, now.tm_year+1900,
+ now.tm_mon+1, now.tm_mday, fileext, compext);
+ globfree(&globResult);
+ free(glob_pattern);
+ } else {
+ if ( log->rotateAge ) {
+ struct stat fst_buf;
+ for (i=1; i <= rotateCount; i++) {
+ sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
+ rotateCount + 1, fileext, compext);
+ if(!stat(oldName,&fst_buf)
+ && (((nowSecs - fst_buf.st_mtime)/60/60/24)
+ > log->rotateAge)) {
+ char * mailFilename = (globResult.gl_pathv)[i];
+ if (!hasErrors && log->logAddress)
+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log);
+ if (!hasErrors)
+ hasErrors = removeLogFile(mailFilename);
+ }
+ }
+ }
sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
logStart + rotateCount, fileext, compext);
@@ -548,8 +696,6 @@
strcpy(disposeName, oldName);
- firstRotated = alloca(strlen(dirName) + strlen(baseName) +
- strlen(fileext) + strlen(compext) + 30);
sprintf(firstRotated, "%s/%s.%d%s%s", dirName, baseName,
logStart, fileext,
(log->flags & LOG_FLAG_DELAYCOMPRESS) ? "" : compext);
@@ -600,12 +746,27 @@
}
}
}
-
+ } /* !LOG_FLAG_DATEEXT */
+
finalName = oldName;
-
- /* note: the gzip extension is *not* used here! */
- sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
-
+
+ if(log->flags & LOG_FLAG_DATEEXT) {
+ char * destFile = alloca(strlen(dirName) + strlen(baseName) +
+ strlen(fileext) + strlen(compext) + 30);
+ struct stat fst_buf;
+ sprintf(finalName, "%s/%s-%04d%02d%02d%s",
+ dirName, baseName, now.tm_year+1900,
+ now.tm_mon+1, now.tm_mday, fileext);
+ sprintf(destFile, "%s%s", finalName, compext);
+ if(!stat(destFile,&fst_buf)) {
+ message (MESS_DEBUG, "destination %s already exists, skipping rotation\n", firstRotated);
+ hasErrors = 1;
+ }
+ } else {
+ /* note: the gzip extension is *not* used here! */
+ sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ }
+
/* if the last rotation doesn't exist, that's okay */
if (!debug && access(disposeName, F_OK)) {
message(MESS_DEBUG, "log %s doesn't exist -- won't try to "
@@ -613,9 +774,6 @@
disposeName = NULL;
}
- free(dirName);
- free(baseName);
-
if (!hasErrors) {
if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
message(MESS_DEBUG, "running prerotate script\n");
@@ -722,33 +880,12 @@
else
mailFilename = disposeName;
- if (mailFilename) {
- /* if the log is compressed (and we're not mailing a
- file whose compression has been delayed), we need
- to uncompress it */
- if ((log->flags & LOG_FLAG_COMPRESS) &&
- !((log->flags & LOG_FLAG_DELAYCOMPRESS) &&
- (log->flags & LOG_FLAG_MAILFIRST))) {
- if (mailLog(mailFilename, mailCommand,
- log->uncompress_prog, log->logAddress,
- log->files[logNum]))
- hasErrors = 1;
- } else {
- if (mailLog(mailFilename, mailCommand, NULL,
- log->logAddress, mailFilename))
- hasErrors = 1;
- }
- }
+ if (mailFilename)
+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log);
}
if (!hasErrors && disposeName) {
- message(MESS_DEBUG, "removing old log %s\n", disposeName);
-
- if (!debug && unlink(disposeName)) {
- message(MESS_ERROR, "Failed to remove old log %s: %s\n",
- disposeName, strerror(errno));
- hasErrors = 1;
- }
+ hasErrors = removeLogFile(disposeName);
}
}
@@ -761,6 +898,8 @@
}
}
#endif
+ free(dirName);
+ free(baseName);
return hasErrors;
}
@@ -1047,7 +1186,9 @@
int main(int argc, const char ** argv) {
logInfo defConfig = { NULL, NULL, 0, NULL, ROT_SIZE,
- /* threshHold */ 1024 * 1024, 0,
+ /* threshHold */ 1024 * 1024,
+ /* rotateCount */ 0,
+ /* rotateAge */ 0,
/* log start */ -1,
/* pre, post */ NULL, NULL,
/* first, last */ NULL, NULL,
diff -u -ruN logrotate-3.7.1.orig/logrotate.h logrotate-3.7.1/logrotate.h
--- logrotate-3.7.1.orig/logrotate.h 2003-08-07 07:13:14.000000000 -0400
+++ logrotate-3.7.1/logrotate.h 2005-05-24 12:21:09.000000000 -0400
@@ -15,6 +15,7 @@
#define LOG_FLAG_MAILFIRST (1 << 6)
#define LOG_FLAG_SHAREDSCRIPTS (1 << 7)
#define LOG_FLAG_COPY (1 << 8)
+#define LOG_FLAG_DATEEXT (1 << 9)
#define NO_FORCE_ROTATE 0
#define FORCE_ROTATE 1
@@ -34,6 +35,7 @@
enum { ROT_DAYS, ROT_WEEKLY, ROT_MONTHLY, ROT_SIZE, ROT_FORCE } criterium;
unsigned int threshhold;
int rotateCount;
+ int rotateAge;
int logStart;
char * pre, * post, * first, * last;
char * logAddress;

View File

@@ -1,12 +0,0 @@
diff -u -ruN logrotate-3.7.1.orig/logrotate.c logrotate-3.7.1/logrotate.c
--- logrotate-3.7.1.orig/logrotate.c 2004-10-19 17:41:24.000000000 -0400
+++ logrotate-3.7.1/logrotate.c 2005-05-24 12:12:26.000000000 -0400
@@ -1002,7 +1002,7 @@
}
/* Hack to hide earlier bug */
- if ((year != 1900) && (year < 1996 || year > 2100)) {
+ if ((year != 1900) && (year < 1970 || year > 2100)) {
message(MESS_ERROR, "bad year %d for file %s in state file %s\n",
year, argv[0], stateFilename);
fclose(f);

View File

@@ -1,14 +0,0 @@
--- logrotate-3.7/config.c.orig 2005-04-26 22:57:53.000000000 -0400
+++ logrotate-3.7/config.c 2005-04-26 22:59:36.000000000 -0400
@@ -142,6 +142,11 @@
(!fname[1] || (fname[1] == '.' && !fname[2])))
return 0;
+ /* Don't include 'hidden' files either; this breaks Gentoo
+ portage config file management http://bugs.gentoo.org/87683 */
+ if (fname[0] == '.')
+ return 0;
+
/* Check if fname is ending in a taboo-extension; if so, return
false */
for (i = 0; i < tabooCount; i++) {

View File

@@ -1,54 +0,0 @@
diff -u -ruN logrotate-3.7.1-cur/logrotate.c logrotate-3.7.1/logrotate.c
--- logrotate-3.7.1-cur/logrotate.c 2005-05-25 18:20:41.000000000 -0400
+++ logrotate-3.7.1/logrotate.c 2005-05-25 18:21:10.000000000 -0400
@@ -90,10 +90,7 @@
}
static int runScript(char * logfn, char * script) {
- int fd;
- char *filespec;
int rc;
- char buf[256];
if (debug) {
message(MESS_DEBUG, "running script with arg %s: \"%s\"\n",
@@ -101,38 +98,12 @@
return 0;
}
- filespec = buf;
- snprintf(buf, sizeof(buf), "%s/logrotate.XXXXXX", getenv("TMPDIR") ?: "/tmp");
- fd = -1;
- if (!filespec || (fd = mkstemp(filespec)) < 0 || fchmod(fd, 0700)) {
- message(MESS_DEBUG, "error creating %s: %s\n", filespec,
- strerror(errno));
- if (fd >= 0) {
- close(fd);
- unlink(filespec);
- }
- return -1;
- }
-
- if (write(fd, "#!/bin/sh\n\n", 11) != 11 ||
- write(fd, script, strlen(script)) != strlen(script)) {
- message(MESS_DEBUG, "error writing %s\n", filespec);
- close(fd);
- unlink(filespec);
- return -1;
- }
-
- close(fd);
-
if (!fork()) {
- execlp(filespec, filespec, logfn, NULL);
+ execl("/bin/sh", "sh", "-c", script, NULL);
exit(1);
}
wait(&rc);
-
- unlink(filespec);
-
return rc;
}

View File

@@ -1,12 +0,0 @@
diff -u -ruN logrotate-3.7.1.orig/config.c logrotate-3.7.1/config.c
--- logrotate-3.7.1.orig/config.c 2003-08-07 07:13:14.000000000 -0400
+++ logrotate-3.7.1/config.c 2005-05-24 12:13:41.000000000 -0400
@@ -147,7 +147,7 @@
for (i = 0; i < tabooCount; i++) {
if (!strcmp(fname + strlen(fname) - strlen(tabooExts[i]),
tabooExts[i])) {
- message(MESS_ERROR, "Ignoring %s, because of %s "
+ message(MESS_DEBUG, "Ignoring %s, because of %s "
"ending\n", fname, tabooExts[i]);
return 0;

View File

@@ -1,22 +0,0 @@
--- logrotate-3.7.1-old/logrotate.c 2004-10-19 23:41:24.000000000 +0200
+++ logrotate-3.7.1-new/logrotate.c 2005-10-02 17:29:22.380767321 +0200
@@ -424,12 +424,15 @@ int findNeedRotating(logInfo * log, int
switch (log->criterium) {
case ROT_WEEKLY:
/* rotate if:
- 1) the current weekday is before the weekday of the
- last rotation
+ 1) the day of the week is the same as the day of the week of
+ the previous rotation but not the same day of the year
+ this will rotate it on the same day every week, but not
+ twice a day.
2) more then a week has passed since the last
rotation */
- state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) ||
- ((mktime(&now) - mktime(&state->lastRotated)) >
+ state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday &&
+ now.tm_yday != state->lastRotated.tm_yday) ||
+ ((mktime(&now) - mktime(&state->lastRotated)) >
(7 * 24 * 3600)));
break;
case ROT_MONTHLY:

85
map-1905/Makefile Normal file
View File

@@ -0,0 +1,85 @@
#
# Copyright (C) 2019 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-1905
PKG_VERSION:=0.0.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5fed40b905a673e41eee05fc60e4a424a9826b56
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/map-1905
SECTION:=utils
CATEGORY:=Utilities
TITLE:= MultiAP Stack
DEPENDS:= +ubox +ieee1905
endef
define Package/map-1905/description
MultiAP plugin for ieee1905d based on Wifi alliance's MAP-r2 specification
endef
define Package/libmaputils
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WFA MultiAP utility library
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE \
-fstrict-aliasing \
-Wall \
-Wextra
ifeq ($(CONFIG_IEEE1905_SEND_EMPTY_TLVS),y)
TARGET_CFLAGS += -DSEND_EMPTY_TLVS
endif
ifeq ($(CONFIG_IEEE1905_FIX_BROKEN_TLVS),y)
TARGET_CFLAGS += -DFIX_BROKEN_TLVS
endif
ifeq ($(CONFIG_IEEE1905_SPEED_UP_DISCOVERY),y)
TARGET_CFLAGS += -DSPEED_UP_DISCOVERY
endif
ifeq ($(CONFIG_IEEE1905_DO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS),y)
TARGET_CFLAGS += -DDO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/map-1905/* $(PKG_BUILD_DIR)/
endef
endif
define Package/map-1905/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifimap2.so $(1)/usr/lib/
endef
define Package/libmaputils/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmaputils.so $(1)/usr/lib/libmaputils.so
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/map1905
$(CP) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/map1905/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifimap2.so $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libmaputils.so $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libmaputils))
$(eval $(call BuildPackage,map-1905))

60
map-agent/Makefile Normal file
View File

@@ -0,0 +1,60 @@
#
# Copyright (C) 2020 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=2.0.1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=362ddbaf2b9a5510c89b740fcc23d8425770da3d
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/map-agent.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
include $(INCLUDE_DIR)/package.mk
define Package/map-agent
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
DEPENDS:=+libwifi +libuci +libubox +ubus
endef
define Package/map-agent/description
This package implements EasyMesh R2 compliant WiFi Agent.
endef
define Package/map-agent/config
#source "$(SOURCE)/Config.in"
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
MAKE_PATH:=src
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/map-agent
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/src/include/*.h $(1)/usr/include/map-agent
$(CP) $(PKG_BUILD_DIR)/src/utils/timer_impl.h $(1)/usr/include/map-agent
$(CP) $(PKG_BUILD_DIR)/src/utils/*.so* $(1)/usr/lib/
endef
define Package/map-agent/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/src/utils/*.so* $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapagent $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,map-agent))

38
mcastmngr/Makefile Normal file
View File

@@ -0,0 +1,38 @@
#
# Copyright (C) 2013-2020 iopsys
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mcastmngr
PKG_VERSION:=1.0.0
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/mcastmngr
CATEGORY:=Utilities
TITLE:=multicast packets manager daemon
endef
define Package/mcastmngr/description
Configures IGMP and MLD snooping and proxy
endef
#define Build/Prepare
# $(CP) -rf ./mcastmngr/* $(PKG_BUILD_DIR)/
#endef
define Build/Compile
endef
define Package/mcastmngr/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,mcastmngr))

View File

@@ -0,0 +1,31 @@
#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
. /lib/functions/network.sh
network_get_device l3device $INTERFACE
[ -n "$l3device" ] || exit 0
compare_mcast_proxy_upstream() {
local upstream
local mode="$2"
if [ "$mode" == "proxy" ]; then
config_get upstream $1 upstream_interface
else
config_get upstream $1 interface
fi
for dev in $upstream; do
if [ "$l3device" == "$dev" ]; then
ubus call uci commit '{"config":"mcast"}'
exit
fi
done
}
config_load mcast
config_foreach compare_mcast_proxy_upstream "proxy" "proxy"
config_foreach compare_mcast_proxy_upstream "snooping" "snooping"

View File

@@ -0,0 +1,41 @@
#!/bin/sh /etc/rc.common
START=98
STOP=10
USE_PROCD=1
NAME=mcast
include /lib/network
include /lib/mcast
service_triggers() {
procd_add_reload_trigger network $NAME
}
start_service() {
if [ -f "/etc/config/mcast" ]; then
configure_mcast
fi
procd_open_instance
procd_set_param command "$PROG_EXE"
procd_set_param respawn
procd_close_instance
}
boot() {
setup_mcast_mode
start
}
stop_service() {
service_stop $PROG_EXE
}
reload_service() {
stop
start
}

View File

@@ -0,0 +1,62 @@
#!/bin/sh
. /lib/functions.sh
generate_igmp_global_params(){
uci add mcast igmp
uci rename mcast.@igmp[-1]="igmp"
uci set mcast.@igmp[-1].max_membership="20"
uci set mcast.@igmp[-1].max_msf="10"
uci set mcast.@igmp[-1].qrv="2"
uci set mcast.@igmp[-1].force_version="0"
uci add mcast mld
uci rename mcast.@mld[-1]="mld"
uci set mcast.@mld[-1].mldv1_unsolicited_report_interval="10"
uci set mcast.@mld[-1].mldv2_unsolicited_report_interval="1"
uci set mcast.@mld[-1].qrv="2"
uci set mcast.@mld[-1].force_version="0"
uci commit mcast
}
generate_mcast_config(){
up_itf="$(uci -q get network.wan.ifname)"
uci add mcast proxy
uci rename mcast.@proxy[-1]="igmp_proxy_1"
uci set mcast.@proxy[-1].enable="1"
uci set mcast.@proxy[-1].proto="igmp"
uci set mcast.@proxy[-1].version="2"
uci set mcast.@proxy[-1].robustness="2"
uci set mcast.@proxy[-1].query_interval="125"
uci set mcast.@proxy[-1].query_response_interval="100"
uci set mcast.@proxy[-1].last_member_query_interval="10"
uci set mcast.@proxy[-1].fast_leave="1"
uci set mcast.@proxy[-1].snooping_mode="2"
uci set mcast.@proxy[-1].lan_to_lan="0"
uci add_list mcast.@proxy[-1].downstream_interface="br-lan"
IFS=" "
for itf in $up_itf; do
uci add_list mcast.@proxy[-1].upstream_interface="$itf"
done
uci add_list mcast.@proxy[-1].filter="239.0.0.0/8"
uci commit mcast
}
if [ -s "/etc/config/mcast" ]; then
if uci -q get mcast.@proxy[0] >/dev/null; then
# return if there is any valid content
exit
else
rm -f /etc/config/mcast
fi
fi
touch /etc/config/mcast
generate_igmp_global_params
generate_mcast_config

View File

@@ -0,0 +1,538 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
include /lib/network
CONFFILE=/var/mcpd.conf
PROG_EXE=/usr/sbin/mcpd
# Parameters available in snooping configuration
igmp_s_enable=0
igmp_s_version=2
igmp_s_robustness=2
igmp_s_mode=0
igmp_s_iface=""
igmp_s_exceptions=""
mld_s_enable=0
mld_s_version=2
mld_s_robustness=2
mld_s_mode=0
mld_s_iface=""
mld_s_exceptions=""
# Global params
max_groups=25
max_msf=10
max_members=25
mldv1_unsolicited_report_interval=10
mldv2_unsolicited_report_interval=1
# Parameters available in proxy configuration
igmp_p_enable=0
igmp_p_version=2
igmp_query_interval=125
igmp_q_resp_interval=100
igmp_last_mem_q_int=10
igmp_fast_leave=1
igmp_p_robustness=2
igmp_p_mode=0
igmp_p_up_interfaces=""
igmp_p_down_interfaces=""
igmp_p_exceptions=""
mld_p_enable=0
mld_p_version=1
mld_query_interval=125
mld_q_resp_interval=100
mld_last_mem_q_int=10
mld_fast_leave=1
mld_p_robustness=2
mld_p_mode=0
mld_p_up_interfaces=""
mld_p_down_interfaces=""
mld_p_exceptions=""
# Standard parameters need by BCM's multicast daemon
l_2_l_mcast=0
allow_brdevice=0
proxdevs=""
ethwan="$(db -q get hw.board.ethernetWanPort)"
read_snooping() {
local config="$1"
local sec_enable
local proto
config_get sec_enable "$config" enable 0
config_get proto "$config" proto
if [ "$sec_enable" == "0" ]; then
return
fi
if [ "$proto" == "igmp" ]; then
igmp_s_enable=$sec_enable
config_get igmp_s_version "$config" version 2
config_get igmp_s_robustness "$config" robustness 2
config_get igmp_s_mode "$config" snooping_mode 0
config_get igmp_s_iface "$config" interface
config_get igmp_s_exceptions "$config" filter
config_get l_2_l_mcast "$config" lan_to_lan
return
fi
if [ "$proto" == "mld" ]; then
mld_s_enable=$sec_enable
config_get mld_s_version "$config" version 2
config_get mld_s_robustness "$config" robustness 2
config_get mld_s_mode "$config" snooping_mode 0
config_get mld_s_iface "$config" interface
config_get mld_s_exceptions "$config" filter
config_get l_2_l_mcast "$config" lan_to_lan
return
fi
}
read_proxy() {
local config="$1"
local sec_enable
local proto
config_get sec_enable "$config" enable 0
config_get proto "$config" proto
if [ "$sec_enable" == "0" ]; then
return
fi
if [ "$proto" == "igmp" ]; then
igmp_p_enable=$sec_enable
config_get igmp_p_version "$config" version 2
config_get igmp_query_interval "$config" query_interval 125
config_get igmp_q_resp_interval "$config" query_response_interval 100
config_get igmp_last_mem_q_int "$config" last_member_query_interval 10
config_get igmp_fast_leave "$config" fast_leave 1
config_get igmp_p_robustness "$config" robustness 2
config_get igmp_p_mode "$config" snooping_mode 0
config_get igmp_p_up_interfaces "$config" upstream_interface
config_get igmp_p_down_interfaces "$config" downstream_interface
config_get igmp_p_exceptions "$config" filter
config_get l_2_l_mcast "$config" lan_to_lan
return
fi
if [ "$proto" == "mld" ]; then
mld_p_enable=$sec_enable
config_get mld_p_version "$config" version 2
config_get mld_query_interval "$config" query_interval 125
config_get mld_q_resp_interval "$config" query_response_interval 100
config_get mld_last_mem_q_int "$config" last_member_query_interval 10
config_get mld_fast_leave "$config" fast_leave 1
config_get mld_p_robustness "$config" robustness 2
config_get mld_p_mode "$config" snooping_mode 0
config_get mld_p_up_interfaces "$config" upstream_interface
config_get mld_p_down_interfaces "$config" downstream_interface
config_get mld_p_exceptions "$config" filter
config_get l_2_l_mcast "$config" lan_to_lan
return
fi
}
config_snooping_common_params() {
local protocol="$1"
echo "${protocol}-default-version $2" >> $CONFFILE
echo "${protocol}-robustness-value $3" >> $CONFFILE
echo "${protocol}-max-groups $max_groups" >> $CONFFILE
echo "${protocol}-max-sources $max_msf" >> $CONFFILE
echo "${protocol}-max-members $max_members" >> $CONFFILE
echo "${protocol}-snooping-enable $4" >> $CONFFILE
}
config_mcast_querier_params() {
local protocol="$1"
local query_interval=$2
local q_resp_interval=$3
local last_mem_q_int=$4
echo "${protocol}-query-interval $query_interval" >> $CONFFILE
echo "${protocol}-query-response-interval $q_resp_interval" >> $CONFFILE
echo "${protocol}-last-member-query-interval $last_mem_q_int" >> $CONFFILE
}
config_snooping_on_bridge() {
local protocol="$1"
local bcm_mcast_p=1
echo "${protocol}-snooping-interfaces $2" >> $CONFFILE
[ "$protocol" == "mld" ] && bcm_mcast_p=2
for snpif in $2; do
case "$snpif" in
br-*)
# set snooping mode on the bridge
bcmmcastctl mode -i $snpif -p $bcm_mcast_p -m $3
# set L2L snooping mode on the bridge
bcmmcastctl l2l -i $snpif -p $bcm_mcast_p -e $l_2_l_mcast # set L2L snooping mode on the bridge
;;
esac
done
}
handle_bridged_proxy_interface() {
local p2="$1"
local p_enable=0
if [ "$p2" == "igmp" ]; then
p_enable=$igmp_p_enable
else
p_enable=$mld_p_enable
fi
if [ $p_enable -eq 1 -a $allow_brdevice -eq 1 ]
then
proxdevs="$proxdevs $2"
echo "upstream-interface $2" >>$CONFFILE
else
json_load "$(devstatus $2)"
itr=1
json_select bridge-members
while json_get_var dev $itr; do
case "$dev" in
*.*)
port="$(echo "$dev" | cut -d'.' -f 1)"
if [ $port == $ethwan ]; then
ifconfig $dev | grep RUNNING >/dev/null && proxdevs="$proxdevs $dev" && break
fi
;;
esac
itr=$(($itr + 1))
done
json_select ..
fi
}
config_mcast_proxy_interface() {
local itr
local p1="$1"
local p_enable
if [ "$p1" == "igmp" ]; then
p_enable=$igmp_p_enable
else
p_enable=$mld_p_enable
fi
for proxif in $2; do
case "$proxif" in
br-*)
handle_bridged_proxy_interface $p1 $proxif
;;
*)
ifconfig $proxif | grep RUNNING >/dev/null && proxdevs="$proxdevs $proxif"
;;
esac
done
if [ $p_enable -eq 1 ]; then
echo "${p1}-proxy-interfaces $proxdevs" >> $CONFFILE
fi
[ -n "$proxdevs" ] && echo "${p1}-mcast-interfaces $proxdevs" >> $CONFFILE
}
configure_mcpd_snooping() {
local protocol="$1"
local exceptions
local filter_ip=""
# Configure snooping related params
if [ "$protocol" == "igmp" ]; then
config_snooping_common_params $protocol $igmp_p_version $igmp_p_robustness $igmp_s_mode
config_mcast_querier_params $protocol $igmp_query_interval $igmp_q_resp_interval $igmp_last_mem_q_int
config_mcast_proxy_interface $protocol "$igmp_s_iface"
config_snooping_on_bridge $protocol $igmp_s_iface $igmp_s_mode
exceptions=$igmp_s_exceptions
elif [ "$protocol" == "mld" ]; then
config_snooping_common_params $protocol $mld_p_version $mld_p_robustness $mld_s_mode
config_mcast_querier_params $protocol $mld_query_interval $mld_q_resp_interval $mld_last_mem_q_int
config_mcast_proxy_interface $protocol "$mld_s_iface"
config_snooping_on_bridge $protocol $mld_s_iface $mld_s_mode
exceptions=$mld_s_exceptions
fi
echo "${protocol}-proxy-enable 0" >> $CONFFILE
if [ -n "$exceptions" ]; then
IFS=" "
for excp in $exceptions; do
case $excp in
*/*)
tmp="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
tmp1="$(ipcalc.sh $excp | grep NETMASK | awk '{print substr($0,9)}')"
filter_ip="$filter_ip $tmp/$tmp1"
;;
*)
filter_ip="$filter_ip $excp"
;;
esac
done
echo "${protocol}-mcast-snoop-exceptions $filter_ip" >> $CONFFILE
fi
}
configure_mcpd_proxy() {
local protocol="$1"
local fast_leave=0
local exceptions=""
# Configure snooping related params
if [ "$protocol" == "igmp" ]; then
config_snooping_common_params $protocol $igmp_p_version $igmp_p_robustness $igmp_p_mode
config_mcast_querier_params $protocol $igmp_query_interval $igmp_q_resp_interval $igmp_last_mem_q_int
config_mcast_proxy_interface $protocol "$igmp_p_up_interfaces"
config_snooping_on_bridge $protocol $igmp_p_down_interfaces $igmp_p_mode
fast_leave=$igmp_fast_leave
exceptions=$igmp_p_exceptions
elif [ "$protocol" == "mld" ]; then
config_snooping_common_params $protocol $mld_p_version $mld_p_robustness $mld_p_mode
config_mcast_querier_params $protocol $mld_query_interval $mld_q_resp_interval $mld_last_mem_q_int
config_mcast_proxy_interface $protocol "$mld_p_up_interfaces"
config_snooping_on_bridge $protocol $mld_p_down_interfaces $mld_p_mode
fast_leave=$mld_fast_leave
exceptions=$mld_p_exceptions
fi
# This function will only be hit in case proxy is enabled, so hard coding
# proxy enable should not be a problem
echo "${protocol}-proxy-enable 1" >> $CONFFILE
echo "${protocol}-fast-leave $fast_leave" >> $CONFFILE
if [ -n "$exceptions" ]; then
IFS=" "
for excp in $exceptions; do
case $excp in
*/*)
tmp="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
tmp1="$(ipcalc.sh $excp | grep NETMASK | awk '{print substr($0,9)}')"
filter_ip="$filter_ip $tmp/$tmp1"
;;
*)
filter_ip="$filter_ip $excp"
;;
esac
done
echo "${protocol}-mcast-snoop-exceptions $filter_ip" >> $CONFFILE
fi
}
disable_snooping() {
local bcm_mcast_p=$1
for br in $(brctl show | grep 'br-' | awk '{print$1}' | tr '\n' ' '); do
bcmmcastctl mode -i $br -p $bcm_mcast_p -m 0 # disable snooping on all bridges
bcmmcastctl l2l -i $br -p $bcm_mcast_p -e 0 # disable L2L snooping on all bridges
done
}
configure_mcpd() {
disable_snooping 1
disable_snooping 2
# BCM's mcpd does not allow configuration of proxy and L2 snooping simultaneously, hence
# here, if proxy is to be configured then the configuration params of snooping are ignored.
if [ "$igmp_p_enable" == "1" ]; then
configure_mcpd_proxy igmp
elif [ "$igmp_s_enable" == "1" ]; then
configure_mcpd_snooping igmp
fi
proxdevs=""
if [ "$mld_p_enable" == "1" ]; then
configure_mcpd_proxy mld
elif [ "$mld_s_enable" == "1" ]; then
configure_mcpd_snooping mld
fi
}
read_mcast_snooping_params() {
config_load mcast
config_foreach read_snooping snooping
}
read_mcast_proxy_params() {
config_load mcast
config_foreach read_proxy proxy
}
config_global_params() {
local igmp_qrv
local igmp_force_version
local mld_qrv
local mld_force_version
config_load mcast
config_get max_msf igmp max_msf 10
config_get max_groups igmp max_membership 25
config_get igmp_qrv igmp qrv 2
config_get igmp_force_version igmp force_version 0
config_get mld_qrv mld qrv 2
config_get mldv1_unsolicited_report_interval mld mldv1_unsolicited_report_interval 10
config_get mldv2_unsolicited_report_interval mld mldv2_unsolicited_report_interval 1
config_get mld_force_version mld force_version 0
# mcpd internally writes max_groups and max_msf, no need to modify
# here directly
echo $igmp_qrv > /proc/sys/net/ipv4/igmp_qrv
echo $igmp_force_version > /proc/sys/net/ipv4/conf/all/force_igmp_version
echo $mld_qrv > /proc/sys/net/ipv6/mld_qrv
echo $mld_force_version > /proc/sys/net/ipv6/conf/all/force_mld_version
echo $mldv1_unsolicited_report_interval > /proc/sys/net/ipv6/conf/all/mldv1_unsolicited_report_interval
echo $mldv2_unsolicited_report_interval > /proc/sys/net/ipv6/conf/all/mldv2_unsolicited_report_interval
}
setup_mcast_mode() {
# set the mode at chip to allow both tagged and untagged multicast forwarding
bs /b/c iptv lookup_method=group_ip_src_ip
}
configure_mcast() {
rm -f $CONFFILE
touch $CONFFILE
config_global_params
read_mcast_snooping_params
read_mcast_proxy_params
configure_mcpd
}
read_mcast_stats() {
cat /proc/net/igmp_snooping > /tmp/igmp_stats
local mcast_addrs=""
local ifaces=""
while read line; do
# reading each line
case $line in
br-*)
found_iface=0
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ -z "$ifaces" ]; then
ifaces="$snoop_iface"
continue
fi
IFS=" "
for ifx in $ifaces; do
if [ $ifx == $snoop_iface ]; then
found_iface=1
break
fi
done
if [ $found_iface -eq 0 ]; then
ifaces="$ifaces $snoop_iface"
continue
fi
;;
esac
done < /tmp/igmp_stats
while read line; do
# reading each line
case $line in
br-*)
found_ip=0
grp_ip="$(echo $line | awk -F ' ' '{ print $9 }')"
if [ -z "$mcast_addrs" ]; then
mcast_addrs="$grp_ip"
continue
fi
IFS=" "
for ip_addr in $mcast_addrs; do
if [ $ip_addr == $grp_ip ]; then
found_ip=1
break
fi
done
if [ $found_ip -eq 0 ]; then
mcast_addrs="$mcast_addrs $grp_ip"
continue
fi
;;
esac
done < /tmp/igmp_stats
json_init
json_add_array "snooping"
json_add_object ""
IFS=" "
for intf in $ifaces; do
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
json_add_string "interface" "$intf"
json_add_array "groups"
break
;;
esac
done < /tmp/igmp_stats
IFS=" "
for gip_addr in $mcast_addrs; do
grp_obj_added=0
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
grp_ip="$(echo $line | awk -F ' ' '{ print $9 }')"
if [ "$grp_ip" != "$gip_addr" ]; then
continue
fi
if [ $grp_obj_added -eq 0 ]; then
json_add_object ""
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
json_add_string "groupaddr" "$gip"
json_add_array "clients"
grp_obj_added=1
fi
json_add_object ""
host_ip="$(echo $line | awk -F ' ' '{ print $13 }')"
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
json_add_string "ipaddr" "$h_ip"
src_port="$(echo $line | awk -F ' ' '{ print $2 }')"
json_add_string "device" "$src_port"
timeout="$(echo $line | awk -F ' ' '{ print $14 }')"
json_add_int "timeout" "$timeout"
json_close_object #close the associated device object
;;
esac
done < /tmp/igmp_stats
json_close_array #close the associated devices array
json_close_object # close the groups object
done # close the loop for group addresses
json_close_array #close the groups array
done # close the loop for interfaces
json_close_object # close the snooping object
json_close_array # close the snooping array
json_dump
rm -f /tmp/igmp_stats
}

View File

@@ -0,0 +1,18 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
include /lib/mcast
case "$1" in
list)
echo '{ "stats":{} }'
;;
call)
case "$2" in
stats)
read_mcast_stats
;;
esac
;;
esac

View File

@@ -16,6 +16,8 @@ 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)
PKG_LICENSE:=Apache-2.0
include $(INCLUDE_DIR)/package.mk
define Package/mqtt-ciotc

View File

@@ -1,49 +0,0 @@
#
# Copyright (C) 2010-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=multiwan
PKG_VERSION:=1.0.22
PKG_RELEASE:=2
PKG_LICENSE:=GPLv2
include $(INCLUDE_DIR)/package.mk
define Package/multiwan
SECTION:=net
CATEGORY:=Network
DEPENDS:=+ip +iptables +kmod-ipt-conntrack +iptables-mod-conntrack-extra +iptables-mod-ipopt
TITLE:=Simple multi WAN configuration
URL:=ftp://ftp.netlab7.com/
MAINTAINER:=Craig M. Coffee <craigc@netlab7.com>
endef
define Package/multiwan/description
An agent script that makes Multi-WAN configuration simple,
easy and manageable. Complete with load balancing, failover and an easy
to manage traffic ruleset.
endef
define Package/multiwan/conffiles
/etc/config/multiwan
endef
define Build/Compile
endef
define Package/multiwan/install
$(CP) ./files/* $(1)
endef
define Package/multiwan/postinst
[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/multiwan enable
exit 0
endef
$(eval $(call BuildPackage,multiwan))

View File

@@ -1,57 +0,0 @@
config 'multiwan' 'config'
# REMOVE THIS LINE OR PUT TO 1 TO ENABLE MULTIWAN
option 'enabled' '0'
option 'default_route' 'balancer'
# health_monitor below is defaulted to parallel, and can be set to
# serial to save system resources.
# option 'health_monitor' 'serial'
# option 'debug' '1'
config 'interface' 'wan'
option 'weight' '10'
option 'health_interval' '10'
option 'icmp_hosts' 'dns'
# icmp_count is defaulted to 1, and can be increased to reduce
# false positives.
# option 'icmp_count' '3'
option 'timeout' '3'
option 'health_fail_retries' '3'
option 'health_recovery_retries' '5'
option 'failover_to' 'wwan'
option 'dns' 'auto'
config 'interface' 'wwan'
option 'weight' '10'
option 'health_interval' '10'
option 'icmp_hosts' 'gateway'
option 'timeout' '3'
option 'health_fail_retries' '3'
option 'health_recovery_retries' '5'
option 'failover_to' 'balancer'
option 'dns' '208.67.222.222 208.67.220.220'
#config 'mwanfw'
# option 'src' '192.168.1.0/24'
# option 'dst' 'ftp.netlab7.com'
# option 'proto' 'tcp'
# option 'ports' '21'
# option 'wanrule' 'wan2'
# VoIP traffic goes through wan
# config 'mwanfw'
# option 'src' '192.168.1.0/24'
# option 'proto' 'udp'
# option 'port_type' 'source-ports'
# option 'ports' '5060,16384:16482'
# option 'wanrule' 'wan'
#config 'mwanfw'
# option 'src' '192.168.0.3'
# option 'proto' 'icmp'
# option 'wanrule' 'balancer'
#config 'mwanfw'
# option 'dst' 'www.whatismyip.com'
# option 'wanrule' 'fastbalancer'

View File

@@ -1,25 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
EXTRA_COMMANDS="single"
USE_PROCD=1
start_service () {
/usr/bin/multiwan agent &
}
stop_service () {
sh /usr/bin/multiwan stop
}
reload_service () {
/usr/bin/multiwan restart &
}
single () {
/usr/bin/multiwan single &
}
service_triggers() {
procd_add_reload_trigger multiwan
}

File diff suppressed because it is too large Load Diff

View File

@@ -13,10 +13,10 @@ PKG_VERSION:=12.26
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=https://dev.iopsys.eu/dialog/natalie-dect-h.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9e2236989ff58d0db897f938b6b07b535144e0e2
PKG_SOURCE_VERSION:=f3889dc3f80bed10374f46430009aca24448bdcc
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE:=PROPRIETARY RTX
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk

View File

@@ -15,7 +15,7 @@ PKG_SOURCE_URL:=http://download.iopsys.eu/iopsys/opensdk/
PKG_NAME:=natalie-dect-open
else
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=git@dev.iopsys.eu:dialog/natalie-dect-12.26
PKG_SOURCE_URL:=https://dev.iopsys.eu/dialog/natalie-dect-12.26.git
PKG_SOURCE_PROTO:=git
endif

View File

@@ -11,8 +11,9 @@ PKG_RELEASE:=3
PKG_BUILD_DIR:=${BUILD_DIR}/ndt-$(PKG_VERSION)
PKG_SOURCE:=ndt-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://software.internet2.edu/sources/ndt
PKG_HASH=098d9d55536b8a0ab07ef13eb15b7fd4
PKG_LICENSE:=NONSTANDARD
PKG_LICENSE:=NONSTANDARD_PERMISSIV
PKG_LICENSE_FILES:=COPYRIGHT
include $(INCLUDE_DIR)/package.mk

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=netmode
PKG_VERSION:=0.2.0
PKG_SOURCE_VERSION:=6406325e72d7ddd0ff7aaa3a87669519021bdb11
PKG_SOURCE_VERSION:=5c8abbdf86e4651c7c6f14f784cfb52e69979f96
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/netmoded

View File

@@ -1,9 +1,8 @@
config mode 'setup'
config netmoded 'netmoded'
option enabled '0'
config setup 'setup'
option enabled '0'
option dir '/etc/netmodes'
option detail ''
option curmode 'routed'
config tools 'tools'
option wificontrol 0
option arp_discovery 1
# option mode 'router'

View File

@@ -1,50 +0,0 @@
#!/bin/sh
[ "$INTERFACE" != "wan" ] && exit
automode="$(uci -q get netmode.setup.automode)"
[ "$automode" == "0" ] && exit
. /lib/functions.sh
. /lib/functions/network.sh
. /lib/functions/netmode.sh
network_flush_cache
network_get_ipaddr ipaddr $INTERFACE
[ -z "$ipaddr" ] && exit
repeaterready="$(uci -q get netmode.setup.repeaterready)"
curmode="$(uci -q get netmode.setup.curmode)"
if [ "$(netmode_get_ip_type $ipaddr)" == "private" ]; then
if [ "$repeaterready" == "1" -o "${curmode:0:8}" == "repeater" ]; then
# flush the ip on br-lan; br-lan will anyhow be deleted.
# this is needed if the ip received on the wan is also from the same net
logger -s -p user.info -t $0: [netmode] ip addr flush dev br-lan >/dev/console
ip addr flush dev br-lan 2>/dev/null
# flush iptables in case the MASTER
# tries to configure us before
# firewall is disabled the proper way
logger -s -p user.info -t $0: [netmode] iptables -F >/dev/console
iptables -F
disable_firewall 1
fi
else
disable_firewall 0
fi
case "$curmode" in
repeater*)
;;
*)
[ "$repeaterready" == "1" ] || return
if [ "$(netmode_get_ip_type $ipaddr)" == "private" ]; then
wificontrol_takes_over || switch_netmode repeater
else
switch_netmode routed
fi
;;
esac

View File

@@ -14,7 +14,7 @@ interface_check() {
}
interface_check
if [ -n "$(pidof testnet)" ]; then
if [ -n "$(pgrep -f testnet)" ]; then
testnet once
else
testnet &

View File

@@ -1,27 +0,0 @@
#!/bin/sh
. /lib/functions.sh
. /lib/functions/netmode.sh
ps | grep hotplug | grep button && exit
[ -z "$INTERFACE" ] && exit
defroute=$(ip route | grep default | awk '{print$3}')
case "$(uci get netmode.setup.curmode)" in
repeater*)
;;
*)
ping -c 1 -w 5 $defroute >/dev/null 2>&1 || {
logger -s -t "80-repeater" "ping to $defroute failed, sending USR1 to udhcpc" >/dev/console
killall -USR1 udhcpc
}
exit
;;
esac
case "$ACTION" in
add|register|remove|unregister) correct_uplink $INTERFACE;;
esac

View File

@@ -9,6 +9,13 @@ NETMODED="/sbin/netmoded"
. /lib/functions/netmode.sh
start_netmoded() {
config_load netmode
config_get enabled netmoded enabled 0
if [ "$enabled" != "1" ]; then
return
fi
procd_open_instance
procd_set_param command $NETMODED
@@ -24,18 +31,12 @@ start_service() {
populate_netmodes
start_netmoded
start_netmode_tools
}
reload_service() {
switch_netmode
start_netmoded
start_netmode_tools
}
stop_service() {
stop_netmode_tools
}
service_triggers()

View File

@@ -0,0 +1,9 @@
{
"description": [
{ "en" : "Bridge Mode" }
],
"explanation": [
{ "en" : "NAT is disabled." }
],
"reboot" : 0
}

View File

@@ -0,0 +1,92 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
BRIDGEPORTS=""
get_vlan() {
local device="$1"
for section in $(uci show network | grep "=device" | cut -d '=' -f1); do
if [ "$(uci -q get $section.ifname)" == "$device" ]; then
uci -q get $section.name
break
fi
done
}
add_wifi_devs()
{
add_wdev()
{
local cfg=$1
# local disabled
# config_get_bool disabled $cfg disabled 0
# config_get_bool ifname $cfg ifname
# if [ $disabled -eq 0 -a -n "$ifname" ]; then
# BRIDGEPORTS="$ifname"
# fi
uci -q set wireless.$cfg.network="wan"
}
config_load wireless
config_foreach add_wdev "wifi-iface"
uci -q commit wireless
}
add_xtm_devs() {
local section device vlan
for section in $(uci show dsl | grep "=.*tm-device" | cut -d'=' -f1); do
if [ -n "$(uci -q get $section.device)" ]; then
vlan="$(get_vlan $device)"
[ -n "$vlan" ] && device="$vlan"
if [ -n "$device" ]; then
BRIDGEPORTS="$BRIDGEPORTS $device"
fi
fi
done
}
add_eth_ports() {
add_port()
{
local cfg=$1
local ifname vlan
config_get ifname $cfg ifname
vlan="$(get_vlan $ifname)"
[ -n "$vlan" ] && ifname="$vlan"
if [ -n "$ifname" ]; then
BRIDGEPORTS="$BRIDGEPORTS $ifname"
fi
}
config_load ports
config_foreach add_port "ethport"
}
add_xtm_devs
add_eth_ports
add_wifi_devs
BRIDGEPORTS="$(echo $BRIDGEPORTS | sed -e 's/[[:space:]]*$//')"
uci -q set network.wan.type="bridge"
uci -q set network.wan.ifname="$BRIDGEPORTS"
uci -q set network.wan6.ifname="@wan"
uci -q delete network.lan.ifname
ubus call uci commit '{"config":"network"}'

View File

@@ -1,23 +0,0 @@
{
"description": [
{ "en" : "Bridged IPTV" },
{ "sv" : "Brygg IPTV" }
],
"explanation": [
{ "en" : "LAN4 port is bridged with IPTV VLAN" },
{ "sv" : "LAN4 port överbryggas med IPTV VLAN" }
],
"credentials" : 0,
"excluded_boards" : [
"CG300",
"CG301",
"EX400",
"SDX810-AP",
"NORRLAND"
],
"acl" : [
"admin",
"support"
]
}

View File

@@ -1,22 +0,0 @@
config dnsmasq
option domainneeded 1
option boguspriv 1
option filterwin2k 0
option localise_queries 1
option rebind_protection 0
option rebind_localhost 1
option local '/lan/'
option domain 'lan'
option expandhosts 1
option nonegcache 0
option authoritative 1
option readethers 1
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
config dhcp lan
option interface lan
option start 100
option limit 150
option leasetime 12h

View File

@@ -1,117 +0,0 @@
config settings 'settings'
option disabled '0'
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1
config zone
option name lan
list network 'lan'
option input ACCEPT
option output ACCEPT
option forward ACCEPT
config zone
option name wan
list network 'wan'
list network 'wan6'
list network 'iptv'
option input REJECT
option output ACCEPT
option forward REJECT
option masq 1
option mtu_fix 1
config forwarding
option src lan
option dest wan
# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
option name Allow-DHCP-Renew
option src wan
option proto udp
option dest_port 68
option target ACCEPT
option family ipv4
option hidden 1
# Allow IPv4 ping
config rule
option name Allow-Ping
option src wan
option proto icmp
option icmp_type echo-request
option family ipv4
option target ACCEPT
option hidden 1
# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
option name Allow-DHCPv6
option src wan
option proto udp
option src_ip fe80::/10
option src_port 547
option dest_ip fe80::/10
option dest_port 546
option family ipv6
option target ACCEPT
option hidden 1
# Allow essential incoming IPv6 ICMP traffic
config rule
option name Allow-ICMPv6-Input
option src wan
option proto icmp
list icmp_type echo-request
list icmp_type echo-reply
list icmp_type destination-unreachable
list icmp_type packet-too-big
list icmp_type time-exceeded
list icmp_type bad-header
list icmp_type unknown-header-type
list icmp_type router-solicitation
list icmp_type neighbour-solicitation
list icmp_type router-advertisement
list icmp_type neighbour-advertisement
option limit 1000/sec
option family ipv6
option target ACCEPT
option hidden 1
# Allow essential forwarded IPv6 ICMP traffic
config rule
option name Allow-ICMPv6-Forward
option src wan
option dest *
option proto icmp
list icmp_type echo-request
list icmp_type echo-reply
list icmp_type destination-unreachable
list icmp_type packet-too-big
list icmp_type time-exceeded
list icmp_type bad-header
list icmp_type unknown-header-type
option limit 1000/sec
option family ipv6
option target ACCEPT
option hidden 1
# include a file with users custom iptables rules
config include
option path /etc/firewall.user
option reload 1
# include a file with rules for SIP and RTP traffic
config include
option path /etc/firewall.sip
option reload 1

View File

@@ -1,18 +0,0 @@
config mcpd 'mcpd'
option igmp_query_response_interval '10'
option igmp_last_member_query_interval '10'
option igmp_robustness_value '2'
option igmp_lan_to_lan_multicast '0'
option igmp_max_groups '25'
option igmp_max_sources '10'
option igmp_max_members '25'
option igmp_fast_leave '1'
option igmp_join_immediate '0'
option igmp_proxy_enable '0'
option igmp_snooping_enable '2'
option igmp_snooping_interfaces 'br-iptv'
option igmp_default_version '2'
option igmp_query_interval '120'
option igmp_proxy_interfaces 'iptv'

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