Compare commits

..

101 Commits

Author SHA1 Message Date
Anjan Chanda
b0fa588a4d mt7603, mt7615: add Mediatek wifi driver packages 2019-12-10 09:59:45 +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
Amin Ben Ramdhane
31f5f9b017 bbf: 1.0-2019-10-01 2019-10-01 14:33:20 +01:00
Amin Ben Ramdhane
055489fb21 icwmp: 4.0-2019-10-01 2019-10-01 14:31:05 +01:00
Omar Kallel
3b09d142d9 icwmp: firmware and vendor config download logging 2019-09-30 17:12:09 +01:00
Sukru Senli
96909bca38 icwmp: enable tr-181 support by default 2019-09-27 12:03:57 +02:00
Omar Kallel
31b38d98ec Generate two icwmp binaries: icwmpd & icwmp_tr098d 2019-09-27 09:14:10 +01:00
Sukru Senli
f18405e303 tr098: use https url 2019-09-27 10:00:45 +02:00
vdutta
6973cf5f63 obuspa: Change default interface to wan 2019-09-26 19:32:31 +05:30
vdutta
b9c5aaa012 uspd: Fix uspd freeze issue on empty input 2019-09-26 19:27:47 +05:30
vdutta
a4c5bde955 obuspa: Add obuspa interface support in uci 2019-09-26 19:04:54 +05:30
Amin Ben Ramdhane
66ed795149 icwmp+bbf: add TR157 Bulkdata 2019-09-25 17:20:30 +01:00
Omar Kallel
9268a2960e Add tr098 package 2019-09-25 16:29:33 +01:00
vdutta
ee9f652942 uspd: Align with libbbfdm 2019-09-25 17:46:11 +05:30
Omar Kallel
100b91d3d5 icwmp: add TR098 includes 2019-09-25 12:07:57 +01:00
vdutta
e58a80228d uspd: Updated dependency to libbbfdm 2019-09-25 09:48:43 +05:30
Sukru Senli
9f21e1568a easy-soc-libs: libdsl depends on kmod-ppa-drv for intel_mips target 2019-09-24 19:04:55 +02:00
Sukru Senli
71f340a122 bbf: change pkg build dir 2019-09-24 17:18:55 +02:00
78 changed files with 5211 additions and 827 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

@@ -16,6 +16,10 @@ config BBF_TR143
bool "Compile with tr143 diagnostics features"
default y
config BBF_TR157
bool "Compile with tr157 bulkdata collector features"
default y
config BBF_TR064
bool "Compile with tr064 features"
default n

View File

@@ -5,16 +5,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=1.0-2019-09-18
PKG_VERSION:=1.0-2019-11-02
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4be7fe3c202e221c4d094de36c8a88126cc47bdf
PKG_SOURCE_VERSION:=a33b47b9c34bdd174e39b54525b082259c60850c
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)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
@@ -56,6 +56,11 @@ CONFIGURE_ARGS += \
--enable-tr143
endif
ifeq ($(CONFIG_BBF_TR157),y)
CONFIGURE_ARGS += \
--enable-tr157
endif
ifeq ($(CONFIG_BBF_TR064),y)
CONFIGURE_ARGS += \
--enable-tr064
@@ -65,6 +70,7 @@ 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

View File

@@ -30,7 +30,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

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

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs
PKG_VERSION:=2.4.0
PKG_VERSION:=2.4.1
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=30f5527ae724d54537c803127e11992d1a5ae154
PKG_SOURCE_VERSION:=63f749faa67670229a5cbaf39ee0fef92d8276f3
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
@@ -82,7 +82,7 @@ endif
define Package/libdsl
$(call Package/easy-soc-libs)
TITLE:= XDSL library (libdsl)
DEPENDS+=+TARGET_intel_mips:dsl-cpe-api-vrx +TARGET_intel_mips:dsl-cpe-fapi
DEPENDS+=+TARGET_intel_mips:dsl-cpe-api-vrx +TARGET_intel_mips:dsl-cpe-fapi +TARGET_intel_mips:kmod-ppa-drv
endef
subdirs := \
@@ -162,3 +162,4 @@ endef
$(eval $(call BuildPackage,libwifi))
$(eval $(call BuildPackage,libdsl))
$(eval $(call BuildPackage,libethernet))
$(eval $(call BuildPackage,easy-soc-libs))

View File

@@ -8,23 +8,21 @@ include $(TOPDIR)/rules.mk
PKG_RELEASE:=1
PKG_VERSION:=0.2
PKG_SOURCE_VERSION:=631e61b7ab5d86f2f4c86756a117badff9fb0f2c
PKG_SOURCE_VERSION:=ef49d57c3824df4dfb4921d39461e2bd14f918a7
PKG_LICENSE:=GPLv2
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_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_NAME:=endptmngr
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
endif
RSTRIP:=true
@@ -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 @(PACKAGE_bcmkernel||PACKAGE_bcmopen) @TARGET_HAS_VOICE
endef
define Package/endptmngr/description

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=4.0-2019-09-15
PKG_VERSION:=4.0-2019-10-17
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=89564260af83117243b57dcc00a441f25225cb98
PKG_SOURCE_VERSION:=9cfbfa9a381d372643fe18f8c258779bed3ee3bd
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -60,11 +60,18 @@ define Package/icwmp_udpechoserver
DEPENDS:=+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
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
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libbbfdm +libtr098
endef
define Package/icwmp/description
@@ -151,10 +158,21 @@ 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
@@ -209,6 +227,15 @@ define Package/icwmp_twamp/install
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_twamp $(1)/etc/config
endef
define Package/icwmp_bulkdata/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/icwmp_bulkdatad $(1)/usr/sbin/icwmp_bulkdatad
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmp_bulkdatad $(1)/etc/init.d/icwmp_bulkdatad
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_bulkdata $(1)/etc/config
endef
define Package/icwmp-$(BUILD_VARIANT)/postinst
#!/bin/sh
echo "$(CWMP_BKP_FILE)" >> $${IPKG_INSTROOT}/etc/sysupgrade.conf
@@ -233,4 +260,4 @@ $(eval $(call BuildPackage,icwmp_stun))
$(eval $(call BuildPackage,icwmp_xmpp))
$(eval $(call BuildPackage,icwmp_udpechoserver))
$(eval $(call BuildPackage,icwmp_twamp))
$(eval $(call BuildPackage,icwmp-zstream))
$(eval $(call BuildPackage,icwmp_bulkdata))

45
ieee1905/Makefile Normal file
View File

@@ -0,0 +1,45 @@
#
# Copyright (C) 2019 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=1.0.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a6a39128b1fe5132e51de4f580bf66f373515dcd
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/ieee1905
SECTION:=utils
CATEGORY:=Utilities
TITLE:=IEEE1905 handler
DEPENDS:=+meshcomms +libubox +libubus +libblobmsg-json
endef
define Package/ieee1905/description
Listens to ieee1905 messages, parse and expose them over ubus.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE
#define Build/Prepare
# $(CP) -rf ./ieee1905/* $(PKG_BUILD_DIR)/
#endef
define Package/ieee1905/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/ieee1905 $(1)/etc/init.d/ieee1905
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ieee1905 $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,ieee1905))

View File

@@ -1,20 +1,24 @@
#!/bin/sh /etc/rc.common
START=96
START=99
STOP=10
USE_PROCD=1
PROG=/usr/sbin/wifixd
PROG=/usr/sbin/ieee1905
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
}
reload_service() {
stop
start
stop
start
}
service_triggers()
{
procd_add_config_trigger "config.change" "ieee1905" /etc/init.d/ieee1905 restart
}

View File

@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ifbt
PKG_VERSION:=0.2
PKG_SOURCE_VERSION:=f6edff47b6c0a154ab892301acf767d19ac8ad73
PKG_SOURCE_VERSION:=6a279efa5046ace0681a1d0e79592a120f80e171
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ifbt.git

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

@@ -123,8 +123,6 @@ 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
@@ -185,6 +183,10 @@ 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_LIBCURL_CRYPTO_AUTH=y
# CONFIG_LIBCURL_MBEDTLS is not set
CONFIG_LIBCURL_OPENSSL=y

36
iop/scripts/cve-check.sh Normal file
View File

@@ -0,0 +1,36 @@
#!/bin/sh
function cvecheck {
CVEDIR="/tmp/cve-indicator/"
CVEBIN="${CVEDIR}/bin"
REPORTS="reports"
mkdir -p $REPORTS
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 "$CVEDIR" ]; then
### Take action if $DIR exists ###
echo "${CVEDIR} exists running cvecheck"
else
### Control will jump here if $DIR does NOT exists ###
echo "Error: cvecheck not found. getting from iopsys repo"
git clone git@dev.iopsys.eu:iopsys/cve-indicator.git /tmp/cve-indicator
fi
CVEGENLIST=`${CVEBIN}/cve-indicator gen-list openwrt bin`
CVEGETCVES=`${CVEBIN}/cve-indicator get-cves $CVEGENLIST --api_url http://cve.circl.lu/api/cvefor/`
CVEGETRPRT=`${CVEBIN}/cve-indicator gen-rprt $CVEGETCVES`
exit 0
}
register_command "cvecheck" "Generate a CVE report on latest build"

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,7 +28,7 @@ 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

View File

@@ -437,10 +437,6 @@ function genconfig {
CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}"
# git ls-remote is used for testing access rights so do not ask for password
# if the user has access the ssh key is used not password
export GIT_SSH_COMMAND="ssh -oBatchMode=yes"
setup_dirs
create_and_copy_files "$@"
fi

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

32
json-editor/Makefile Normal file
View File

@@ -0,0 +1,32 @@
#
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=json-editor
PKG_RELEASE:=1.0.0
PKG_SOURCE_VERSION:=44b32937a062ec4ffc9f7355841dc94ab6efa50f
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/json-editor.git
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/json-editor
SECTION:=base
CATEGORY:=Libraries
DEPENDS:=+libjson-c +libblobmsg-json
TITLE:=JSON-editor
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_BUILD_DIR)/src/json-editor.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libjson-editor.so $(1)/usr/lib/
endef
$(eval $(call BuildPackage,json-editor))

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:=git://dev.freecwmp.org/microxml
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

@@ -14,6 +14,8 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=7875222706cb6999af0361ef0aebdc85cd75c127
PKG_NAME:=libpicoevent
PKG_LICENSE:=GPL-2.0-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))

64
meshcomms/Makefile Normal file
View File

@@ -0,0 +1,64 @@
#
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=meshcomms
PKG_VERSION:=1.0.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8d5808d81d1fc96e4ce4ee682847b4de15b46224
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/meshcomms.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=BSD2+Patent
PKG_LICENSE_FILES:=LICENSE
PLATFORM := linux
FLAVOUR := iopsys
export PLATFORM
export FLAVOUR
include $(INCLUDE_DIR)/package.mk
define Package/meshcomms
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Mesh agent
DEPENDS:=+libpcap +libopenssl +libubox +libubus +libblobmsg-json
endef
define Package/meshcomms/description
meshComms is an open source implementation of IEEE 1905.1a that is an output
of the Broadband Forum Open Broadband - Multi Access Point (OB-MAP) project.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE \
-DDO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS
ifneq ($(CONFIG_BIG_ENDIAN),)
TARGET_CFLAGS += -D_HOST_IS_BIG_ENDIAN_=1
else
TARGET_CFLAGS += -D_HOST_IS_LITTLE_ENDIAN_=1
endif
#define Build/Prepare
# $(CP) -rf ./meshcomms/* $(PKG_BUILD_DIR)/
#endef
define Package/meshcomms/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/meshcomms.conf $(1)/etc/config/meshcomms
$(INSTALL_BIN) ./files/meshcomms.init $(1)/etc/init.d/meshcomms
$(INSTALL_BIN) $(PKG_BUILD_DIR)/output/al_entity $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,meshcomms))

View File

@@ -0,0 +1,8 @@
config meshcomms 'global'
option basemacint 'wan'
list interfaces 'lan'
list interfaces 'wan'
option mapall true
option debug false
option port 8888

View File

@@ -0,0 +1,105 @@
#!/bin/sh /etc/rc.common
START=99
STOP=10
USE_PROCD=1
PROG=/usr/sbin/al_entity
validate_global_section()
{
uci_validate_section meshcomms meshcomms "${1}" \
'basemacint:string:wan' \
'interfaces:string:lan' \
'mapall:bool:true' \
'debug:bool:true' \
'port:port:8888'
}
get_device_name() {
local device
# Get wan L3 interface
ubus list |grep -iq network.interface.${1}
if [ "$?" -eq 0 ]; then
json_load "$(ubus -t 2 call network.interface.${1} status)"
json_get_var device device
echo ${device}
fi
}
get_interface_mac() {
local l3 basemac
l3=$(get_device_name ${1})
if [ -n ${l3} ]; then
json_load "$(ubus -t 2 call network.device status "{\"name\":\"${l3}\"}")"
json_get_var basemac macaddr
fi
echo ${basemac}
}
configure_meshcomms()
{
local basemacint interfaces mapall debug port l3device basemac intf
validate_global_section global || {
echo "Validation of global section failed"
return 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
basemac=$(get_interface_mac ${basemacint})
for f in ${interfaces}
do
local l3=$(get_device_name $f)
intf="${intf} ${l3}"
done
intf=$(echo $intf|sed 's/ /,/g')
[ -z "${intf}" ] && \
echo "interface list is empty/invalid">/dev/console \
return 1
procd_append_param command -m ${basemac} -i ${intf}
[ "${debug}" -eq 1 ] && \
procd_append_param command -vv
[ "${mapall}" -eq 1 ] && \
procd_append_param command -w
[ ${port} -ne 8888 ] && \
procd_append_param command -p ${port}
}
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
config_load meshcomms
config_foreach configure_meshcomms meshcomms
}
start_service() {
procd_open_instance meshcomms
procd_set_param command ${PROG}
configure_network
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "network"
}

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

291
mt7603/Makefile Executable file
View File

@@ -0,0 +1,291 @@
# All rights reserved.
# See LICENSE for more information.
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mt7603e
PKG_VERSION:=4.1.2.0_20190222
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@dev.iopsys.eu:mediatek/mt7603.git
PKG_SOURCE_VERSION:=4e94b2c3f45b7d5374ed988cdad925d5ca30b838
#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
#PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_KCONFIG:= \
AP_SUPPORT \
RT_FIRST_CARD \
RT_SECOND_CARD \
RT_FIRST_IF_RF_OFFSET \
RT_SECOND_IF_RF_OFFSET \
MT_WIFI \
WIFI_BASIC_FUNC \
MT_WIFI_PATH \
FIRST_IF_NONE \
FIRST_IF_EEPROM_FLASH \
FIRST_IF_EEPROM_EFUSE \
RT_FIRST_CARD_EEPROM \
SECOND_IF_NONE \
SECOND_IF_EEPROM_FLASH \
SECOND_IF_EEPROM_PROM \
SECOND_IF_EEPROM_EFUSE \
RT_SECOND_CARD_EEPROM \
MULTI_INF_SUPPORT \
WIFI_BASIC_FUNC \
WIRELESS_EXT \
WEXT_SPY \
WEXT_PRIV \
DOT11_N_SUPPORT \
DOT11_VHT_AC \
DOT11_HE_AX \
CFG_SUPPORT_FALCON_MURU \
CFG_SUPPORT_FALCON_TXCMD_DBG \
CFG_SUPPORT_FALCON_SR \
WIFI_DRIVER \
G_BAND_256QAM_SUPPORT \
BRCM_256QAM_SUPPORT \
ICAP_SUPPORT \
MT_AP_SUPPORT \
BACKGROUND_SCAN_SUPPORT \
SMART_CARRIER_SENSE_SUPPORT \
SCS_FW_OFFLOAD \
THERMAL_PROTECT_SUPPORT \
MT_DFS_SUPPORT \
HDR_TRANS_TX_SUPPORT \
CHIP_MT7615E \
HDR_TRANS_RX_SUPPORT \
SUPPORT_DYNAMIC_TXOP \
WSC_INCLUDED \
MT_STA_SUPPORT \
WSC_V2_SUPPORT \
DOT11W_PMF_SUPPORT \
PASSPOINT_R2 \
TXBF_SUPPORT \
IGMP_SNOOP_SUPPORT \
RATE_ADAPTION \
RATE_ADAPT_AGBS_SUPPORT \
RTMP_FLASH_SUPPORT \
ATE_SUPPORT \
WLAN_SERVICE \
UAPSD \
RLT_MAC \
RLT_BBP \
RLT_RF \
RTMP_MAC \
RTMP_BBP \
RTMP_RF \
RTMP_PCI_SUPPORT \
RTMP_USB_SUPPORT \
RTMP_RBUS_SUPPORT \
WIFI_MODE_AP \
WIFI_MODE_STA \
WIRELESS_EXT \
WEXT_SPY \
WEXT_PRIV \
WDS_SUPPORT \
MBSS_SUPPORT \
APCLI_SUPPORT \
APCLI_CERT_SUPPORT \
APCLI_CONNECTION_TRIAL \
MAC_REPEATER_SUPPORT \
RALINK_RT6352 \
RALINK_MT7620 \
RALINK_MT7603E \
CON_WPS_SUPPORT \
VOW_SUPPORT \
BAND_STEERING \
TXOP_ARBITER \
CFG_SUPPORT_DYNAMIC_TXOP \
WIFI_MODE_BOTH \
WIFI_RLT_MAC \
RLT_MAC \
WIFI_RTMP_MAC \
RTMP_MAC \
WIFI_MT_MAC \
CHIP_MT7603E \
CHIP_MT7615E \
MT_MAC \
RATE_ADAPTION \
SUPPORT_OPENWRT \
SDK_USER_LIGHTY \
MUMIMO_SUPPORT \
MU_RA_SUPPORT \
LED_CONTROL_SUPPORT \
RA_HW_NAT \
RA_HW_NAT_WIFI_NEW_ARCH \
CFG80211_SUPPORT \
SER_SUPPORT \
GREENAP_SUPPORT \
RADIUS_ACCOUNTING_SUPPORT \
TPC_SUPPORT \
RLM_CAL_CACHE_SUPPORT \
CAL_BIN_FILE_SUPPORT \
RF_LOCKDOWN_SUPPORT \
PASSPOINT_R2 \
RED_SUPPORT \
FIRST_IF_EPAELNA \
FIRST_IF_IPAILNA \
FIRST_IF_IPAELNA \
FIRST_IF_EPAILNA \
SECOND_IF_EPAELNA \
SECOND_IF_IPAILNA \
SECOND_IF_IPAELNA \
SECOND_IF_EPAILNA \
THIRD_IF_EPAELNA \
THIRD_IF_IPAILNA \
THIRD_IF_IPAELNA \
THIRD_IF_EPAILNA \
WIFI_PKT_FWD \
DOT11K_RRM_SUPPORT \
DOT11R_FT_SUPPORT \
ENTERPRISE_AP_SUPPORT \
WIFI_EAP_FEATURE \
RADIUS_MAC_AUTH_SUPPORT \
VLAN_SUPPORT \
DYNAMIC_VLAN_SUPPORT \
CUSTOMISED_HOSTAPD_SUPPORT \
APCLI_STA_SUPPORT \
WDS_STA_SUPPORT \
MBSS_AS_WDS_AP_SUPPORT \
MBO_SUPPORT \
MAP_SUPPORT \
WPA3_SUPPORT \
OWE_SUPPORT \
WIFI_PKT_FWD_V1 \
FIRST_IF_MT7615E \
FIRST_IF_MT7622 \
FIRST_IF_MT7626 \
FIRST_IF_AXE \
FIRST_IF_MT7915 \
SECOND_IF_MT7615E \
SECOND_IF_AXE \
THIRD_IF_NONE \
THIRD_IF_MT7615E \
CHIP_AXE \
CHIP_MT7915 \
RT_THIRD_CARD \
RT_THIRD_IF_RF_OFFSET \
THIRD_IF_EEPROM_FLASH \
THIRD_IF_EEPROM_PROM \
THIRD_IF_EEPROM_EFUSE \
RT_THIRD_CARD_EEPROM \
SPECTRUM_SUPPORT \
PRE_CAL_TRX_SET1_SUPPORT \
MWDS \
MCAST_RATE_SPECIFIC \
WLAN_HOOK \
COEX_SUPPORT \
EASY_SETUP_SUPPORT \
EVENT_NOTIFIER_SUPPORT \
AIR_MONITOR \
OFFCHANNEL_SCAN_FEATURE \
WNM_SUPPORT \
INTERWORKING \
LINUX_NET_TXQ_SUPPORT \
CHIP_MT7622 \
CHIP_MT7626 \
MEMORY_SHRINK \
RPS_EFFICIENCY \
WHNAT_SUPPORT \
FAST_NAT_SUPPORT \
PRE_CAL_TRX_SET2_SUPPORT \
LINK_TEST_SUPPORT \
TCP_RACK_SUPPORT \
FQ_SCH_SUPPORT \
BRCM_256QAM_SUPPORT \
VHT_TXBF_2G_EPIGRAM_IE_SUPPORT \
DSCP_QOS_MAP_SUPPORT \
DSCP_PRI_SUPPORT \
PCIE_ASPM_DYM_CTRL_SUPPORT \
MIN_PHY_RATE_SUPPORT \
FAST_UP_RATE_SUPPORT \
TXRX_STAT_SUPPORT \
VENDOR_FEATURE11_SUPPORT \
WIFI_TWT_SUPPORT \
SINGLE_SKU \
SNIFFER_SUPPORT \
PKG_CONFIG_DEPENDS:=$(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_MTK_$c),CONFIG_$(c)))
include $(INCLUDE_DIR)/package.mk
#TAR_CMD=$(HOST_TAR) -C $(1)/ $(TAR_OPTIONS)
define KernelPackage/mt7603e
CATEGORY:=Mediatek drivers
TITLE:=WiFi drivers
DEPENDS:= +wifi-profile
ifneq ($(CONFIG_MTK_FAST_NAT_SUPPORT), )
ifneq ($(CONFIG_NET_MEDIATEK_HNAT), )
DEPENDS+=+kmod-mediatek_hnat
endif
endif
FILES:=$(PKG_BUILD_DIR)/mt7603_wifi_ap/mt7603e.ko
AUTOLOAD:=$(call AutoProbe, mt7603e)
MENU:=1
endef
define KernelPackage/mt7603e/config
source "$(SOURCE)/globalconfig.in"
endef
## check following
#CONFIG_MT7603E_HOTSPOT=y (depends on missing WAPP_SUPPORT)
#CONFIG_MT7603E_MBO_SUPPORT=y
#CONFIG_MT7603E_MAP_SUPPORT=y
#CONFIG_MT7603E_TXBF_SUPPORT=y (undef -DVHT_TXBF_SUPPORT)
#CONFIG_MT7603E_ACL_V2_SUPPORT=y (build error)
#CONFIG_MT7603E_DFS_SUPPORT=y (unnecessary)
#CONFIG_MT7603E_SINGLE_SKU_V2=y (fix: get_single_sku_path())
#CONFIG_MT7603E_WDS_SUPPORT=y ( incomplete? )
#CONFIG_MT7603E_BTCOEX_CONCURRENT=y (undefined)
NOSTDINC_FLAGS := -DCONFIG_SECOND_IF_MT7615E -DCONFIG_FIRST_IF_MT7603E
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) V=1 \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
SUBDIRS="$(PKG_BUILD_DIR)/mt7603_wifi_ap" \
$(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_MTK_$c),CONFIG_$(c)=$(CONFIG_MTK_$(c)))) \
CONFIG_SUPPORT_OPENWRT=y CONFIG_MT_AP_SUPPORT=m CONFIG_CHIP_MT7603E=y CONFIG_MT_MAC=y \
CONFIG_FIRST_IF_MT7603E=y CONFIG_SECOND_IF_MT7615E=y \
CONFIG_RT_FIRST_IF_RF_OFFSET=0x0 CONFIG_RT_SECOND_IF_RF_OFFSET=0x8000 \
CONFIG_MT7603E_RALINK_MT7603E=y \
CONFIG_MT_MAC=y \
CONFIG_MT7603E_RTMP_PCI_SUPPORT=y \
CONFIG_MT7603E_NEW_RATE_ADAPT_SUPPORT=y CONFIG_MT7603E_AGS_SUPPORT=y \
CONFIG_MT7603E_UAPSD=y CONFIG_MT7603E_MT_MAC=y \
CONFIG_MT7603E_WSC_INCLUDED=y CONFIG_MT7603E_WSC_V2_SUPPORT=y \
CONFIG_MT7603E_DOT11W_PMF_SUPPORT=y \
CONFIG_MT7603E_DOT11N_DRAFT3=y \
CONFIG_MT7603E_DOT11R_FT_SUPPORT=y \
CONFIG_MT7603E_DOT11K_RRM_SUPPORT=y \
CONFIG_MT7603E_WNM_SUPPORT=y \
CONFIG_MT7603E_INTERWORKING=y \
CONFIG_MT7603E_IGMP_SNOOP_SUPPORT=y \
CONFIG_MT7603E_LED_CONTROL_SUPPORT=y \
CONFIG_MT7603E_MBSS_SUPPORT=y \
CONFIG_MT7603E_APCLI_SUPPORT=y \
CONFIG_MT7603E_MULTI_APCLI_SUPPORT=y \
CONFIG_MT7603E_MAC_REPEATER_SUPPORT=y \
CONFIG_MT7603E_ATE_SUPPORT=y \
CONFIG_MT7603E_BAND_STEERING_7603=y \
CONFIG_MT7603E_MULTI_INF_SUPPORT=y \
CONFIG_MT7603E_WPA3_SUPPORT=y \
CONFIG_MT7603E_OWE_SUPPORT=y \
CONFIG_MT7603E_SECURITY_IMPROVEMENT_SUPPORT=y \
CONFIG_MT7603E_NEW_BW2040_COEXIST_SUPPORT=y \
CONFIG_MT7603E_RLT_AP_SUPPORT=m \
modules
endef
define KernelPackage/mt7603e/install
true
endef
$(eval $(call KernelPackage,mt7603e))

317
mt7603/ap.config.in Normal file
View File

@@ -0,0 +1,317 @@
config MTK_MT_AP_SUPPORT
bool
default y
depends on MTK_WIFI_MODE_AP
if MTK_MT_AP_SUPPORT
config MTK_WDS_SUPPORT
bool "WDS"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_MBSS_SUPPORT
bool "Multi-BSS (MBSSID)"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_APCLI_SUPPORT
bool "AP-Client Support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_APCLI_CERT_SUPPORT
bool "AP-Client TGn Cert Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_APCLI_SUPPORT
default n
config MTK_MAC_REPEATER_SUPPORT
bool "MAC Repeater Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_APCLI_SUPPORT
default y
config MTK_APCLI_CONNECTION_TRIAL
bool "AP-Client Trial Connection"
depends on MTK_MT_AP_SUPPORT
depends on MTK_APCLI_SUPPORT
default n
config MTK_MWDS
bool "Mixed WDS (MWDS)"
depends on MTK_MT_AP_SUPPORT
select MTK_APCLI_SUPPORT
default n
config MTK_MUMIMO_SUPPORT
bool "MU-MIMO Support"
depends on MTK_WIFI_DRIVER
select MTK_MU_RA_SUPPORT
default y
config MTK_MU_RA_SUPPORT
bool "MU-RGA Support"
depends on MTK_MUMIMO_SUPPORT
config MTK_DOT11R_FT_SUPPORT
bool "IEEE 802.11r Fast BSS Transition"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_DOT11K_RRM_SUPPORT
bool "IEEE 802.11k Radio Resource Management"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_IGMP_SNOOP_SUPPORT
bool "IGMP snooping (for multicast --> unicast)"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default y
config MTK_OFFCHANNEL_SCAN_FEATURE
bool "Off-Channel scan support (Channel Quality Monitor)"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default n
config MTK_SNIFFER_SUPPORT
bool "Sniffer support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_ENTERPRISE_AP_SUPPORT
bool "Enterprise AP Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_WIFI_EAP_FEATURE
bool "EAP Feature"
depends on MTK_WIFI_DRIVER
default y
config MTK_RADIUS_MAC_AUTH_SUPPORT
bool "RADIUS MAC Auth Support"
depends on MTK_ENTERPRISE_AP_SUPPORT
depends on MTK_CFG80211_SUPPORT
default n
config MTK_VLAN_SUPPORT
bool "VLAN Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_ENTERPRISE_AP_SUPPORT
default n
config MTK_DYNAMIC_VLAN_SUPPORT
bool "Dynamic VLAN Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_ENTERPRISE_AP_SUPPORT
default n
config MTK_CFG80211_SUPPORT
bool "Linux CFG80211 support"
depends on MTK_MT_AP_SUPPORT
default n
#CUSTOMISED HOSTAPD
config MTK_CUSTOMISED_HOSTAPD_SUPPORT
bool "Customised Hostapd Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_CFG80211_SUPPORT
default n
#APCLI STA
config MTK_APCLI_STA_SUPPORT
bool "APCLI STA Support"
depends on MTK_APCLI_SUPPORT
depends on MTK_CFG80211_SUPPORT
default n
#WDS STA
config MTK_WDS_STA_SUPPORT
bool "WDS STA Support"
depends on MTK_APCLI_SUPPORT
depends on MTK_CFG80211_SUPPORT
default n
#WDS AP
config MTK_MBSS_AS_WDS_AP_SUPPORT
bool "MBSS as WDS AP Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_MBSS_SUPPORT
default n
config MTK_DSCP_QOS_MAP_SUPPORT
bool "Dscp Qos Mapping Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_DSCP_PRI_SUPPORT
bool "Dscp Priority Mapping Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_MIN_PHY_RATE_SUPPORT
bool "Minimum PHY rate support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_FAST_UP_RATE_SUPPORT
bool "Fast UP rate support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_CON_WPS_SUPPORT
bool "Concurrent WPS Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_APCLI_SUPPORT
depends on MTK_WSC_INCLUDED
depends on MTK_WSC_V2_SUPPORT
default n
config MTK_MCAST_RATE_SPECIFIC
bool "User specific tx rate of mcast pkt"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_VOW_SUPPORT
bool "MediaAir (VOW) support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_BAND_STEERING
bool "Band Steering"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_LED_CONTROL_SUPPORT
bool "LED Control Support"
default n
config MTK_WLAN_HOOK
bool "WLAN hook Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_RADIUS_ACCOUNTING_SUPPORT
bool "Radius Accounting Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_GREENAP_SUPPORT
bool "GreenAP Support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_TXRX_STAT_SUPPORT
bool "Tx/Rx Stats Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_VENDOR_FEATURE11_SUPPORT
bool "Enable Vendor-11 Features"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default n
config MTK_PCIE_ASPM_DYM_CTRL_SUPPORT
bool "Pcie Aspm Dynamic Control Support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_COEX_SUPPORT
bool "Coex Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_EASY_SETUP_SUPPORT
bool "Whole Home Coverage - Easy Setup"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_EVENT_NOTIFIER_SUPPORT
bool "Whole Home Coverage - Event Notifier"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_AIR_MONITOR
bool "Air Monitor"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_WNM_SUPPORT
bool "IEEE 802.11v WNM Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_INTERWORKING
bool "IEEE 802.11u Interworking"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_LINUX_NET_TXQ_SUPPORT
bool "NET TX Queue Support"
default n
config MTK_WPA3_SUPPORT
bool "WPA3 Support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_OWE_SUPPORT
bool "Enhanced Open Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_SINGLE_SKU
bool "Single SKU Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_ICAP_SUPPORT
bool "ICAP Support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default y
config MTK_SPECTRUM_SUPPORT
bool "Wifi Spectrum Mgmt Support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default y
config MTK_FTM_SUPPORT
bool "FTM Support"
depends on MTK_WIFI_DRIVER
select MTK_PASSPOINT_R2
default n
config MTK_PASSPOINT_R2
bool "Passpoint Release-2 Support"
depends on MTK_WIFI_DRIVER
select MTK_DOT11W_PMF_SUPPORT
depends on MTK_MT_AP_SUPPORT
default n
config MTK_MBO_SUPPORT
bool "MBO Support"
depends on MTK_WIFI_DRIVER
select MTK_INTERWORKING
select MTK_WNM_SUPPORT
select MTK_DOT11K_RRM_SUPPORT
select MTK_DOT11R_FT_SUPPORT
select MTK_DOT11W_PMF_SUPPORT
default n
config MTK_MAP_SUPPORT
bool "Multi-AP (MAP) Support"
depends on MTK_WIFI_DRIVER
select MTK_INTERWORKING
select MTK_WNM_SUPPORT
select MTK_DOT11K_RRM_SUPPORT
select MTK_DOT11R_FT_SUPPORT
select MTK_DOT11W_PMF_SUPPORT
default n
endif #MTK_MT_AP_SUPPORT

250
mt7603/common.config.in Normal file
View File

@@ -0,0 +1,250 @@
#mtk wifi common optiions
menu "Common WiFi options"
config MTK_WIFI_BASIC_FUNC
bool "Linux Wireless Extension support (for iwconfig, iwpriv etc.)"
select MTK_WIRELESS_EXT
select MTK_WEXT_SPY
select MTK_WEXT_PRIV
config MTK_DOT11_N_SUPPORT
bool "IEEE 802.11n support"
default y
config MTK_DOT11_VHT_AC
bool "IEEE 802.11ac support"
depends on MTK_DOT11_N_SUPPORT
default y
config MTK_DOT11_HE_AX
bool "IEEE 802.11ax support"
depends on MTK_DOT11_VHT_AC
depends on MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_CFG_SUPPORT_FALCON_MURU
bool "MURU support"
depends on MTK_DOT11_VHT_AC
depends on MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_CFG_SUPPORT_FALCON_TXCMD_DBG
bool "TXCMD DBG support"
depends on MTK_WIFI_DRIVER
depends on MTK_DOT11_VHT_AC
depends on MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_CFG_SUPPORT_FALCON_SR
bool "Spatial Reuse (SR) support"
depends on MTK_WIFI_DRIVER
depends on MTK_CHIP_MT7915
default y
config MTK_WIFI_TWT_SUPPORT
bool "Target Wake Time (TWT) support"
depends on MTK_WIFI_DRIVER
depends on MTK_DOT11_HE_AX
depends on MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_G_BAND_256QAM_SUPPORT
bool "2.4G 256-QAM support"
depends on MTK_WIFI_DRIVER
depends on MTK_DOT11_VHT_AC
default y
config MTK_BRCM_256QAM_SUPPORT
bool "BRCM 2.4G 256-QAM support"
depends on MTK_WIFI_DRIVER
depends on MTK_G_BAND_256QAM_SUPPORT
default n
config MTK_VHT_TXBF_2G_EPIGRAM_IE_SUPPORT
bool "BRCM 2.4G VHT Sounding support"
depends on MTK_WIFI_DRIVER
default n
config MTK_MT_DFS_SUPPORT
bool "IEEE 802.11h DFS Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_TPC_SUPPORT
bool "IEEE 802.11h TPC Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_BACKGROUND_SCAN_SUPPORT
bool "Background Scan Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_SMART_CARRIER_SENSE_SUPPORT
bool "Smart Carrier Sense Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_THERMAL_PROTECT_SUPPORT
bool "Thermal Protection"
depends on MTK_WIFI_DRIVER && MTK_SMART_CARRIER_SENSE_SUPPORT
default n
config MTK_SCS_FW_OFFLOAD
bool "SCS Fw Offload Support"
depends on MTK_WIFI_DRIVER && MTK_SMART_CARRIER_SENSE_SUPPORT
default n
config MTK_HDR_TRANS_TX_SUPPORT
bool "Tx Header Translation"
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626 || MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_HDR_TRANS_RX_SUPPORT
bool "Rx Header Translation"
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626 || MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_DBDC_MODE
bool "Dual-Band Dual-Concurrent (DBDC) mode support"
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7626 || MTK_CHIP_MT7915
select MULTI_PROFILE_SUPPORT
select DEFAULT_5G_PROFILE
default y
config MTK_MULTI_PROFILE_SUPPORT
bool "Multi Profile Support"
depends on MTK_DBDC_MODE
default n
config MTK_DEFAULT_5G_PROFILE
bool "5G default profile for DBDC"
depends on MTK_DBDC_MODE
default y
config MTK_WSC_INCLUDED
bool "WiFi Simple Config (WSC) or WPS"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default y
config MTK_WSC_V2_SUPPORT
bool "WiFi Simple Config ver.2 (WPS 2.0)"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default y
config MTK_DOT11W_PMF_SUPPORT
bool "IEEE 802.11w PMF support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default y
config MTK_TXBF_SUPPORT
bool "Tx Beam Forming Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_FAST_NAT_SUPPORT
bool "Fast-NAT support"
default n
config MTK_WHNAT_SUPPORT
tristate "Wifi Hardware NAT support"
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7915
depends on MTK_WLAN_HOOK
depends on MTK_FAST_NAT_SUPPORT
depends on PACKAGE_kmod-hw_nat || PACKAGE_kmod-mediatek_hnat
default n
#config CARRIER_DETECTION_SUPPORT
# bool "Carrier Detect"
# depends on WIFI_DRIVER
# default n
config MTK_MEMORY_SHRINK
bool "Memory Shrink"
depends on MTK_WIFI_DRIVER && MTK_CHIP_MT7626
default n
config MTK_RPS_EFFICIENCY
bool "RPS Efficiency"
depends on MTK_WIFI_DRIVER && MTK_CHIP_MT7626
default n
config MTK_RTMP_FLASH_SUPPORT
bool "Platform's Flash APIs Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_PRE_CAL_TRX_SET1_SUPPORT
bool "Calibration To Flash/BinFile Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_RLM_CAL_CACHE_SUPPORT
bool "Rlm Calibration Cache Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_PRE_CAL_TRX_SET2_SUPPORT
bool "Pre-calibration to Flash Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_CAL_BIN_FILE_SUPPORT
bool "Calibration to BinFile Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_RF_LOCKDOWN_SUPPORT
bool "RF Lockdown Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_LINK_TEST_SUPPORT
bool "Link Test Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_ATE_SUPPORT
bool "ATE/QA Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_WLAN_SERVICE
bool "Wlan Service Library Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_UAPSD
bool "UAPSD support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default y
config MTK_TCP_RACK_SUPPORT
bool "TCP Reduced ACK support"
depends on MTK_WIFI_DRIVER
default n
config MTK_RED_SUPPORT
bool "RED (Random Early Drop) support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default n
config MTK_FQ_SCH_SUPPORT
bool "Fair Queueing support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT && MTK_VOW_SUPPORT
depends on MTK_CHIP_MT7622
default y
config MTK_FDB_SUPPORT
bool "FW Debug Port"
depends on MTK_WIFI_DRIVER
default n
endmenu

250
mt7603/config.in Normal file
View File

@@ -0,0 +1,250 @@
# Kconfig for mtk wifi
config MTK_WIFI_DRIVER
bool
default y
depends on PACKAGE_kmod-mt7615 || PACKAGE_kmod-mt7603
select MTK_SUPPORT_OPENWRT
select MTK_MT_WIFI
select MTK_WIFI_BASIC_FUNC
if MTK_WIFI_DRIVER
menu "First WiFi card"
choice
prompt "Choose First WiFi card"
default MTK_FIRST_IF_MT7603E
config MTK_FIRST_IF_NONE
bool "None"
config MTK_FIRST_IF_MT7603E
bool "MT7603E"
select RALINK_MT7603E
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7603E
config MTK_FIRST_IF_MT7615E
bool "MT7615E"
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7615E
endchoice
config MTK_RT_FIRST_CARD
int
depends on ! MTK_FIRST_IF_NONE
default 7603 if MTK_FIRST_IF_MT7603E
default 7615 if MTK_FIRST_IF_MT7615E
config MTK_MT_WIFI_PATH_FIRST_CARD
string "WiFi driver build directory name"
default "rlt_wifi"
config MTK_RT_FIRST_IF_RF_OFFSET
hex "RF offset of 1st card"
depends on ! MTK_FIRST_IF_NONE
default 0x0
#prompt "WiFi detailed options for 1st card"
choice
prompt "EEPROM Type of 1st Card"
depends on ! MTK_FIRST_IF_NONE
default MTK_FIRST_IF_EEPROM_EFUSE
config MTK_FIRST_IF_EEPROM_FLASH
bool "FLASH"
config MTK_FIRST_IF_EEPROM_PROM
bool "EEPROM"
config MTK_FIRST_IF_EEPROM_EFUSE
bool "EFUSE"
endchoice
config MTK_RT_FIRST_CARD_EEPROM
string
depends on ! MTK_FIRST_IF_NONE
default "prom" if MTK_FIRST_IF_EEPROM_PROM
default "efuse" if MTK_FIRST_IF_EEPROM_EFUSE
default "flash" if MTK_FIRST_IF_EEPROM_FLASH
choice
prompt "PA/LNA Type of 1st Card"
depends on ! MTK_FIRST_IF_NONE
default MTK_FIRST_IF_IPAILNA
config MTK_FIRST_IF_EPAELNA
bool "ePAeLNA"
config MTK_FIRST_IF_IPAILNA
bool "iPAiLNA"
config MTK_FIRST_IF_IPAELNA
bool "iPAeLNA"
endchoice
menu "Operation Modes for 1st card"
choice
prompt "Operating mode"
default MTK_WIFI_MODE_AP
config MTK_WIFI_MODE_AP
bool "AP"
config MTK_WIFI_MODE_STA
bool "STA"
config MTK_WIFI_MODE_BOTH
bool "AP+STA"
#select MTK_MT_STA_SUPPORT
endchoice
source "ap.config.in"
endmenu
endmenu
### endmenu for 1st wifi card #######
#### menu starts for 2nd wifi card ###
menu "Second WiFi card"
choice
prompt "Choose Second WiFi card"
default MTK_SECOND_IF_MT7615E
config MTK_SECOND_IF_NONE
bool "None"
config MTK_SECOND_IF_MT7603E
bool "MT7603E"
select RALINK_MT7603E
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7603E
config MTK_SECOND_IF_MT7615E
bool "MT7615E"
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7615E
endchoice
config MTK_RT_SECOND_CARD
int
depends on ! MTK_SECOND_IF_NONE
default 7603 if MTK_SECOND_IF_MT7603E
default 7615 if MTK_SECOND_IF_MT7615E
config MTK_MT_WIFI_PATH_SECOND_CARD
string "WiFi driver build directory name"
default "mt_wifi"
config MTK_RT_SECOND_IF_RF_OFFSET
hex "RF offset of 2nd card"
depends on ! MTK_SECOND_IF_NONE
default 0x8000
#prompt "WiFi detailed options for 2nd card"
choice
prompt "EEPROM Type of 2nd Card"
depends on ! MTK_SECOND_IF_NONE
default MTK_SECOND_IF_EEPROM_EFUSE
config MTK_SECOND_IF_EEPROM_FLASH
bool "FLASH"
config MTK_SECOND_IF_EEPROM_PROM
bool "EEPROM"
config MTK_SECOND_IF_EEPROM_EFUSE
bool "EFUSE"
endchoice
config MTK_RT_SECOND_CARD_EEPROM
string
depends on ! MTK_SECOND_IF_NONE
default "prom" if MTK_SECOND_IF_EEPROM_PROM
default "efuse" if MTK_SECOND_IF_EEPROM_EFUSE
default "flash" if MTK_SECOND_IF_EEPROM_FLASH
choice
prompt "PA/LNA Type of 2nd Card"
depends on ! MTK_SECOND_IF_NONE
default MTK_SECOND_IF_IPAILNA
config MTK_SECOND_IF_EPAELNA
bool "ePAeLNA"
config MTK_SECOND_IF_IPAILNA
bool "iPAiLNA"
config MTK_SECOND_IF_IPAELNA
bool "iPAeLNA"
endchoice
menu "Operation Modes for 2nd card"
choice
prompt "Operating mode"
default MTK_WIFI_MODE_AP
config MTK_WIFI_MODE_AP
bool "AP"
config MTK_WIFI_MODE_STA
bool "STA"
config MTK_WIFI_MODE_BOTH
bool "AP+STA"
endchoice
source "ap.config.in"
endmenu
endmenu
### endmenu for 2nd wifi card #######
#### placeholder for 3rd wifi card ###
config MTK_THIRD_IF_NONE
bool
default y
config MTK_RT_THIRD_CARD
int
default 0
config MTK_RT_THIRD_IF_RF_OFFSET
hex
default 0x4000
config MTK_RT_THIRD_CARD_EEPROM
string
default "efuse"
### placehlder for 3rd wifi card #######
config MTK_MULTI_INF_SUPPORT
bool
default y if !MTK_FIRST_IF_NONE && !MTK_SECOND_IF_NONE
source "common.config.in"
#if MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626 || MTK_CHIP_AXE || MTK_CHIP_MT7915
# config MTK_MT_MAC
# bool
# default y
# select MTK_RATE_ADAPTION
# select MTK_RATE_ADAPT_AGBS_SUPPORT
# select MTK_DOT11_N_SUPPORT
# select MTK_DOT11_VHT_AC
# select MTK_HDR_TRANS_TX_SUPPORT
# select MTK_HDR_TRANS_RX_SUPPORT
#endif
endif #MTK_WIFI_DRIVER#

250
mt7603/globalconfig.in Normal file
View File

@@ -0,0 +1,250 @@
# Kconfig for mtk wifi
config MTK_WIFI_DRIVER
bool
default y
depends on (PACKAGE_kmod-mt7615e || PACKAGE_kmod-mt7603e)
select MTK_SUPPORT_OPENWRT
select MTK_MT_WIFI
select MTK_WIFI_BASIC_FUNC
if MTK_WIFI_DRIVER
menu "First WiFi card"
choice
prompt "Choose First WiFi card"
default MTK_FIRST_IF_MT7603E
config MTK_FIRST_IF_NONE
bool "None"
config MTK_FIRST_IF_MT7603E
bool "MT7603E"
select RALINK_MT7603E
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7603E
config MTK_FIRST_IF_MT7615E
bool "MT7615E"
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7615E
endchoice
config MTK_RT_FIRST_CARD
int
depends on ! MTK_FIRST_IF_NONE
default 7603 if MTK_FIRST_IF_MT7603E
default 7615 if MTK_FIRST_IF_MT7615E
config MTK_MT_WIFI_PATH_FIRST_CARD
string "WiFi driver build directory name"
default "rlt_wifi"
config MTK_RT_FIRST_IF_RF_OFFSET
hex "RF offset of 1st card"
depends on ! MTK_FIRST_IF_NONE
default 0x0
#prompt "WiFi detailed options for 1st card"
choice
prompt "EEPROM Type of 1st Card"
depends on ! MTK_FIRST_IF_NONE
default MTK_FIRST_IF_EEPROM_EFUSE
config MTK_FIRST_IF_EEPROM_FLASH
bool "FLASH"
config MTK_FIRST_IF_EEPROM_PROM
bool "EEPROM"
config MTK_FIRST_IF_EEPROM_EFUSE
bool "EFUSE"
endchoice
config MTK_RT_FIRST_CARD_EEPROM
string
depends on ! MTK_FIRST_IF_NONE
default "prom" if MTK_FIRST_IF_EEPROM_PROM
default "efuse" if MTK_FIRST_IF_EEPROM_EFUSE
default "flash" if MTK_FIRST_IF_EEPROM_FLASH
choice
prompt "PA/LNA Type of 1st Card"
depends on ! MTK_FIRST_IF_NONE
default MTK_FIRST_IF_IPAILNA
config MTK_FIRST_IF_EPAELNA
bool "ePAeLNA"
config MTK_FIRST_IF_IPAILNA
bool "iPAiLNA"
config MTK_FIRST_IF_IPAELNA
bool "iPAeLNA"
endchoice
menu "Operation Modes for 1st card"
choice
prompt "Operating mode"
default MTK_WIFI_MODE_AP
config MTK_WIFI_MODE_AP
bool "AP"
config MTK_WIFI_MODE_STA
bool "STA"
config MTK_WIFI_MODE_BOTH
bool "AP+STA"
#select MTK_MT_STA_SUPPORT
endchoice
source "ap.config.in"
endmenu
endmenu
### endmenu for 1st wifi card #######
#### menu starts for 2nd wifi card ###
menu "Second WiFi card"
choice
prompt "Choose Second WiFi card"
default MTK_SECOND_IF_MT7615E
config MTK_SECOND_IF_NONE
bool "None"
config MTK_SECOND_IF_MT7603E
bool "MT7603E"
select RALINK_MT7603E
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7603E
config MTK_SECOND_IF_MT7615E
bool "MT7615E"
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7615E
endchoice
config MTK_RT_SECOND_CARD
int
depends on ! MTK_SECOND_IF_NONE
default 7603 if MTK_SECOND_IF_MT7603E
default 7615 if MTK_SECOND_IF_MT7615E
config MTK_MT_WIFI_PATH_SECOND_CARD
string "WiFi driver build directory name"
default "mt_wifi"
config MTK_RT_SECOND_IF_RF_OFFSET
hex "RF offset of 2nd card"
depends on ! MTK_SECOND_IF_NONE
default 0x8000
#prompt "WiFi detailed options for 2nd card"
choice
prompt "EEPROM Type of 2nd Card"
depends on ! MTK_SECOND_IF_NONE
default MTK_SECOND_IF_EEPROM_EFUSE
config MTK_SECOND_IF_EEPROM_FLASH
bool "FLASH"
config MTK_SECOND_IF_EEPROM_PROM
bool "EEPROM"
config MTK_SECOND_IF_EEPROM_EFUSE
bool "EFUSE"
endchoice
config MTK_RT_SECOND_CARD_EEPROM
string
depends on ! MTK_SECOND_IF_NONE
default "prom" if MTK_SECOND_IF_EEPROM_PROM
default "efuse" if MTK_SECOND_IF_EEPROM_EFUSE
default "flash" if MTK_SECOND_IF_EEPROM_FLASH
choice
prompt "PA/LNA Type of 2nd Card"
depends on ! MTK_SECOND_IF_NONE
default MTK_SECOND_IF_IPAILNA
config MTK_SECOND_IF_EPAELNA
bool "ePAeLNA"
config MTK_SECOND_IF_IPAILNA
bool "iPAiLNA"
config MTK_SECOND_IF_IPAELNA
bool "iPAeLNA"
endchoice
menu "Operation Modes for 2nd card"
choice
prompt "Operating mode"
default MTK_WIFI_MODE_AP
config MTK_WIFI_MODE_AP
bool "AP"
config MTK_WIFI_MODE_STA
bool "STA"
config MTK_WIFI_MODE_BOTH
bool "AP+STA"
endchoice
source "ap.config.in"
endmenu
endmenu
### endmenu for 2nd wifi card #######
#### placeholder for 3rd wifi card ###
config MTK_THIRD_IF_NONE
bool
default y
config MTK_RT_THIRD_CARD
int
default 0
config MTK_RT_THIRD_IF_RF_OFFSET
hex
default 0x4000
config MTK_RT_THIRD_CARD_EEPROM
string
default "efuse"
### placehlder for 3rd wifi card #######
config MTK_MULTI_INF_SUPPORT
bool
default y if !MTK_FIRST_IF_NONE && !MTK_SECOND_IF_NONE
source "common.config.in"
#if MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626 || MTK_CHIP_AXE || MTK_CHIP_MT7915
# config MTK_MT_MAC
# bool
# default y
# select MTK_RATE_ADAPTION
# select MTK_RATE_ADAPT_AGBS_SUPPORT
# select MTK_DOT11_N_SUPPORT
# select MTK_DOT11_VHT_AC
# select MTK_HDR_TRANS_TX_SUPPORT
# select MTK_HDR_TRANS_RX_SUPPORT
#endif
endif #MTK_WIFI_DRIVER#

View File

@@ -0,0 +1,191 @@
diff -uprN a/mt7603_wifi/common/cmm_info.c b/mt7603_wifi/common/cmm_info.c
--- a/mt7603_wifi/common/cmm_info.c 2019-02-22 10:01:55.000000000 +0100
+++ b/mt7603_wifi/common/cmm_info.c 2019-12-08 21:47:48.553113878 +0100
@@ -132,7 +132,7 @@ INT Set_DriverVersion_Proc(RTMP_ADAPTER
{
#ifdef CONFIG_AP_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_AP(pAd)
- DBGPRINT(RT_DEBUG_OFF, ("Driver version-%s %s %s\n", AP_DRIVER_VERSION, __DATE__, __TIME__));
+ DBGPRINT(RT_DEBUG_OFF, ("Driver version-%s\n", AP_DRIVER_VERSION));
DBGPRINT(RT_DEBUG_OFF, ("Driver Patch\n"));
DBGPRINT(RT_DEBUG_OFF, ("001 : 4AC + MGMT PSE queue pkt stuck detect & AP tr_entry is memory currupted\n"));
DBGPRINT(RT_DEBUG_OFF, ("002 : wifi_forward support\n"));
diff -uprN a/mt7603_wifi/os/linux/rt_linux.c b/mt7603_wifi/os/linux/rt_linux.c
--- a/mt7603_wifi/os/linux/rt_linux.c 2019-02-22 10:01:39.000000000 +0100
+++ b/mt7603_wifi/os/linux/rt_linux.c 2019-12-08 22:16:27.246150818 +0100
@@ -47,8 +47,8 @@
#endif
#if defined(CONFIG_RA_HW_NAT) || defined(CONFIG_RA_HW_NAT_MODULE)
-#include "../../../../../../../../net/nat/hw_nat/ra_nat.h"
-#include "../../../../../../../../net/nat/hw_nat/frame_engine.h"
+#include <../net/nat/hw_nat/ra_nat.h>
+#include <../net/nat/hw_nat/frame_engine.h>
#endif
/* TODO */
@@ -855,18 +855,27 @@ void RtmpOSFileSeek(RTMP_OS_FD osfd, int
int RtmpOSFileRead(RTMP_OS_FD osfd, char *pDataPtr, int readLen)
{
/* The object must have a read method */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
if (osfd->f_op && osfd->f_op->read) {
return osfd->f_op->read(osfd, pDataPtr, readLen, &osfd->f_pos);
- } else {
- DBGPRINT(RT_DEBUG_ERROR, ("no file read method\n"));
- return -1;
+#else
+ if (osfd->f_mode & FMODE_CAN_READ) {
+ return __vfs_read(osfd, pDataPtr, readLen,&osfd->f_pos);
+#endif
+ } else {
+ DBGPRINT(RT_DEBUG_ERROR, ("no file read method\n"));
+ return -1;
+ }
}
-}
int RtmpOSFileWrite(RTMP_OS_FD osfd, char *pDataPtr, int writeLen)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
return osfd->f_op->write(osfd, pDataPtr, (size_t) writeLen, &osfd->f_pos);
+#else
+ return __vfs_write(osfd, pDataPtr, (size_t) writeLen, &osfd->f_pos);
+#endif
}
diff -uprN a/mt7603_wifi/os/linux/rt_proc.c b/mt7603_wifi/os/linux/rt_proc.c
--- a/mt7603_wifi/os/linux/rt_proc.c 2019-02-22 10:01:39.000000000 +0100
+++ b/mt7603_wifi/os/linux/rt_proc.c 2019-12-08 21:47:48.553113878 +0100
@@ -61,7 +61,7 @@ int wl_proc_exit(void);
#endif /* PROCREG_DIR */
#ifdef CONFIG_PROC_FS
-extern struct proc_dir_entry *procRegDir;
+struct proc_dir_entry *procRegDir;
#ifdef VIDEO_TURBINE_SUPPORT
extern BOOLEAN UpdateFromGlobal;
diff -uprN a/mt7603_wifi/os/linux/rt_profile.c b/mt7603_wifi/os/linux/rt_profile.c
--- a/mt7603_wifi/os/linux/rt_profile.c 2019-02-22 10:01:39.000000000 +0100
+++ b/mt7603_wifi/os/linux/rt_profile.c 2019-12-09 10:27:49.609507632 +0100
@@ -30,8 +30,8 @@
#endif
#if defined (CONFIG_RA_HW_NAT) || defined (CONFIG_RA_HW_NAT_MODULE)
-#include "../../../../../../../../net/nat/hw_nat/ra_nat.h"
-#include "../../../../../../../../net/nat/hw_nat/frame_engine.h"
+#include <../net/nat/hw_nat/ra_nat.h>
+#include <../net/nat/hw_nat/frame_engine.h>
#endif
@@ -689,7 +689,11 @@ NDIS_STATUS RTMPReadParametersHook(RTMP_
{
#ifndef OS_ABL_SUPPORT
// TODO: need to roll back when convert into OSABL code
- fsize = (ULONG)srcf->f_dentry->d_inode->i_size;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
+ fsize = (ULONG)srcf->f_dentry->d_inode->i_size;
+#else
+ fsize = (ULONG)srcf->f_path.dentry->d_inode->i_size;
+#endif
if (buf_size < (fsize + 1))
buf_size = fsize + 1;
#endif /* OS_ABL_SUPPORT */
diff -uprN a/mt7603_wifi_ap/Makefile b/mt7603_wifi_ap/Makefile
--- a/mt7603_wifi_ap/Makefile 2019-02-22 10:01:27.000000000 +0100
+++ b/mt7603_wifi_ap/Makefile 2019-12-08 21:52:10.253012796 +0100
@@ -16,6 +16,90 @@ DRV_NAME = mt7603_wifi
RT_WIFI_DIR = ../mt7603_wifi
endif
+ifeq ($(CONFIG_SUPPORT_OPENWRT),y)
+###EXTRA_CFLAGS += -DCONFIG_SUPPORT_OPENWRT
+ifneq ($(CONFIG_RT_FIRST_CARD),)
+EXTRA_CFLAGS += -DCONFIG_RT_FIRST_CARD=$(CONFIG_RT_FIRST_CARD)
+EXTRA_CFLAGS += -DCONFIG_RT_FIRST_IF_RF_OFFSET=$(CONFIG_RT_FIRST_IF_RF_OFFSET)
+endif
+ifneq ($(CONFIG_RT_SECOND_CARD),)
+EXTRA_CFLAGS += -DCONFIG_RT_SECOND_CARD=$(CONFIG_RT_SECOND_CARD)
+EXTRA_CFLAGS += -DCONFIG_RT_SECOND_IF_RF_OFFSET=$(CONFIG_RT_SECOND_IF_RF_OFFSET)
+endif
+ifneq ($(CONFIG_RT_THIRD_CARD),)
+EXTRA_CFLAGS += -DCONFIG_RT_THIRD_CARD=$(CONFIG_RT_THIRD_CARD)
+EXTRA_CFLAGS += -DCONFIG_RT_THIRD_IF_RF_OFFSET=$(CONFIG_RT_THIRD_IF_RF_OFFSET)
+endif
+ifeq ($(CONFIG_FIRST_IF_EEPROM_PROM),y)
+EXTRA_CFLAGS += -DCONFIG_RT_FIRST_CARD_EEPROM="\"prom\""
+else
+ifeq ($(CONFIG_FIRST_IF_EEPROM_EFUSE),y)
+EXTRA_CFLAGS += -DCONFIG_RT_FIRST_CARD_EEPROM="\"efuse\""
+else
+ifeq ($(CONFIG_FIRST_IF_EEPROM_FLASH),y)
+EXTRA_CFLAGS += -DCONFIG_RT_FIRST_CARD_EEPROM="\"flash\""
+endif
+endif
+endif
+ifeq ($(CONFIG_SECOND_IF_EEPROM_PROM),y)
+EXTRA_CFLAGS += -DCONFIG_RT_SECOND_CARD_EEPROM="\"prom\""
+else
+ifeq ($(CONFIG_SECOND_IF_EEPROM_EFUSE),y)
+EXTRA_CFLAGS += -DCONFIG_RT_SECOND_CARD_EEPROM="\"efuse\""
+else
+ifeq ($(CONFIG_SECOND_IF_EEPROM_FLASH),y)
+EXTRA_CFLAGS += -DCONFIG_RT_SECOND_CARD_EEPROM="\"flash\""
+endif
+endif
+endif
+ifeq ($(CONFIG_THIRD_IF_EEPROM_PROM),y)
+EXTRA_CFLAGS += -DCONFIG_RT_THIRD_CARD_EEPROM="\"prom\""
+else
+ifeq ($(CONFIG_THIRD_IF_EEPROM_EFUSE),y)
+EXTRA_CFLAGS += -DCONFIG_RT_THIRD_CARD_EEPROM="\"efuse\""
+else
+ifeq ($(CONFIG_THIRD_IF_EEPROM_FLASH),y)
+EXTRA_CFLAGS += -DCONFIG_RT_THIRD_CARD_EEPROM="\"flash\""
+endif
+endif
+endif
+endif
+
+ifeq ($(CONFIG_FIRST_IF_EPAELNA),y)
+EXTRA_CFLAGS += -DCONFIG_FIRST_IF_EPAELNA
+else
+ifeq ($(CONFIG_FIRST_IF_IPAILNA),y)
+EXTRA_CFLAGS += -DCONFIG_FIRST_IF_IPAILNA
+else
+ifeq ($(CONFIG_FIRST_IF_IPAELNA),y)
+EXTRA_CFLAGS += -DCONFIG_FIRST_IF_IPAELNA
+endif
+endif
+endif
+ifeq ($(CONFIG_SECOND_IF_EPAELNA),y)
+EXTRA_CFLAGS += -DCONFIG_SECOND_IF_EPAELNA
+else
+ifeq ($(CONFIG_SECOND_IF_IPAILNA),y)
+EXTRA_CFLAGS += -DCONFIG_SECOND_IF_IPAILNA
+else
+ifeq ($(CONFIG_SECOND_IF_IPAELNA),y)
+EXTRA_CFLAGS += -DCONFIG_SECOND_IF_IPAELNA
+endif
+endif
+endif
+ifeq ($(CONFIG_THIRD_IF_EPAELNA),y)
+EXTRA_CFLAGS += -DCONFIG_THIRD_IF_EPAELNA
+else
+ifeq ($(CONFIG_THIRD_IF_IPAILNA),y)
+EXTRA_CFLAGS += -DCONFIG_THIRD_IF_IPAILNA
+else
+ifeq ($(CONFIG_THIRD_IF_IPAELNA),y)
+EXTRA_CFLAGS += -DCONFIG_THIRD_IF_IPAELNA
+endif
+endif
+endif
+
+
########################################################
# Common files
########################################################

256
mt7615/Makefile Executable file
View File

@@ -0,0 +1,256 @@
# All rights reserved.
# See LICENSE for more information.
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mt7615e
PKG_VERSION:=5.0.4.0_20190503
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@dev.iopsys.eu:mediatek/mt7615.git
PKG_SOURCE_VERSION:=12c69fe1912113d16d17292bcee6415a8c9ab131
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_KCONFIG:= \
AP_SUPPORT \
RT_FIRST_CARD \
RT_SECOND_CARD \
RT_FIRST_IF_RF_OFFSET \
RT_SECOND_IF_RF_OFFSET \
MT_WIFI \
WIFI_BASIC_FUNC \
MT_WIFI_PATH \
FIRST_IF_NONE \
FIRST_IF_EEPROM_FLASH \
FIRST_IF_EEPROM_EFUSE \
RT_FIRST_CARD_EEPROM \
SECOND_IF_NONE \
SECOND_IF_EEPROM_FLASH \
SECOND_IF_EEPROM_PROM \
SECOND_IF_EEPROM_EFUSE \
RT_SECOND_CARD_EEPROM \
MULTI_INF_SUPPORT \
WIFI_BASIC_FUNC \
WIRELESS_EXT \
WEXT_SPY \
WEXT_PRIV \
DOT11_N_SUPPORT \
DOT11_VHT_AC \
DOT11_HE_AX \
CFG_SUPPORT_FALCON_MURU \
CFG_SUPPORT_FALCON_TXCMD_DBG \
CFG_SUPPORT_FALCON_SR \
WIFI_DRIVER \
G_BAND_256QAM_SUPPORT \
BRCM_256QAM_SUPPORT \
ICAP_SUPPORT \
MT_AP_SUPPORT \
BACKGROUND_SCAN_SUPPORT \
SMART_CARRIER_SENSE_SUPPORT \
SCS_FW_OFFLOAD \
THERMAL_PROTECT_SUPPORT \
MT_DFS_SUPPORT \
HDR_TRANS_TX_SUPPORT \
CHIP_MT7615E \
HDR_TRANS_RX_SUPPORT \
SUPPORT_DYNAMIC_TXOP \
WSC_INCLUDED \
MT_STA_SUPPORT \
WSC_V2_SUPPORT \
DOT11W_PMF_SUPPORT \
PASSPOINT_R2 \
TXBF_SUPPORT \
IGMP_SNOOP_SUPPORT \
RATE_ADAPTION \
RATE_ADAPT_AGBS_SUPPORT \
RTMP_FLASH_SUPPORT \
ATE_SUPPORT \
WLAN_SERVICE \
UAPSD \
RLT_MAC \
RLT_BBP \
RLT_RF \
RTMP_MAC \
RTMP_BBP \
RTMP_RF \
RTMP_PCI_SUPPORT \
RTMP_USB_SUPPORT \
RTMP_RBUS_SUPPORT \
WIFI_MODE_AP \
WIFI_MODE_STA \
WIRELESS_EXT \
WEXT_SPY \
WEXT_PRIV \
WDS_SUPPORT \
MBSS_SUPPORT \
APCLI_SUPPORT \
APCLI_CERT_SUPPORT \
APCLI_CONNECTION_TRIAL \
MAC_REPEATER_SUPPORT \
RALINK_RT6352 \
RALINK_MT7620 \
RALINK_MT7603E \
CON_WPS_SUPPORT \
VOW_SUPPORT \
BAND_STEERING \
TXOP_ARBITER \
CFG_SUPPORT_DYNAMIC_TXOP \
WIFI_MODE_BOTH \
WIFI_RLT_MAC \
RLT_MAC \
WIFI_RTMP_MAC \
RTMP_MAC \
WIFI_MT_MAC \
CHIP_MT7603E \
CHIP_MT7615E \
MT_MAC \
RATE_ADAPTION \
SUPPORT_OPENWRT \
SDK_USER_LIGHTY \
MUMIMO_SUPPORT \
MU_RA_SUPPORT \
LED_CONTROL_SUPPORT \
RA_HW_NAT \
RA_HW_NAT_WIFI_NEW_ARCH \
CFG80211_SUPPORT \
SER_SUPPORT \
GREENAP_SUPPORT \
RADIUS_ACCOUNTING_SUPPORT \
TPC_SUPPORT \
RLM_CAL_CACHE_SUPPORT \
CAL_BIN_FILE_SUPPORT \
RF_LOCKDOWN_SUPPORT \
PASSPOINT_R2 \
RED_SUPPORT \
FIRST_IF_EPAELNA \
FIRST_IF_IPAILNA \
FIRST_IF_IPAELNA \
FIRST_IF_EPAILNA \
SECOND_IF_EPAELNA \
SECOND_IF_IPAILNA \
SECOND_IF_IPAELNA \
SECOND_IF_EPAILNA \
THIRD_IF_EPAELNA \
THIRD_IF_IPAILNA \
THIRD_IF_IPAELNA \
THIRD_IF_EPAILNA \
WIFI_PKT_FWD \
DOT11K_RRM_SUPPORT \
DOT11R_FT_SUPPORT \
ENTERPRISE_AP_SUPPORT \
WIFI_EAP_FEATURE \
RADIUS_MAC_AUTH_SUPPORT \
VLAN_SUPPORT \
DYNAMIC_VLAN_SUPPORT \
CUSTOMISED_HOSTAPD_SUPPORT \
APCLI_STA_SUPPORT \
WDS_STA_SUPPORT \
MBSS_AS_WDS_AP_SUPPORT \
MBO_SUPPORT \
MAP_SUPPORT \
WPA3_SUPPORT \
OWE_SUPPORT \
WIFI_PKT_FWD_V1 \
FIRST_IF_MT7615E \
FIRST_IF_MT7622 \
FIRST_IF_MT7626 \
FIRST_IF_AXE \
FIRST_IF_MT7915 \
SECOND_IF_MT7615E \
SECOND_IF_AXE \
THIRD_IF_NONE \
THIRD_IF_MT7615E \
CHIP_AXE \
CHIP_MT7915 \
RT_THIRD_CARD \
RT_THIRD_IF_RF_OFFSET \
THIRD_IF_EEPROM_FLASH \
THIRD_IF_EEPROM_PROM \
THIRD_IF_EEPROM_EFUSE \
RT_THIRD_CARD_EEPROM \
SPECTRUM_SUPPORT \
PRE_CAL_TRX_SET1_SUPPORT \
MWDS \
MCAST_RATE_SPECIFIC \
WLAN_HOOK \
COEX_SUPPORT \
EASY_SETUP_SUPPORT \
EVENT_NOTIFIER_SUPPORT \
AIR_MONITOR \
OFFCHANNEL_SCAN_FEATURE \
WNM_SUPPORT \
INTERWORKING \
LINUX_NET_TXQ_SUPPORT \
CHIP_MT7622 \
CHIP_MT7626 \
MEMORY_SHRINK \
RPS_EFFICIENCY \
WHNAT_SUPPORT \
FAST_NAT_SUPPORT \
PRE_CAL_TRX_SET2_SUPPORT \
LINK_TEST_SUPPORT \
TCP_RACK_SUPPORT \
FQ_SCH_SUPPORT \
BRCM_256QAM_SUPPORT \
VHT_TXBF_2G_EPIGRAM_IE_SUPPORT \
DSCP_QOS_MAP_SUPPORT \
DSCP_PRI_SUPPORT \
PCIE_ASPM_DYM_CTRL_SUPPORT \
MIN_PHY_RATE_SUPPORT \
FAST_UP_RATE_SUPPORT \
TXRX_STAT_SUPPORT \
VENDOR_FEATURE11_SUPPORT \
WIFI_TWT_SUPPORT \
SINGLE_SKU \
SNIFFER_SUPPORT \
PKG_CONFIG_DEPENDS:=$(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_MTK_$c),CONFIG_$(c)))
include $(INCLUDE_DIR)/package.mk
#TAR_CMD=$(HOST_TAR) -C $(1)/ $(TAR_OPTIONS)
define KernelPackage/mt7615e
CATEGORY:=Mediatek drivers
TITLE:=WiFi drivers
DEPENDS:= +wifi-profile
ifneq ($(CONFIG_MTK_FAST_NAT_SUPPORT), )
ifneq ($(CONFIG_NET_MEDIATEK_HNAT), )
DEPENDS+=+kmod-mediatek_hnat
endif
endif
ifneq ($(CONFIG_MTK_WHNAT_SUPPORT), )
FILES:=$(PKG_BUILD_DIR)/mt_wifi_ap/mt_wifi.ko \
$(PKG_BUILD_DIR)/mt_wifi/embedded/plug_in/whnat/mt_whnat.ko
AUTOLOAD:=$(call AutoProbe,mt_wifi mt_whnat)
else
FILES:=$(PKG_BUILD_DIR)/mt_wifi_ap/mt_wifi.ko
AUTOLOAD:=$(call AutoProbe,mt_wifi)
endif
MENU:=1
endef
define KernelPackage/mt7615e/config
source "$(SOURCE)/globalconfig.in"
endef
define Build/Compile
$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) V=1 \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
SUBDIRS="$(PKG_BUILD_DIR)/mt_wifi_ap" \
$(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_MTK_$c),CONFIG_$(c)=$(CONFIG_MTK_$(c)))) \
CONFIG_SUPPORT_OPENWRT=y CONFIG_MT_AP_SUPPORT=m CONFIG_CHIP_MT7615E=y CONFIG_MT_MAC=y \
CONFIG_FIRST_IF_MT7603E=y CONFIG_SECOND_IF_MT7615E=y \
modules
endef
define KernelPackage/mt7615e/install
$(INSTALL_DIR) $(1)/etc/wireless
$(CP) ./files/l1profile.dat $(1)/etc/wireless
endef
$(eval $(call KernelPackage,mt7615e))

317
mt7615/ap.config.in Normal file
View File

@@ -0,0 +1,317 @@
config MTK_MT_AP_SUPPORT
bool
default y
depends on MTK_WIFI_MODE_AP
if MTK_MT_AP_SUPPORT
config MTK_WDS_SUPPORT
bool "WDS"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_MBSS_SUPPORT
bool "Multi-BSS (MBSSID)"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_APCLI_SUPPORT
bool "AP-Client Support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_APCLI_CERT_SUPPORT
bool "AP-Client TGn Cert Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_APCLI_SUPPORT
default n
config MTK_MAC_REPEATER_SUPPORT
bool "MAC Repeater Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_APCLI_SUPPORT
default y
config MTK_APCLI_CONNECTION_TRIAL
bool "AP-Client Trial Connection"
depends on MTK_MT_AP_SUPPORT
depends on MTK_APCLI_SUPPORT
default n
config MTK_MWDS
bool "Mixed WDS (MWDS)"
depends on MTK_MT_AP_SUPPORT
select MTK_APCLI_SUPPORT
default n
config MTK_MUMIMO_SUPPORT
bool "MU-MIMO Support"
depends on MTK_WIFI_DRIVER
select MTK_MU_RA_SUPPORT
default y
config MTK_MU_RA_SUPPORT
bool "MU-RGA Support"
depends on MTK_MUMIMO_SUPPORT
config MTK_DOT11R_FT_SUPPORT
bool "IEEE 802.11r Fast BSS Transition"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_DOT11K_RRM_SUPPORT
bool "IEEE 802.11k Radio Resource Management"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_IGMP_SNOOP_SUPPORT
bool "IGMP snooping (for multicast --> unicast)"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default y
config MTK_OFFCHANNEL_SCAN_FEATURE
bool "Off-Channel scan support (Channel Quality Monitor)"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default n
config MTK_SNIFFER_SUPPORT
bool "Sniffer support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_ENTERPRISE_AP_SUPPORT
bool "Enterprise AP Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_WIFI_EAP_FEATURE
bool "EAP Feature"
depends on MTK_WIFI_DRIVER
default y
config MTK_RADIUS_MAC_AUTH_SUPPORT
bool "RADIUS MAC Auth Support"
depends on MTK_ENTERPRISE_AP_SUPPORT
depends on MTK_CFG80211_SUPPORT
default n
config MTK_VLAN_SUPPORT
bool "VLAN Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_ENTERPRISE_AP_SUPPORT
default n
config MTK_DYNAMIC_VLAN_SUPPORT
bool "Dynamic VLAN Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_ENTERPRISE_AP_SUPPORT
default n
config MTK_CFG80211_SUPPORT
bool "Linux CFG80211 support"
depends on MTK_MT_AP_SUPPORT
default n
#CUSTOMISED HOSTAPD
config MTK_CUSTOMISED_HOSTAPD_SUPPORT
bool "Customised Hostapd Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_CFG80211_SUPPORT
default n
#APCLI STA
config MTK_APCLI_STA_SUPPORT
bool "APCLI STA Support"
depends on MTK_APCLI_SUPPORT
depends on MTK_CFG80211_SUPPORT
default n
#WDS STA
config MTK_WDS_STA_SUPPORT
bool "WDS STA Support"
depends on MTK_APCLI_SUPPORT
depends on MTK_CFG80211_SUPPORT
default n
#WDS AP
config MTK_MBSS_AS_WDS_AP_SUPPORT
bool "MBSS as WDS AP Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_MBSS_SUPPORT
default n
config MTK_DSCP_QOS_MAP_SUPPORT
bool "Dscp Qos Mapping Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_DSCP_PRI_SUPPORT
bool "Dscp Priority Mapping Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_MIN_PHY_RATE_SUPPORT
bool "Minimum PHY rate support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_FAST_UP_RATE_SUPPORT
bool "Fast UP rate support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_CON_WPS_SUPPORT
bool "Concurrent WPS Support"
depends on MTK_MT_AP_SUPPORT
depends on MTK_APCLI_SUPPORT
depends on MTK_WSC_INCLUDED
depends on MTK_WSC_V2_SUPPORT
default n
config MTK_MCAST_RATE_SPECIFIC
bool "User specific tx rate of mcast pkt"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_VOW_SUPPORT
bool "MediaAir (VOW) support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_BAND_STEERING
bool "Band Steering"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_LED_CONTROL_SUPPORT
bool "LED Control Support"
default n
config MTK_WLAN_HOOK
bool "WLAN hook Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_RADIUS_ACCOUNTING_SUPPORT
bool "Radius Accounting Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_GREENAP_SUPPORT
bool "GreenAP Support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_TXRX_STAT_SUPPORT
bool "Tx/Rx Stats Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_VENDOR_FEATURE11_SUPPORT
bool "Enable Vendor-11 Features"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default n
config MTK_PCIE_ASPM_DYM_CTRL_SUPPORT
bool "Pcie Aspm Dynamic Control Support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_COEX_SUPPORT
bool "Coex Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_EASY_SETUP_SUPPORT
bool "Whole Home Coverage - Easy Setup"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_EVENT_NOTIFIER_SUPPORT
bool "Whole Home Coverage - Event Notifier"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_AIR_MONITOR
bool "Air Monitor"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_WNM_SUPPORT
bool "IEEE 802.11v WNM Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_INTERWORKING
bool "IEEE 802.11u Interworking"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_LINUX_NET_TXQ_SUPPORT
bool "NET TX Queue Support"
default n
config MTK_WPA3_SUPPORT
bool "WPA3 Support"
depends on MTK_MT_AP_SUPPORT
default y
config MTK_OWE_SUPPORT
bool "Enhanced Open Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_SINGLE_SKU
bool "Single SKU Support"
depends on MTK_MT_AP_SUPPORT
default n
config MTK_ICAP_SUPPORT
bool "ICAP Support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default y
config MTK_SPECTRUM_SUPPORT
bool "Wifi Spectrum Mgmt Support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT
default y
config MTK_FTM_SUPPORT
bool "FTM Support"
depends on MTK_WIFI_DRIVER
select MTK_PASSPOINT_R2
default n
config MTK_PASSPOINT_R2
bool "Passpoint Release-2 Support"
depends on MTK_WIFI_DRIVER
select MTK_DOT11W_PMF_SUPPORT
depends on MTK_MT_AP_SUPPORT
default n
config MTK_MBO_SUPPORT
bool "MBO Support"
depends on MTK_WIFI_DRIVER
select MTK_INTERWORKING
select MTK_WNM_SUPPORT
select MTK_DOT11K_RRM_SUPPORT
select MTK_DOT11R_FT_SUPPORT
select MTK_DOT11W_PMF_SUPPORT
default n
config MTK_MAP_SUPPORT
bool "Multi-AP (MAP) Support"
depends on MTK_WIFI_DRIVER
select MTK_INTERWORKING
select MTK_WNM_SUPPORT
select MTK_DOT11K_RRM_SUPPORT
select MTK_DOT11R_FT_SUPPORT
select MTK_DOT11W_PMF_SUPPORT
default n
endif #MTK_MT_AP_SUPPORT

250
mt7615/common.config.in Normal file
View File

@@ -0,0 +1,250 @@
#mtk wifi common optiions
menu "Common WiFi options"
config MTK_WIFI_BASIC_FUNC
bool "Linux Wireless Extension support (for iwconfig, iwpriv etc.)"
select MTK_WIRELESS_EXT
select MTK_WEXT_SPY
select MTK_WEXT_PRIV
config MTK_DOT11_N_SUPPORT
bool "IEEE 802.11n support"
default y
config MTK_DOT11_VHT_AC
bool "IEEE 802.11ac support"
depends on MTK_DOT11_N_SUPPORT
default y
config MTK_DOT11_HE_AX
bool "IEEE 802.11ax support"
depends on MTK_DOT11_VHT_AC
depends on MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_CFG_SUPPORT_FALCON_MURU
bool "MURU support"
depends on MTK_DOT11_VHT_AC
depends on MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_CFG_SUPPORT_FALCON_TXCMD_DBG
bool "TXCMD DBG support"
depends on MTK_WIFI_DRIVER
depends on MTK_DOT11_VHT_AC
depends on MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_CFG_SUPPORT_FALCON_SR
bool "Spatial Reuse (SR) support"
depends on MTK_WIFI_DRIVER
depends on MTK_CHIP_MT7915
default y
config MTK_WIFI_TWT_SUPPORT
bool "Target Wake Time (TWT) support"
depends on MTK_WIFI_DRIVER
depends on MTK_DOT11_HE_AX
depends on MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_G_BAND_256QAM_SUPPORT
bool "2.4G 256-QAM support"
depends on MTK_WIFI_DRIVER
depends on MTK_DOT11_VHT_AC
default y
config MTK_BRCM_256QAM_SUPPORT
bool "BRCM 2.4G 256-QAM support"
depends on MTK_WIFI_DRIVER
depends on MTK_G_BAND_256QAM_SUPPORT
default n
config MTK_VHT_TXBF_2G_EPIGRAM_IE_SUPPORT
bool "BRCM 2.4G VHT Sounding support"
depends on MTK_WIFI_DRIVER
default n
config MTK_MT_DFS_SUPPORT
bool "IEEE 802.11h DFS Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_TPC_SUPPORT
bool "IEEE 802.11h TPC Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_BACKGROUND_SCAN_SUPPORT
bool "Background Scan Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_SMART_CARRIER_SENSE_SUPPORT
bool "Smart Carrier Sense Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_THERMAL_PROTECT_SUPPORT
bool "Thermal Protection"
depends on MTK_WIFI_DRIVER && MTK_SMART_CARRIER_SENSE_SUPPORT
default n
config MTK_SCS_FW_OFFLOAD
bool "SCS Fw Offload Support"
depends on MTK_WIFI_DRIVER && MTK_SMART_CARRIER_SENSE_SUPPORT
default n
config MTK_HDR_TRANS_TX_SUPPORT
bool "Tx Header Translation"
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626 || MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_HDR_TRANS_RX_SUPPORT
bool "Rx Header Translation"
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626 || MTK_CHIP_AXE || MTK_CHIP_MT7915
default y
config MTK_DBDC_MODE
bool "Dual-Band Dual-Concurrent (DBDC) mode support"
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7626 || MTK_CHIP_MT7915
select MULTI_PROFILE_SUPPORT
select DEFAULT_5G_PROFILE
default y
config MTK_MULTI_PROFILE_SUPPORT
bool "Multi Profile Support"
depends on MTK_DBDC_MODE
default n
config MTK_DEFAULT_5G_PROFILE
bool "5G default profile for DBDC"
depends on MTK_DBDC_MODE
default y
config MTK_WSC_INCLUDED
bool "WiFi Simple Config (WSC) or WPS"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default y
config MTK_WSC_V2_SUPPORT
bool "WiFi Simple Config ver.2 (WPS 2.0)"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default y
config MTK_DOT11W_PMF_SUPPORT
bool "IEEE 802.11w PMF support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default y
config MTK_TXBF_SUPPORT
bool "Tx Beam Forming Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_FAST_NAT_SUPPORT
bool "Fast-NAT support"
default n
config MTK_WHNAT_SUPPORT
tristate "Wifi Hardware NAT support"
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7915
depends on MTK_WLAN_HOOK
depends on MTK_FAST_NAT_SUPPORT
depends on PACKAGE_kmod-hw_nat || PACKAGE_kmod-mediatek_hnat
default n
#config CARRIER_DETECTION_SUPPORT
# bool "Carrier Detect"
# depends on WIFI_DRIVER
# default n
config MTK_MEMORY_SHRINK
bool "Memory Shrink"
depends on MTK_WIFI_DRIVER && MTK_CHIP_MT7626
default n
config MTK_RPS_EFFICIENCY
bool "RPS Efficiency"
depends on MTK_WIFI_DRIVER && MTK_CHIP_MT7626
default n
config MTK_RTMP_FLASH_SUPPORT
bool "Platform's Flash APIs Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_PRE_CAL_TRX_SET1_SUPPORT
bool "Calibration To Flash/BinFile Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_RLM_CAL_CACHE_SUPPORT
bool "Rlm Calibration Cache Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_PRE_CAL_TRX_SET2_SUPPORT
bool "Pre-calibration to Flash Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_CAL_BIN_FILE_SUPPORT
bool "Calibration to BinFile Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_RF_LOCKDOWN_SUPPORT
bool "RF Lockdown Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_LINK_TEST_SUPPORT
bool "Link Test Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_ATE_SUPPORT
bool "ATE/QA Support"
depends on MTK_WIFI_DRIVER
default y
config MTK_WLAN_SERVICE
bool "Wlan Service Library Support"
depends on MTK_WIFI_DRIVER
default n
config MTK_UAPSD
bool "UAPSD support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default y
config MTK_TCP_RACK_SUPPORT
bool "TCP Reduced ACK support"
depends on MTK_WIFI_DRIVER
default n
config MTK_RED_SUPPORT
bool "RED (Random Early Drop) support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
default n
config MTK_FQ_SCH_SUPPORT
bool "Fair Queueing support"
depends on MTK_WIFI_DRIVER
depends on MTK_MT_AP_SUPPORT && MTK_VOW_SUPPORT
depends on MTK_CHIP_MT7622
default y
config MTK_FDB_SUPPORT
bool "FW Debug Port"
depends on MTK_WIFI_DRIVER
default n
endmenu

250
mt7615/config.in Normal file
View File

@@ -0,0 +1,250 @@
# Kconfig for mtk wifi
config MTK_WIFI_DRIVER
bool
default y
depends on PACKAGE_kmod-mt7615 || PACKAGE_kmod-mt7603
select MTK_SUPPORT_OPENWRT
select MTK_MT_WIFI
select MTK_WIFI_BASIC_FUNC
if MTK_WIFI_DRIVER
menu "First WiFi card"
choice
prompt "Choose First WiFi card"
default MTK_FIRST_IF_MT7603E
config MTK_FIRST_IF_NONE
bool "None"
config MTK_FIRST_IF_MT7603E
bool "MT7603E"
select RALINK_MT7603E
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7603E
config MTK_FIRST_IF_MT7615E
bool "MT7615E"
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7615E
endchoice
config MTK_RT_FIRST_CARD
int
depends on ! MTK_FIRST_IF_NONE
default 7603 if MTK_FIRST_IF_MT7603E
default 7615 if MTK_FIRST_IF_MT7615E
config MTK_MT_WIFI_PATH_FIRST_CARD
string "WiFi driver build directory name"
default "rlt_wifi"
config MTK_RT_FIRST_IF_RF_OFFSET
hex "RF offset of 1st card"
depends on ! MTK_FIRST_IF_NONE
default 0x0
#prompt "WiFi detailed options for 1st card"
choice
prompt "EEPROM Type of 1st Card"
depends on ! MTK_FIRST_IF_NONE
default MTK_FIRST_IF_EEPROM_EFUSE
config MTK_FIRST_IF_EEPROM_FLASH
bool "FLASH"
config MTK_FIRST_IF_EEPROM_PROM
bool "EEPROM"
config MTK_FIRST_IF_EEPROM_EFUSE
bool "EFUSE"
endchoice
config MTK_RT_FIRST_CARD_EEPROM
string
depends on ! MTK_FIRST_IF_NONE
default "prom" if MTK_FIRST_IF_EEPROM_PROM
default "efuse" if MTK_FIRST_IF_EEPROM_EFUSE
default "flash" if MTK_FIRST_IF_EEPROM_FLASH
choice
prompt "PA/LNA Type of 1st Card"
depends on ! MTK_FIRST_IF_NONE
default MTK_FIRST_IF_IPAILNA
config MTK_FIRST_IF_EPAELNA
bool "ePAeLNA"
config MTK_FIRST_IF_IPAILNA
bool "iPAiLNA"
config MTK_FIRST_IF_IPAELNA
bool "iPAeLNA"
endchoice
menu "Operation Modes for 1st card"
choice
prompt "Operating mode"
default MTK_WIFI_MODE_AP
config MTK_WIFI_MODE_AP
bool "AP"
config MTK_WIFI_MODE_STA
bool "STA"
config MTK_WIFI_MODE_BOTH
bool "AP+STA"
#select MTK_MT_STA_SUPPORT
endchoice
source "ap.config.in"
endmenu
endmenu
### endmenu for 1st wifi card #######
#### menu starts for 2nd wifi card ###
menu "Second WiFi card"
choice
prompt "Choose Second WiFi card"
default MTK_SECOND_IF_MT7615E
config MTK_SECOND_IF_NONE
bool "None"
config MTK_SECOND_IF_MT7603E
bool "MT7603E"
select RALINK_MT7603E
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7603E
config MTK_SECOND_IF_MT7615E
bool "MT7615E"
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7615E
endchoice
config MTK_RT_SECOND_CARD
int
depends on ! MTK_SECOND_IF_NONE
default 7603 if MTK_SECOND_IF_MT7603E
default 7615 if MTK_SECOND_IF_MT7615E
config MTK_MT_WIFI_PATH_SECOND_CARD
string "WiFi driver build directory name"
default "mt_wifi"
config MTK_RT_SECOND_IF_RF_OFFSET
hex "RF offset of 2nd card"
depends on ! MTK_SECOND_IF_NONE
default 0x8000
#prompt "WiFi detailed options for 2nd card"
choice
prompt "EEPROM Type of 2nd Card"
depends on ! MTK_SECOND_IF_NONE
default MTK_SECOND_IF_EEPROM_EFUSE
config MTK_SECOND_IF_EEPROM_FLASH
bool "FLASH"
config MTK_SECOND_IF_EEPROM_PROM
bool "EEPROM"
config MTK_SECOND_IF_EEPROM_EFUSE
bool "EFUSE"
endchoice
config MTK_RT_SECOND_CARD_EEPROM
string
depends on ! MTK_SECOND_IF_NONE
default "prom" if MTK_SECOND_IF_EEPROM_PROM
default "efuse" if MTK_SECOND_IF_EEPROM_EFUSE
default "flash" if MTK_SECOND_IF_EEPROM_FLASH
choice
prompt "PA/LNA Type of 2nd Card"
depends on ! MTK_SECOND_IF_NONE
default MTK_SECOND_IF_IPAILNA
config MTK_SECOND_IF_EPAELNA
bool "ePAeLNA"
config MTK_SECOND_IF_IPAILNA
bool "iPAiLNA"
config MTK_SECOND_IF_IPAELNA
bool "iPAeLNA"
endchoice
menu "Operation Modes for 2nd card"
choice
prompt "Operating mode"
default MTK_WIFI_MODE_AP
config MTK_WIFI_MODE_AP
bool "AP"
config MTK_WIFI_MODE_STA
bool "STA"
config MTK_WIFI_MODE_BOTH
bool "AP+STA"
endchoice
source "ap.config.in"
endmenu
endmenu
### endmenu for 2nd wifi card #######
#### placeholder for 3rd wifi card ###
config MTK_THIRD_IF_NONE
bool
default y
config MTK_RT_THIRD_CARD
int
default 0
config MTK_RT_THIRD_IF_RF_OFFSET
hex
default 0x4000
config MTK_RT_THIRD_CARD_EEPROM
string
default "efuse"
### placehlder for 3rd wifi card #######
config MTK_MULTI_INF_SUPPORT
bool
default y if !MTK_FIRST_IF_NONE && !MTK_SECOND_IF_NONE
source "common.config.in"
#if MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626 || MTK_CHIP_AXE || MTK_CHIP_MT7915
# config MTK_MT_MAC
# bool
# default y
# select MTK_RATE_ADAPTION
# select MTK_RATE_ADAPT_AGBS_SUPPORT
# select MTK_DOT11_N_SUPPORT
# select MTK_DOT11_VHT_AC
# select MTK_HDR_TRANS_TX_SUPPORT
# select MTK_HDR_TRANS_RX_SUPPORT
#endif
endif #MTK_WIFI_DRIVER#

60
mt7615/defconfig.in Normal file
View File

@@ -0,0 +1,60 @@
#defconfig for mt7615
CONFIG_WIFI_DRIVER=y
CONFIG_SUPPORT_OPENWRT=y
CONFIG_RT_FIRST_CARD=7603
CONFIG_RT_FIRST_IF_RF_OFFSET=0x0
CONFIG_FIRST_IF_EEPROM_EFUSE=y
CONFIG_RT_FIRST_CARD_EEPROM="efuse"
CONFIG_FIRST_IF_IPAILNA=y
CONFIG_RT_SECOND_CARD=7615
CONFIG_RT_SECOND_IF_RF_OFFSET=0x8000
CONFIG_SECOND_IF_EEPROM_EFUSE=y
CONFIG_RT_SECOND_CARD_EEPROM="efuse"
CONFIG_SECOND_IF_IPAILNA=y
CONFIG_RT_THIRD_CARD=0
CONFIG_RT_THIRD_IF_RF_OFFSET=0x4000
CONFIG_RT_THIRD_CARD_EEPROM="efuse"
CONFIG_MULTI_INF_SUPPORT=y
CONFIG_FIRST_IF_MT7603E=y
CONFIG_SECOND_IF_MT7615E=y
CONFIG_THIRD_IF_NONE=y
CONFIG_WIFI_BASIC_FUNC=y
CONFIG_DOT11_N_SUPPORT=y
CONFIG_DOT11_VHT_AC=y
CONFIG_G_BAND_256QAM_SUPPORT=y
CONFIG_ICAP_SUPPORT=y
CONFIG_MT_MAC=y
#CONFIG_MT_AP_SUPPORT=y
CONFIG_MT_DFS_SUPPORT=y
CONFIG_BACKGROUND_SCAN_SUPPORT=y
CONFIG_SMART_CARRIER_SENSE_SUPPORT=y
CONFIG_WSC_INCLUDED=y
CONFIG_WSC_V2_SUPPORT=y
CONFIG_DOT11W_PMF_SUPPORT=y
CONFIG_TXBF_SUPPORT=y
CONFIG_IGMP_SNOOP_SUPPORT=y
CONFIG_RTMP_FLASH_SUPPORT=y
CONFIG_ATE_SUPPORT=y
CONFIG_UAPSD=y
CONFIG_WIFI_MODE_AP=y
CONFIG_WDS_SUPPORT=y
CONFIG_MBSS_SUPPORT=y
CONFIG_APCLI_SUPPORT=y
CONFIG_MAC_REPEATER_SUPPORT=y
CONFIG_VOW_SUPPORT=y
CONFIG_BAND_STEERING=y
CONFIG_MUMIMO_SUPPORT=y
CONFIG_MU_RA_SUPPORT=y
CONFIG_GREENAP_SUPPORT=y
CONFIG_TPC_SUPPORT=y
CONFIG_RLM_CAL_CACHE_SUPPORT=y
CONFIG_CAL_BIN_FILE_SUPPORT=y
CONFIG_WIFI_EAP_FEATURE=y
CONFIG_WPA3_SUPPORT=y
CONFIG_SPECTRUM_SUPPORT=y
CONFIG_PRE_CAL_TRX_SET1_SUPPORT=y
CONFIG_MCAST_RATE_SPECIFIC=y
CONFIG_PRE_CAL_TRX_SET2_SUPPORT=y
CONFIG_PCIE_ASPM_DYM_CTRL_SUPPORT=y
CONFIG_MT_AP_SUPPORT=m
CONFIG_CHIP_MT7615E=y

406
mt7615/files/iNic_ap.dat Executable file
View File

@@ -0,0 +1,406 @@
Default
AccessControlList0=
AccessControlList1=
AccessControlList10=
AccessControlList11=
AccessControlList12=
AccessControlList13=
AccessControlList14=
AccessControlList15=
AccessControlList2=
AccessControlList3=
AccessControlList4=
AccessControlList5=
AccessControlList6=
AccessControlList7=
AccessControlList8=
AccessControlList9=
AccessPolicy0=0
AccessPolicy1=0
AccessPolicy10=0
AccessPolicy11=0
AccessPolicy12=0
AccessPolicy13=0
AccessPolicy14=0
AccessPolicy15=0
AccessPolicy2=0
AccessPolicy3=0
AccessPolicy4=0
AccessPolicy5=0
AccessPolicy6=0
AccessPolicy7=0
AccessPolicy8=0
AccessPolicy9=0
AckPolicy=0;0;0;0
APACM=0;0;0;0
APAifsn=3;7;1;1
ApCliAuthMode=
ApCliBssid=
ApCliDefaultKeyID=
ApCliEnable=
ApCliEncrypType=
ApCliKey1Str=
ApCliKey1Str1=
ApCliKey1Type=
ApCliKey2Str=
ApCliKey2Str1=
ApCliKey2Type=
ApCliKey3Str=
ApCliKey3Str1=
ApCliKey3Type=
ApCliKey4Str=
ApCliKey4Str1=
ApCliKey4Type=
ApCliSsid=
ApCliWirelessMode=
ApCliWPAPSK=
ApCliWPAPSK1=
APCwmax=6;10;4;3
APCwmin=4;4;3;2
APSDCapable=1
APTxop=0;0;94;47
AuthMode=OPEN
AutoChannelSelect=0
AutoChannelSkipList=
AutoProvisionEn=0
BandSteering=0
BasicRate=15
BeaconPeriod=100
BFBACKOFFenable=0
BgndScanSkipCh=
BGProtection=0
BndStrgBssIdx=
BSSACM=0;0;0;0
BSSAifsn=3;7;2;2
BSSCwmax=10;10;4;3
BSSCwmin=4;4;3;2
BssidNum=1
BSSTxop=0;0;94;47
BW_Enable=0
BW_Guarantee_Rate=
BW_Maximum_Rate=
BW_Priority=
BW_Root=0
CalCacheApply=0
CarrierDetect=0
Channel=100
ChannelGrp=
CountryCode=US
CountryRegion=5
CountryRegionABand=7
CP_SUPPORT=2
CSPeriod=6
DBDC_MODE=0
DebugFlags=0
DefaultKeyID=1
DfsCalibration=0
DfsEnable=0
DfsFalseAlarmPrevent=1
DfsZeroWait=0
DfsZeroWaitCacTime=255
DisableOLBC=0
DtimPeriod=1
E2pAccessMode=1
EAPifname=br0
EDCCAEnable=1
EncrypType=NONE
EthConvertMode=dongle
EtherTrafficBand=0
Ethifname=
ETxBfEnCond=1
FineAGC=0
FixedTxMode=
ForceRoamSupport=
FragThreshold=2346
FreqDelta=0
FtSupport=0
GreenAP=1
G_BAND_256QAM=1
HideSSID=0
HT_AMSDU=1
HT_AutoBA=1
HT_BADecline=0
HT_BAWinSize=64
HT_BSSCoexistence=1
HT_BW=1
HT_DisallowTKIP=1
HT_EXTCHA=1
HT_GI=1
HT_HTC=1
HT_LDPC=1
HT_LinkAdapt=0
HT_MCS=33
HT_MpduDensity=5
HT_OpMode=0
HT_PROTECT=1
HT_RDG=0
HT_RxStream=4
HT_STBC=1
HT_TxStream=4
IcapMode=0
idle_timeout_interval=0
IEEE80211H=1
IEEE8021X=0
IgmpSnEnable=0
ITxBfEn=1
Key1Str=
Key1Str1=
Key1Str10=
Key1Str11=
Key1Str12=
Key1Str13=
Key1Str14=
Key1Str15=
Key1Str16=
Key1Str2=
Key1Str3=
Key1Str4=
Key1Str5=
Key1Str6=
Key1Str7=
Key1Str8=
Key1Str9=
Key1Type=0
Key2Str=
Key2Str1=
Key2Str10=
Key2Str11=
Key2Str12=
Key2Str13=
Key2Str14=
Key2Str15=
Key2Str16=
Key2Str2=
Key2Str3=
Key2Str4=
Key2Str5=
Key2Str6=
Key2Str7=
Key2Str8=
Key2Str9=
Key2Type=0
Key3Str=
Key3Str1=
Key3Str10=
Key3Str11=
Key3Str12=
Key3Str13=
Key3Str14=
Key3Str15=
Key3Str16=
Key3Str2=
Key3Str3=
Key3Str4=
Key3Str5=
Key3Str6=
Key3Str7=
Key3Str8=
Key3Str9=
Key3Type=0
Key4Str=
Key4Str1=
Key4Str10=
Key4Str11=
Key4Str12=
Key4Str13=
Key4Str14=
Key4Str15=
Key4Str16=
Key4Str2=
Key4Str3=
Key4Str4=
Key4Str5=
Key4Str6=
Key4Str7=
Key4Str8=
Key4Str9=
Key4Type=0
LinkTestSupport=0
MACRepeaterEn=
MACRepeaterOuiMode=2
MeshAuthMode=
MeshAutoLink=0
MeshDefaultkey=0
MeshEncrypType=
MeshId=
MeshWEPKEY=
MeshWPAKEY=
MUTxRxEnable=0
NoForwarding=0
NoForwardingBTNBSSID=0
own_ip_addr=10.10.10.254
PcieAspm=0
PERCENTAGEenable=0
PhyRateLimit=0
PMFMFPC=1
PMFMFPR=0
PMFSHA256=0
PMKCachePeriod=10
PowerUpCckOfdm=0:0:0:0:0:0:0
PowerUpHT20=0:0:0:0:0:0:0
PowerUpHT40=0:0:0:0:0:0:0
PowerUpVHT160=0:0:0:0:0:0:0
PowerUpVHT20=0:0:0:0:0:0:0
PowerUpVHT40=0:0:0:0:0:0:0
PowerUpVHT80=0:0:0:0:0:0:0
PreAntSwitch=
PreAuth=0
PreAuthifname=br0
RadioLinkSelection=0
RadioOn=1
RADIUS_Acct_Key=
RADIUS_Acct_Port=1813
RADIUS_Acct_Server=
RADIUS_Key1=
RADIUS_Key10=
RADIUS_Key11=
RADIUS_Key12=
RADIUS_Key13=
RADIUS_Key14=
RADIUS_Key15=
RADIUS_Key16=
RADIUS_Key2=
RADIUS_Key3=
RADIUS_Key4=
RADIUS_Key5=
RADIUS_Key6=
RADIUS_Key7=
RADIUS_Key8=
RADIUS_Key9=
RADIUS_Port=1812
RADIUS_Server=0
RDRegion=
RED_Enable=1
RekeyInterval=3600
RekeyMethod=DISABLE
RRMEnable=0
RTSThreshold=2347
session_timeout_interval=0
ShortSlot=1
SKUenable=0
SSID=
SSID1=MTK_AP2
SSID10=
SSID11=
SSID12=
SSID13=
SSID14=
SSID15=
SSID16=
SSID2=
SSID3=
SSID4=
SSID5=
SSID6=
SSID7=
SSID8=
SSID9=
StationKeepAlive=0
StreamMode=0
StreamModeMac0=
StreamModeMac1=
StreamModeMac2=
StreamModeMac3=
TGnWifiTest=0
ThermalRecal=0
TxBurst=1
TxPower=100
TxPreamble=1
VHT_BW=1
VHT_BW_SIGNAL=0
VHT_LDPC=1
VHT_Sec80_Channel=0
VHT_SGI=1
VHT_STBC=1
VLANID=0
VLANPriority=0
VLANTag=0
VOW_Airtime_Ctrl_En=
VOW_Airtime_Fairness_En=1
VOW_BW_Ctrl=0
VOW_Group_Backlog=
VOW_Group_DWRR_Max_Wait_Time=
VOW_Group_DWRR_Quantum=
VOW_Group_Max_Airtime_Bucket_Size=
VOW_Group_Max_Rate=
VOW_Group_Max_Rate_Bucket_Size=
VOW_Group_Max_Ratio=
VOW_Group_Max_Wait_Time=
VOW_Group_Min_Airtime_Bucket_Size=
VOW_Group_Min_Rate=
VOW_Group_Min_Rate_Bucket_Size=
VOW_Group_Min_Ratio=
VOW_Rate_Ctrl_En=
VOW_Refill_Period=
VOW_RX_En=1
VOW_Sta_BE_DWRR_Quantum=
VOW_Sta_BK_DWRR_Quantum=
VOW_Sta_DWRR_Max_Wait_Time=
VOW_Sta_VI_DWRR_Quantum=
VOW_Sta_VO_DWRR_Quantum=
VOW_WATF_Enable=
VOW_WATF_MAC_LV0=
VOW_WATF_MAC_LV1=
VOW_WATF_MAC_LV2=
VOW_WATF_MAC_LV3=
VOW_WATF_Q_LV0=
VOW_WATF_Q_LV1=
VOW_WATF_Q_LV2=
VOW_WATF_Q_LV3=
VOW_WMM_Search_Rule_Band0=
VOW_WMM_Search_Rule_Band1=
WapiAsCertPath=
WapiAsIpAddr=
WapiAsPort=
Wapiifname=
WapiPsk1=
WapiPsk10=
WapiPsk11=
WapiPsk12=
WapiPsk13=
WapiPsk14=
WapiPsk15=
WapiPsk16=
WapiPsk2=
WapiPsk3=
WapiPsk4=
WapiPsk5=
WapiPsk6=
WapiPsk7=
WapiPsk8=
WapiPsk9=
WapiPskType=
WapiUserCertPath=
WCNTest=0
Wds0Key=
Wds1Key=
Wds2Key=
Wds3Key=
WdsEnable=0
WdsEncrypType=NONE
WdsList=
WdsPhyMode=0
WHNAT=1
WiFiTest=0
WirelessMode=14
WmmCapable=1
WPAPSK=
WPAPSK1=12345678
WPAPSK10=
WPAPSK11=
WPAPSK12=
WPAPSK13=
WPAPSK14=
WPAPSK15=
WPAPSK16=
WPAPSK2=
WPAPSK3=
WPAPSK4=
WPAPSK5=
WPAPSK6=
WPAPSK7=
WPAPSK8=
WPAPSK9=
WscConfMode=0
WscConfStatus=2

View File

@@ -0,0 +1,27 @@
Default
INDEX0=MT7603
INDEX0_profile_path=/etc/Wireless/RT2860/RT2860.dat
INDEX0_EEPROM_offset=0x0
INDEX0_EEPROM_size=0x4000
INDEX0_EEPROM_name=e2p
INDEX0_main_ifname=ra0
INDEX0_ext_ifname=ra
INDEX0_wds_ifname=wds
INDEX0_apcli_ifname=apcli
INDEX0_mesh_ifname=mesh
INDEX0_nvram_zone=dev1
INDEX0_single_sku_path=/etc_ro/Wireless/RT2860AP/SingleSKU.dat
INDEX0_bf_sku_path=/etc_ro/Wireless/RT2860AP/SingleSKU_BF.dat
INDEX1=MT7615
INDEX1_profile_path=/etc/Wireless/iNIC/iNIC_ap.dat
INDEX1_EEPROM_offset=0x4000
INDEX1_EEPROM_size=0x4000
INDEX1_EEPROM_name=e2p
INDEX1_main_ifname=rai0
INDEX1_ext_ifname=rai
INDEX1_wds_ifname=wdsi
INDEX1_apcli_ifname=apclii
INDEX1_mesh_ifname=meshi
INDEX1_nvram_zone=dev2
INDEX1_single_sku_path=/etc_ro/Wireless/RT2860AP/SingleSKU.dat
INDEX1_bf_sku_path=/etc_ro/Wireless/RT2860AP/SingleSKU_BF.dat

250
mt7615/globalconfig.in Normal file
View File

@@ -0,0 +1,250 @@
# Kconfig for mtk wifi
config MTK_WIFI_DRIVER
bool
default y
depends on (PACKAGE_kmod-mt7615e || PACKAGE_kmod-mt7603e)
select MTK_SUPPORT_OPENWRT
select MTK_MT_WIFI
select MTK_WIFI_BASIC_FUNC
if MTK_WIFI_DRIVER
menu "First WiFi card"
choice
prompt "Choose First WiFi card"
default MTK_FIRST_IF_MT7603E
config MTK_FIRST_IF_NONE
bool "None"
config MTK_FIRST_IF_MT7603E
bool "MT7603E"
select RALINK_MT7603E
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7603E
config MTK_FIRST_IF_MT7615E
bool "MT7615E"
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7615E
endchoice
config MTK_RT_FIRST_CARD
int
depends on ! MTK_FIRST_IF_NONE
default 7603 if MTK_FIRST_IF_MT7603E
default 7615 if MTK_FIRST_IF_MT7615E
config MTK_MT_WIFI_PATH_FIRST_CARD
string "WiFi driver build directory name"
default "rlt_wifi"
config MTK_RT_FIRST_IF_RF_OFFSET
hex "RF offset of 1st card"
depends on ! MTK_FIRST_IF_NONE
default 0x0
#prompt "WiFi detailed options for 1st card"
choice
prompt "EEPROM Type of 1st Card"
depends on ! MTK_FIRST_IF_NONE
default MTK_FIRST_IF_EEPROM_EFUSE
config MTK_FIRST_IF_EEPROM_FLASH
bool "FLASH"
config MTK_FIRST_IF_EEPROM_PROM
bool "EEPROM"
config MTK_FIRST_IF_EEPROM_EFUSE
bool "EFUSE"
endchoice
config MTK_RT_FIRST_CARD_EEPROM
string
depends on ! MTK_FIRST_IF_NONE
default "prom" if MTK_FIRST_IF_EEPROM_PROM
default "efuse" if MTK_FIRST_IF_EEPROM_EFUSE
default "flash" if MTK_FIRST_IF_EEPROM_FLASH
choice
prompt "PA/LNA Type of 1st Card"
depends on ! MTK_FIRST_IF_NONE
default MTK_FIRST_IF_IPAILNA
config MTK_FIRST_IF_EPAELNA
bool "ePAeLNA"
config MTK_FIRST_IF_IPAILNA
bool "iPAiLNA"
config MTK_FIRST_IF_IPAELNA
bool "iPAeLNA"
endchoice
menu "Operation Modes for 1st card"
choice
prompt "Operating mode"
default MTK_WIFI_MODE_AP
config MTK_WIFI_MODE_AP
bool "AP"
config MTK_WIFI_MODE_STA
bool "STA"
config MTK_WIFI_MODE_BOTH
bool "AP+STA"
#select MTK_MT_STA_SUPPORT
endchoice
source "ap.config.in"
endmenu
endmenu
### endmenu for 1st wifi card #######
#### menu starts for 2nd wifi card ###
menu "Second WiFi card"
choice
prompt "Choose Second WiFi card"
default MTK_SECOND_IF_MT7615E
config MTK_SECOND_IF_NONE
bool "None"
config MTK_SECOND_IF_MT7603E
bool "MT7603E"
select RALINK_MT7603E
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7603E
config MTK_SECOND_IF_MT7615E
bool "MT7615E"
select MTK_WIFI_MT_MAC
select MTK_MT_MAC
select MTK_CHIP_MT7615E
endchoice
config MTK_RT_SECOND_CARD
int
depends on ! MTK_SECOND_IF_NONE
default 7603 if MTK_SECOND_IF_MT7603E
default 7615 if MTK_SECOND_IF_MT7615E
config MTK_MT_WIFI_PATH_SECOND_CARD
string "WiFi driver build directory name"
default "mt_wifi"
config MTK_RT_SECOND_IF_RF_OFFSET
hex "RF offset of 2nd card"
depends on ! MTK_SECOND_IF_NONE
default 0x8000
#prompt "WiFi detailed options for 2nd card"
choice
prompt "EEPROM Type of 2nd Card"
depends on ! MTK_SECOND_IF_NONE
default MTK_SECOND_IF_EEPROM_EFUSE
config MTK_SECOND_IF_EEPROM_FLASH
bool "FLASH"
config MTK_SECOND_IF_EEPROM_PROM
bool "EEPROM"
config MTK_SECOND_IF_EEPROM_EFUSE
bool "EFUSE"
endchoice
config MTK_RT_SECOND_CARD_EEPROM
string
depends on ! MTK_SECOND_IF_NONE
default "prom" if MTK_SECOND_IF_EEPROM_PROM
default "efuse" if MTK_SECOND_IF_EEPROM_EFUSE
default "flash" if MTK_SECOND_IF_EEPROM_FLASH
choice
prompt "PA/LNA Type of 2nd Card"
depends on ! MTK_SECOND_IF_NONE
default MTK_SECOND_IF_IPAILNA
config MTK_SECOND_IF_EPAELNA
bool "ePAeLNA"
config MTK_SECOND_IF_IPAILNA
bool "iPAiLNA"
config MTK_SECOND_IF_IPAELNA
bool "iPAeLNA"
endchoice
menu "Operation Modes for 2nd card"
choice
prompt "Operating mode"
default MTK_WIFI_MODE_AP
config MTK_WIFI_MODE_AP
bool "AP"
config MTK_WIFI_MODE_STA
bool "STA"
config MTK_WIFI_MODE_BOTH
bool "AP+STA"
endchoice
source "ap.config.in"
endmenu
endmenu
### endmenu for 2nd wifi card #######
#### placeholder for 3rd wifi card ###
config MTK_THIRD_IF_NONE
bool
default y
config MTK_RT_THIRD_CARD
int
default 0
config MTK_RT_THIRD_IF_RF_OFFSET
hex
default 0x4000
config MTK_RT_THIRD_CARD_EEPROM
string
default "efuse"
### placehlder for 3rd wifi card #######
config MTK_MULTI_INF_SUPPORT
bool
default y if !MTK_FIRST_IF_NONE && !MTK_SECOND_IF_NONE
source "common.config.in"
#if MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626 || MTK_CHIP_AXE || MTK_CHIP_MT7915
# config MTK_MT_MAC
# bool
# default y
# select MTK_RATE_ADAPTION
# select MTK_RATE_ADAPT_AGBS_SUPPORT
# select MTK_DOT11_N_SUPPORT
# select MTK_DOT11_VHT_AC
# select MTK_HDR_TRANS_TX_SUPPORT
# select MTK_HDR_TRANS_RX_SUPPORT
#endif
endif #MTK_WIFI_DRIVER#

View File

@@ -12,7 +12,7 @@ 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_LICENSE:=NONSTANDARD
PKG_LICENSE:=NONSTANDARD_PERMISSIV
PKG_LICENSE_FILES:=COPYRIGHT
include $(INCLUDE_DIR)/package.mk

View File

@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=1.0.0
PKG_VERSION:=2.0.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e2816ff39f654a191afd49c90a05f70e99259d8e
PKG_SOURCE_VERSION:=9c7921c8e39acfc31f563bd08220faba1012a834
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
@@ -51,7 +51,8 @@ define Package/obuspa/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/obuspa
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspa $(1)/usr/sbin/
$(CP) ./files/* $(1)/
$(INSTALL_BIN) ./files/etc/init.d/obuspa $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/obuspa $(1)/etc/config/
endef
$(eval $(call BuildPackage,obuspa))

View File

@@ -1,14 +1,41 @@
# controller, mtp, connection makes a group and related to one another
# ex: first controller will be mapped to first mtp and first connection
# details, always defined in groups
config obuspa
option cert '/etc/obuspa/rootCA.pem'
option interface 'wan'
option debug 'false'
config controller
option endpointid 'self::usp-controller.com'
option enable 'true'
# Trust cerificate number
option AssignedRole 1
option PeriodicNotifInterval "86400"
option PeriodicNotifTime "0001-01-01T00:00:00Z"
option USPRetryMinimumWaitInterval "5"
option USPRetryIntervalMultiplier "2000"
option ControllerCode ""
option protocol 'STOMP'
config mtp
option enable 'true'
option protocol 'STOMP'
option destination 'uspq'
option destination ''
config connection
option host 'usp-controller.com'
option username 'username'
option password 'password'
option encryption 'false'
option encryption 'true'
option enable 'true'
option port 61613
option virtualhost '/'
option EnableHeartbeats "true"
option OutgoingHeartbeat "30000"
option IncomingHeartbeat "300000"
option ServerRetryInitialInterval "60"
option ServerRetryIntervalMultiplier "2000"
option ServerRetryMaxInterval "30720"

View File

@@ -5,99 +5,210 @@ USE_PROCD=1
PROG=/usr/sbin/obuspa
l3device=""
CTRL_PATH="Device.LocalAgent.Controller.1."
MTP_PATH="Device.LocalAgent.MTP.1."
CONN_PATH="Device.STOMP.Connection.1."
certificate=""
PARAM_FILE="/tmp/obuspa_param_reset.txt"
conn_num=1
mtp_num=1
stomp_num=1
log() {
echo "${@}"|logger -t obuspa -p debug
}
db_set() {
log "DBSET param|${1}| value|${2}|"
USP_BOARD_IFNAME=${l3device} ${PROG} -c dbset ${1} ${2}
if [ -n "${1}" ]; then
echo "${1} \"${2}\"">>${PARAM_FILE}
else
echo >>${PARAM_FILE}
fi
}
validate_obuspa_section()
{
uci_validate_section obuspa obuspa "${1}" \
'cert:string:"/etc/obuspa/rootCA.pem"' \
'interface:string:wan' \
'debug:bool:false'
}
validate_controller_section()
{
uci_validate_section obuspa controller "${1}" \
'endpointid:string:"self:usp-controller.com"'
'endpointid:string:"self:usp-controller.com"' \
'enable:bool:true' \
'AssignedRole:uinteger:1' \
'PeriodicNotifInterval:uinteger:86400' \
'PeriodicNotifTime:string:"0001-01-01T00:00:00Z"' \
'USPRetryMinimumWaitInterval:uinteger:5' \
'USPRetryIntervalMultiplier:uinteger:2000' \
'ControllerCode:string' \
'protocol:or("STOMP","CoAP")' \
'CoAPHost:string' \
'CoAPPath:string' \
'CoAPPort:uinteger'
}
validate_mtp_section()
{
uci_validate_section obuspa mtp "${1}" \
'enable:bool:true' \
'protocol:string:"STOMP"' \
'destination:string:'
'protocol:or("STOMP","CoAP")' \
'destination:string' \
'CoAPPath:string' \
'CoAPPort:uinteger'
}
validate_connection_section()
{
uci_validate_section obuspa connection "${1}" \
'host:string:"usp-controller.com"' \
'username:string:username' \
'password:string:password' \
'encryption:bool:true'
'username:string:""' \
'password:string:""' \
'encryption:bool:true' \
'enable:bool:true' \
'port:uinteger:61613' \
'virtualhost:string:"/"' \
'EnableHeartbeats:bool:true' \
'OutgoingHeartbeat:uinteger:30000' \
'IncomingHeartbeat:uinteger:300000' \
'ServerRetryInitialInterval:uinteger:60' \
'ServerRetryIntervalMultiplier:uinteger:2000' \
'ServerRetryMaxInterval:uinteger:30720'
}
configure_controller() {
local endpointid
local endpointid enable AssignedRole PeriodicNotifInterval PeriodicNotifTime USPRetryMinimumWaitInterval
local USPRetryIntervalMultiplier ControllerCode protocol CoAPHost CoAPPath CoAPPort
validate_controller_section "${1}" || {
log "Validation of section failed"
return 1;
}
db_set "${CTRL_PATH}EndpointID" ${endpointid}
db_set Device.LocalAgent.Controller.${conn_num}.EndpointID "${endpointid}"
db_set Device.LocalAgent.Controller.${conn_num}.Alias "cpe-${conn_num}"
db_set Device.LocalAgent.Controller.${conn_num}.Enable "true"
db_set Device.LocalAgent.Controller.${conn_num}.AssignedRole "Device.LocalAgent.ControllerTrust.Role.${AssignedRole}"
db_set Device.LocalAgent.Controller.${conn_num}.PeriodicNotifInterval "${PeriodicNotifInterval}"
db_set Device.LocalAgent.Controller.${conn_num}.PeriodicNotifTime "${PeriodicNotifTime}"
db_set Device.LocalAgent.Controller.${conn_num}.USPRetryMinimumWaitInterval "${USPRetryMinimumWaitInterval}"
db_set Device.LocalAgent.Controller.${conn_num}.USPRetryIntervalMultiplier "${USPRetryIntervalMultiplier}"
db_set Device.LocalAgent.Controller.${conn_num}.ControllerCode "${ControllerCode}"
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.Alias "cpe-${conn_num}"
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.Enable "${enable}"
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.Protocol "${protocol}"
if [ "${protocol}"=="STOMP" ]; then
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.STOMP.Reference "Device.STOMP.Connection.${conn_num}"
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.STOMP.Destination "controller-notify-dest"
elif [ "${protocol}"=="CoAP" ]; then
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.CoAP.Host "${CoAPHost}"
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.CoAP.Path "${CoAPPath}"
db_set Device.LocalAgent.Controller.${conn_num}.MTP.${conn_num}.CoAP.Port "${CoAPPort}"
else
log "Unsupported protocol ${protocol}"
fi
db_set
conn_num=$((conn_num+1))
}
configure_mtp() {
local protocol enable destination
local protocol enable destination CoAPPath CoAPPort
validate_mtp_section "${1}" || {
log "Validation of section failed"
return 1;
}
db_set "${MTP_PATH}Enable" ${enable}
db_set "${MTP_PATH}Protocol" ${protocol}
db_set "${MTP_PATH}STOMP.Destination" ${destination}
db_set Device.LocalAgent.MTP.${mtp_num}.Alias "cpe-${mtp_num}"
db_set Device.LocalAgent.MTP.${mtp_num}.Enable "${enable}"
db_set Device.LocalAgent.MTP.${mtp_num}.Protocol "${protocol}"
if [ "${protocol}"=="STOMP" ]; then
db_set Device.LocalAgent.MTP.${mtp_num}.STOMP.Reference "Device.STOMP.Connection.${mtp_num}"
db_set Device.LocalAgent.MTP.${mtp_num}.STOMP.Destination "${destination}"
elif [ "${protocol}"=="CoAP" ]; then
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Path "${CoAPPath}"
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Port "${CoAPPort}"
else
log "Unsupported protocol ${protocol}"
fi
db_set
mtp_num=$((mtp_num+1))
}
configure_connection() {
local host username password encryption
local host username password encryption enable port virtualhost EnableHeartbeats
local OutgoingHeartbeat IncomingHeartbeat ServerRetryInitialInterval
local ServerRetryIntervalMultiplier ServerRetryMaxInterval
validate_connection_section "${1}" || {
log "Validation of section failed"
return 1;
}
db_set "${CONN_PATH}Host" ${host}
db_set "${CONN_PATH}Username" ${username}
db_set "${CONN_PATH}Password" ${password}
db_set "${CONN_PATH}X_ARRIS-COM_EnableEncryption" ${encryption}
db_set Device.STOMP.Connection.${stomp_num}.Host "${host}"
db_set Device.STOMP.Connection.${stomp_num}.Username "${username}"
db_set Device.STOMP.Connection.${stomp_num}.Password "${password}"
db_set Device.STOMP.Connection.${stomp_num}.Alias "cpe-${stomp_num}"
db_set Device.STOMP.Connection.${stomp_num}.Enable "${enable}"
db_set Device.STOMP.Connection.${stomp_num}.Port "${port}"
db_set Device.STOMP.Connection.${stomp_num}.X_ARRIS-COM_EnableEncryption "${encryption}"
db_set Device.STOMP.Connection.${stomp_num}.VirtualHost "${virtualhost}"
db_set Device.STOMP.Connection.${stomp_num}.EnableHeartbeats "${EnableHeartbeats}"
db_set Device.STOMP.Connection.${stomp_num}.OutgoingHeartbeat "${OutgoingHeartbeat}"
db_set Device.STOMP.Connection.${stomp_num}.IncomingHeartbeat "${IncomingHeartbeat}"
db_set Device.STOMP.Connection.${stomp_num}.ServerRetryInitialInterval "${ServerRetryInitialInterval}"
db_set Device.STOMP.Connection.${stomp_num}.ServerRetryIntervalMultiplier "${ServerRetryIntervalMultiplier}"
db_set Device.STOMP.Connection.${stomp_num}.ServerRetryMaxInterval "${ServerRetryMaxInterval}"
db_set
stomp_num=$((stomp_num+1))
}
configure_obuspa() {
local cert interface debug
validate_obuspa_section "${1}" || {
log "Validation of section failed"
return 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
# Get wan L3 interface
json_load "$(ubus -t 2 call network.interface.${interface} status)"
json_get_var l3device l3_device
export USP_BOARD_IFNAME=${l3device}
# Set this variable for root user
echo "export USP_BOARD_IFNAME=${l3device}">/root/.profile
[ -f $cert ] && certificate=$cert
}
db_init() {
[ -f ${PARAM_FILE} ] && rm -f ${PARAM_FILE}
[ -f /tmp/usp.db ] && rm -f /tmp/usp.db
config_load obuspa
config_foreach configure_obuspa obuspa
config_foreach configure_controller controller
config_foreach configure_mtp mtp
config_foreach configure_connection connection
config_foreach configure_mtp mtp
db_set Internal.Reboot.Cause "LocalFactoryReset"
}
start_service() {
# Get wan L3 interface
json_load "$(ubus call network.interface.wan status)"
json_get_var l3device l3_device
procd_open_instance obuspa
db_init
procd_open_instance
procd_set_param env USP_BOARD_IFNAME=${l3device}
# Forward stdout of the command to logd
# procd_set_param stdout 1
# Same for stderr
# procd_set_param stderr 1
procd_set_param command ${PROG}
procd_append_param command -p -v 4
procd_append_param command -p -v 4 -r ${PARAM_FILE}
if [ -f "${certificate}" ]; then
procd_append_param command -t ${certificate}
fi
procd_set_param respawn
procd_close_instance
}
@@ -110,4 +221,3 @@ reload_service() {
service_triggers() {
procd_add_config_trigger "config.change" "obuspa" /etc/init.d/obuspa restart
}

View File

@@ -10,7 +10,7 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/owsd.git
PKG_SOURCE_VERSION:=8a2b9ba61be4f13111b32dbef9e97eb40aea5866
PKG_SOURCE_VERSION:=a83448ed65e1c76411b9c6553d64b5d623b8bcd7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
PKG_INSTALL:=1

View File

@@ -39,7 +39,7 @@ define Package/peripheral_manager
CATEGORY:=Utilities
TITLE:=Application deamon for handling of peripheral
URL:=
DEPENDS:=+libuci +libubus +libblobmsg-json +PACKAGE_bcmkernel:bcmkernel +PACKAGE_bcmopen:bcmopen
DEPENDS:=+libuci +libubus +libblobmsg-json @+PACKAGE_bcmkernel:bcmkernel @+PACKAGE_bcmopen:bcmopen
endef
define Package/peripheral_manager/description

View File

@@ -1,86 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=picolisp
PKG_VERSION=3.1.10
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/picoLisp
PKG_SOURCE:=picoLisp-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://software-lab.de/
PKG_MD5SUM:=ac19fd6ff4d05dd2b15ea00d1ed591e7
PKG_BUILD_DEPENDS+= +libopenssl +@OPENSSL_WITH_EC2M
PKG_LICENSE:=MIT-X11
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/picolisp
SECTION:=lang
CATEGORY:=Languages
TITLE:=PicoLisp interpreter
DEPENDS:= +libopenssl +@OPENSSL_WITH_EC2M
URL:=http://www.picolisp.org/
MAINTAINER:=Jeronimo Pellegrini <j_p@aleph0.info>
endef
define Package/picolisp/description
Picolisp is yet another dialect of the Lisp language, specially written to be radically practical and simple.
endef
TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
# A hack to make picoLisp's Makefile see the include path:
MAKE_FLAGS += C_INCLUDE_PATH+=$(STAGING_DIR)/usr/include/
define Package/picolisp/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib/picolisp/
$(INSTALL_DIR) $(1)/usr/lib/picolisp/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/pil $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/psh $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/watchdog $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/picolisp $(1)/usr/bin/
$(CP) $(PKG_BUILD_DIR)/*.l $(1)/usr/lib/picolisp/
$(CP) $(PKG_BUILD_DIR)/lib/ht \
$(PKG_BUILD_DIR)/lib/ext \
$(PKG_BUILD_DIR)/lib/adm.l \
$(PKG_BUILD_DIR)/lib/app.l \
$(PKG_BUILD_DIR)/lib/boss.l \
$(PKG_BUILD_DIR)/lib/btree.l \
$(PKG_BUILD_DIR)/lib/conDbgc.l \
$(PKG_BUILD_DIR)/lib/db.l \
$(PKG_BUILD_DIR)/lib/debug.l \
$(PKG_BUILD_DIR)/lib/edit.l \
$(PKG_BUILD_DIR)/lib/ed.l \
$(PKG_BUILD_DIR)/lib/form.l \
$(PKG_BUILD_DIR)/lib/frac.l \
$(PKG_BUILD_DIR)/lib/heartbeat.l \
$(PKG_BUILD_DIR)/lib/http.l \
$(PKG_BUILD_DIR)/lib/import.l \
$(PKG_BUILD_DIR)/lib/led.l \
$(PKG_BUILD_DIR)/lib/lint.l \
$(PKG_BUILD_DIR)/lib/math32.l \
$(PKG_BUILD_DIR)/lib/math64.l \
$(PKG_BUILD_DIR)/lib/math.l \
$(PKG_BUILD_DIR)/lib/misc.l \
$(PKG_BUILD_DIR)/lib/pilog.l \
$(PKG_BUILD_DIR)/lib/prof.l \
$(PKG_BUILD_DIR)/lib/ps.l \
$(PKG_BUILD_DIR)/lib/rsa.l \
$(PKG_BUILD_DIR)/lib/scrape.l \
$(PKG_BUILD_DIR)/lib/simul.l \
$(PKG_BUILD_DIR)/lib/sq.l \
$(PKG_BUILD_DIR)/lib/too.l \
$(PKG_BUILD_DIR)/lib/xhtml.l \
$(PKG_BUILD_DIR)/lib/xm.l \
$(PKG_BUILD_DIR)/lib/xml.l \
$(PKG_BUILD_DIR)/lib/xmlrpc.l $(1)/usr/lib/picolisp/lib/
touch $(1)/usr/lib/picolisp/lib/tags
$(STRIP) $(1)/usr/bin/picolisp
endef
$(eval $(call BuildPackage,picolisp))

View File

@@ -1,43 +0,0 @@
diff -Nur picoLisp/Makefile picoLisp-new/Makefile
--- picoLisp/Makefile 1969-12-31 21:00:00.000000000 -0300
+++ picoLisp-new/Makefile 2015-06-02 15:38:07.469726899 -0300
@@ -0,0 +1,6 @@
+all:
+ (cd src; make)
+
+clean:
+ (cd src; make clean)
+
diff -Nur picoLisp/src/Makefile picoLisp-new/src/Makefile
--- picoLisp/src/Makefile 2015-03-31 15:48:22.000000000 -0300
+++ picoLisp-new/src/Makefile 2015-06-02 15:40:43.541491599 -0300
@@ -6,9 +6,13 @@
picoFiles = main.c gc.c apply.c flow.c sym.c subr.c big.c io.c net.c tab.c
-CC = gcc
+#CC = gcc
# CCLD is the cc (compiler frontend) to use for the link step.
-CCLD = gcc
+#CCLD = gcc
+
+# Honor the $(CC) variable, inherited form the environment (it's essential
+# when cross-compiling)
+CCLD = $(CC)
CFLAGS = -c -O2 -pipe \
-falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing \
@@ -19,10 +23,10 @@
ifeq ($(shell uname), Linux)
OS = Linux
- CFLAGS += -m32
- PICOLISP-FLAGS = -m32 -rdynamic
+ CFLAGS += -mabi=32 -fPIC
+ PICOLISP-FLAGS = -rdynamic
LIB-FLAGS = -lm -ldl
- DYNAMIC-LIB-FLAGS = -m32 -shared -export-dynamic
+ DYNAMIC-LIB-FLAGS = -shared -export-dynamic -fPIC
LCRYPT = -lcrypt
STRIP = strip
else

View File

@@ -4,7 +4,7 @@ PKG_NAME:=port-management
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk
define Package/port-management

View File

@@ -3,6 +3,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=power-management
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk

View File

@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=4.1.1
PKG_SOURCE_VERSION:=b1e1d6218a90b533a3492fd93b0e2b256bc23cf6
PKG_SOURCE_VERSION:=04eb78c28d96801951b204bc434f84d43d4a0d03
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
@@ -16,7 +16,7 @@ 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:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk

View File

@@ -17,6 +17,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

View File

@@ -1,223 +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:=samba2
PKG_VERSION:=2.2.12
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/samba2.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d687d07a137981f4fe78cc289b040e6426c61e29
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
define Package/samba2/Default
SUBMENU:=Filesystem
SECTION:=net
CATEGORY:=Network
TITLE:=samba - NetBIOS/SMB implementation
DEPENDS:= +libreadline +ncurses +popt
URL:=http://www.samba.org/
endef
define Package/samba2/Default/description
The Samba software suite is a collection of programs that implements the
SMB protocol for unix systems, allowing you to serve files and printers to
Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred
to as the LanManager or Netbios protocol.
endef
define Package/samba2-common
$(call Package/samba2/Default)
MENU:=1
TITLE:=NetBIOS/SMB server and client shared files
endef
#define Package/samba2-server
# $(call Package/samba2/Default)
# TITLE:=NetBIOS/SMB file and print server
# DEPENDS:=samba2-common
#endef
define Package/samba2-client
$(call Package/samba2/Default)
TITLE:=NetBIOS/SMB simple client
DEPENDS:=samba2-common
endef
TARGET_CFLAGS += $(FPIC)
WERR := -Werror=format-security
TARGET_CFLAGS_WITHOUT_WERR := $(filter-out $(WERR),$(TARGET_CFLAGS))
define Build/Compile
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
(cd $(PKG_BUILD_DIR)/source ; rm -rf config.{cache,status} ; \
CFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE" \
./configure \
$(HOST_CONFIGURE_VARS) \
$(HOST_CONFIGURE_ARGS) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var/log/samba2 \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc/samba2 \
$(DISABLE_NLS) \
--with-included-popt \
--with-lockdir=/var/run/samba2 \
--with-privatedir=/etc/samba2 \
--with-readline=no \
);
$(MAKE) -C $(PKG_BUILD_DIR)/source \
bin/make_smbcodepage bin/make_unicodemap
(cd $(PKG_BUILD_DIR)/source/bin ; \
mv -f make_smbcodepage make_smbcodepage.old ; \
mv -f make_unicodemap make_unicodemap.old ; \
);
$(MAKE) -C $(PKG_BUILD_DIR)/source \
clean
(cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS_WITHOUT_WERR) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) $(LIBGCC_S)" \
ac_cv_lib_cups_httpConnect=no \
samba_cv_FTRUNCATE_NEEDS_ROOT=no \
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \
samba_cv_HAVE_BROKEN_GETGROUPS=no \
samba_cv_HAVE_BROKEN_READDIR=no \
samba_cv_HAVE_FCNTL_LOCK=yes \
samba_cv_HAVE_FNMATCH=yes \
samba_cv_HAVE_FTRUNCATE_EXTEND=no \
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
samba_cv_HAVE_IFACE_AIX=no \
samba_cv_HAVE_IFACE_IFCONF=yes \
samba_cv_HAVE_IFACE_IFREQ=yes \
samba_cv_HAVE_INO64_T=yes \
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no \
samba_cv_HAVE_OFF64_T=yes \
samba_cv_HAVE_ROOT=yes \
samba_cv_HAVE_SECURE_MKSTEMP=yes \
samba_cv_HAVE_SHARED_MMAP=yes \
samba_cv_HAVE_STRUCT_FLOCK64=yes \
samba_cv_HAVE_SYSV_IPC=no \
samba_cv_HAVE_TRUNCATED_SALT=no \
samba_cv_HAVE_UNION_SEMUN=no \
samba_cv_HAVE_UNSIGNED_CHAR=yes \
samba_cv_NEED_SGI_SEMUN_HACK=no \
samba_cv_REPLACE_INET_NTOA=no \
samba_cv_SIZEOF_INO_T=4 \
samba_cv_SIZEOF_OFF_T=4 \
samba_cv_SYSCONF_SC_NGROUPS_MAX=yes \
samba_cv_USE_SETEUID=yes \
samba_cv_USE_SETRESUID=no \
samba_cv_USE_SETREUID=yes \
samba_cv_USE_SETUIDX=no \
samba_cv_have_longlong=yes \
samba_cv_have_setresgid=no \
samba_cv_have_setresuid=no \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var/log/samba2 \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc/samba2 \
$(DISABLE_NLS) \
--with-included-popt \
--with-lockdir=/var/run/samba2 \
--with-privatedir=/etc/samba2 \
--with-readline=no \
--with-syslog \
);
$(MAKE) -C $(PKG_BUILD_DIR)/source \
$(TARGET_CONFIGURE_OPTS) \
CODEPAGEDIR="/usr/share/samba2" \
all
(cd $(PKG_BUILD_DIR)/source/bin ; \
mv -f make_smbcodepage.old make_smbcodepage ; touch make_smbcodepage ; \
mv -f make_unicodemap.old make_unicodemap ; touch make_unicodemap ; \
);
mkdir -p $(PKG_INSTALL_DIR)/usr/share/samba2
mkdir -p $(PKG_INSTALL_DIR)/var/log
$(MAKE) -C $(PKG_BUILD_DIR)/source \
BASEDIR="$(PKG_INSTALL_DIR)/usr" \
BINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
SBINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
VARDIR="$(PKG_INSTALL_DIR)/var/log/samba2" \
MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
CONFIGDIR="$(PKG_INSTALL_DIR)/etc/samba2" \
PRIVATEDIR="$(PKG_INSTALL_DIR)/etc/samba2" \
SWATDIR="$(PKG_INSTALL_DIR)/usr/swat" \
LOCKDIR="$(PKG_INSTALL_DIR)/var/run/samba2" \
SAMBABOOK="$(PKG_INSTALL_DIR)/usr/swat/using_samba2" \
CODEPAGEDIR="$(PKG_INSTALL_DIR)/usr/share/samba2" \
install
endef
define Package/samba2-common/install
$(INSTALL_DIR) $(1)/etc/samba2
# $(INSTALL_DATA) ./files/smb.conf $(1)/etc/samba2/smb.conf
$(INSTALL_DIR) $(1)/usr/bin
# $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd.shared $(1)/usr/bin/smbpasswd
$(INSTALL_DIR) $(1)/usr/share/samba2
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba2/codepage.{437,850} $(1)/usr/share/samba2/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba2/unicode_map.{437,850,ISO8859-1,ISO8859-15} $(1)/usr/share/samba2/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba2/codepage.852 $(1)/usr/share/samba2/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba2/unicode_map.{852,ISO8859-2} $(1)/usr/share/samba2/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba2/codepage.{866,1251} $(1)/usr/share/samba2/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba2/unicode_map.{866,ISO8859-5,KOI8-R,1251} $(1)/usr/share/samba2/
endef
define Package/samba2-common/conffiles
/etc/samba2/smb.conf
endef
#define Package/samba2-server/install
# $(INSTALL_DIR) $(1)/etc/init.d
# $(INSTALL_BIN) ./files/samba2.init $(1)/etc/init.d/samba2
# $(INSTALL_DIR) $(1)/usr/lib
# $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/libsmb.so $(1)/usr/lib/
# $(INSTALL_DIR) $(1)/usr/sbin
# $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd.shared $(1)/usr/sbin/nmbd
# $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd.shared $(1)/usr/sbin/smbd
#endef
define Package/samba2-client/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rpcclient $(1)/usr/bin/
endef
$(eval $(call BuildPackage,samba2-common))
#$(eval $(call BuildPackage,samba2-server))
$(eval $(call BuildPackage,samba2-client))

View File

@@ -18,6 +18,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/samba-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
#PKG_FIXUP:=autoreconf
PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk

50
shflags/Makefile Normal file
View File

@@ -0,0 +1,50 @@
#
# 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:=shflags
PKG_VERSION:=2012-06-11
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/kward/shflags.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=c12b30cebb92b49c5edb6df255c0952c65b4ddc6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_LICENSE:=LGPL-2.1
include $(INCLUDE_DIR)/package.mk
define Package/shflags
SECTION:=libs
CATEGORY:=Libraries
TITLE:=shflags
DEPENDS:=+getopt
URL:=http://code.google.com/p/shflags/
MAINTAINER:=Luka Perkov <luka@openwrt.org>
endef
define Package/shflags/description
command-line flags module for Unix shell scripts
endef
define Build/Configure
endef
define Build/Compile
endef
define Build/Install
endef
define Package/shflags/install
$(INSTALL_DIR) $(1)/usr/share/shflags
$(CP) $(PKG_BUILD_DIR)/source/1.0/src/shflags $(1)/usr/share/shflags/shflags.sh
endef
$(eval $(call BuildPackage,shflags))

View File

@@ -0,0 +1,763 @@
--- a/source/1.0/src/shflags
+++ b/source/1.0/src/shflags
@@ -1,91 +1,10 @@
-# $Id$
-# vim:et:ft=sh:sts=2:sw=2
-#
-# Copyright 2008 Kate Ward. All Rights Reserved.
-# Released under the LGPL (GNU Lesser General Public License)
-#
-# shFlags -- Advanced command-line flag library for Unix shell scripts.
-# http://code.google.com/p/shflags/
-#
-# Author: kate.ward@forestent.com (Kate Ward)
-#
-# This module implements something like the google-gflags library available
-# from http://code.google.com/p/google-gflags/.
-#
-# FLAG TYPES: This is a list of the DEFINE_*'s that you can do. All flags take
-# a name, default value, help-string, and optional 'short' name (one-letter
-# name). Some flags have other arguments, which are described with the flag.
-#
-# DEFINE_string: takes any input, and intreprets it as a string.
-#
-# DEFINE_boolean: typically does not take any argument: say --myflag to set
-# FLAGS_myflag to true, or --nomyflag to set FLAGS_myflag to false.
-# Alternately, you can say
-# --myflag=true or --myflag=t or --myflag=0 or
-# --myflag=false or --myflag=f or --myflag=1
-# Passing an option has the same affect as passing the option once.
-#
-# DEFINE_float: takes an input and intreprets it as a floating point number. As
-# shell does not support floats per-se, the input is merely validated as
-# being a valid floating point value.
-#
-# DEFINE_integer: takes an input and intreprets it as an integer.
-#
-# SPECIAL FLAGS: There are a few flags that have special meaning:
-# --help (or -?) prints a list of all the flags in a human-readable fashion
-# --flagfile=foo read flags from foo. (not implemented yet)
-# -- as in getopt(), terminates flag-processing
-#
-# EXAMPLE USAGE:
-#
-# -- begin hello.sh --
-# #! /bin/sh
-# . ./shflags
-# DEFINE_string name 'world' "somebody's name" n
-# FLAGS "$@" || exit $?
-# eval set -- "${FLAGS_ARGV}"
-# echo "Hello, ${FLAGS_name}."
-# -- end hello.sh --
-#
-# $ ./hello.sh -n Kate
-# Hello, Kate.
-#
-# NOTE: Not all systems include a getopt version that supports long flags. On
-# these systems, only short flags are recognized.
-
-#==============================================================================
-# shFlags
-#
-# Shared attributes:
-# flags_error: last error message
-# flags_return: last return value
-#
-# __flags_longNames: list of long names for all flags
-# __flags_shortNames: list of short names for all flags
-# __flags_boolNames: list of boolean flag names
-#
-# __flags_opts: options parsed by getopt
-#
-# Per-flag attributes:
-# FLAGS_<flag_name>: contains value of flag named 'flag_name'
-# __flags_<flag_name>_default: the default flag value
-# __flags_<flag_name>_help: the flag help string
-# __flags_<flag_name>_short: the flag short name
-# __flags_<flag_name>_type: the flag type
-#
-# Notes:
-# - lists of strings are space separated, and a null value is the '~' char.
-
-# return if FLAGS already loaded
[ -n "${FLAGS_VERSION:-}" ] && return 0
FLAGS_VERSION='1.0.3'
-# return values
FLAGS_TRUE=0
FLAGS_FALSE=1
FLAGS_ERROR=2
-# reserved flag names
FLAGS_RESERVED='ARGC ARGV ERROR FALSE HELP PARENT RESERVED TRUE VERSION'
_flags_debug() { echo "flags:DEBUG $@" >&2; }
@@ -93,7 +12,6 @@ _flags_warn() { echo "flags:WARN $@" >&2
_flags_error() { echo "flags:ERROR $@" >&2; }
_flags_fatal() { echo "flags:FATAL $@" >&2; }
-# specific shell checks
if [ -n "${ZSH_VERSION:-}" ]; then
setopt |grep "^shwordsplit$" >/dev/null
if [ $? -ne ${FLAGS_TRUE} ]; then
@@ -107,20 +25,15 @@ if [ -n "${ZSH_VERSION:-}" ]; then
fi
fi
-#
-# constants
-#
-# getopt version
__FLAGS_GETOPT_VERS_STD=0
__FLAGS_GETOPT_VERS_ENH=1
__FLAGS_GETOPT_VERS_BSD=2
getopt >/dev/null 2>&1
case $? in
- 0) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD} ;; # bsd getopt
+ 0) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD} ;;
2)
- # TODO(kward): look into '-T' option to test the internal getopt() version
if [ "`getopt --version`" = '-- ' ]; then
__FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD}
else
@@ -133,82 +46,49 @@ case $? in
;;
esac
-# getopt optstring lengths
__FLAGS_OPTSTR_SHORT=0
__FLAGS_OPTSTR_LONG=1
__FLAGS_NULL='~'
-# flag info strings
__FLAGS_INFO_DEFAULT='default'
__FLAGS_INFO_HELP='help'
__FLAGS_INFO_SHORT='short'
__FLAGS_INFO_TYPE='type'
-# flag lengths
__FLAGS_LEN_SHORT=0
__FLAGS_LEN_LONG=1
-# flag types
__FLAGS_TYPE_NONE=0
__FLAGS_TYPE_BOOLEAN=1
__FLAGS_TYPE_FLOAT=2
__FLAGS_TYPE_INTEGER=3
__FLAGS_TYPE_STRING=4
-# set the constants readonly
__flags_constants=`set |awk -F= '/^FLAGS_/ || /^__FLAGS_/ {print $1}'`
for __flags_const in ${__flags_constants}; do
- # skip certain flags
case ${__flags_const} in
FLAGS_HELP) continue ;;
FLAGS_PARENT) continue ;;
esac
- # set flag readonly
if [ -z "${ZSH_VERSION:-}" ]; then
readonly ${__flags_const}
- else # handle zsh
+ else
case ${ZSH_VERSION} in
[123].*) readonly ${__flags_const} ;;
- *) readonly -g ${__flags_const} ;; # declare readonly constants globally
+ *) readonly -g ${__flags_const} ;;
esac
fi
done
unset __flags_const __flags_constants
-#
-# internal variables
-#
-
-__flags_boolNames=' ' # space separated list of boolean flag names
-__flags_longNames=' ' # space separated list of long flag names
-__flags_shortNames=' ' # space separated list of short flag names
-
-__flags_columns='' # screen width in columns
-__flags_opts='' # temporary storage for parsed getopt flags
-
-#------------------------------------------------------------------------------
-# private functions
-#
-
-# Define a flag.
-#
-# Calling this function will define the following info variables for the
-# specified flag:
-# FLAGS_flagname - the name for this flag (based upon the long flag name)
-# __flags_<flag_name>_default - the default value
-# __flags_flagname_help - the help string
-# __flags_flagname_short - the single letter alias
-# __flags_flagname_type - the type of flag (one of __FLAGS_TYPE_*)
-#
-# Args:
-# _flags__type: integer: internal type of flag (__FLAGS_TYPE_*)
-# _flags__name: string: long flag name
-# _flags__default: default flag value
-# _flags__help: string: help string
-# _flags__short: string: (optional) short flag name
-# Returns:
-# integer: success of operation, or error
+
+__flags_boolNames=' '
+__flags_longNames=' '
+__flags_shortNames=' '
+__flags_columns=''
+__flags_opts=''
+
_flags_define()
{
if [ $# -lt 4 ]; then
@@ -226,16 +106,13 @@ _flags_define()
_flags_return_=${FLAGS_TRUE}
- # TODO(kward): check for validity of the flag name (e.g. dashes)
- # check whether the flag name is reserved
echo " ${FLAGS_RESERVED} " |grep " ${_flags_name_} " >/dev/null
if [ $? -eq 0 ]; then
flags_error="flag name (${_flags_name_}) is reserved"
_flags_return_=${FLAGS_ERROR}
fi
- # require short option for getopt that don't support long options
if [ ${_flags_return_} -eq ${FLAGS_TRUE} \
-a ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} \
-a "${_flags_short_}" = "${__FLAGS_NULL}" ]
@@ -244,7 +121,6 @@ _flags_define()
_flags_return_=${FLAGS_ERROR}
fi
- # check for existing long name definition
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
if _flags_itemInList "${_flags_name_}" \
${__flags_longNames} ${__flags_boolNames}
@@ -255,7 +131,6 @@ _flags_define()
fi
fi
- # check for existing short name definition
if [ ${_flags_return_} -eq ${FLAGS_TRUE} \
-a "${_flags_short_}" != "${__FLAGS_NULL}" ]
then
@@ -266,9 +141,6 @@ _flags_define()
fi
fi
- # handle default value. note, on several occasions the 'if' portion of an
- # if/then/else contains just a ':' which does nothing. a binary reversal via
- # '!' is not done because it does not work on all shells.
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
case ${_flags_type_} in
${__FLAGS_TYPE_BOOLEAN})
@@ -301,7 +173,7 @@ _flags_define()
fi
;;
- ${__FLAGS_TYPE_STRING}) ;; # everything in shell is a valid string
+ ${__FLAGS_TYPE_STRING}) ;;
*)
flags_error="unrecognized flag type '${_flags_type_}'"
@@ -311,7 +183,6 @@ _flags_define()
fi
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
- # store flag information
eval "FLAGS_${_flags_name_}='${_flags_default_}'"
eval "__flags_${_flags_name_}_${__FLAGS_INFO_TYPE}=${_flags_type_}"
eval "__flags_${_flags_name_}_${__FLAGS_INFO_DEFAULT}=\
@@ -319,7 +190,6 @@ _flags_define()
eval "__flags_${_flags_name_}_${__FLAGS_INFO_HELP}=\"${_flags_help_}\""
eval "__flags_${_flags_name_}_${__FLAGS_INFO_SHORT}='${_flags_short_}'"
- # append flag name(s) to list of names
__flags_longNames="${__flags_longNames}${_flags_name_} "
__flags_shortNames="${__flags_shortNames}${_flags_short_} "
[ ${_flags_type_} -eq ${__FLAGS_TYPE_BOOLEAN} ] && \
@@ -333,17 +203,6 @@ _flags_define()
return ${flags_return}
}
-# Return valid getopt options using currently defined list of long options.
-#
-# This function builds a proper getopt option string for short (and long)
-# options, using the current list of long options for reference.
-#
-# Args:
-# _flags_optStr: integer: option string type (__FLAGS_OPTSTR_*)
-# Output:
-# string: generated option string for getopt
-# Returns:
-# boolean: success of operation (always returns True)
_flags_genOptStr()
{
_flags_optStrType_=$1
@@ -358,7 +217,6 @@ _flags_genOptStr()
${_flags_flag_} ${__FLAGS_INFO_SHORT}`
if [ "${_flags_shortName_}" != "${__FLAGS_NULL}" ]; then
_flags_opts_="${_flags_opts_}${_flags_shortName_}"
- # getopt needs a trailing ':' to indicate a required argument
[ ${_flags_type_} -ne ${__FLAGS_TYPE_BOOLEAN} ] && \
_flags_opts_="${_flags_opts_}:"
fi
@@ -366,7 +224,6 @@ _flags_genOptStr()
${__FLAGS_OPTSTR_LONG})
_flags_opts_="${_flags_opts_:+${_flags_opts_},}${_flags_flag_}"
- # getopt needs a trailing ':' to indicate a required argument
[ ${_flags_type_} -ne ${__FLAGS_TYPE_BOOLEAN} ] && \
_flags_opts_="${_flags_opts_}:"
;;
@@ -379,15 +236,6 @@ _flags_genOptStr()
return ${FLAGS_TRUE}
}
-# Returns flag details based on a flag name and flag info.
-#
-# Args:
-# string: long flag name
-# string: flag info (see the _flags_define function for valid info types)
-# Output:
-# string: value of dereferenced flag variable
-# Returns:
-# integer: one of FLAGS_{TRUE|FALSE|ERROR}
_flags_getFlagInfo()
{
_flags_name_=$1
@@ -399,13 +247,6 @@ _flags_getFlagInfo()
if [ -n "${_flags_value_}" ]; then
flags_return=${FLAGS_TRUE}
else
- # see if the _flags_name_ variable is a string as strings can be empty...
- # note: the DRY principle would say to have this function call itself for
- # the next three lines, but doing so results in an infinite loop as an
- # invalid _flags_name_ will also not have the associated _type variable.
- # Because it doesn't (it will evaluate to an empty string) the logic will
- # try to find the _type variable of the _type variable, and so on. Not so
- # good ;-)
_flags_typeVar_="__flags_${_flags_name_}_${__FLAGS_INFO_TYPE}"
_flags_strToEval_="_flags_type_=\"\${${_flags_typeVar_}:-}\""
eval "${_flags_strToEval_}"
@@ -424,15 +265,6 @@ _flags_getFlagInfo()
return ${flags_return}
}
-# check for presense of item in a list. passed a string (e.g. 'abc'), this
-# function will determine if the string is present in the list of strings (e.g.
-# ' foo bar abc ').
-#
-# Args:
-# _flags__str: string: string to search for in a list of strings
-# unnamed: list: list of strings
-# Returns:
-# boolean: true if item is in the list
_flags_itemInList()
{
_flags_str_=$1
@@ -449,34 +281,22 @@ _flags_itemInList()
return ${flags_return}
}
-# Returns the width of the current screen.
-#
-# Output:
-# integer: width in columns of the current screen.
_flags_columns()
{
if [ -z "${__flags_columns}" ]; then
- # determine the value and store it
if eval stty size >/dev/null 2>&1; then
- # stty size worked :-)
set -- `stty size`
__flags_columns=$2
elif eval tput cols >/dev/null 2>&1; then
set -- `tput cols`
__flags_columns=$1
else
- __flags_columns=80 # default terminal width
+ __flags_columns=80
fi
fi
echo ${__flags_columns}
}
-# Validate a boolean.
-#
-# Args:
-# _flags__bool: boolean: value to validate
-# Returns:
-# bool: true if the value is a valid boolean
_flags_validateBoolean()
{
_flags_bool_=$1
@@ -492,12 +312,6 @@ _flags_validateBoolean()
return ${flags_return}
}
-# Validate a float.
-#
-# Args:
-# _flags__float: float: value to validate
-# Returns:
-# bool: true if the value is a valid float
_flags_validateFloat()
{
_flags_float_=$1
@@ -507,10 +321,10 @@ _flags_validateFloat()
else
flags_return=${FLAGS_TRUE}
case ${_flags_float_} in
- -*) # negative floats
+ -*)
_flags_test_=`expr "${_flags_float_}" : '\(-[0-9][0-9]*\.[0-9][0-9]*\)'`
;;
- *) # positive floats
+ *)
_flags_test_=`expr "${_flags_float_}" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
;;
esac
@@ -521,22 +335,16 @@ _flags_validateFloat()
return ${flags_return}
}
-# Validate an integer.
-#
-# Args:
-# _flags__integer: interger: value to validate
-# Returns:
-# bool: true if the value is a valid integer
_flags_validateInteger()
{
_flags_int_=$1
flags_return=${FLAGS_TRUE}
case ${_flags_int_} in
- -*) # negative ints
+ -*)
_flags_test_=`expr "${_flags_int_}" : '\(-[0-9][0-9]*\)'`
;;
- *) # positive ints
+ *)
_flags_test_=`expr "${_flags_int_}" : '\([0-9][0-9]*\)'`
;;
esac
@@ -546,23 +354,12 @@ _flags_validateInteger()
return ${flags_return}
}
-# Parse command-line options using the standard getopt.
-#
-# Note: the flag options are passed around in the global __flags_opts so that
-# the formatting is not lost due to shell parsing and such.
-#
-# Args:
-# @: varies: command-line options to parse
-# Returns:
-# integer: a FLAGS success condition
_flags_getoptStandard()
{
flags_return=${FLAGS_TRUE}
_flags_shortOpts_=`_flags_genOptStr ${__FLAGS_OPTSTR_SHORT}`
- # check for spaces in passed options
for _flags_opt_ in "$@"; do
- # note: the silliness with the x's is purely for ksh93 on Ubuntu 6.06
_flags_match_=`echo "x${_flags_opt_}x" |sed 's/ //g'`
if [ "${_flags_match_}" != "x${_flags_opt_}x" ]; then
flags_error='the available getopt does not support spaces in options'
@@ -585,15 +382,6 @@ _flags_getoptStandard()
return ${flags_return}
}
-# Parse command-line options using the enhanced getopt.
-#
-# Note: the flag options are passed around in the global __flags_opts so that
-# the formatting is not lost due to shell parsing and such.
-#
-# Args:
-# @: varies: command-line options to parse
-# Returns:
-# integer: a FLAGS success condition
_flags_getoptEnhanced()
{
flags_return=${FLAGS_TRUE}
@@ -617,17 +405,6 @@ _flags_getoptEnhanced()
return ${flags_return}
}
-# Dynamically parse a getopt result and set appropriate variables.
-#
-# This function does the actual conversion of getopt output and runs it through
-# the standard case structure for parsing. The case structure is actually quite
-# dynamic to support any number of flags.
-#
-# Args:
-# argc: int: original command-line argument count
-# @: varies: output from getopt parsing
-# Returns:
-# integer: a FLAGS success condition
_flags_parseGetopt()
{
_flags_argc_=$1
@@ -638,35 +415,26 @@ _flags_parseGetopt()
if [ ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} ]; then
set -- $@
else
- # note the quotes around the `$@' -- they are essential!
eval set -- "$@"
fi
- # provide user with number of arguments to shift by later
- # NOTE: the FLAGS_ARGC variable is obsolete as of 1.0.3 because it does not
- # properly give user access to non-flag arguments mixed in between flag
- # arguments. Its usage was replaced by FLAGS_ARGV, and it is being kept only
- # for backwards compatibility reasons.
FLAGS_ARGC=`expr $# - 1 - ${_flags_argc_}`
- # handle options. note options with values must do an additional shift
while true; do
_flags_opt_=$1
_flags_arg_=${2:-}
_flags_type_=${__FLAGS_TYPE_NONE}
_flags_name_=''
- # determine long flag name
case "${_flags_opt_}" in
- --) shift; break ;; # discontinue option parsing
+ --) shift; break ;;
- --*) # long option
+ --*)
_flags_opt_=`expr "${_flags_opt_}" : '--\(.*\)'`
_flags_len_=${__FLAGS_LEN_LONG}
if _flags_itemInList "${_flags_opt_}" ${__flags_longNames}; then
_flags_name_=${_flags_opt_}
else
- # check for negated long boolean version
if _flags_itemInList "${_flags_opt_}" ${__flags_boolNames}; then
_flags_name_=`expr "${_flags_opt_}" : 'no\(.*\)'`
_flags_type_=${__FLAGS_TYPE_BOOLEAN}
@@ -675,12 +443,10 @@ _flags_parseGetopt()
fi
;;
- -*) # short option
+ -*)
_flags_opt_=`expr "${_flags_opt_}" : '-\(.*\)'`
_flags_len_=${__FLAGS_LEN_SHORT}
if _flags_itemInList "${_flags_opt_}" ${__flags_shortNames}; then
- # yes. match short name to long name. note purposeful off-by-one
- # (too high) with awk calculations.
_flags_pos_=`echo "${__flags_shortNames}" \
|awk 'BEGIN{RS=" ";rn=0}$0==e{rn=NR}END{print rn}' \
e=${_flags_opt_}`
@@ -690,14 +456,12 @@ _flags_parseGetopt()
;;
esac
- # die if the flag was unrecognized
if [ -z "${_flags_name_}" ]; then
flags_error="unrecognized option (${_flags_opt_})"
flags_return=${FLAGS_ERROR}
break
fi
- # set new flag value
[ ${_flags_type_} -eq ${__FLAGS_TYPE_NONE} ] && \
_flags_type_=`_flags_getFlagInfo \
"${_flags_name_}" ${__FLAGS_INFO_TYPE}`
@@ -746,7 +510,6 @@ _flags_parseGetopt()
;;
esac
- # handle special case help flag
if [ "${_flags_name_}" = 'help' ]; then
if [ ${FLAGS_help} -eq ${FLAGS_TRUE} ]; then
flags_help
@@ -756,12 +519,10 @@ _flags_parseGetopt()
fi
fi
- # shift the option and non-boolean arguements out.
shift
[ ${_flags_type_} != ${__FLAGS_TYPE_BOOLEAN} ] && shift
done
- # give user back non-flag arguments
FLAGS_ARGV=''
while [ $# -gt 0 ]; do
FLAGS_ARGV="${FLAGS_ARGV:+${FLAGS_ARGV} }'$1'"
@@ -773,43 +534,18 @@ _flags_parseGetopt()
return ${flags_return}
}
-#------------------------------------------------------------------------------
-# public functions
-#
-
-# A basic boolean flag. Boolean flags do not take any arguments, and their
-# value is either 1 (false) or 0 (true). For long flags, the false value is
-# specified on the command line by prepending the word 'no'. With short flags,
-# the presense of the flag toggles the current value between true and false.
-# Specifying a short boolean flag twice on the command results in returning the
-# value back to the default value.
-#
-# A default value is required for boolean flags.
-#
-# For example, lets say a Boolean flag was created whose long name was 'update'
-# and whose short name was 'x', and the default value was 'false'. This flag
-# could be explicitly set to 'true' with '--update' or by '-x', and it could be
-# explicitly set to 'false' with '--noupdate'.
+
DEFINE_boolean() { _flags_define ${__FLAGS_TYPE_BOOLEAN} "$@"; }
-# Other basic flags.
DEFINE_float() { _flags_define ${__FLAGS_TYPE_FLOAT} "$@"; }
DEFINE_integer() { _flags_define ${__FLAGS_TYPE_INTEGER} "$@"; }
DEFINE_string() { _flags_define ${__FLAGS_TYPE_STRING} "$@"; }
-# Parse the flags.
-#
-# Args:
-# unnamed: list: command-line flags to parse
-# Returns:
-# integer: success of operation, or error
FLAGS()
{
- # define a standard 'help' flag if one isn't already defined
[ -z "${__flags_help_type:-}" ] && \
DEFINE_boolean 'help' false 'show this help' 'h'
- # parse options
if [ $# -gt 0 ]; then
if [ ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} ]; then
_flags_getoptStandard "$@"
@@ -818,7 +554,6 @@ FLAGS()
fi
flags_return=$?
else
- # nothing passed; won't bother running getopt
__flags_opts='--'
flags_return=${FLAGS_TRUE}
fi
@@ -832,23 +567,11 @@ FLAGS()
return ${flags_return}
}
-# This is a helper function for determining the `getopt` version for platforms
-# where the detection isn't working. It simply outputs debug information that
-# can be included in a bug report.
-#
-# Args:
-# none
-# Output:
-# debug info that can be included in a bug report
-# Returns:
-# nothing
flags_getoptInfo()
{
- # platform info
_flags_debug "uname -a: `uname -a`"
_flags_debug "PATH: ${PATH}"
- # shell info
if [ -n "${BASH_VERSION:-}" ]; then
_flags_debug 'shell: bash'
_flags_debug "BASH_VERSION: ${BASH_VERSION}"
@@ -857,7 +580,6 @@ flags_getoptInfo()
_flags_debug "ZSH_VERSION: ${ZSH_VERSION}"
fi
- # getopt info
getopt >/dev/null
_flags_getoptReturn=$?
_flags_debug "getopt return: ${_flags_getoptReturn}"
@@ -866,39 +588,16 @@ flags_getoptInfo()
unset _flags_getoptReturn
}
-# Returns whether the detected getopt version is the enhanced version.
-#
-# Args:
-# none
-# Output:
-# none
-# Returns:
-# bool: true if getopt is the enhanced version
flags_getoptIsEnh()
{
test ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_ENH}
}
-# Returns whether the detected getopt version is the standard version.
-#
-# Args:
-# none
-# Returns:
-# bool: true if getopt is the standard version
flags_getoptIsStd()
{
test ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_STD}
}
-# This is effectively a 'usage()' function. It prints usage information and
-# exits the program with ${FLAGS_FALSE} if it is ever found in the command line
-# arguments. Note this function can be overridden so other apps can define
-# their own --help flag, replacing this one, if they want.
-#
-# Args:
-# none
-# Returns:
-# integer: success of operation (always returns true)
flags_help()
{
if [ -n "${FLAGS_HELP:-}" ]; then
@@ -953,19 +652,14 @@ flags_help()
echo "${flags_helpStr_}" >&2
else
echo " ${flags_flagStr_} ${flags_help_}" >&2
- # note: the silliness with the x's is purely for ksh93 on Ubuntu 6.06
- # because it doesn't like empty strings when used in this manner.
flags_emptyStr_="`echo \"x${flags_flagStr_}x\" \
|awk '{printf "%"length($0)-2"s", ""}'`"
flags_helpStr_=" ${flags_emptyStr_} ${flags_defaultStr_}"
flags_helpStrLen_=`expr "${flags_helpStr_}" : '.*'`
if [ ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_STD} \
-o ${flags_helpStrLen_} -lt ${flags_columns_} ]; then
- # indented to match help string
echo "${flags_helpStr_}" >&2
else
- # indented four from left to allow for longer defaults as long flag
- # names might be used too, making things too long
echo " ${flags_defaultStr_}" >&2
fi
fi
@@ -978,12 +672,6 @@ flags_help()
return ${FLAGS_TRUE}
}
-# Reset shflags back to an uninitialized state.
-#
-# Args:
-# none
-# Returns:
-# nothing
flags_reset()
{
for flags_name_ in ${__flags_longNames}; do
@@ -1000,7 +688,6 @@ flags_reset()
eval ${flags_strToEval_}
done
- # reset internal variables
__flags_boolNames=' '
__flags_longNames=' '
__flags_shortNames=' '

View File

@@ -15,7 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.routemeister.net/projects/sipcalc/files \
http://download.google.com/mirror
PKG_MD5SUM:=8d59e70d21d8f0568e310d342e3e2306
PKG_LICENSE:=NONSTANDARD_PERMISSIV
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/sipcalc
@@ -23,7 +24,6 @@ define Package/sipcalc
CATEGORY:=Network
TITLE:=IPv6 IPv4 Calculation Program
URL:=http://www.routemeister.net/projects/sipcalc/
DEPENDS:=+kmod-ipv6
endef
define Package/sipcalc/description

View File

@@ -1,42 +0,0 @@
#
# Copyright (C) 2009 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:=speedtest-cli
PKG_RELEASE:=1
PKG_SOURCE:=speedtest_cli.py
PKG_SOURCE_URL:=https://raw.githubusercontent.com/sivel/speedtest-cli/master
include $(INCLUDE_DIR)/package.mk
define Package/speedtest-cli
SECTION:=utils
CATEGORY:=Utilities
TITLE:=speedtest-cli utility
DEPENDS:=+python +python-mini +python-openssl +python-expat
URL:=https://github.com/sivel/speedtest-cli
endef
define Package/speedtest-cli/description
Command line interface for testing internet bandwidth using speedtest.net.
endef
define Build/Prepare
endef
define Build/Compile
endef
define Package/speedtest-cli/install
$(INSTALL_DIR) $(1)/sbin
$(CP) $(DL_DIR)/speedtest_cli.py $(1)/sbin/
chmod 744 $(1)/sbin/speedtest_cli.py
endef
$(eval $(call BuildPackage,speedtest-cli))

View File

@@ -15,7 +15,8 @@ PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/topologyd.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:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/topologyd

View File

@@ -11,7 +11,8 @@ PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/tptest.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:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
TARGET_LDFLAGS+= \

View File

@@ -11,7 +11,7 @@ PKG_SOURCE_VERSION:=e53d492a09c433718a520987c419cb6a4d4ae8dc
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only Apache-2.0
PKG_CONFIG_DEPENDS:= \
CONFIG_TR064_DEBUG \
CONFIG_TR064_DEVEL
@@ -24,7 +24,7 @@ define Package/tr064
SECTION:=utils
CATEGORY:=Utilities
TITLE:=tr064
DEPENDS:=+libubus +libuci +libubox +libmicroxml +libjson-c +libpthread +libdatamodel +libopenssl +libubus +libubox
DEPENDS:=+libubus +libuci +libubox +libmicroxml +libjson-c +libpthread +libopenssl +libubus +libubox
endef
define Package/tr064/description

11
tr098/Config.in Normal file
View File

@@ -0,0 +1,11 @@
if PACKAGE_libtr098
config LIBTR098_VENDOR_PREFIX
string "TR-098 Vendor Prefix"
default "X_IOPSYS_EU_"
config UPNP_TR064
bool "Compile with tr064 features"
default n
endif

73
tr098/Makefile Normal file
View File

@@ -0,0 +1,73 @@
#
# Copyright (C) 2019 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libtr098
PKG_VERSION:=1.0-2019-09-25
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/tr-098
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=65bd1d77eb85a2d5d3d55e5c68abd38268b89ec8
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/libtr098
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for broadband-forum data model
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace
endef
define Package/libtr098/config
source "$(SOURCE)/Config.in"
endef
define Package/libtr098/description
Test description will update later.
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_LIBTR098_VENDOR_PREFIX)\\\"
TARGET_CFLAGS += \
-D_GNU_SOURCE -D_AADJ
ifeq ($(CONFIG_UPNP_TR064),y)
CONFIGURE_ARGS += \
--enable-tr064
endif
define Package/libtr098/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libtr098.so* $(1)/lib/
$(INSTALL_DIR) $(1)/etc/tr098
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/tr098
$(INSTALL_DIR) $(1)/usr/share/tr098
$(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/tr098
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libtr098
$(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libtr098/
$(CP) $(PKG_BUILD_DIR)/tr098/*.h $(1)/usr/include/libtr098/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libtr098.{a,so*} $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libtr098))

View File

@@ -24,6 +24,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSI
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_LICENSE:=GPL-2.0-or-later
# u-boot for mips_intel do not build in parallel.
#PKG_BUILD_PARALLEL:=1

View File

@@ -16,6 +16,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=NONE
include $(INCLUDE_DIR)/package.mk

View File

@@ -5,14 +5,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uspd
PKG_VERSION:=1.0.3
PKG_VERSION:=1.0.4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=eeb458e2f5b309ec9290388863d73d8bdf176484
PKG_SOURCE_VERSION:=ad23aa1ce58fe769c7cfa57673376400c0556580
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
@@ -20,7 +22,7 @@ define Package/uspd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=USP ubus backend
DEPENDS:=+libubox +ubus +icwmp-curl
DEPENDS:=+libubox +ubus +libbbfdm
endef
define Package/uspd/description

View File

@@ -8,7 +8,7 @@ PKG_NAME:=voice-client
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
@@ -29,7 +29,7 @@ define Package/voice-client
SECTION:=net
CATEGORY:=Network
TITLE:=voice-client
DEPENDS:=+asterisk13
DEPENDS:=@TARGET_HAS_VOICE
endef
define Package/voice-client/description

View File

@@ -37,27 +37,6 @@ EOT
}
# Default phone volume for iopsysWrt 4.X.
uci -q batch <<-EOT
set voice_client.$(getLineName)0.txgain=4
set voice_client.$(getLineName)0.rxgain=4
set voice_client.$(getLineName)1.txgain=4
set voice_client.$(getLineName)1.rxgain=4
set voice_client.$(getLineName)2.txgain=4
set voice_client.$(getLineName)2.rxgain=4
set voice_client.$(getLineName)3.txgain=4
set voice_client.$(getLineName)3.rxgain=4
set voice_client.$(getLineName)4.txgain=4
set voice_client.$(getLineName)4.rxgain=4
set voice_client.$(getLineName)5.txgain=4
set voice_client.$(getLineName)5.rxgain=4
set voice_client.$(getLineName)6.txgain=4
set voice_client.$(getLineName)6.rxgain=4
set voice_client.$(getLineName)7.txgain=4
set voice_client.$(getLineName)7.rxgain=4
commit voice_client
EOT
# Add firewall include
uci -q batch <<-EOT
delete firewall.sip

View File

@@ -103,9 +103,8 @@ case "$1" in
echo $uniqueid | grep "[A-Z,a-z]" && continue
from="$(echo $line | cut -d',' -f2)"
to="$(echo $line | cut -d',' -f3)"
callok=0
uci show voice_client | grep user | grep -wq "$from\|$to" && callok=1
[ $callok -eq 0 ] && continue
# "from" will be empty for call log of internal call (beween extension numbers)
[ -z "$from" ] && [ -z "$to" ] && continue
account="$(echo $line | cut -d',' -f4)"
actok=0
uci show voice_client | grep sip_service_provider | grep -wq "$account" && actok=1

View File

@@ -18,7 +18,8 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/voicesec

View File

@@ -7,9 +7,12 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=wifilife
PKG_VERSION:=2.5.0
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=9b9a787120743d121ce867251af45da076fe7cce
PKG_SOURCE_VERSION:=878ad93c0f1ad49bd187f776808e0b86402b2238
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
ifeq ($(CONFIG_WIFILIFE_OPEN),y)
TARGET_PROD=$(shell echo $(CONFIG_TARGET_BOARD) | sed s/\"//g)
PKG_SOURCE_URL:=http://download.iopsys.eu/iopsys/opensdk/

View File

@@ -14,6 +14,8 @@ 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:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk

View File

@@ -1,55 +0,0 @@
#
# Copyright (C) 2018 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=wifixd
PKG_VERSION:=1.0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=7aae246602af0df883ddefb83147010a457c2725
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.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)
include $(INCLUDE_DIR)/package.mk
define Package/wifixd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi status and configration utility (Deprecated)
DEPENDS:=+libwifix +libuci +libubox +ubus +libpthread +libnl-genl
endef
define Package/wifixd/description
This package can be used to configure and provide status about
the WiFi modules through UBUS.
It does this in an implementation agnostic manner through APIs
exposed by the libwifi library.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
#MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)"
#define Build/Compile
# +$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
#endef
define Package/wifixd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/wifix.init $(1)/etc/init.d/wifix
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wifixd $(1)/usr/sbin/wifixd
endef
$(eval $(call BuildPackage,wifixd))