mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-25 19:44:30 +08:00
Compare commits
258 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70f0315d8d | ||
|
|
f3f3f69789 | ||
|
|
cf2c8972b3 | ||
|
|
5d8dcb76df | ||
|
|
525d55177a | ||
|
|
5b69874139 | ||
|
|
92c7c24a43 | ||
|
|
906f7881c7 | ||
|
|
1cec925bbb | ||
|
|
bd6aa7ed3d | ||
|
|
4e3fbdb5b3 | ||
|
|
02363930c1 | ||
|
|
c35f3b1ca1 | ||
|
|
da88558c98 | ||
|
|
3fa918aacc | ||
|
|
406002c5b0 | ||
|
|
e4df6d3814 | ||
|
|
52a8c3b217 | ||
|
|
9c4252e918 | ||
|
|
39d7ee1f1a | ||
|
|
e446abffd3 | ||
|
|
a35497685b | ||
|
|
c364bb7f82 | ||
|
|
0440496d16 | ||
|
|
981d4b0b7d | ||
|
|
7513d32e91 | ||
|
|
45c4d8dc39 | ||
|
|
1fa45afa52 | ||
|
|
8c272d3613 | ||
|
|
8de301e38b | ||
|
|
f91e7063ca | ||
|
|
bcba464917 | ||
|
|
b1d03ebb60 | ||
|
|
833e1b90c5 | ||
|
|
206370c994 | ||
|
|
ad4d329dc1 | ||
|
|
f8857b208d | ||
|
|
f072c81d04 | ||
|
|
7799804f1d | ||
|
|
6d5130e982 | ||
|
|
b08f86d209 | ||
|
|
a9976f626b | ||
|
|
223f025b72 | ||
|
|
c8ba536d59 | ||
|
|
6781aad52e | ||
|
|
133ab71018 | ||
|
|
e3c43d892f | ||
|
|
d9380968a1 | ||
|
|
8784439985 | ||
|
|
d1ad9dc34f | ||
|
|
c430a0f15e | ||
|
|
800728c7aa | ||
|
|
38668ee8d9 | ||
|
|
e9d00040a7 | ||
|
|
bc5fad2c76 | ||
|
|
52ea555ffb | ||
|
|
eeecaa27de | ||
|
|
d804ac28b9 | ||
|
|
5ff1045b54 | ||
|
|
b9ce500c0c | ||
|
|
eda0d3a3f6 | ||
|
|
11eb21aa1f | ||
|
|
56b2db5817 | ||
|
|
14d6d0eaa4 | ||
|
|
a2aa796cda | ||
|
|
8469ce20e5 | ||
|
|
c6bce18981 | ||
|
|
7564ef08d6 | ||
|
|
72fa3e9b3c | ||
|
|
9139217694 | ||
|
|
714b7ade2f | ||
|
|
1561d7b6b4 | ||
|
|
342616a451 | ||
|
|
ae91292604 | ||
|
|
5115b71ce8 | ||
|
|
2a4c5a1c56 | ||
|
|
5f937eb6ea | ||
|
|
8078dff380 | ||
|
|
7a57ddef4b | ||
|
|
73cae5d93a | ||
|
|
c9cf69ee54 | ||
|
|
fbde005657 | ||
|
|
d5422a20b3 | ||
|
|
51c167adf6 | ||
|
|
0acbd692b8 | ||
|
|
d2c3004c63 | ||
|
|
541e0cff50 | ||
|
|
4f9223dab7 | ||
|
|
b020676abb | ||
|
|
351965e397 | ||
|
|
2187c6cadd | ||
|
|
27800f2100 | ||
|
|
4fa352c5fc | ||
|
|
8a83899eba | ||
|
|
d228f8dbe0 | ||
|
|
57bd744aba | ||
|
|
8353c17ea6 | ||
|
|
6641a075ea | ||
|
|
a0be24b379 | ||
|
|
38916c8bfd | ||
|
|
bc2ad87997 | ||
|
|
c3e18ae04c | ||
|
|
48b47727fa | ||
|
|
52353475f4 | ||
|
|
5e91f9d69c | ||
|
|
765ba5632a | ||
|
|
4e9836fa17 | ||
|
|
c2776532c5 | ||
|
|
ebd13be2c5 | ||
|
|
28b3715da2 | ||
|
|
e0792ad185 | ||
|
|
227f258789 | ||
|
|
2830ec29b6 | ||
|
|
d18fd1cd4a | ||
|
|
7c8634e948 | ||
|
|
dafde17b4f | ||
|
|
7571abd272 | ||
|
|
78c861801e | ||
|
|
fa8fd97000 | ||
|
|
bd1c686c18 | ||
|
|
96f2b96c29 | ||
|
|
2c440cdfa8 | ||
|
|
5a1de62955 | ||
|
|
89ec592e51 | ||
|
|
253865d22f | ||
|
|
b1bd71033e | ||
|
|
032b27503d | ||
|
|
d4ab62bfcb | ||
|
|
2898a64249 | ||
|
|
7c81da0c41 | ||
|
|
d0d9387c85 | ||
|
|
af9cfe3e93 | ||
|
|
6b0f82b322 | ||
|
|
fec4dc0535 | ||
|
|
e48ebfad92 | ||
|
|
0876536e9a | ||
|
|
318ad1776b | ||
|
|
7916ea3bd4 | ||
|
|
2e12e27c49 | ||
|
|
4befcc49ee | ||
|
|
8b5e6820ea | ||
|
|
8d27db3d09 | ||
|
|
6e5cabc67b | ||
|
|
4a8598aeee | ||
|
|
01d73e7642 | ||
|
|
a7f37954b9 | ||
|
|
c0e7e9ad57 | ||
|
|
06fcbb6060 | ||
|
|
8819f589d4 | ||
|
|
47200eb0fa | ||
|
|
56fab86483 | ||
|
|
fa2f9de5d7 | ||
|
|
4372f2b307 | ||
|
|
9bc25990ab | ||
|
|
83d5e75695 | ||
|
|
f1757d70f7 | ||
|
|
a71f0184e1 | ||
|
|
1ab6bb017a | ||
|
|
1457c5c9f8 | ||
|
|
7befbac499 | ||
|
|
1fcc834cd3 | ||
|
|
d0e17bf396 | ||
|
|
3729431a8c | ||
|
|
4f0ff76d64 | ||
|
|
3873129a8b | ||
|
|
1bacdc2674 | ||
|
|
10b621fd3d | ||
|
|
e2abb169ee | ||
|
|
ee650fb957 | ||
|
|
4d143d5ef4 | ||
|
|
e5059e353c | ||
|
|
75cad8fc20 | ||
|
|
1da7077174 | ||
|
|
9f20352d24 | ||
|
|
09dd775333 | ||
|
|
cf696ffeb7 | ||
|
|
ce95cd7d81 | ||
|
|
0d65ac18e1 | ||
|
|
3afb3554e8 | ||
|
|
7331e90d2b | ||
|
|
82ce3554fc | ||
|
|
3455c72cc3 | ||
|
|
01f9a10dd1 | ||
|
|
8615067f19 | ||
|
|
41a5d95de9 | ||
|
|
3daae59284 | ||
|
|
39805c2691 | ||
|
|
8c18af64cc | ||
|
|
8f98094d15 | ||
|
|
4f67105dfc | ||
|
|
7e364527f7 | ||
|
|
6011f9bb49 | ||
|
|
497967b693 | ||
|
|
7fdc3201c1 | ||
|
|
950cab82b6 | ||
|
|
92e9c9eb74 | ||
|
|
b80196822f | ||
|
|
b355f5e8f8 | ||
|
|
1c7838d256 | ||
|
|
5aac2cf484 | ||
|
|
cf912cc3fa | ||
|
|
6b419252d1 | ||
|
|
65158e8ec1 | ||
|
|
c1b3629448 | ||
|
|
01e0a25d3f | ||
|
|
de7c7b2f96 | ||
|
|
719bbcba8c | ||
|
|
cd7fb325fb | ||
|
|
2983cdabfc | ||
|
|
04e2675604 | ||
|
|
bf4ba7269c | ||
|
|
e2897f2d83 | ||
|
|
e6caf05501 | ||
|
|
8f9b75b6c5 | ||
|
|
4b04adb789 | ||
|
|
cfb0962150 | ||
|
|
319cb50c59 | ||
|
|
c3acd8cc63 | ||
|
|
49a3984859 | ||
|
|
15e9ad716a | ||
|
|
2222549327 | ||
|
|
1761a014c4 | ||
|
|
1f83a9634f | ||
|
|
274b9cbd68 | ||
|
|
c5a3077cdb | ||
|
|
19bce6b31e | ||
|
|
da41d31b72 | ||
|
|
cd9dcad8f7 | ||
|
|
e90e81a8b2 | ||
|
|
0803c60bab | ||
|
|
1b2053c29a | ||
|
|
e006e0d7d3 | ||
|
|
d86336c526 | ||
|
|
a2e5b4b79e | ||
|
|
040dbf65a5 | ||
|
|
d1162b7a7d | ||
|
|
c9dfb08a40 | ||
|
|
694eb258d2 | ||
|
|
88291c196a | ||
|
|
5260f1ecfb | ||
|
|
54e25d9c59 | ||
|
|
a5b1435576 | ||
|
|
f7cae08993 | ||
|
|
18ca4cc0e0 | ||
|
|
c6f2b57122 | ||
|
|
2e0e871d51 | ||
|
|
d145686f74 | ||
|
|
5af81c786f | ||
|
|
79976db976 | ||
|
|
2bffd0242b | ||
|
|
b5d073a39f | ||
|
|
5af440548c | ||
|
|
ec69c2d171 | ||
|
|
3d1cd95e77 | ||
|
|
8a13c2c46e | ||
|
|
da757a75c3 | ||
|
|
77350790c1 | ||
|
|
16d7e6a4ca |
@@ -42,6 +42,7 @@ define Package/dectmngr2/install
|
||||
$(INSTALL_DIR) $(1)/etc/dect/
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults/
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
|
||||
@@ -49,6 +50,7 @@ define Package/dectmngr2/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
|
||||
$(CP) ./files/dect.config $(1)/etc/config/dect
|
||||
$(CP) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dectmngr2))
|
||||
|
||||
23
dectmngr2/files/etc/uci-defaults/22-dect-defaults
Executable file
23
dectmngr2/files/etc/uci-defaults/22-dect-defaults
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
# Workaround for product DG400 which has an
|
||||
# incorrect value in nvram from factory.
|
||||
|
||||
if [ -e "/proc/nvram/BoardId" ]; then
|
||||
boardid=$(cat /proc/nvram/BoardId)
|
||||
ulBoardStuffOption=$(cat /proc/nvram/ulBoardStuffOption)
|
||||
|
||||
if [ "$boardid" = "DG400R0" -a "$ulBoardStuffOption" = "0xffffffff" ]; then
|
||||
echo "0xfffffff2" >/proc/nvram/ulBoardStuffOption
|
||||
|
||||
db -q batch <<-EOT
|
||||
set hw.board.hasDect=1
|
||||
commit hw.board
|
||||
EOT
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -9,7 +9,7 @@ PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=259178b62ba910f53ec10899ef52bbc670b7aea5
|
||||
PKG_SOURCE_VERSION:=6a311af7cd17fc410c27de3cfae33b658195fd0b
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@inteno.se>
|
||||
|
||||
@@ -60,9 +60,9 @@ else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
|
||||
TARGET_PLATFORM=MARVELL
|
||||
TARGET_CFLAGS +=-DIOPSYS_MARVELL
|
||||
else ifeq ($(CONFIG_TARGET_lantiq_xrx500),y)
|
||||
TARGET_PLATFORM=LANTIQ
|
||||
TARGET_CFLAGS +=-DIOPSYS_LANTIQ
|
||||
else ifeq ($(CONFIG_TARGET_intel_mips),y)
|
||||
TARGET_PLATFORM=INTEL
|
||||
TARGET_CFLAGS +=-DIOPSYS_INTEL
|
||||
else
|
||||
$(info (UNEXPECTED CONFIG TARGET))
|
||||
endif
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.2
|
||||
PKG_SOURCE_VERSION:=9db2a6998e956270738b3b0cf86f7f962ca84026
|
||||
PKG_SOURCE_VERSION:=a78fe95d5c5a0a320f3b62b9d2faafd07b56e3a7
|
||||
|
||||
|
||||
ifeq ($(CONFIG_ENDPT_OPEN),y)
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=eventlog
|
||||
PKG_VERSION:=0.2.9
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/eventlog/0.2/
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
|
||||
PKG_MD5SUM:=76e3d7a0b8f335c12099e9b91191fbf1
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libeventlog
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=A new API to format and send structured log messages.
|
||||
endef
|
||||
|
||||
define Package/eventlog/description
|
||||
A new API to format and send structured log messages. It supports multiple message
|
||||
representations (plain, XML attributes and XML tags) and multiple output methods
|
||||
(local syslogd).
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libeventlog/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libeventlog))
|
||||
@@ -19,14 +19,14 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
|
||||
|
||||
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
|
||||
export LOGIN:=$(shell whoami)
|
||||
BASE_PKG_VERSION:=5.1.13
|
||||
BASE_PKG_VERSION:=5.3.6
|
||||
PKG_RELEASE:=
|
||||
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
|
||||
export PKG_VERSION
|
||||
|
||||
###########################--RELEASE--################################
|
||||
|
||||
PKG_SOURCE_VERSION:=41a4a9c70cf8a4b7d577f107f62150e477867f9f
|
||||
PKG_SOURCE_VERSION:=94aab1532fef2caf2d65579614fc413252a517eb
|
||||
ifeq ($(CONFIG_ICE_OPEN),y)
|
||||
TARGET_PROFILE=$(shell echo $(CONFIG_TARGET_BOARD) | sed s/\"//g)
|
||||
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
|
||||
@@ -7,6 +7,9 @@ grep -rq "^ice:" /etc/passwd || {
|
||||
uci -q delete passwords.ice
|
||||
uci -q set passwords.ice=usertype
|
||||
uci -q set passwords.ice.password="\$WPAKEY"
|
||||
uci -q del_list passwords.ice._access_w=root
|
||||
uci -q add_list passwords.ice._access_w=root
|
||||
uci -q del_list passwords.ice._access_r=root
|
||||
uci -q add_list passwords.ice._access_r=root
|
||||
uci -q commit passwords
|
||||
|
||||
@@ -16,7 +19,7 @@ cat >> /etc/config/rpcd << EOF
|
||||
config login
|
||||
option username 'ice'
|
||||
option password '\$p\$ice'
|
||||
list _access_r 'none'
|
||||
list _access_w 'none'
|
||||
list write 'user-user'
|
||||
list write 'juci-broadcom-dsl'
|
||||
list write 'juci-broadcom-dsl-admin'
|
||||
@@ -63,5 +66,9 @@ config login
|
||||
EOF
|
||||
}
|
||||
|
||||
uci -q del_list dhcp.@domain[0].name="inteno.lan"
|
||||
uci -q add_list dhcp.@domain[0].name="inteno.lan"
|
||||
uci -q commit dhcp
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ config CWMP_DEVEL_DEBUG
|
||||
|
||||
config LIBDATAMODEL_VENDOR_PREFIX
|
||||
string "Vendor Prefix"
|
||||
default "X_Inteno_SE_"
|
||||
default "X_IOPSYS_EU_"
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=4.0-2018-10-16
|
||||
PKG_VERSION:=4.0-2019-04-01
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=92cbe9f51270054bc2ae9ad266fb20dc94f4d9db
|
||||
PKG_SOURCE_VERSION:=7faa875dcb825869c6bd942e140d2200e5e0dc0e
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
- libz.so
|
||||
- libcrypto.so
|
||||
the librairies should be present in the "staging_dir/target-i386_uClibc-0.9.30.1/usr/lib/" or "staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib"
|
||||
|
||||
|
||||
header files and folders:
|
||||
- expat.h
|
||||
- expat_external.h
|
||||
@@ -33,7 +33,7 @@ this software is composed of 3 packages:
|
||||
- cwmp kernel package: contains cwmp kernel module. This module could be used by other kernel modules to notify the icwmpd daemon when kernel parameter changes
|
||||
|
||||
The three packages should be selected in the make menu config in order to get the three packages compiled.
|
||||
To compile the three packages: $ make package/cwmpd/compile
|
||||
To compile the three packages: $ make package/cwmpd/compile
|
||||
|
||||
3) OpenWRT settings
|
||||
in the OpenWRT, Add the following lines in the /usr/share/udhcpc/default.script file:
|
||||
@@ -49,7 +49,7 @@ in the OpenWRT, Add the following lines in the /usr/share/udhcpc/default.script
|
||||
- libopenssl package should be installed
|
||||
- libz package should be installed
|
||||
- libcrypto package should be installed
|
||||
|
||||
|
||||
Configure the acs url in the /etc/config/icwmp
|
||||
and then start the cwmpd service: /etc/init.d/icwmpd start
|
||||
for the help: /etc/init.d/icwmpd
|
||||
|
||||
@@ -75,9 +75,11 @@ handle_icwmp_restart() {
|
||||
"$previpaddr" = "$curipaddr" -a \
|
||||
"$prevgateway" = "$curgateway" -a \
|
||||
"$prevsubnets" = "$cursubnets" -a \
|
||||
"$prevdnsservers" = "$curdnsservers" -a \
|
||||
"$prevopt43url" = "$curopt43url" \
|
||||
] && exit 0
|
||||
"$prevdnsservers" = "$curdnsservers" \
|
||||
] && {
|
||||
[ "$prevopt43url" = "$curopt43url" ] && exit 0
|
||||
[ -z "$prevopt43url" ] && exit 0
|
||||
}
|
||||
|
||||
/etc/init.d/icwmpd reload &
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2013 Inteno
|
||||
# Copyright (C) 2018 iopsys Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
@@ -8,9 +8,9 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
PKG_NAME:=ifbt
|
||||
PKG_VERSION:=0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=2ed58929d18f914905e316558d8756a2056af0b2
|
||||
PKG_SOURCE_VERSION:=0286812ed8036dea758f904694dc416481fba64d
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/ifbt.git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ifbt.git
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -18,6 +18,22 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_MARVELL
|
||||
else ifeq ($(CONFIG_TARGET_intel_mips),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_INTEL
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_MEDIATEK
|
||||
else
|
||||
$(info (UNEXPECTED CONFIG TARGET))
|
||||
endif
|
||||
|
||||
export TARGET_PLATFORM
|
||||
|
||||
define Package/ifbt
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libwifi +libjson-c
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_INSTALL:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/imonitor.git
|
||||
PKG_SOURCE_VERSION:=532f4900862bcb45d8cd4bf37555fabda81750b6
|
||||
PKG_SOURCE_VERSION:=cea60630cfac1d3c70f486acea6663d339b7d444
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_MAINTAINER:=Sartura Support for Inteno <support-inteno@sartura.hr>
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_NAME:=inbd
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=b846ae0ff55284392de2c4d874851b33edd7a6c5
|
||||
PKG_SOURCE_VERSION:=12755fccb8ef87965ac684d62d56e19e73a255bd
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ CONFIG_PACKAGE_ice-client-netrounds=m
|
||||
CONFIG_PACKAGE_ice-client-rshell=m
|
||||
CONFIG_PACKAGE_ice-client-texec=m
|
||||
CONFIG_PACKAGE_icwmp-curl=y
|
||||
CONFIG_PACKAGE_ifbt=y
|
||||
CONFIG_PACKAGE_imonitor=y
|
||||
CONFIG_PACKAGE_inbd=y
|
||||
CONFIG_PACKAGE_netmode=y
|
||||
@@ -42,10 +43,11 @@ CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
|
||||
CONFIG_PACKAGE_iptables-mod-filter=y
|
||||
CONFIG_PACKAGE_iptables-mod-ipopt=y
|
||||
CONFIG_PACKAGE_iup=y
|
||||
CONFIG_PACKAGE_iwatchdog=y
|
||||
# CONFIG_PACKAGE_iwatchdog is not set
|
||||
CONFIG_PACKAGE_juci=y
|
||||
CONFIG_PACKAGE_juci-broadcom-iptv=y
|
||||
CONFIG_PACKAGE_juci-broadcom-pwrmgmt=y
|
||||
CONFIG_PACKAGE_juci-wifilife=y
|
||||
CONFIG_PACKAGE_juci-wireless=y
|
||||
CONFIG_PACKAGE_juci-ddns=y
|
||||
CONFIG_PACKAGE_juci-diagnostics=y
|
||||
@@ -224,3 +226,5 @@ CONFIG_KERNEL_DEVTMPFS=y
|
||||
CONFIG_KERNEL_DEVTMPFS_MOUNT=y
|
||||
CONFIG_PACKAGE_ip-full=y
|
||||
# CONFIG_BUSYBOX_CONFIG_IP is not set
|
||||
CONFIG_PACKAGE_iopupgrade=y
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
CONFIG_PACKAGE_luci=y
|
||||
CONFIG_PACKAGE_luci-mod-admin-core=y
|
||||
CONFIG_PACKAGE_luci-mod-admin-full=y
|
||||
CONFIG_PACKAGE_luci-app-ddns=y
|
||||
CONFIG_PACKAGE_luci-app-dslstats=y
|
||||
CONFIG_PACKAGE_luci-app-firewall=y
|
||||
CONFIG_PACKAGE_luci-app-iup=y
|
||||
CONFIG_PACKAGE_luci-app-mcpd=y
|
||||
CONFIG_PACKAGE_luci-app-minidlna=y
|
||||
CONFIG_PACKAGE_luci-app-multiwan=y
|
||||
CONFIG_PACKAGE_luci-app-p910nd=y
|
||||
CONFIG_PACKAGE_luci-app-parental-control=y
|
||||
CONFIG_PACKAGE_luci-app-port-management=y
|
||||
CONFIG_PACKAGE_luci-app-power-mgmt=y
|
||||
CONFIG_PACKAGE_luci-app-samba=y
|
||||
CONFIG_PACKAGE_luci-app-sfp=y
|
||||
CONFIG_PACKAGE_luci-app-snmp=y
|
||||
CONFIG_PACKAGE_luci-app-speedtest=y
|
||||
CONFIG_PACKAGE_luci-app-upnp=y
|
||||
CONFIG_PACKAGE_luci-app-voice=y
|
||||
CONFIG_PACKAGE_luci-theme-base=y
|
||||
CONFIG_PACKAGE_luci-theme-bootstrap=y
|
||||
CONFIG_PACKAGE_luci-i18n-english=y
|
||||
CONFIG_PACKAGE_luci-proto-3g=y
|
||||
CONFIG_PACKAGE_luci-proto-4g=y
|
||||
CONFIG_PACKAGE_luci-proto-core=y
|
||||
CONFIG_PACKAGE_luci-proto-ipv6=y
|
||||
CONFIG_PACKAGE_luci-proto-ppp=y
|
||||
CONFIG_PACKAGE_luci-sgi-cgi=y
|
||||
CONFIG_PACKAGE_luci-lib-core=y
|
||||
CONFIG_PACKAGE_luci-lib-core_source=y
|
||||
CONFIG_PACKAGE_luci-lib-ipkg=y
|
||||
CONFIG_PACKAGE_luci-lib-json=y
|
||||
CONFIG_PACKAGE_luci-lib-nixio=y
|
||||
CONFIG_PACKAGE_luci-lib-nixio_notls=y
|
||||
CONFIG_PACKAGE_luci-lib-sys=y
|
||||
CONFIG_PACKAGE_luci-lib-web=y
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||
CONFIG_GCC_VERSION="6.3.0"
|
||||
CONFIG_TOOLCHAINOPTS=y
|
||||
# CONFIG_BINUTILS_USE_VERSION_2_27 is not set
|
||||
CONFIG_BINUTILS_USE_VERSION_2_28=y
|
||||
# CONFIG_BINUTILS_USE_VERSION_2_29_1 is not set
|
||||
# CONFIG_GCC_USE_GRAPHITE is not set
|
||||
# CONFIG_GCC_USE_VERSION_5 is not set
|
||||
CONFIG_GCC_USE_VERSION_6=y
|
||||
# CONFIG_GCC_USE_VERSION_7 is not set
|
||||
# CONFIG_LIBC_USE_GLIBC is not set
|
||||
CONFIG_LIBC_USE_MUSL=y
|
||||
|
||||
|
||||
# CONFIG_PACKAGE_ppp-mod-pppoa is not set
|
||||
|
||||
|
||||
#################### DSL related
|
||||
CONFIG_PACKAGE_dsl-cpe-control-vrx=y
|
||||
CONFIG_dsl-cpe-mei-vrx_DEVICE_VR11=y
|
||||
CONFIG_dsl-cpe-mei-vrx_IRQ_POLLING_ACTIVE=y
|
||||
CONFIG_PACKAGE_kmod-dsl-cpe-mei-vrx=y
|
||||
CONFIG_PACKAGE_ifxos=y
|
||||
CONFIG_PACKAGE_kmod-directconnect-dp=y
|
||||
CONFIG_PACKAGE_kmod-vrx518_tc_drv=y
|
||||
CONFIG_PACKAGE_vrx518_aca_fw=y
|
||||
CONFIG_PACKAGE_vrx518_ppe_fw=y
|
||||
CONFIG_dsl-cpe-api-vrx_MODEL_DEBUG=y
|
||||
CONFIG_dsl-cpe-control-vrx_DTI=y
|
||||
CONFIG_dsl-cpe-control-vrx_MODEL_DEBUG=y
|
||||
#################### DSL related end
|
||||
|
||||
# the options below this point is wrong but packages wont compile
|
||||
|
||||
# CONFIG_PACKAGE_icwmp-curl is not set
|
||||
# CONFIG_PACKAGE_juci-icwmp is not set
|
||||
# CONFIG_PACKAGE_libcgroup is not set
|
||||
# CONFIG_PACKAGE_libcgroup-daemon is not set
|
||||
# CONFIG_PACKAGE_libdatamodel is not set
|
||||
@@ -1,15 +0,0 @@
|
||||
# CONFIG_PACKAGE_libcgroup-daemon is not set
|
||||
# CONFIG_PACKAGE_libcgroup is not set
|
||||
|
||||
# CONFIG_PACKAGE_juci-broadcom-wl is not set
|
||||
# CONFIG_PACKAGE_juci-minisnmpd is not set
|
||||
# CONFIG_PACKAGE_juci-router-openwrt is not set
|
||||
# CONFIG_PACKAGE_speedsvc is not set
|
||||
|
||||
# CONFIG_juci_broadcom_wl is not set
|
||||
# CONFIG_juci_minisnmpd is not set
|
||||
# CONFIG_juci_router_openwrt is not set
|
||||
|
||||
# CONFIG_PACKAGE_brcminfo is not set
|
||||
CONFIG_PACKAGE_brcm_fw_tool=y
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
# Disable kernel internal Dect. External Dect can still operate.
|
||||
CONFIG_TARGET_NO_DECT=y
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
# Disable kernel internal Dect. External Dect can still operate.
|
||||
CONFIG_TARGET_NO_DECT=y
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
CONFIG_BCM_I2C=y
|
||||
|
||||
# Disable kernel internal Dect. External Dect can still operate.
|
||||
CONFIG_TARGET_NO_DECT=y
|
||||
|
||||
CONFIG_TARGET_NO_DSL=y
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
# Disable kernel internal Dect. External Dect can still operate.
|
||||
CONFIG_TARGET_NO_DECT=y
|
||||
|
||||
CONFIG_USE_DSL=y
|
||||
CONFIG_TARGET_DSL_GFAST=y
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
# Disable kernel internal Dect. External Dect can still operate.
|
||||
CONFIG_TARGET_NO_DECT=y
|
||||
|
||||
CONFIG_USE_DSL=y
|
||||
CONFIG_TARGET_DSL_GFAST=y
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
# Disable kernel internal Dect. External Dect can still operate.
|
||||
CONFIG_TARGET_NO_DECT=y
|
||||
|
||||
CONFIG_TARGET_NO_DSL=y
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_TARGET_NO_DSL=y
|
||||
CONFIG_BCM_I2C=y
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
# CONFIG_PACKAGE_libcgroup-daemon is not set
|
||||
# CONFIG_PACKAGE_libcgroup is not set
|
||||
|
||||
# CONFIG_PACKAGE_juci-broadcom-wl is not set
|
||||
# CONFIG_PACKAGE_juci-minisnmpd is not set
|
||||
# CONFIG_PACKAGE_juci-router-openwrt is not set
|
||||
# CONFIG_PACKAGE_speedsvc is not set
|
||||
|
||||
# CONFIG_juci_broadcom_wl is not set
|
||||
# CONFIG_juci_minisnmpd is not set
|
||||
# CONFIG_juci_router_openwrt is not set
|
||||
|
||||
# CONFIG_PACKAGE_brcminfo is not set
|
||||
CONFIG_PACKAGE_brcm_fw_tool=y
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_BCM_I2C=y
|
||||
CONFIG_TARGET_NO_DECT=y
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_TARGET_NO_VOICE=y
|
||||
CONFIG_BCM_I2C=y
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
CONFIG_BCM_I2C=y
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_TARGET_NO_VOICE=y
|
||||
CONFIG_BCM_I2C=y
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
CONFIG_BCM_I2C=y
|
||||
CONFIG_TARGET_NO_DECT=y
|
||||
CONFIG_TARGET_NO_DSL=y
|
||||
CONFIG_BCM_ENDPOINT_MODULE=y
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_TARGET_NO_DSL=y
|
||||
CONFIG_BCM_I2C=y
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
CONFIG_TARGET_NO_DHD=y
|
||||
CONFIG_TARGET_NO_VOICE=y
|
||||
CONFIG_BCM_I2C=y
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# CONFIG_PACKAGE_libcgroup-daemon is not set
|
||||
# CONFIG_PACKAGE_libcgroup is not set
|
||||
# CONFIG_PACKAGE_power-management is not set
|
||||
# CONFIG_PACKAGE_qos-scripts is not set
|
||||
# CONFIG_PACKAGE_mtd-utils-deubinize is not set
|
||||
# CONFIG_PACKAGE_mtd-utils-imagewrite is not set
|
||||
# CONFIG_PACKAGE_mtd-utils-mkfs.jffs2 is not set
|
||||
# CONFIG_PACKAGE_mtd-utils-nanddump is not set
|
||||
CONFIG_PACKAGE_mtd-utils-nandwrite=y
|
||||
CONFIG_PACKAGE_mtk-bndstrg=y
|
||||
CONFIG_PACKAGE_igmpproxy=y
|
||||
CONFIG_PACKAGE_kmod-nf-nathelper=y
|
||||
CONFIG_PACKAGE_kmod-nf-nathelper-extra=y
|
||||
# CONFIG_PACKAGE_endptmngr is not set
|
||||
@@ -34,9 +34,8 @@ _iop()
|
||||
|
||||
iopcmds="bootstrap cfe_upgrade cfe_upgrade_latest extract_core \
|
||||
feeds_update genconfig generate_tarballs install_key \
|
||||
scp_changes setup_host ssh_install_key ssh_sysupgrade \
|
||||
ssh_sysupgrade_latest ssh_sysupgrade_latest_w status \
|
||||
update_package update_feed_branches"
|
||||
scp_changes setup_host ssh_install_key status \
|
||||
update_package update_feed_branches ssh_upgrade"
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ] ; then
|
||||
|
||||
@@ -76,7 +75,13 @@ _iop()
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
|
||||
ssh_upgrade)
|
||||
if [ "$prev" == "-f" ] ; then
|
||||
_filedir
|
||||
else
|
||||
COMPREPLY=( $(compgen -W "-f -t -i -n -x -b" -- ${cur}) )
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# No arguments or arguments not supported yet
|
||||
;;
|
||||
|
||||
15
iop/scripts/auto_feeds_conf.sh
Executable file
15
iop/scripts/auto_feeds_conf.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare -a feed_list
|
||||
function list_feeds {
|
||||
jq '.feed[] | .name' feeds.conf
|
||||
}
|
||||
|
||||
# Exported interface
|
||||
function auto_feeds_conf {
|
||||
echo "Function auto feeds conf"
|
||||
echo "feed list:"
|
||||
list_feeds
|
||||
}
|
||||
|
||||
register_command "auto_feeds_conf" "Automatically update feeds"
|
||||
@@ -7,7 +7,7 @@ function genconfig {
|
||||
export FILEDIR="files/"
|
||||
export THEMEDIR="themes"
|
||||
CURRENT_CONFIG_FILE=".current_config_file"
|
||||
export CONFIGPATH="package/feeds/iopsys/iop/configs"
|
||||
export CONFIGPATH="package/feeds/iopsys/iop"
|
||||
CUSTPATH="customerconfigs"
|
||||
export CUSTCONF="customerconfigs/customers"
|
||||
export VERBOSE=0
|
||||
@@ -15,24 +15,36 @@ function genconfig {
|
||||
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
|
||||
|
||||
target="bogus"
|
||||
masterconfig=1
|
||||
config_path=""
|
||||
|
||||
# Takes a board name and returns the target name in global var $target
|
||||
set_target() {
|
||||
local profile=$1
|
||||
|
||||
local iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25 hpc_hu02 eg200"
|
||||
local iopsys_brcm63xx_arm="dg400 eg400 sdx810_rg f104w f104 dg400prime dg400primeb 963138REF_P502"
|
||||
local iopsys_ramips="ex400 sdx810_ap"
|
||||
local intel_mips="easy550"
|
||||
local ramips="mt7621"
|
||||
local iopsys_brcm63xx_mips=$(cd target/linux/iopsys-brcm63xx-mips; ./genconfig)
|
||||
local iopsys_brcm63xx_arm=$(cd target/linux/iopsys-brcm63xx-arm; ./genconfig)
|
||||
local iopsys_ramips=$(cd target/linux/iopsys-ramips; ./genconfig)
|
||||
local intel_mips=$(cd target/linux/intel_mips; ./genconfig)
|
||||
|
||||
if [ "$profile" == "LIST" ]
|
||||
then
|
||||
for list in iopsys_brcm63xx_mips iopsys_brcm63xx_arm iopsys_ramips intel_mips
|
||||
do
|
||||
echo "$list based boards:"
|
||||
for b in ${!list}
|
||||
do
|
||||
echo -e "\t$b"
|
||||
done
|
||||
done
|
||||
return
|
||||
fi
|
||||
|
||||
local targets
|
||||
|
||||
for p in $iopsys_brcm63xx_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_mips"
|
||||
config_path="target/linux/iopsys-brcm63xx-mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -40,6 +52,7 @@ function genconfig {
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
config_path="target/linux/iopsys-brcm63xx-arm/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -47,14 +60,7 @@ function genconfig {
|
||||
for p in $iopsys_ramips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_ramips"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $ramips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="ramips"
|
||||
masterconfig=0
|
||||
config_path="target/linux/iopsys-ramips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -62,6 +68,7 @@ function genconfig {
|
||||
for p in $intel_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="intel_mips"
|
||||
config_path="target/linux/intel_mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -97,16 +104,16 @@ function genconfig {
|
||||
|
||||
usage() {
|
||||
echo
|
||||
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer ]"
|
||||
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer [customer2 ]...]"
|
||||
echo
|
||||
echo -e " -c|--clean\tRemove all files under ./files and import from config "
|
||||
echo -e " -v|--verbose\tVerbose"
|
||||
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
|
||||
echo -e " -p|--profile\tSet profile (if exists) default juci"
|
||||
echo -e " -s|--override\tEnable 'Package source tree override'"
|
||||
echo -e " -h|--help\tShow this message"
|
||||
echo -e " -l|--list [customer]\tList all Customers or all boards for one customer"
|
||||
echo -e " -a|--list-all\tList all Customers and their board types"
|
||||
echo -e " -b|--boards\tList all board types"
|
||||
echo
|
||||
echo "Example ./iop genconfig vg50 TELIA"
|
||||
echo "(if no customerconfig is chosen the Inteno Config will be used)"
|
||||
@@ -200,90 +207,84 @@ function genconfig {
|
||||
create_and_copy_files()
|
||||
{
|
||||
local BOARDTYPE=$1
|
||||
local CUSTOMER=$2
|
||||
shift
|
||||
local CUSTOMERS=$@
|
||||
|
||||
# Validate seleced board and customer
|
||||
# Validate seleced board and customers
|
||||
set_target $BOARDTYPE
|
||||
if [ $target == "bogus" ]; then
|
||||
echo "Hardware profile does not exist"
|
||||
exit 1
|
||||
elif [ -n "$CUSTOMER" ]; then
|
||||
if [ ! -d "$CUSTCONF/$CUSTOMER/" ]; then
|
||||
echo "Customer profile for '$CUSTOMER' does not exist"
|
||||
exit 1
|
||||
elif [ ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
|
||||
echo "'$BOARDTYPE' board profile does not exist for customer '$CUSTOMER'"
|
||||
if [ -f "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
echo "Common profile configuration will be used"
|
||||
else
|
||||
elif [ -n "$CUSTOMERS" ]; then
|
||||
for CUSTOMER in $CUSTOMERS; do
|
||||
if [ ! -d "$CUSTCONF/$CUSTOMER/" ]; then
|
||||
echo "Customer profile for '$CUSTOMER' does not exist"
|
||||
exit 1
|
||||
elif [ ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
|
||||
echo "'$BOARDTYPE' board profile does not exist for customer '$CUSTOMER'"
|
||||
if [ -f "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
echo "Common profile configuration will be used"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Generate base config
|
||||
# Used only for iopsys targets, not openwrt targets
|
||||
rm -f .config
|
||||
if [ $masterconfig -eq 1 ]; then
|
||||
v "Config $BOARDTYPE selected"
|
||||
v "cp $CONFIGPATH/config .config"
|
||||
cp $CONFIGPATH/config .config
|
||||
v "Config $BOARDTYPE selected"
|
||||
v "cp $CONFIGPATH/config .config"
|
||||
cp $CONFIGPATH/config .config
|
||||
|
||||
if [ -f $config_path/config ]; then
|
||||
cat $config_path/config >> .config
|
||||
fi
|
||||
if [ -f $config_path/$BOARDTYPE/config ]; then
|
||||
cat $config_path/$BOARDTYPE/config >> .config
|
||||
fi
|
||||
|
||||
# Add target (soc/board specific )
|
||||
if [ -f $CONFIGPATH/target/config ]; then
|
||||
cat $CONFIGPATH/target/config >> .config
|
||||
fi
|
||||
if [ -f $CONFIGPATH/target/$target/config ]; then
|
||||
cat $CONFIGPATH/target/$target/config >> .config
|
||||
fi
|
||||
if [ -f $CONFIGPATH/target/$target/$BOARDTYPE/config ]; then
|
||||
cat $CONFIGPATH/target/$target/$BOARDTYPE/config >> .config
|
||||
fi
|
||||
|
||||
# Apply profile diff to master config if selected
|
||||
if [ -n "$PROFILE" ]; then
|
||||
if [ -e "$CONFIGPATH/$PROFILE.diff" ]; then
|
||||
cat $CONFIGPATH/$PROFILE.diff >> .config
|
||||
elif [ "$PROFILE" == "juci" ]; then
|
||||
v "Default profile (juci) is selected."
|
||||
else
|
||||
echo "ERROR: profile $PROFILE does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
#special handling for intel_mips which use TARGET_DEVICES
|
||||
if [ "$target" = "intel_mips" ]; then
|
||||
subtarget="xrx500"
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
echo "CONFIG_TARGET_MULTI_PROFILE=y" >> .config
|
||||
echo "CONFIG_TARGET_PER_DEVICE_ROOTFS=y" >> .config
|
||||
device=$(echo $BOARDTYPE | tr a-z A-Z)
|
||||
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${device}=y" >> .config
|
||||
else
|
||||
v "No profile selected! Using default."
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
fi
|
||||
|
||||
# Set target and profile
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
|
||||
echo "$CUSTOMER $BOARDTYPE" > $CURRENT_CONFIG_FILE
|
||||
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
|
||||
|
||||
# Add customerconfig diff if a customer is selected
|
||||
if [ -n "$CUSTOMER" ]; then
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/juci-theme" ]; then
|
||||
customer="$(echo $CUSTOMER | tr 'A-Z' 'a-z')"
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/juci-theme $THEMEDIR/juci-theme-$customer"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/juci-theme $THEMEDIR/juci-theme-$customer
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
|
||||
fi
|
||||
if [ -n "$CUSTOMERS" ]; then
|
||||
for CUSTOMER in $CUSTOMERS; do
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -d "$CUSTCONF/$CUSTOMER/juci-theme" ]; then
|
||||
customer="$(echo $CUSTOMER | tr 'A-Z' 'a-z')"
|
||||
v "cp -ar $CUSTCONF/$CUSTOMER/juci-theme $THEMEDIR/juci-theme-$customer"
|
||||
cp -ar $CUSTCONF/$CUSTOMER/juci-theme $THEMEDIR/juci-theme-$customer
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
@@ -325,20 +326,11 @@ function genconfig {
|
||||
# currently boardparms.c and boardparms_voice.c is the only place that is depending on inteno boardid name
|
||||
# so just touch that file.
|
||||
[ -d ./build_dir ] && find build_dir/ -name "boardparms*c" -print0 2>/dev/null | xargs -0 touch 2>/dev/null
|
||||
|
||||
|
||||
# Set default values based on selected parameters
|
||||
v "$(make defconfig 2>&1)"
|
||||
|
||||
# Temporary fixup for juci/luci profile
|
||||
if [ "$PROFILE" == "luci" ]; then
|
||||
sed -i '/CONFIG_DEFAULT_juci/d' .config
|
||||
sed -i '/CONFIG_PACKAGE_juci/d' .config
|
||||
sed -i '/CONFIG_PACKAGE_uhttpd/d' .config
|
||||
fi
|
||||
|
||||
if [ $masterconfig -eq 1 ]; then
|
||||
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
|
||||
fi
|
||||
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
|
||||
|
||||
# Clean base-file package to force rebuild when changing profile
|
||||
v "$(make package/base-files/clean 2>&1)"
|
||||
@@ -369,6 +361,7 @@ function genconfig {
|
||||
-h|--help) usage;;
|
||||
-l|--list) list_customers 0 $2;;
|
||||
-a|--list-all)list_customers 1;;
|
||||
-b|--boards)set_target LIST;exit 0;;
|
||||
-*)
|
||||
echo "Invalid option: $1 "
|
||||
echo "Try -h or --help for more information."
|
||||
@@ -382,7 +375,7 @@ function genconfig {
|
||||
CUSTREPO="${CUSTREPO:-git@private.inteno.se:customerconfigs}"
|
||||
|
||||
setup_dirs
|
||||
create_and_copy_files "$1" "$2"
|
||||
create_and_copy_files "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ build_bcmkernel_consumer() {
|
||||
tarfile='out/bcm963xx_*_consumer.tar.gz'
|
||||
[ $(ls -1 $tarfile |wc -l) -ne 1 ] && echo "Too many tar files: '$tarfile'" && return
|
||||
scp -pv $tarfile $SERVER:$FPATH/bcmopen-$board-$bcmkernelcommith.tar.gz
|
||||
ssh $SERVER "[ -f $FPATH/bcmopen-$board-$bcmkernelcommith.tar.gz ] && ln -sf $FPATH/bcmopen-$board-$bcmkernelcommith.tar.gz $FPATH/bcmopen-$board-$majver.$minver.tar.gz"
|
||||
ssh $SERVER "[ -f $FPATH/bcmopen-$board-$bcmkernelcommith.tar.gz ] && ln -sf $FPATH/bcmopen-$board-$bcmkernelcommith.tar.gz $FPATH/bcmopen-$board-$majver.$minver-latest"
|
||||
rm -f $tarfile
|
||||
cd "$curdir"
|
||||
}
|
||||
|
||||
326
iop/scripts/iopupgrade.sh
Normal file
326
iop/scripts/iopupgrade.sh
Normal file
@@ -0,0 +1,326 @@
|
||||
# this is a developer helper script to install firmware on a remote host with SSH
|
||||
|
||||
function upd_usage {
|
||||
echo "usage: $0 iopupgrade -t <host> -f <file> [opts] "
|
||||
echo ""
|
||||
echo " Default host is 192.168.1.1"
|
||||
echo " Default firmware file is the newest one found"
|
||||
echo " Default is to not keep configuration"
|
||||
echo "opts:"
|
||||
echo ""
|
||||
echo " -i Interactive use, Allows to select firmware file"
|
||||
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 " -s Use sysupgade. old upgrade method, needed for old releases that do not have iopu"
|
||||
}
|
||||
|
||||
function set_config_string {
|
||||
eval `grep $1 .config`
|
||||
}
|
||||
|
||||
function upd_ask_ok {
|
||||
echo "Will Continue with the following settings"
|
||||
echo "-----------------------------------------"
|
||||
printf "%20s: %s\n" "Firmare file" "$upd_fw_base"
|
||||
printf "%20s: %s\n" "Host ip" "$upd_host"
|
||||
printf "%20s: " "Reboot"; if [ "$upd_noreboot" == "0" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
printf "%20s: " "Keep config"; if [ "$upd_keepconf" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
printf "%20s: " "Force bootloader"; if [ "$upd_forceboot" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
printf "%20s: " "Force image upgrade"; if [ "$upd_forceimage" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
printf "%20s: " "Use sysupgrade"; if [ "$upd_sysupgrade" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi
|
||||
echo "-----------------------------------------"
|
||||
|
||||
if [ "$upd_sysupgrade" == "0" ]
|
||||
then
|
||||
if [ "$upd_keepconf" == "1" ] ;then echo "keeping config is just a fantasy it's not yet implemented, try sysupgrade";fi
|
||||
fi
|
||||
|
||||
echo -n "Continue? [Y/n/q]:"
|
||||
read answer
|
||||
|
||||
case $answer in
|
||||
n|N)
|
||||
return 1;;
|
||||
q|Q)
|
||||
exit 1;;
|
||||
y|Y|*)
|
||||
return 0;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_file {
|
||||
|
||||
dialog --keep-tite --title "To select file use TAB/ARROW to hilight then press SPACEBAR -> RETURN" \
|
||||
--fselect "bin/targets/$CONFIG_TARGET_BOARD/generic/" \
|
||||
$((lines -10)) $((cols -5)) \
|
||||
2> $tempfile
|
||||
|
||||
new_file=$(cat $tempfile)
|
||||
if [ -n "$new_file" ]
|
||||
then
|
||||
upd_fw="$new_file"
|
||||
upd_fw_base=$(basename $upd_fw);
|
||||
fi
|
||||
}
|
||||
|
||||
function upd_select_target {
|
||||
|
||||
dialog --keep-tite --title "Input the name/ip number of target board" \
|
||||
--inputbox "Name/IP" \
|
||||
$((lines -10)) $((cols -5)) \
|
||||
"$upd_host" \
|
||||
2> $tempfile
|
||||
|
||||
new_file=$(cat $tempfile)
|
||||
if [ -n "$new_file" ]
|
||||
then
|
||||
upd_host="$new_file"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function upd_select_reboot {
|
||||
dialog --keep-tite --radiolist "Should the board reboot after download finished" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Reboot" "Restart board after done" `if [ "$upd_noreboot" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"No reboot" "Continue running old system" `if [ "$upd_noreboot" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"No reboot")
|
||||
upd_noreboot=1
|
||||
;;
|
||||
"Reboot")
|
||||
upd_noreboot=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_config {
|
||||
dialog --keep-tite --radiolist "Should the configuration be keept" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Keep" "Keep the config from old system" `if [ "$upd_keepconf" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"Default" "Use default config for new system" `if [ "$upd_keepconf" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"Keep")
|
||||
upd_keepconf=1
|
||||
;;
|
||||
"Default")
|
||||
upd_keepconf=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_forceboot {
|
||||
dialog --keep-tite --radiolist "Should the boot loader be updated reagardless of version installed" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Force" "Alwasy update boot loader" `if [ "$upd_forceboot" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"Version check" "Only upgrade if version is newer" `if [ "$upd_forceboot" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"Force")
|
||||
upd_forceboot=1
|
||||
;;
|
||||
"Version check")
|
||||
upd_forceboot=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_forceimage {
|
||||
dialog --keep-tite --radiolist "Should the image be stored in flash even if sanity checks would reject it" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Force" "Dissable sanity check and force use of image (dangerous)" `if [ "$upd_forceimage" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"Only compatible" "Normal checks apply" `if [ "$upd_forceimage" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"Force")
|
||||
upd_forceimage=1
|
||||
;;
|
||||
"Only compatible")
|
||||
upd_forceimage=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select_sysupgrade {
|
||||
dialog --keep-tite --radiolist "Use the old way to upgrade a board" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"iopu" "Use the iop upgrade methode" `if [ "$upd_sysupgrade" == "0" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
"sysupgrade" "Use the old sysupgrade methode" `if [ "$upd_sysupgrade" == "1" ] ;then echo "ON" ;else echo "OFF";fi` \
|
||||
2> $tempfile
|
||||
|
||||
res=$(cat $tempfile)
|
||||
case $res in
|
||||
"iopu")
|
||||
upd_sysupgrade=0
|
||||
;;
|
||||
"sysupgrade")
|
||||
upd_sysupgrade=1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function upd_select {
|
||||
|
||||
dialog --keep-tite --ok-label "Select" --cancel-label "Done" --menu "Select Item to change" \
|
||||
$((lines -5)) $((cols -5)) $((lines -5 -5)) \
|
||||
"Firmare file" "$upd_fw_base"\
|
||||
"Host ip" "$upd_host" \
|
||||
"Reboot" `if [ "$upd_noreboot" == "0" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
"Keep config" `if [ "$upd_keepconf" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
"Force bootloader" `if [ "$upd_forceboot" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
"Force image upgrade" `if [ "$upd_forceimage" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
"sysupgrade" `if [ "$upd_sysupgrade" == "1" ] ;then printf "Yes\n" ;else printf "No\n";fi` \
|
||||
2> $tempfile
|
||||
|
||||
|
||||
case $(cat $tempfile) in
|
||||
"Firmare file")
|
||||
upd_select_file
|
||||
;;
|
||||
"Host ip")
|
||||
upd_select_target
|
||||
;;
|
||||
"Reboot")
|
||||
upd_select_reboot
|
||||
;;
|
||||
"Keep config")
|
||||
upd_select_config
|
||||
;;
|
||||
"Force bootloader")
|
||||
upd_select_forceboot
|
||||
;;
|
||||
"Force image upgrade")
|
||||
upd_select_forceimage
|
||||
;;
|
||||
"sysupgrade")
|
||||
upd_select_sysupgrade
|
||||
;;
|
||||
*)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
upd_select
|
||||
}
|
||||
function upd_select_start {
|
||||
lines=$(tput lines)
|
||||
cols=$(tput cols)
|
||||
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
|
||||
trap "rm -f $tempfile" 0 1 2 5 15
|
||||
upd_select
|
||||
|
||||
}
|
||||
|
||||
function ssh_upgrade {
|
||||
upd_noreboot=0
|
||||
upd_forceboot=0
|
||||
upd_keepconf=0
|
||||
upd_forceimage=0
|
||||
upd_fw_base=""
|
||||
upd_fw=""
|
||||
upd_host="192.168.1.1"
|
||||
upd_sysupgrade=0
|
||||
do_dialog=0
|
||||
|
||||
while getopts "f:hnxt:iscb" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
upd_noreboot=1
|
||||
;;
|
||||
x)
|
||||
upd_forceimage=1
|
||||
;;
|
||||
b)
|
||||
upd_forceboot=1
|
||||
;;
|
||||
c)
|
||||
upd_keepconf=1
|
||||
;;
|
||||
v)
|
||||
verbose=$OPTARG
|
||||
;;
|
||||
f)
|
||||
upd_fw=$OPTARG
|
||||
;;
|
||||
t)
|
||||
upd_host=$OPTARG
|
||||
;;
|
||||
i)
|
||||
do_dialog=1
|
||||
;;
|
||||
s)
|
||||
upd_sysupgrade=1
|
||||
;;
|
||||
h)
|
||||
upd_usage
|
||||
exit 1
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$upd_fw" ]
|
||||
then
|
||||
upd_fw_base=$(basename $upd_fw);
|
||||
else
|
||||
set_config_string CONFIG_TARGET_BOARD
|
||||
firmwares=$(cd bin/targets/$CONFIG_TARGET_BOARD/generic/; ls -t *[0-9].y[3])
|
||||
|
||||
for upd_fw_base in $firmwares
|
||||
do
|
||||
#echo "firmware $upd_fw"
|
||||
break
|
||||
done
|
||||
upd_fw="bin/targets/$CONFIG_TARGET_BOARD/generic/$upd_fw_base"
|
||||
fi
|
||||
|
||||
[ $do_dialog -eq 1 ] && upd_select_start
|
||||
|
||||
if ! upd_ask_ok
|
||||
then
|
||||
upd_select_start
|
||||
if ! upd_ask_ok
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f $upd_fw ]
|
||||
then
|
||||
echo "firmware file $firmware do not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $upd_sysupgrade -eq 0 ]
|
||||
then
|
||||
extra_args=""
|
||||
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args -n"
|
||||
[ $upd_forceimage -eq 1 ] && extra_args="$extra_args -x"
|
||||
[ $upd_forceboot -eq 1 ] && extra_args="$extra_args -b"
|
||||
|
||||
file_size_kb=`du -k "$upd_fw" | cut -f1`
|
||||
cat $upd_fw | pv -s ${file_size_kb}k | ssh root@$upd_host "iopu $extra_args"
|
||||
else
|
||||
scp $upd_fw root@$upd_host:/tmp/ &&
|
||||
ssh -o ConnectTimeout=60 root@$upd_host "sysupgrade -v $3 /tmp/$upd_fw_base" &&
|
||||
echo "sysupgrade done!"
|
||||
fi
|
||||
}
|
||||
|
||||
register_command "ssh_upgrade" "-h <host> -f <file> [opts] Install firmware on remote host with SSH"
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
# this is a developer helper script to install firmware on a remote host with SSH
|
||||
|
||||
function usage {
|
||||
echo "usage: $0 ssh_sysupgrade <host> <file> [opts]"
|
||||
}
|
||||
|
||||
function ssh_sysupgrade {
|
||||
if [ -z "$1" ] ; then
|
||||
usage
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
usage
|
||||
echo "Error: firmware filename required"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -e $2 ] ; then
|
||||
usage
|
||||
echo "Error: firmware file does not exist"
|
||||
exit 1
|
||||
fi
|
||||
IMAGE=`basename $2`
|
||||
echo "sysupgrade host: $1 with file $IMAGE"
|
||||
[ "$2" ] && [ -e "$2" ] && scp $2 root@$1:/tmp/ && ssh -o ConnectTimeout=60 root@$1 "sysupgrade -v $3 /tmp/$IMAGE" && echo "sysupgrade done!"
|
||||
}
|
||||
|
||||
register_command "ssh_sysupgrade" "<host> <file> [opts] Install firmware on remote host with SSH"
|
||||
|
||||
function ssh_sysupgrade_latest {
|
||||
if [ -z "$1" ] ; then
|
||||
echo "usage: $0 ssh_sysupgrade_latest <host> [opts]"
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
{ cd `dirname $0`
|
||||
IMAGE=`ls -Art bin/*/*/*/*.y[23] | tail -n1`
|
||||
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
|
||||
}
|
||||
}
|
||||
|
||||
register_command "ssh_sysupgrade_latest" "<host> [opts] Install latest ubifs firmware on remote host with SSH"
|
||||
|
||||
function ssh_sysupgrade_latest_w {
|
||||
if [ -z "$1" ] ; then
|
||||
echo "usage: $0 ssh_sysupgrade_latest_w <host> [opts]"
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
{ cd `dirname $0`
|
||||
IMAGE=`ls -Art bin/*/*.w | tail -n1`
|
||||
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
|
||||
}
|
||||
}
|
||||
|
||||
register_command "ssh_sysupgrade_latest_w" "<host> [opts] Install latest jffs2 firmware on remote host with SSH"
|
||||
@@ -36,13 +36,13 @@ function update_feed_branches {
|
||||
echo "Updating release branch $release to specific commit hash given in feeds.conf for each feed repo"
|
||||
fi
|
||||
|
||||
ifeeds="$(grep -r feed_inteno feeds.conf | awk '{print$2}' | cut -d'_' -f3 | tr '\n' ' ')"
|
||||
ifeeds="$(grep -r 'dev.iopsys.eu' feeds.conf | awk '{print$2}' | tr '\n' ' ')"
|
||||
|
||||
for f in $ifeeds; do
|
||||
commith=$(grep feed_inteno_$f feeds.conf | cut -d'^' -f2)
|
||||
cd $ipath/feeds/feed_inteno_$f
|
||||
commith=$(grep $f feeds.conf | cut -d'^' -f2)
|
||||
cd $ipath/feeds/$f
|
||||
git branch -D $release 2>/dev/null
|
||||
echo "feed_inteno_$f: updating release branch $release to commit $commith"
|
||||
echo "$f: updating release branch $release to commit $commith"
|
||||
git checkout $commith
|
||||
git push origin :$release
|
||||
git checkout -b $release
|
||||
|
||||
@@ -496,6 +496,7 @@ check_feeds()
|
||||
for feed in `echo $feeds`
|
||||
do
|
||||
feed_hash=$(feeds_hash $feed)
|
||||
[ -n "$feed_hash" ] || continue
|
||||
if [ -d feeds/$feed ]; then
|
||||
in_git=$(cd feeds/$feed; git rev-parse HEAD)
|
||||
|
||||
|
||||
55
iopupgrade/Makefile
Normal file
55
iopupgrade/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# 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:=iopupgrade
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=9b5ed4bc9f7ac5064414cf5feb510ffd95df6ec4
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/iopupgrade
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
# support parallel build
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
#re create configure scripts if not present.
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
|
||||
# this way we don't need to pick out the resulting files from the build dir.
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/iopupgrade
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Iopsys system upgrade utility
|
||||
URL:=
|
||||
# DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/iopupgrade/description
|
||||
Application handling peripheral
|
||||
endef
|
||||
|
||||
define Package/iopupgrade/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/etc/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iopupgrade $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,iopupgrade))
|
||||
|
||||
277
iopupgrade/files/sbin/iopu
Executable file
277
iopupgrade/files/sbin/iopu
Executable file
@@ -0,0 +1,277 @@
|
||||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
# Global variables. can be used directly in any function called.
|
||||
cur_vol="" # num,[0/1] Number used for ubifs root filesystem volume name.
|
||||
# eg: rootfs_0 or rootfs_1, currently used
|
||||
upd_vol="" # num,[0/1] Number used for ubifs root filesystem volume name.
|
||||
# eg: rootfs_0 or rootfs_1, the one we want to update
|
||||
cmdline="" # command line settings.
|
||||
|
||||
###############################################################################
|
||||
# file local variables. should not be used in imported functions. Can be used
|
||||
# by functions declared in this script
|
||||
chroot_cmdline="" # command line for the iop_chroot command.
|
||||
board="" # string, Board name that is going to be matched
|
||||
# against header of firmware image
|
||||
upd_ubi_id="" # num, UBI volume number for the volume name
|
||||
# "rootfs_$upd_vol", use to know what volume to run
|
||||
# ubiupdatevol on.
|
||||
run_cleanup=0 # if set the cleanup should be run otherwise we skip it.
|
||||
run_mount_cleanup=0 # set if we should run umount in cleanup
|
||||
upd_kernel=0 # set to 1 if system has the kernel in own mtd partition
|
||||
upd_cfe=0 # set to 1 if system is using cfe as bootloader.
|
||||
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
|
||||
###############################################################################
|
||||
# import external functions
|
||||
source /lib/upgrade/iopsys.sh
|
||||
[ -f /lib/upgrade/iopupgrade ] && source /lib/upgrade/iopupgrade
|
||||
|
||||
# only call function if it exists
|
||||
function_call() {
|
||||
if type "$1" 2>/dev/null >/dev/null
|
||||
then
|
||||
$1 $@
|
||||
fi
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Cleanup and error handling functions.
|
||||
function log {
|
||||
TIME=$(date)
|
||||
[ $log_stdout -eq 1 ] && echo "$@"
|
||||
echo "[$TIME] $@" >>/tmp/upd_log
|
||||
}
|
||||
|
||||
# we need to handle ctrl-c, segmentation fault, sigpipe and other abnormal
|
||||
# terminations. no printing to stdout/stderr allowed in this function or
|
||||
# anyhting it calls as stdout/stderr might no longer exist
|
||||
function finish {
|
||||
|
||||
if [ "$run_cleanup" == "1" ]
|
||||
then
|
||||
|
||||
function_call upd_cleanup
|
||||
log ""
|
||||
fi
|
||||
|
||||
if [ "$run_mount_cleanup" == "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
|
||||
|
||||
lock -u /tmp/iopu.lock
|
||||
}
|
||||
|
||||
function sig_pipe {
|
||||
log_stdout=0 # stdin,stdout,stderr do not exist anymore
|
||||
log "Got sigpipe. Turning of log printing to stdout"
|
||||
}
|
||||
|
||||
# if a timout happens terminate
|
||||
function timeout {
|
||||
finish
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Not much that can be done if the mount fails but to try again.
|
||||
# if after 10 seconds there still is errors abort program.
|
||||
# UBIFS has some wierd time intervall after ubiupdatevol where
|
||||
# a mount of the newly written data results in a busy error.
|
||||
function mount_retry {
|
||||
local tries=0
|
||||
|
||||
while [ $tries -lt 10 ]
|
||||
do
|
||||
if mount $@ 2>/dev/null
|
||||
then
|
||||
return
|
||||
fi
|
||||
tries=$((tries + 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
log "mount failed for command [mount $@] so upgrade failed."
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
function mount_newroot {
|
||||
run_mount_cleanup=1
|
||||
mkdir -p /tmp/newroot
|
||||
mkdir -p /tmp/newroot_overlay
|
||||
|
||||
mount_retry -t ubifs ubi0:rootfs_$upd_vol /tmp/newroot
|
||||
|
||||
mount_retry -o noatime,lowerdir=/tmp/newroot,upperdir=/tmp/newroot/overlay,workdir=/tmp/newroot/lib/overlay.tmp -t overlay "overlayfs:/tmp/newroot/overlay" /tmp/newroot_overlay
|
||||
mount_retry --bind /tmp/newroot/ /tmp/newroot_overlay/rom
|
||||
|
||||
mount_retry --bind /dev /tmp/newroot_overlay/dev
|
||||
mount_retry --bind /proc /tmp/newroot_overlay/proc
|
||||
mount_retry --bind /sys /tmp/newroot_overlay/sys
|
||||
mount_retry -t tmpfs -o noatime,mode=0755 root /tmp/newroot_overlay/tmp
|
||||
|
||||
mkdir -p /tmp/newroot_overlay/tmp/oldroot
|
||||
mount_retry --bind / /tmp/newroot_overlay/tmp/oldroot
|
||||
mount_retry --bind /tmp /tmp/newroot_overlay/tmp/oldroot/tmp
|
||||
}
|
||||
|
||||
function umount_newroot {
|
||||
umount /tmp/newroot_overlay/tmp/oldroot/tmp
|
||||
umount /tmp/newroot_overlay/tmp/oldroot
|
||||
umount /tmp/newroot_overlay/tmp
|
||||
umount /tmp/newroot_overlay/sys
|
||||
umount /tmp/newroot_overlay/proc
|
||||
umount /tmp/newroot_overlay/dev
|
||||
umount /tmp/newroot_overlay/rom
|
||||
umount /tmp/newroot_overlay
|
||||
umount /tmp/newroot
|
||||
run_mount_cleanup=0
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $0 iopu [opts] "
|
||||
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"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
# just one instance
|
||||
# this check has to be done before we install handler to avoid removing the
|
||||
# lock even if it was not available.
|
||||
if ! lock -n /tmp/iopu.lock
|
||||
then
|
||||
echo "Another instance of iopu already running"
|
||||
echo "If you are sure this is wrong remove file /tmp/iopu.lock"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap finish EXIT
|
||||
trap timeout SIGALRM
|
||||
trap sig_pipe SIGPIPE
|
||||
|
||||
while getopts "nrxb" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
upd_noreboot=1
|
||||
;;
|
||||
x)
|
||||
upd_forceimage=1
|
||||
;;
|
||||
b)
|
||||
upd_forceboot=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
|
||||
;;
|
||||
h)
|
||||
upd_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
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
|
||||
)&
|
||||
TIMEOUT_PID=$!
|
||||
|
||||
log "Firmware upgrade started"
|
||||
|
||||
# Should board name be checked
|
||||
if [ $upd_forceimage -eq 0 ]
|
||||
then
|
||||
board=$(db get hw.board.iopVerBoard)
|
||||
cmdline="$cmdline -b $board"
|
||||
else
|
||||
cmdline="$cmdline -q"
|
||||
fi
|
||||
|
||||
# find out what rootfs volume is active.
|
||||
cur_vol=$(get_flashbank_current)
|
||||
upd_vol=$(get_flashbank_next)
|
||||
|
||||
# convert volume name "rootfs_$upd_vol" into ubifs 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"
|
||||
|
||||
# prepare to update CFE if it exists
|
||||
function_call upd_conf_cfe
|
||||
|
||||
# prepare to update kernel if it is stored in MTD/JFFS2
|
||||
function_call upd_conf_kernel
|
||||
|
||||
log "now starting writing data to flash with [ iopupgrade $cmdline -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 -u ubi0_$upd_ubi_id
|
||||
|
||||
# in case of any error we abort
|
||||
if [ $? -ne 0 ]; 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"
|
||||
|
||||
mount_newroot
|
||||
chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline
|
||||
umount_newroot
|
||||
|
||||
log "Update fully installed."
|
||||
run_cleanup=0
|
||||
|
||||
# Now make sure that we actually boot the new system on the next reboot
|
||||
upd_finnish
|
||||
|
||||
# spawn the reboot to a subshell to allow the main program to quit before reset
|
||||
# to avoid any hanged network connection like ssh
|
||||
if [ $upd_noreboot -eq 0 ]
|
||||
then
|
||||
(
|
||||
log_stdout=0 # stdin,stdout,stderr do not exist anymore, we are in a
|
||||
# subshell and then the trap is no longer working.
|
||||
sleep 1
|
||||
log "Rebooting NOW!!!"
|
||||
log ""
|
||||
reboot
|
||||
)&
|
||||
log "Reboot initiated"
|
||||
else
|
||||
log "Skipping reboot"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
61
iopupgrade/files/sbin/iopu_chroot
Executable file
61
iopupgrade/files/sbin/iopu_chroot
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This program is intended to be run in a chroot environment where the old system
|
||||
# is mounted in /tmp/oldroot
|
||||
#
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Global variables. can be used directly in any function called.
|
||||
|
||||
|
||||
###############################################################################
|
||||
# file local variables. should not be used in imported functions. Can be used
|
||||
# by functions declared in this script
|
||||
upd_forceboot=0
|
||||
log_stdout=1 # set to 0 to prevent the log to also print to stdout
|
||||
|
||||
###############################################################################
|
||||
# import external functions
|
||||
|
||||
source /lib/upgrade/iopsys.sh
|
||||
[ -f /lib/upgrade/iopupgrade ] && source /lib/upgrade/iopupgrade
|
||||
|
||||
|
||||
# only call function if it exists
|
||||
function_call() {
|
||||
if type "$1" 2>/dev/null >/dev/null
|
||||
then
|
||||
$1 $@
|
||||
fi
|
||||
}
|
||||
# Cleanup and error handling functions.
|
||||
function 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
|
||||
done
|
||||
|
||||
# copy old install log over
|
||||
cp /tmp/oldroot/tmp/upd_log /root/upd_log
|
||||
|
||||
# Upgrade boot loader if needed.
|
||||
function_call upd_program_boot
|
||||
|
||||
18
iopupgrade/files/sbin/iopu_chroot_env
Executable file
18
iopupgrade/files/sbin/iopu_chroot_env
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# this is run when "iopr -r" is executed.
|
||||
# intended to just show what environment is actually started.
|
||||
|
||||
cat /etc/banner
|
||||
|
||||
echo "/tmp/oldroot:"
|
||||
echo " Contains the running root filesystem. It is live so files are in use"
|
||||
echo " Anything copying/reading files from there needs to make sure it is done safely."
|
||||
echo ""
|
||||
|
||||
Color_Off='\033[0m' # Text Reset
|
||||
Red='\033[0;31m' # Red
|
||||
|
||||
PS1="${Red}chroot_new${Color_Off}:\w\#"
|
||||
export PS1
|
||||
export Red
|
||||
export Color_Off
|
||||
@@ -281,7 +281,7 @@ change_to_vlan() {
|
||||
v "option 132: committed update to file network"
|
||||
|
||||
# reload configuration files.
|
||||
/etc/init.d/layer2_interface_vlan reload
|
||||
ubus call network reload
|
||||
v "option 132: reload network config"
|
||||
|
||||
# replace old interface (like eth0.1 with new eth0.101).
|
||||
|
||||
52
libjwt/Makefile
Normal file
52
libjwt/Makefile
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
# Copyright (C) 2018 Iopsys
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libjwt
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=866607c7741421c8ac99876e7201eb32d9af1b92
|
||||
PKG_SOURCE_URL:=https://github.com/benmcollins/libjwt.git
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libjwt
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libopenssl +jansson
|
||||
TITLE:= libjwt
|
||||
endef
|
||||
|
||||
|
||||
#TARGET_CFLAGS += \
|
||||
# -I$(STAGING_DIR)/usr/include
|
||||
# -I$(STAGING_DIR)/usr/include/libnl3
|
||||
|
||||
#MAKE_FLAGS += \
|
||||
# CFLAGS="$(TARGET_CFLAGS)" \
|
||||
# LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
# FPIC="$(FPIC)" \
|
||||
# PLATFORM="$(TARGET_PLATFORM)" \
|
||||
# subdirs="$(subdirs)"
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/include/jwt.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libjwt/.libs/libjwt.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libjwt/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libjwt/.libs/libjwt.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libjwt))
|
||||
37
mqtt-ciotc/Makefile
Normal file
37
mqtt-ciotc/Makefile
Normal file
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# Copyright (C) 2013 Inteno
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mqtt-ciotc
|
||||
PKG_VERSION:=0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=00da3fb1f1691d836037dc4d93e38d0835ba46a4
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifilife-testbed.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)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/mqtt-ciotc
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libjwt +lib-paho-mqtt +libopenssl +libubox +ubus +libblobmsg-json
|
||||
TITLE:=mqtt google iot clinet
|
||||
endef
|
||||
|
||||
define Package/mqtt-ciotc/description
|
||||
mqtt google iot client
|
||||
endef
|
||||
|
||||
define Package/mqtt-ciotc/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mqtt_ciotc $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mqtt-ciotc))
|
||||
3
mqtt-ciotc/files/etc/config/mqtt_ciotc
Normal file
3
mqtt-ciotc/files/etc/config/mqtt_ciotc
Normal file
@@ -0,0 +1,3 @@
|
||||
config certs 'certs'
|
||||
option private '/etc/mqtt-ciotc/rsa_private.pem'
|
||||
option root '/etc/mqtt-ciotc/roots.pem'
|
||||
35
mqtt-ciotc/files/etc/init.d/mqtt_ciotc
Executable file
35
mqtt-ciotc/files/etc/init.d/mqtt_ciotc
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=96
|
||||
STOP=10
|
||||
PROG=/sbin/mqtt_ciotc
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
config_load mqtt_ciotc
|
||||
config_get private certs private
|
||||
config_get root certs root
|
||||
|
||||
[ -n $private ] && procd_append_param command --private-cert $private
|
||||
[ -n $root ] && procd_append_param command --root-cert $root
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service()
|
||||
{
|
||||
service_stop ${PROG}
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
# procd_send_signal wifilife # use SIGHUP
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "mqtt_ciotc"
|
||||
}
|
||||
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=netmode
|
||||
PKG_VERSION:=0.2.0
|
||||
|
||||
PKG_SOURCE_VERSION:=fbd7dcfab03df19b3c32675940e0aee708c7cf75
|
||||
PKG_SOURCE_VERSION:=9fa23664b3bdd963e4556f5921c9f9be1c9c578f
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/netmoded
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ config wifi-device 'wl0'
|
||||
option bandwidth '80'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option scantimer '60'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
@@ -60,7 +60,7 @@ config wifi-device 'wl1'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option scantimer '60'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
|
||||
@@ -16,6 +16,7 @@ config interface 'wan'
|
||||
option hostname 'iopsys-$MAC'
|
||||
option reqopts '66 67 128 224'
|
||||
option igmp_snooping '0'
|
||||
option macaddr '$MACWAN'
|
||||
|
||||
config device 'wan_dev'
|
||||
option name 'eth0.2'
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#if wet in wireless config and SSID nad KEY was saved for it, apply to config
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
parse_wet_json()
|
||||
{
|
||||
local interface=$1
|
||||
local mode key encryption ssid connect_bssid
|
||||
|
||||
config_get mode $interface mode
|
||||
[ "$mode" = "wet" ] || return
|
||||
|
||||
json_load "$(cat /tmp/netmodecfg)" 2> /dev/null
|
||||
json_get_var ssid ssid
|
||||
json_get_var key key
|
||||
json_get_var encryption encryption
|
||||
json_get_var connect_bssid connect_bssid
|
||||
|
||||
uci -q set wireless.$1.key="$key"
|
||||
uci -q set wireless.$1.encryption="$encryption"
|
||||
uci -q set wireless.$1.ssid="$ssid"
|
||||
uci -q set wireless.$1.connect_bssid="$connect_bssid"
|
||||
uci commit wireless
|
||||
}
|
||||
|
||||
apply_wet_cfg()
|
||||
{
|
||||
[ -f /tmp/netmodecfg ] || return
|
||||
|
||||
config_load wireless
|
||||
config_foreach parse_wet_json "wifi-iface"
|
||||
|
||||
rm /tmp/netmodecfg 2> /dev/null
|
||||
}
|
||||
|
||||
apply_wet_cfg
|
||||
@@ -0,0 +1,38 @@
|
||||
#if mode wet in wireless config has SSID Key, save them
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
parse_wet_cfg()
|
||||
{
|
||||
local interface=$1
|
||||
local mode key encryption ssid connect_bssid
|
||||
|
||||
config_get mode $interface mode
|
||||
[ "$mode" = "wet" ] || return
|
||||
|
||||
config_get ssid $interface ssid
|
||||
config_get key $interface key
|
||||
config_get encryption $interface encryption
|
||||
config_get connect_bssid $interface connect_bssid
|
||||
|
||||
[ -n "$key" ] || return
|
||||
[ -n "$encryption" ] || return
|
||||
|
||||
json_init
|
||||
json_add_string "ssid" "$ssid"
|
||||
json_add_string "key" "$key"
|
||||
json_add_string "encryption" "$encryption"
|
||||
json_add_string "connect_bssid" "$connect_bssid"
|
||||
|
||||
echo "`json_dump`" > /tmp/netmodecfg
|
||||
}
|
||||
|
||||
save_wet_cfg()
|
||||
{
|
||||
config_load wireless
|
||||
config_foreach parse_wet_cfg "wifi-iface"
|
||||
}
|
||||
|
||||
save_wet_cfg
|
||||
@@ -18,7 +18,7 @@ config wifi-device 'wl0'
|
||||
option bandwidth '80'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option scantimer '60'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
@@ -60,7 +60,7 @@ config wifi-device 'wl1'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option scantimer '60'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
|
||||
@@ -18,6 +18,7 @@ config wifi-device ra0
|
||||
option hwmode auto
|
||||
option htmode HT20
|
||||
option country 'DE'
|
||||
option scantimer '60'
|
||||
|
||||
config wifi-iface
|
||||
option device ra0
|
||||
@@ -37,6 +38,7 @@ config wifi-device rai0
|
||||
option htmode VHT80
|
||||
option country 'DE'
|
||||
option beamforming 1
|
||||
option scantimer '60'
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
|
||||
@@ -104,9 +104,13 @@ correct_uplink() {
|
||||
|
||||
if [ "$link" == "up" ]; then
|
||||
ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":true}"
|
||||
ifconfig $WETIF down
|
||||
echo ethernet > /tmp/netmodes/uplink_type
|
||||
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":false}"
|
||||
else
|
||||
ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":false}"
|
||||
ifconfig $WETIF up
|
||||
echo wireless > /tmp/netmodes/uplink_type
|
||||
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":true}"
|
||||
ubus call led.internet set '{"state" : "notice"}'
|
||||
fi
|
||||
@@ -176,6 +180,7 @@ switch_netmode() {
|
||||
run_netmode_scripts $curmode "pre"
|
||||
|
||||
logger -s -p user.info -t $0 "[netmode] Copying /etc/netmodes/$curmode in /etc/config" >/dev/console
|
||||
|
||||
for file in $(ls /etc/netmodes/$curmode/); do
|
||||
case "$file" in
|
||||
DETAILS|scripts) continue ;;
|
||||
@@ -184,6 +189,9 @@ switch_netmode() {
|
||||
done
|
||||
sync
|
||||
|
||||
#commit owsd to reload all init.d scripts dependent on its config
|
||||
ubus call uci commit '{"config":"owsd"}'
|
||||
|
||||
local reboot=$(uci -q get netmode.$curmode.reboot)
|
||||
|
||||
if [ "$reboot" != "0" ]; then
|
||||
@@ -199,6 +207,7 @@ switch_netmode() {
|
||||
logger -s -p user.info -t $0 "Switching to $curmode mode" > /dev/console
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
[ -f /etc/init.d/omcproxy ] && /etc/init.d/omcproxy stop
|
||||
[ -f /etc/init.d/igmpproxy ] && /etc/init.d/igmpproxy stop
|
||||
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
|
||||
ubus call network reload
|
||||
wifi reload nodat
|
||||
@@ -377,7 +386,10 @@ populate_netmodes() {
|
||||
if json_select acl; then
|
||||
_i=1
|
||||
while json_get_var user $_i; do
|
||||
uci del_list netmode.$mode._access_r="$user"
|
||||
uci del_list netmode.$mode._access_w="$user"
|
||||
uci add_list netmode.$mode._access_r="$user"
|
||||
uci add_list netmode.$mode._access_w="$user"
|
||||
_i=$((_i+1))
|
||||
done
|
||||
json_select ..
|
||||
|
||||
@@ -205,19 +205,21 @@ internet_test() {
|
||||
fi
|
||||
}
|
||||
|
||||
iptvtest() {
|
||||
ubus list led.ext >/dev/null 2>&1 && TVCON=1 || return
|
||||
|
||||
iptv_test() {
|
||||
local dest="$(uci -q get system.@system[0].tvping_addr)"
|
||||
|
||||
[ -n "$dest" ] || return
|
||||
|
||||
ubus list led.ext >/dev/null 2>&1 || return
|
||||
|
||||
test_connection $dest
|
||||
|
||||
if [ "$?" -eq 0 ]; then
|
||||
TVCON=1
|
||||
[ -n "$dest" ] && ubus call led.ext set '{"state" : "ok"}'
|
||||
ubus call led.ext set '{"state" : "ok"}'
|
||||
else
|
||||
TVCON=0
|
||||
[ -n "$dest" ] && ubus call led.ext set '{"state" : "off"}'
|
||||
ubus call led.ext set '{"state" : "off"}'
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -250,6 +252,8 @@ connectivity_test() {
|
||||
[ "$CURSTATUS" == "$LASTSTATUS" ] || ubus send internet '{"status" : "offline"}'
|
||||
LASTSTATUS=0
|
||||
fi
|
||||
|
||||
iptv_test
|
||||
}
|
||||
|
||||
if [ "$1" == "once" ]; then
|
||||
|
||||
@@ -10,7 +10,7 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/owsd.git
|
||||
PKG_SOURCE_VERSION:=aed9de16f49d94bd5abf10a3038fd9a1712cec19
|
||||
PKG_SOURCE_VERSION:=f0eedeb6fd061edf3784d6bf86fa60b176bf3fe7
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_MAINTAINER:=Sartura Support for Inteno <support-inteno@sartura.hr>
|
||||
|
||||
@@ -308,10 +308,10 @@ start_service() {
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service()
|
||||
{
|
||||
service_stop ${PROG}
|
||||
}
|
||||
#stop_service()
|
||||
#{
|
||||
# service_stop ${PROG}
|
||||
#}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
|
||||
43
paho-mqtt-c/Makefile
Normal file
43
paho-mqtt-c/Makefile
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# Copyright (C) 2013 Inteno
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=lib-paho-mqtt
|
||||
PKG_VERSION:=0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=9f715d0862a8e16099b5837c4e53a1bf6a6a0675
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/eclipse/paho.mqtt.c.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)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/lib-paho-mqtt
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libopenssl
|
||||
TITLE:=package for mqtt stuff
|
||||
endef
|
||||
|
||||
|
||||
define Package/lib-paho-mqtt/description
|
||||
a library
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/*.h $(1)/usr/include/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/output/*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/lib-paho-mqtt/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build/output/*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,lib-paho-mqtt))
|
||||
@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=fe43108d986a02d3a14f079d58bfa666c1089471
|
||||
PKG_SOURCE_VERSION:=02903ce5b594420331f80c6973fa3635921d7080
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/peripheral-manager
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=3.1.40
|
||||
|
||||
PKG_SOURCE_VERSION:=48da42f05c4b8c9d0d5a656932ba77d37bb2e573
|
||||
PKG_SOURCE_VERSION:=9edeefb6942c1a806a82274d124d8889bfb4f8e7
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ useradd()
|
||||
local password
|
||||
config_get user $1 user
|
||||
config_get password $1 password
|
||||
|
||||
filter="0A;5C 6E"
|
||||
[ "$(hex_filter "$user" "$filter" 1)" = "" ] || return
|
||||
[ "$(hex_filter "$password" "$filter" 1)" = "" ] || return
|
||||
|
||||
if ! $(grep -rq "^$user:" /etc/passwd) ; then
|
||||
echo "adding user $user"
|
||||
adduser $user -s /bin/false -D -H -h /mnt/$user -g "samba,pass=$password" && smbpasswd $user $password
|
||||
@@ -51,6 +56,30 @@ purgepasswd()
|
||||
done
|
||||
}
|
||||
|
||||
hex_filter() {
|
||||
local string=$1
|
||||
local hex_chars=$2
|
||||
local wc_max=$3
|
||||
local wc_tot=0
|
||||
|
||||
if [ -z "$string" -o -z "$hex_chars" -o -z "$wc_max" ]
|
||||
then
|
||||
return;
|
||||
fi
|
||||
|
||||
dump=$(echo "$string" | hexdump -v -e '32/1 "%02X ""\n"')
|
||||
|
||||
IFS=';'
|
||||
for i in $hex_chars;
|
||||
do
|
||||
local wc
|
||||
wc=$(echo "$dump" | grep -o "$i" | wc -w)
|
||||
wc_tot=$((wc_tot+wc))
|
||||
done
|
||||
|
||||
[ $wc_tot -gt $wc_max ] && echo "corrupt"
|
||||
}
|
||||
|
||||
smb_header() {
|
||||
local interface
|
||||
config_get interface $1 interface
|
||||
@@ -80,6 +109,13 @@ smb_header() {
|
||||
config_get description $1 description "Samba on ${hostname:-OpenWrt}"
|
||||
config_get charset $1 charset "UTF-8"
|
||||
|
||||
filter="0A;5C 6E"
|
||||
[ "$(hex_filter "$name" "$filter" 1)" = "" ] || exit
|
||||
[ "$(hex_filter "$workgroup" "$filter" 1)" = "" ] || exit
|
||||
[ "$(hex_filter "$description" "$filter" 1)" = "" ] || exit
|
||||
[ "$(hex_filter "$interfaces" "$filter" 1)" = "" ] || exit
|
||||
[ "$(hex_filter "$charset" "$filter" 1)" = "" ] || exit
|
||||
|
||||
mkdir -p /var/etc
|
||||
sed -e "s#|NAME|#$name#g" \
|
||||
-e "s#|WORKGROUP|#$workgroup#g" \
|
||||
@@ -138,6 +174,15 @@ smb_add_share() {
|
||||
path=$(readlink -f $path)
|
||||
[ "${path:0:4}" == "/mnt" ] || path="/mnt/"
|
||||
|
||||
filter="0A;5C 6E"
|
||||
[ "$(hex_filter "$name" "$filter" 1)" = "" ] || return
|
||||
[ "$(hex_filter "$users" "$filter" 1)" = "" ] || return
|
||||
[ "$(hex_filter "$read_only" "$filter" 1)" = "" ] || return
|
||||
[ "$(hex_filter "$guest_ok" "$filter" 1)" = "" ] || return
|
||||
[ "$(hex_filter "$create_mask" "$filter" 1)" = "" ] || return
|
||||
[ "$(hex_filter "$dir_mask" "$filter" 1)" = "" ] || return
|
||||
[ "$(hex_filter "$browseable" "$filter" 1)" = "" ] || return
|
||||
|
||||
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
|
||||
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
|
||||
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
|
||||
|
||||
@@ -1,72 +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:=syslog-ng
|
||||
PKG_VERSION:=3.0.5
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/$(PKG_VERSION)/source/
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
|
||||
PKG_MD5SUM:=28f0d9ff2243b330e8cd6311ef9b2f12
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_IPV6 \
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/syslog-ng3
|
||||
SECTION:=admin
|
||||
CATEGORY:=Administration
|
||||
DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libwrap +libpthread +librt +zlib +libdbi
|
||||
TITLE:=A powerful syslog daemon
|
||||
URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/
|
||||
endef
|
||||
|
||||
define Package/syslog-ng3/description
|
||||
syslog-ng reads and logs messages to the system console, log
|
||||
files, other machines and/or users as specified by its
|
||||
configuration file.
|
||||
endef
|
||||
|
||||
define Package/syslog-ng3/conffiles
|
||||
/etc/syslog-ng.conf
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure
|
||||
$(Build/Configure/Default)
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
|
||||
--disable-dependency-tracking \
|
||||
--enable-tcp-wrapper \
|
||||
--disable-glibtest \
|
||||
--disable-spoof-source \
|
||||
--disable-sql \
|
||||
--enable-prce \
|
||||
--disable-linux-caps \
|
||||
|
||||
TARGET_CPPFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include/eventlog
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include"
|
||||
|
||||
define Package/syslog-ng3/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/syslog-ng $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,syslog-ng3))
|
||||
@@ -1,37 +0,0 @@
|
||||
@version:3.0
|
||||
|
||||
options {
|
||||
chain_hostnames(no);
|
||||
create_dirs(yes);
|
||||
flush_lines(0);
|
||||
keep_hostname(yes);
|
||||
log_fifo_size(256);
|
||||
log_msg_size(1024);
|
||||
stats_freq(0);
|
||||
flush_lines(0);
|
||||
use_fqdn(no);
|
||||
};
|
||||
|
||||
source src {
|
||||
internal();
|
||||
unix-stream("/dev/log");
|
||||
};
|
||||
|
||||
source net {
|
||||
udp(ip(0.0.0.0) port(514));
|
||||
};
|
||||
|
||||
source kernel {
|
||||
file("/proc/kmsg" program_override("kernel"));
|
||||
};
|
||||
|
||||
destination messages {
|
||||
file("/var/log/messages");
|
||||
};
|
||||
|
||||
log {
|
||||
source(src);
|
||||
source(net);
|
||||
source(kernel);
|
||||
destination(messages);
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
|
||||
START=50
|
||||
|
||||
SERVICE_USE_PID=1
|
||||
|
||||
start() {
|
||||
[ -f /etc/syslog-ng.conf ] || return 1
|
||||
service_start /usr/sbin/syslog-ng
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_stop /usr/sbin/syslog-ng
|
||||
}
|
||||
|
||||
reload() {
|
||||
service_reload /usr/sbin/syslog-ng
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7357,6 +7357,9 @@ dynamic_threads () {
|
||||
esac
|
||||
}
|
||||
|
||||
+GLIB_LIBS="-Wl,-rpath-link=$STAGING_DIR/usr/lib/libiconv-full/lib $GLIB_LIBS"
|
||||
+LIBS="-Wl,-rpath-link=$STAGING_DIR/usr/lib/libiconv-full/lib $LIBS"
|
||||
+
|
||||
case "$ostype" in
|
||||
FreeBSD)
|
||||
GLIB_LIBS="$GLIB_LIBS -lintl"
|
||||
@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
PKG_NAME:=topologyd
|
||||
PKG_VERSION:=0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=7cae7d079eb2d1d990e94274258afe1d36dade19
|
||||
PKG_SOURCE_VERSION:=23b812bb512189487484182ab736e957d54da9f3
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/topologyd.git
|
||||
|
||||
@@ -20,10 +20,13 @@ include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/topologyd
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libubox +ubus +libpthread +libopenssl +libnl-genl +libnl +libuci
|
||||
DEPENDS:=+libubox +ubus +libpthread +libopenssl +libnl-genl +libnl +libuci +libwifi
|
||||
TITLE:=topology daemon
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include
|
||||
|
||||
define Package/topologyd/description
|
||||
gathers topology information and presents it as json structure
|
||||
endef
|
||||
|
||||
@@ -9,16 +9,15 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=u-boot
|
||||
PKG_VERSION:=2016.08
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
ifdef CONFIG_TARGET_intel_mips
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:intel/uboot.git
|
||||
PKG_SOURCE_VERSION:=505b9ebb3d3f620e46f16a9b7b364ecc64256c2f
|
||||
PKG_SOURCE_VERSION:=a6292375108a6d5f200f234f5eef3fe17f427092
|
||||
else
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/uboot.git
|
||||
PKG_SOURCE_VERSION:=a86e52439340d078f8c66a28f01e0575a24bcebd
|
||||
PKG_SOURCE_VERSION:=3ef2ba866a99205496e0ce01935c89a1778d9b85
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -47,23 +46,42 @@ UBOOT_IMG:=uboot.img
|
||||
define uboot/ex400
|
||||
TITLE:=U-Boot for the ex400
|
||||
DEPENDS:=@TARGET_iopsys_ramips
|
||||
PKG_RELEASE:=6
|
||||
endef
|
||||
|
||||
define uboot/sdx810_ap
|
||||
TITLE:=U-Boot for the sdx810_ap
|
||||
DEPENDS:=@TARGET_iopsys_ramips
|
||||
PKG_RELEASE:=6
|
||||
endef
|
||||
|
||||
define uboot/grx500
|
||||
TITLE:=U-Boot for the grx
|
||||
UBOOT_IMG:=u-boot-nand.bin
|
||||
DEPENDS:=@TARGET_intel_mips
|
||||
PKG_RELEASE:=8
|
||||
endef
|
||||
|
||||
define uboot/grx500_speedport_smart3
|
||||
TITLE:=U-Boot for the Speedport Smart3
|
||||
UBOOT_IMG:=u-boot-nand.bin
|
||||
DEPENDS:=@TARGET_intel_mips
|
||||
PKG_RELEASE:=7
|
||||
endef
|
||||
|
||||
define uboot/grx500_norrland
|
||||
TITLE:=U-Boot for Norrland Board
|
||||
UBOOT_IMG:=u-boot-nand.bin
|
||||
DEPENDS:=@TARGET_intel_mips
|
||||
PKG_RELEASE:=8
|
||||
endef
|
||||
|
||||
UBOOTS := \
|
||||
ex400 \
|
||||
sdx810_ap \
|
||||
grx500
|
||||
grx500 \
|
||||
grx500_speedport_smart3 \
|
||||
grx500_norrland
|
||||
|
||||
define Package/uboot/template
|
||||
define Package/uboot-$(1)
|
||||
@@ -85,13 +103,14 @@ ifdef BUILD_VARIANT
|
||||
$(eval $(call uboot/$(BUILD_VARIANT)))
|
||||
UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
|
||||
UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
|
||||
UBOOT_IOPSYS_VERSION:=$(PKG_RELEASE)
|
||||
endif
|
||||
|
||||
define Build/Configure
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
$(UBOOT_CONFIG)_config
|
||||
|
||||
$(SED) "s,CONFIG_INTENO_MAJOR=\"0\",CONFIG_INTENO_MAJOR=\"$(PKG_RELEASE)\"," $(PKG_BUILD_DIR)/.config
|
||||
$(SED) "s,CONFIG_INTENO_MAJOR=\"0\",CONFIG_INTENO_MAJOR=\"$(UBOOT_IOPSYS_VERSION)\"," $(PKG_BUILD_DIR)/.config
|
||||
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
oldconfig
|
||||
|
||||
@@ -40,6 +40,10 @@ uboot_upgrade(){
|
||||
start() {
|
||||
iver=$(fw_printenv -n uboot_inteno_version 2>/dev/null)
|
||||
|
||||
# Fixup improper json string for major and minor key.
|
||||
# this adds the missing "
|
||||
iver=$(echo $iver | sed -e 's/{Major:/{"Major":/' | sed -e 's/,Minor:/,"Minor":/')
|
||||
|
||||
if [ -z "$iver" ]
|
||||
then
|
||||
# if this variable is not set by u-boot the u-boot version is too old.
|
||||
|
||||
80
voice-client/files/etc/asterisk_templates/acl.conf.TEMPLATE
Normal file
80
voice-client/files/etc/asterisk_templates/acl.conf.TEMPLATE
Normal file
@@ -0,0 +1,80 @@
|
||||
;
|
||||
; Named Access Control Lists (ACLs)
|
||||
;
|
||||
; A convenient way to share acl definitions
|
||||
;
|
||||
; This configuration file is read on startup
|
||||
;
|
||||
; CLI Commands
|
||||
; -----------------------------------------------------------
|
||||
; acl show Show all named ACLs configured
|
||||
; acl show <name> Show contents of a particular named ACL
|
||||
; reload acl Reload configuration file
|
||||
;
|
||||
; Any configuration that uses ACLs which has been made to be able to use named
|
||||
; ACLs will specify a named ACL with the 'acl' option in its configuration in
|
||||
; a similar fashion to the usual 'permit' and 'deny' options. Example:
|
||||
; acl=my_named_acl
|
||||
;
|
||||
; Multiple named ACLs can be applied by either comma separating the arguments or
|
||||
; just by adding additional ACL lines. Example:
|
||||
; acl=my_named_acl
|
||||
; acl=my_named_acl2
|
||||
;
|
||||
; or
|
||||
;
|
||||
; acl=my_named_acl,my_named_acl2
|
||||
;
|
||||
; ACLs specified by name are evaluated independently from the ACL specified via
|
||||
; permit/deny. In order for an address to pass a given ACL, it must pass both
|
||||
; the ACL specified by permit/deny for a given item as well as any named ACLs
|
||||
; that were specified.
|
||||
;
|
||||
;[example_named_acl1]
|
||||
;deny=0.0.0.0/0.0.0.0
|
||||
;permit=209.16.236.0
|
||||
;permit=209.16.236.1
|
||||
;
|
||||
;[example_named_acl2]
|
||||
;permit=0.0.0.0/0.0.0.0
|
||||
;deny=10.24.20.171
|
||||
;deny=10.24.20.103
|
||||
;deny=209.16.236.1
|
||||
;
|
||||
; example_named_acl1 above shows an example of whitelisting. When whitelisting, the
|
||||
; named ACLs should follow a deny that blocks everything (like deny=0.0.0.0/0.0.0.0)
|
||||
; The following example explains how combining the ACLs works:
|
||||
; <in another configuration>
|
||||
; [example_item_with_acl]
|
||||
; acl=example_named_acl1
|
||||
; acl=example_named_acl2
|
||||
;
|
||||
; Suppose 209.16.236.0 tries to communicate and the ACL for that example is applied to it...
|
||||
; First, example_named_acl1 is evaluated. The address is allowed by that ACL.
|
||||
; Next, example_named_acl2 is evaluated. The address isn't blocked by example_named_acl2
|
||||
; either, so it passes.
|
||||
;
|
||||
; Suppose instead 209.16.236.1 tries to communicate and the same ACL is applied.
|
||||
; First, example_named_acl1 is evaluated and the address is allowed.
|
||||
; However, it is blocked by example_named_acl2, so the address is blocked from the combined
|
||||
; ACL.
|
||||
;
|
||||
; Similarly, the permits/denies in specific configurations that make up an ACL definition
|
||||
; are also treated as a separate ACL for evaluation. So if we change the example above to:
|
||||
; <in another configuration>
|
||||
; [example_item_with_acl]
|
||||
; acl=example_named_acl1
|
||||
; acl=example_named_acl2
|
||||
; deny=209.16.236.0
|
||||
;
|
||||
; Then 209.16.236.0 will be rejected by the non-named component of the combined ACL even
|
||||
; though it passes the two named components.
|
||||
;
|
||||
;
|
||||
; Named ACLs can use ipv6 addresses just like normal ACLs.
|
||||
;[ipv6_example_1]
|
||||
;deny = ::
|
||||
;permit = ::1/128
|
||||
;
|
||||
;[ipv6_example_2]
|
||||
;permit = fe80::21d:bad:fad:2323
|
||||
@@ -71,7 +71,7 @@ astsbindir => /usr/sbin
|
||||
documentation_language = en_US ; Set the language you want documentation
|
||||
; displayed in. Value is in the same format as
|
||||
; locale names.
|
||||
;hideconnect = yes ; Hide messages displayed when a remote console
|
||||
hideconnect = yes ; Hide messages displayed when a remote console
|
||||
; connects and disconnects.
|
||||
;lockconfdir = no ; Protect the directory containing the
|
||||
; configuration files (/etc/asterisk) with a
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
;
|
||||
; Mappings for custom config file
|
||||
;
|
||||
; To get your CSV output in a format tailored to your liking, uncomment the
|
||||
; following lines and look for the output in the cdr-custom directory (usually
|
||||
; in /var/log/asterisk). Depending on which mapping you uncomment, you may see
|
||||
; Master.csv, Simple.csv, or both.
|
||||
;
|
||||
;[mappings]
|
||||
;Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration)})},${CSV_QUOTE(${CDR(billsec)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)}
|
||||
;
|
||||
; High Resolution Time for billsec and duration fields
|
||||
;Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration,f)})},${CSV_QUOTE(${CDR(billsec,f)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)}
|
||||
;Simple.csv => ${CSV_QUOTE(${EPOCH})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})}
|
||||
116
voice-client/files/etc/asterisk_templates/cel.conf.TEMPLATE
Normal file
116
voice-client/files/etc/asterisk_templates/cel.conf.TEMPLATE
Normal file
@@ -0,0 +1,116 @@
|
||||
;
|
||||
; Asterisk Channel Event Logging (CEL)
|
||||
;
|
||||
|
||||
; Channel Event Logging is a mechanism to provide fine-grained event information
|
||||
; that can be used to generate billing information. Such event information can
|
||||
; be recorded to various backend modules.
|
||||
;
|
||||
|
||||
[general]
|
||||
|
||||
; CEL Activation
|
||||
;
|
||||
; Use the 'enable' keyword to turn CEL on or off.
|
||||
;
|
||||
; Accepted values: yes and no
|
||||
; Default value: no
|
||||
|
||||
;enable=yes
|
||||
|
||||
; Application Tracking
|
||||
;
|
||||
; Use the 'apps' keyword to specify the list of applications for which you want
|
||||
; to receive CEL events. This is a comma separated list of Asterisk dialplan
|
||||
; applications, such as Dial, Queue, and Park.
|
||||
;
|
||||
; Accepted values: A comma separated list of Asterisk dialplan applications
|
||||
; Default value: none
|
||||
;
|
||||
; Note: You may also use 'all' which will result in CEL events being reported
|
||||
; for all Asterisk applications. This may affect Asterisk's performance
|
||||
; significantly.
|
||||
|
||||
apps=dial,park
|
||||
|
||||
; Event Tracking
|
||||
;
|
||||
; Use the 'events' keyword to specify the list of events which you want to be
|
||||
; raised when they occur. This is a comma separated list of the values in the
|
||||
; table below.
|
||||
;
|
||||
; Accepted values: A comma separated list of one or more of the following:
|
||||
; ALL -- Generate entries on all events
|
||||
; CHAN_START -- The time a channel was created
|
||||
; CHAN_END -- The time a channel was terminated
|
||||
; ANSWER -- The time a channel was answered (ie, phone taken off-hook)
|
||||
; HANGUP -- The time at which a hangup occurred
|
||||
; BRIDGE_ENTER -- The time a channel was connected into a conference room
|
||||
; BRIDGE_EXIT -- The time a channel was removed from a conference room
|
||||
; APP_START -- The time a tracked application was started
|
||||
; APP_END -- the time a tracked application ended
|
||||
; PARK_START -- The time a call was parked
|
||||
; PARK_END -- Unpark event
|
||||
; BLINDTRANSFER -- When a blind transfer is initiated
|
||||
; ATTENDEDTRANSFER -- When an attended transfer is initiated
|
||||
; PICKUP -- This channel picked up the specified channel
|
||||
; FORWARD -- This channel is being forwarded somewhere else
|
||||
; LINKEDID_END -- The last channel with the given linkedid is retired
|
||||
; USER_DEFINED -- Triggered from the dialplan, and has a name given by the
|
||||
; user
|
||||
; LOCAL_OPTIMIZE -- A local channel pair is optimizing away.
|
||||
;
|
||||
; Default value: none
|
||||
; (Track no events)
|
||||
|
||||
events=APP_START,CHAN_START,CHAN_END,ANSWER,HANGUP,BRIDGE_ENTER,BRIDGE_EXIT
|
||||
|
||||
; Date Format
|
||||
;
|
||||
; Use the 'dateformat' keyword to specify the date format used when CEL events
|
||||
; are raised.
|
||||
;
|
||||
; Accepted values: A strftime format string (see man strftime)
|
||||
;
|
||||
; Example: "%F %T"
|
||||
; -> This gives the date and time in the format "2009-06-23 17:02:35"
|
||||
;
|
||||
; If this option is not specified, the default format is "<seconds>.<microseconds>"
|
||||
; since epoch. The microseconds field will always be 6 digits in length, meaning it
|
||||
; may have leading zeros.
|
||||
;
|
||||
;dateformat = %F %T
|
||||
|
||||
;
|
||||
; Asterisk Manager Interface (AMI) CEL Backend
|
||||
;
|
||||
[manager]
|
||||
|
||||
; AMI Backend Activation
|
||||
;
|
||||
; Use the 'enable' keyword to turn CEL logging to the Asterisk Manager Interface
|
||||
; on or off.
|
||||
;
|
||||
; Accepted values: yes and no
|
||||
; Default value: no
|
||||
;enabled=yes
|
||||
|
||||
; Use 'show_user_defined' to put "USER_DEFINED" in the EventName header,
|
||||
; instead of (by default) just putting the user defined event name there.
|
||||
; When enabled the UserDefType header is added for user defined events to
|
||||
; provide the user defined event name.
|
||||
;
|
||||
;show_user_defined=yes
|
||||
|
||||
;
|
||||
; RADIUS CEL Backend
|
||||
;
|
||||
[radius]
|
||||
;
|
||||
; Log date/time in GMT
|
||||
;usegmtime=yes
|
||||
;
|
||||
; Set this to the location of the radiusclient-ng configuration file
|
||||
; The default is /etc/radiusclient-ng/radiusclient.conf
|
||||
;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf
|
||||
;
|
||||
@@ -0,0 +1,383 @@
|
||||
[general]
|
||||
; The general section of this config
|
||||
; is not currently used, but reserved
|
||||
; for future use.
|
||||
|
||||
;
|
||||
; --- Default Information ---
|
||||
; The default_user and default_bridge sections are applied
|
||||
; automatically to all ConfBridge instances invoked without
|
||||
; a user, or bridge argument. No menu is applied by default.
|
||||
;
|
||||
; Note that while properties of the default_user or default_bridge
|
||||
; profile can be overridden, if removed, they will be automatically
|
||||
; added and made available to the dialplan upon module load.
|
||||
;
|
||||
|
||||
; --- ConfBridge User Profile Options ---
|
||||
[default_user]
|
||||
type=user
|
||||
;admin=yes ; Sets if the user is an admin or not. Off by default.
|
||||
;marked=yes ; Sets if this is a marked user or not. Off by default.
|
||||
;startmuted=yes; Sets if all users should start out muted. Off by default
|
||||
;music_on_hold_when_empty=yes ; Sets whether MOH should be played when only
|
||||
; one person is in the conference or when the
|
||||
; the user is waiting on a marked user to enter
|
||||
; the conference. Off by default.
|
||||
;music_on_hold_class=default ; The MOH class to use for this user.
|
||||
;quiet=yes ; When enabled enter/leave prompts and user intros are not played.
|
||||
; There are some prompts, such as the prompt to enter a PIN number,
|
||||
; that must be played regardless of what this option is set to.
|
||||
; Off by default
|
||||
;announce_user_count=yes ; Sets if the number of users should be announced to the
|
||||
; caller. Off by default.
|
||||
;announce_user_count_all=yes ; Sets if the number of users should be announced to
|
||||
; all the other users in the conference when someone joins.
|
||||
; This option can be either set to 'yes' or a number.
|
||||
; When set to a number, the announcement will only occur
|
||||
; once the user count is above the specified number.
|
||||
;announce_only_user=yes ; Sets if the only user announcement should be played
|
||||
; when a channel enters a empty conference. On by default.
|
||||
;wait_marked=yes ; Sets if the user must wait for a marked user to enter before
|
||||
; joining the conference. Off by default.
|
||||
;end_marked=yes ; This option will kick every user with this option set in their
|
||||
; user profile after the last Marked user exists the conference.
|
||||
|
||||
;dsp_drop_silence=yes ; This option drops what Asterisk detects as silence from
|
||||
; entering into the bridge. Enabling this option will drastically
|
||||
; improve performance and help remove the buildup of background
|
||||
; noise from the conference. Highly recommended for large conferences
|
||||
; due to its performance enhancements.
|
||||
|
||||
;dsp_talking_threshold=128 ; The time in milliseconds of sound above what the dsp has
|
||||
; established as base line silence for a user before a user
|
||||
; is considered to be talking. This value affects several
|
||||
; operations and should not be changed unless the impact on
|
||||
; call quality is fully understood.
|
||||
;
|
||||
; What this value affects internally:
|
||||
;
|
||||
; 1. Audio is only mixed out of a user's incoming audio stream
|
||||
; if talking is detected. If this value is set too
|
||||
; loose the user will hear themselves briefly each
|
||||
; time they begin talking until the dsp has time to
|
||||
; establish that they are in fact talking.
|
||||
; 2. When talk detection AMI events are enabled, this value
|
||||
; determines when talking has begun which results in
|
||||
; an AMI event to fire. If this value is set too tight
|
||||
; AMI events may be falsely triggered by variants in
|
||||
; room noise.
|
||||
; 3. The drop_silence option depends on this value to determine
|
||||
; when the user's audio should be mixed into the bridge
|
||||
; after periods of silence. If this value is too loose
|
||||
; the beginning of a user's speech will get cut off as they
|
||||
; transition from silence to talking.
|
||||
;
|
||||
; By default this value is 160 ms. Valid values are 1 through 2^31
|
||||
|
||||
;dsp_silence_threshold=2000 ; The time in milliseconds of sound falling within the what
|
||||
; the dsp has established as baseline silence before a user
|
||||
; is considered be silent. This value affects several
|
||||
; operations and should not be changed unless the impact
|
||||
; on call quality is fully understood.
|
||||
;
|
||||
; What this value affects internally:
|
||||
;
|
||||
; 1. When talk detection AMI events are enabled, this value
|
||||
; determines when the user has stopped talking after a
|
||||
; period of talking. If this value is set too low
|
||||
; AMI events indicating the user has stopped talking
|
||||
; may get falsely sent out when the user briefly pauses
|
||||
; during mid sentence.
|
||||
; 2. The drop_silence option depends on this value to
|
||||
; determine when the user's audio should begin to be
|
||||
; dropped from the conference bridge after the user
|
||||
; stops talking. If this value is set too low the user's
|
||||
; audio stream may sound choppy to the other participants.
|
||||
; This is caused by the user transitioning constantly from
|
||||
; silence to talking during mid sentence.
|
||||
;
|
||||
; The best way to approach this option is to set it slightly above
|
||||
; the maximum amount of ms of silence a user may generate during
|
||||
; natural speech.
|
||||
;
|
||||
; By default this value is 2500ms. Valid values are 1 through 2^31
|
||||
|
||||
;talk_detection_events=yes ; This option sets whether or not notifications of when a user
|
||||
; begins and ends talking should be sent out as events over AMI.
|
||||
; By default this option is off.
|
||||
|
||||
;denoise=yes ; Sets whether or not a denoise filter should be applied
|
||||
; to the audio before mixing or not. Off by default. Requires
|
||||
; func_speex to be built and installed. Do not confuse this option
|
||||
; with drop_silence. Denoise is useful if there is a lot of background
|
||||
; noise for a user as it attempts to remove the noise while preserving
|
||||
; the speech. This option does NOT remove silence from being mixed into
|
||||
; the conference and does come at the cost of a slight performance hit.
|
||||
|
||||
;jitterbuffer=yes ; Enabling this option places a jitterbuffer on the user's audio stream
|
||||
; before audio mixing is performed. This is highly recommended but will
|
||||
; add a slight delay to the audio. This option is using the JITTERBUFFER
|
||||
; dialplan function's default adaptive jitterbuffer. For a more fine tuned
|
||||
; jitterbuffer, disable this option and use the JITTERBUFFER dialplan function
|
||||
; on the user before entering the ConfBridge application.
|
||||
|
||||
;pin=1234 ; Sets if this user must enter a PIN number before entering
|
||||
; the conference. The PIN will be prompted for.
|
||||
;announce_join_leave=yes ; When enabled, this option will prompt the user for a
|
||||
; name when entering the conference. After the name is
|
||||
; recorded, it will be played as the user enters and exists
|
||||
; the conference. This option is off by default.
|
||||
;announce_join_leave_review=yes ; When enabled, implies announce_join_leave, but the user
|
||||
; will be prompted to review their recording before
|
||||
; entering the conference. During this phase, the recording
|
||||
; may be listened to, re-recorded, or accepted as is. This
|
||||
; option is off by default.
|
||||
;dtmf_passthrough=yes ; Sets whether or not DTMF should pass through the conference.
|
||||
; This option is off by default.
|
||||
;announcement=</path/to/file> ; Play a sound file to the user when they join the conference.
|
||||
|
||||
;timeout=3600 ; When set non-zero, this specifies the number of seconds that the participant
|
||||
; may stay in the conference before being automatically ejected. When the user
|
||||
; is ejected from the conference, the user's channel will have the CONFBRIDGE_RESULT
|
||||
; variable set to "TIMEOUT". A value of 0 indicates that there is no timeout.
|
||||
; Default: 0
|
||||
|
||||
; --- ConfBridge Bridge Profile Options ---
|
||||
[default_bridge]
|
||||
type=bridge
|
||||
;max_members=50 ; This option limits the number of participants for a single
|
||||
; conference to a specific number. By default conferences
|
||||
; have no participant limit. After the limit is reached, the
|
||||
; conference will be locked until someone leaves. Note however
|
||||
; that an Admin user will always be alowed to join the conference
|
||||
; regardless if this limit is reached or not.
|
||||
|
||||
;record_conference=yes ; Records the conference call starting when the first user
|
||||
; enters the room, and ending when the last user exits the room.
|
||||
; The default recorded filename is
|
||||
; 'confbridge-<name of conference bridge>-<start time>.wav
|
||||
; and the default format is 8khz slinear. This file will be
|
||||
; located in the configured monitoring directory in asterisk.conf.
|
||||
|
||||
;record_file=</path/to/file> ; When record_conference is set to yes, the specific name of the
|
||||
; record file can be set using this option. Note that since multiple
|
||||
; conferences may use the same bridge profile, this may cause issues
|
||||
; depending on the configuration. It is recommended to only use this
|
||||
; option dynamically with the CONFBRIDGE() dialplan function. This
|
||||
; allows the record name to be specified and a unique name to be chosen.
|
||||
; By default, the record_file is stored in Asterisk's spool/monitor directory
|
||||
; with a unique filename starting with the 'confbridge' prefix.
|
||||
|
||||
;internal_sample_rate=auto ; Sets the internal native sample rate the
|
||||
; conference is mixed at. This is set to automatically
|
||||
; adjust the sample rate to the best quality by default.
|
||||
; Other values can be anything from 8000-192000. If a
|
||||
; sample rate is set that Asterisk does not support, the
|
||||
; closest sample rate Asterisk does support to the one requested
|
||||
; will be used.
|
||||
|
||||
;mixing_interval=40 ; Sets the internal mixing interval in milliseconds for the bridge. This
|
||||
; number reflects how tight or loose the mixing will be for the conference.
|
||||
; In order to improve performance a larger mixing interval such as 40ms may
|
||||
; be chosen. Using a larger mixing interval comes at the cost of introducing
|
||||
; larger amounts of delay into the bridge. Valid values here are 10, 20, 40,
|
||||
; or 80. By default 20ms is used.
|
||||
|
||||
;video_mode = follow_talker; Sets how confbridge handles video distribution to the conference participants.
|
||||
; Note that participants wanting to view and be the source of a video feed
|
||||
; _MUST_ be sharing the same video codec. Also, using video in conjunction with
|
||||
; with the jitterbuffer currently results in the audio being slightly out of sync
|
||||
; with the video. This is a result of the jitterbuffer only working on the audio
|
||||
; stream. It is recommended to disable the jitterbuffer when video is used.
|
||||
;
|
||||
; --- MODES ---
|
||||
; none: No video sources are set by default in the conference. It is still
|
||||
; possible for a user to be set as a video source via AMI or DTMF action
|
||||
; at any time.
|
||||
;
|
||||
; follow_talker: The video feed will follow whoever is talking and providing video.
|
||||
;
|
||||
; last_marked: The last marked user to join the conference with video capabilities
|
||||
; will be the single source of video distributed to all participants.
|
||||
; If multiple marked users are capable of video, the last one to join
|
||||
; is always the source, when that user leaves it goes to the one who
|
||||
; joined before them.
|
||||
;
|
||||
; first_marked: The first marked user to join the conference with video capabilities
|
||||
; is the single source of video distribution among all participants. If
|
||||
; that user leaves, the marked user to join after them becomes the source.
|
||||
|
||||
;language=en ; Set the language used for announcements to the conference.
|
||||
; Default is en (English).
|
||||
|
||||
;regcontext=conferences ; The name of the context into which to register conference names as extensions.
|
||||
|
||||
; All sounds in the conference are customizable using the bridge profile options below.
|
||||
; Simply state the option followed by the filename or full path of the filename after
|
||||
; the option. Example: sound_had_joined=conf-hasjoin This will play the conf-hasjoin
|
||||
; sound file found in the sounds directory when announcing someone's name is joining the
|
||||
; conference.
|
||||
|
||||
;sound_join ; The sound played to everyone when someone enters the conference.
|
||||
;sound_leave ; The sound played to everyone when someone leaves the conference.
|
||||
;sound_has_joined ; The sound played before announcing someone's name has
|
||||
; joined the conference. This is used for user intros.
|
||||
; Example "_____ has joined the conference"
|
||||
;sound_has_left ; The sound played when announcing someone's name has
|
||||
; left the conference. This is used for user intros.
|
||||
; Example "_____ has left the conference"
|
||||
;sound_kicked ; The sound played to a user who has been kicked from the conference.
|
||||
;sound_muted ; The sound played when the mute option it toggled on.
|
||||
;sound_unmuted ; The sound played when the mute option it toggled off.
|
||||
;sound_only_person ; The sound played when the user is the only person in the conference.
|
||||
;sound_only_one ; The sound played to a user when there is only one other
|
||||
; person is in the conference.
|
||||
;sound_there_are ; The sound played when announcing how many users there
|
||||
; are in a conference.
|
||||
;sound_other_in_party; ; This file is used in conjunction with 'sound_there_are"
|
||||
; when announcing how many users there are in the conference.
|
||||
; The sounds are stringed together like this.
|
||||
; "sound_there_are" <number of participants> "sound_other_in_party"
|
||||
;sound_place_into_conference ; The sound played when someone is placed into the conference
|
||||
; after waiting for a marked user. This sound is now deprecated
|
||||
; since it was only ever used improperly and correcting that bug
|
||||
; made it completely unused.
|
||||
;sound_wait_for_leader ; The sound played when a user is placed into a conference that
|
||||
; can not start until a marked user enters.
|
||||
;sound_leader_has_left ; The sound played when the last marked user leaves the conference.
|
||||
;sound_get_pin ; The sound played when prompting for a conference pin number.
|
||||
;sound_invalid_pin ; The sound played when an invalid pin is entered too many times.
|
||||
;sound_locked ; The sound played to a user trying to join a locked conference.
|
||||
;sound_locked_now ; The sound played to an admin after toggling the conference to locked mode.
|
||||
;sound_unlocked_now; The sound played to an admin after toggling the conference to unlocked mode.
|
||||
;sound_error_menu ; The sound played when an invalid menu option is entered.
|
||||
;sound_begin ; The sound played to the conference when the first marked user enters the conference.
|
||||
|
||||
; --- ConfBridge Menu Options ---
|
||||
; The ConfBridge application also has the ability to
|
||||
; apply custom DTMF menus to each channel using the
|
||||
; application. Like the User and Bridge profiles
|
||||
; a menu is passed in to ConfBridge as an argument in
|
||||
; the dialplan.
|
||||
;
|
||||
; Below is a list of menu actions that can be assigned
|
||||
; to a DTMF sequence.
|
||||
;
|
||||
; To have the first DTMF digit in a sequence be the '#' character, you need to
|
||||
; escape it. If it is not escaped then normal config file processing will
|
||||
; think it is a directive like #include. For example:
|
||||
; \#1=toggle_mute ; Pressing #1 will toggle the mute setting.
|
||||
;
|
||||
; A single DTMF sequence can have multiple actions associated with it. This is
|
||||
; accomplished by stringing the actions together and using a ',' as the delimiter.
|
||||
; Example: Both listening and talking volume is reset when '5' is pressed.
|
||||
; 5=reset_talking_volume, reset_listening_volume
|
||||
;
|
||||
; playback(<name of audio file>&<name of audio file>)
|
||||
; Playback will play back an audio file to a channel
|
||||
; and then immediately return to the conference.
|
||||
; This file can not be interupted by DTMF.
|
||||
; Mutliple files can be chained together using the
|
||||
; '&' character.
|
||||
; playback_and_continue(<name of playback prompt>&<name of playback prompt>)
|
||||
; playback_and_continue will
|
||||
; play back a prompt while continuing to
|
||||
; collect the dtmf sequence. This is useful
|
||||
; when using a menu prompt that describes all
|
||||
; the menu options. Note however that any DTMF
|
||||
; during this action will terminate the prompts
|
||||
; playback. Prompt files can be chained together
|
||||
; using the '&' character as a delimiter.
|
||||
; toggle_mute ; Toggle turning on and off mute. Mute will make the user silent
|
||||
; to everyone else, but the user will still be able to listen in.
|
||||
|
||||
; no_op ; This action does nothing (No Operation). Its only real purpose exists for
|
||||
; being able to reserve a sequence in the config as a menu exit sequence.
|
||||
; decrease_listening_volume ; Decreases the channel's listening volume.
|
||||
; increase_listening_volume ; Increases the channel's listening volume.
|
||||
; reset_listening_volume ; Reset channel's listening volume to default level.
|
||||
|
||||
; decrease_talking_volume ; Decreases the channel's talking volume.
|
||||
; increase_talking_volume ; Icreases the channel's talking volume.
|
||||
; reset_talking_volume ; Reset channel's talking volume to default level.
|
||||
;
|
||||
; dialplan_exec(context,exten,priority) ; The dialplan_exec action allows a user
|
||||
; to escape from the conference and execute
|
||||
; commands in the dialplan. Once the dialplan
|
||||
; exits the user will be put back into the
|
||||
; conference. The possibilities are endless!
|
||||
; leave_conference ; This action allows a user to exit the conference and continue
|
||||
; execution in the dialplan.
|
||||
;
|
||||
; admin_kick_last ; This action allows an Admin to kick the last participant from the
|
||||
; conference. This action will only work for admins which allows
|
||||
; a single menu to be used for both users and admins.
|
||||
;
|
||||
; admin_toggle_conference_lock ; This action allows an Admin to toggle locking and
|
||||
; unlocking the conference. Non admins can not use
|
||||
; this action even if it is in their menu.
|
||||
|
||||
; set_as_single_video_src ; This action allows any user to set themselves as the
|
||||
; single video source distributed to all participants.
|
||||
; This will make the video feed stick to them regardless
|
||||
; of what the video_mode is set to.
|
||||
|
||||
; release_as_single_video_src ; This action allows a user to release themselves as
|
||||
; the video source. If video_mode is not set to "none"
|
||||
; this action will result in the conference returning to
|
||||
; whatever video mode the bridge profile is using.
|
||||
;
|
||||
; Note that this action will have no effect if the user
|
||||
; is not currently the video source. Also, the user is
|
||||
; not guaranteed by using this action that they will not
|
||||
; become the video source again. The bridge will return
|
||||
; to whatever operation the video_mode option is set to
|
||||
; upon release of the video src.
|
||||
|
||||
; admin_toggle_mute_participants ; This action allows an administrator to toggle the mute
|
||||
; state for all non-admins within a conference.
|
||||
; Subsequent non-admins joining a muted conference will
|
||||
; start muted. All admin users are unaffected by this
|
||||
; option. Note that all users, regardless of their admin
|
||||
; status, are notified that the conference is muted when
|
||||
; the state is toggled.
|
||||
|
||||
; participant_count ; This action plays back the number of participants currently
|
||||
; in a conference
|
||||
|
||||
[sample_user_menu]
|
||||
type=menu
|
||||
*=playback_and_continue(conf-usermenu)
|
||||
*1=toggle_mute
|
||||
1=toggle_mute
|
||||
*4=decrease_listening_volume
|
||||
4=decrease_listening_volume
|
||||
*6=increase_listening_volume
|
||||
6=increase_listening_volume
|
||||
*7=decrease_talking_volume
|
||||
7=decrease_talking_volume
|
||||
*8=leave_conference
|
||||
8=leave_conference
|
||||
*9=increase_talking_volume
|
||||
9=increase_talking_volume
|
||||
|
||||
[sample_admin_menu]
|
||||
type=menu
|
||||
*=playback_and_continue(conf-adminmenu)
|
||||
*1=toggle_mute
|
||||
1=toggle_mute
|
||||
*2=admin_toggle_conference_lock ; only applied to admin users
|
||||
2=admin_toggle_conference_lock ; only applied to admin users
|
||||
*3=admin_kick_last ; only applied to admin users
|
||||
3=admin_kick_last ; only applied to admin users
|
||||
*4=decrease_listening_volume
|
||||
4=decrease_listening_volume
|
||||
*6=increase_listening_volume
|
||||
6=increase_listening_volume
|
||||
*7=decrease_talking_volume
|
||||
7=decrease_talking_volume
|
||||
*8=no_op
|
||||
8=no_op
|
||||
*9=increase_talking_volume
|
||||
9=increase_talking_volume
|
||||
@@ -155,7 +155,7 @@ ring = 425/1000,0/3000
|
||||
congestion = 425/167,0/167
|
||||
callwaiting = 1400/175,0/175,1400/175,0/3500
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440"
|
||||
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
info = 900/330,1400/330,1800/330,0/1000
|
||||
|
||||
@@ -17,7 +17,7 @@ rtpholdtimeout=1800
|
||||
localnet=192.168.0.0/16
|
||||
localnet=10.0.0.0/8
|
||||
localnet=172.16.0.0/12
|
||||
nat=yes
|
||||
nat=force_rport,comedia
|
||||
directmedia=no
|
||||
sipdebug=no
|
||||
session-timers=refuse
|
||||
@@ -49,7 +49,6 @@ tos_video=|TOS_VIDEO| ; Sets TOS for RTP video packets. Recommended = af41
|
||||
tos_text=|TOS_TEXT| ; Sets TOS for RTP text packets. Recommended = af41
|
||||
|
||||
tcpenable=|TCPENABLE|
|
||||
tlsbindaddr=0.0.0.0
|
||||
|
||||
tlsenable=|TLSENABLE|
|
||||
tlsbindaddr=0.0.0.0
|
||||
|
||||
@@ -9,7 +9,7 @@ insecure = port,invite
|
||||
canreinvite = no
|
||||
insecure = invite
|
||||
;qualify = yes
|
||||
nat = yes
|
||||
nat = force_rport,comedia
|
||||
context = incoming_calls
|
||||
port=|PORT|
|
||||
transport = |TRANSPORT|
|
||||
|
||||
@@ -9,7 +9,7 @@ insecure = port,invite
|
||||
canreinvite = no
|
||||
insecure = invite
|
||||
;qualify = yes
|
||||
nat = yes
|
||||
nat = force_rport,comedia
|
||||
context = incoming_calls
|
||||
port=|PORT|
|
||||
transport = |TRANSPORT|
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
;
|
||||
; UDPTL Configuration (UDPTL is one of the transports for T.38)
|
||||
;
|
||||
[general]
|
||||
;
|
||||
; UDPTL start and UDPTL end configure start and end addresses
|
||||
;
|
||||
udptlstart=4000
|
||||
udptlend=4999
|
||||
;
|
||||
; Whether to enable or disable UDP checksums on UDPTL traffic
|
||||
;
|
||||
;udptlchecksums=no
|
||||
;
|
||||
; The number of error correction entries in a UDPTL packet
|
||||
;
|
||||
udptlfecentries = 3
|
||||
;
|
||||
; The span over which parity is calculated for FEC in a UDPTL packet
|
||||
;
|
||||
udptlfecspan = 3
|
||||
;
|
||||
; Some VoIP providers will only accept an offer with an even-numbered
|
||||
; UDPTL port. Set this option so that Asterisk will only attempt to use
|
||||
; even-numbered ports when negotiating T.38. Default is no.
|
||||
use_even_ports = no
|
||||
@@ -155,6 +155,10 @@ config 'sip_service_provider' 'sip0'
|
||||
option 'name' 'Account 1'
|
||||
option 'enabled' '0'
|
||||
option 'codec0' 'alaw'
|
||||
option cbbs_key '5'
|
||||
option cbbs_maxretry '5'
|
||||
option cbbs_retrytime '300'
|
||||
option cbbs_waittime '30'
|
||||
option 'autoframing' '1'
|
||||
option 'cfim_on' '*21*'
|
||||
option 'cfim_off' '#21#'
|
||||
|
||||
1
voice-client/files/etc/firewall.sip
Normal file
1
voice-client/files/etc/firewall.sip
Normal file
@@ -0,0 +1 @@
|
||||
iptables -I zone_wan_input 4 -m udp -p udp --dport 10000:20000 -m comment --comment "!fw3: Allow-RTP" -j ACCEPT
|
||||
19
voice-client/files/etc/hotplug.d/iface/80-asterisk
Executable file
19
voice-client/files/etc/hotplug.d/iface/80-asterisk
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$ACTION" = "ifup" -a "$(uci -q get network.$INTERFACE.is_lan)" != "1" ] || exit 0
|
||||
|
||||
config_load voice_client
|
||||
config_get bindintf SIP bindintf
|
||||
|
||||
[ -n "$bindintf" -a "$INTERFACE" != "$bindintf" ] && exit 0
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
if [ -n "$bindintf" ]; then
|
||||
network_get_ipaddr bindaddr "$bindintf"
|
||||
[ -z "$bindaddr" ] && network_get_ipaddr6 bindaddr "$bindintf"
|
||||
fi
|
||||
|
||||
bindaddr="${bindaddr:-::}"
|
||||
sed -i "s/bindaddr=.*/bindaddr=$bindaddr/g" /etc/asterisk/sip.conf
|
||||
[ -e /var/run/asterisk/asterisk.ctl ] && asterisk -rx "sip reload"
|
||||
@@ -67,6 +67,7 @@ TMPL_QUEUE=$TEMPLATEDIR/queue.TEMPLATE
|
||||
TMPL_ASTERISK=$TEMPLATEDIR/asterisk.conf.TEMPLATE
|
||||
TMPL_CDR=$TEMPLATEDIR/cdr.conf.TEMPLATE
|
||||
TMPL_CDR_SYSLOG=$TEMPLATEDIR/cdr_syslog.conf.TEMPLATE
|
||||
TMPL_CDR_CUSTOM=$TEMPLATEDIR/cdr_custom.conf.TEMPLATE
|
||||
TMPL_INDICATIONS=$TEMPLATEDIR/indications.conf.TEMPLATE
|
||||
TMPL_CEL=$TEMPLATEDIR/cel.conf.TEMPLATE
|
||||
TMPL_LOGGER=$TEMPLATEDIR/logger.conf.TEMPLATE
|
||||
@@ -75,6 +76,9 @@ TMPL_MODULES=$TEMPLATEDIR/modules.conf.TEMPLATE
|
||||
TMPL_FEATURES=$TEMPLATEDIR/features.conf.TEMPLATE
|
||||
TMPL_CODECS=$TEMPLATEDIR/codecs.conf.TEMPLATE
|
||||
TMPL_MUSICONHOLD=$TEMPLATEDIR/musiconhold.conf.TEMPLATE
|
||||
TMPL_ACL=$TEMPLATEDIR/acl.conf.TEMPLATE
|
||||
TMPL_CONFBRIDGE=$TEMPLATEDIR/confbridge.conf.TEMPLATE
|
||||
TMPL_UDPTL=$TEMPLATEDIR/udptl.conf.TEMPLATE
|
||||
|
||||
TMPL_BRCM=$TEMPLATEDIR/brcm.conf.TEMPLATE
|
||||
TMPL_BRCM_LINE=$TEMPLATEDIR/brcm_line.TEMPLATE
|
||||
@@ -150,6 +154,11 @@ assemble_and_copy_config()
|
||||
[ -f $TMPL_MODULES ] && cp $TMPL_MODULES $WORKDIR/modules.conf
|
||||
[ -f $TMPL_EXTENSIONS_MACRO ] && cp $TMPL_EXTENSIONS_MACRO $WORKDIR/extensions_macro.conf
|
||||
[ -f $TMPL_MUSICONHOLD ] && cp $TMPL_MUSICONHOLD $WORKDIR/musiconhold.conf
|
||||
[ -f $TMPL_ACL ] && cp $TMPL_ACL $WORKDIR/acl.conf
|
||||
[ -f $TMPL_CDR_CUSTOM ] && cp $TMPL_CDR_CUSTOM $WORKDIR/cdr_custom.conf
|
||||
[ -f $TMPL_CDR_SYSLOG ] && cp $TMPL_CDR_SYSLOG $WORKDIR/cdr_syslog.conf
|
||||
[ -f $TMPL_CONFBRIDGE ] && cp $TMPL_CONFBRIDGE $WORKDIR/confbridge.conf
|
||||
[ -f $TMPL_UDPTL ] && cp $TMPL_UDPTL $WORKDIR/udptl.conf
|
||||
[ -f $SPECRATECFG ] && cp $SPECRATECFG $WORKDIR/special_rate_nr.cfg
|
||||
|
||||
test -e $TMPL_MEETME && cp $TMPL_MEETME $WORKDIR/meetme.conf
|
||||
|
||||
@@ -53,8 +53,17 @@ uci -q batch <<-EOT
|
||||
set firewall.sip=include
|
||||
set firewall.sip.path=/etc/firewall.sip
|
||||
set firewall.sip.reload=1
|
||||
uci del_list firewall.sip._access_w="root"
|
||||
uci add_list firewall.sip._access_w="root"
|
||||
commit firewall
|
||||
EOT
|
||||
|
||||
exit 0
|
||||
# If dtmfmode is set to the obsolete compatability change to auto
|
||||
sed -i 's/dtmfmode\s*=\s*compatibility/dtmfmode=auto/' /etc/asterisk/sip.conf
|
||||
|
||||
if [ $(uci get voice_client.SIP.dtmfmode) == 'compatibility' ]; then
|
||||
uci set voice_client.SIP.dtmfmode='auto'
|
||||
uci commit
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -48,17 +48,24 @@ while read event ; do
|
||||
fi
|
||||
elif json_select asterisk.endpoint >/dev/null; then
|
||||
json_get_var event event
|
||||
if [ "$event" == "OFFHOOK" ]; then
|
||||
|
||||
case $event in
|
||||
OFFHOOK)
|
||||
OFFHOOK=1
|
||||
ubus call led.voice1 set '{"state":"notice"}'
|
||||
else
|
||||
;;
|
||||
ONHOOK)
|
||||
OFFHOOK=0
|
||||
if [ $REGISTERED -eq 1 ]; then
|
||||
ubus call led.voice1 set '{"state":"ok"}'
|
||||
else
|
||||
ubus call led.voice1 set '{"state":"error"}'
|
||||
ubus call led.voice1 set '{"state":"error"}'
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Do nothing for other events.
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done &
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=wifilife
|
||||
PKG_VERSION:=1.0.2
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=c56c761795739a419cc766919304d32d16d24540
|
||||
PKG_SOURCE_VERSION:=9a75b717d3cd95d88e394f5bcd8b4006dfa450ba
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
ifeq ($(CONFIG_WIFILIFE_OPEN),y)
|
||||
@@ -55,12 +55,9 @@ define Package/wifilife/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/wifilife.init $(1)/etc/init.d/wifilife
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/997-wifilife-add-owsd-wifi \
|
||||
$(1)/etc/uci-defaults/997-wifilife-add-owsd-wifi
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wifiagent $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/nodexcluder $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/nodefinder $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,wifilife))
|
||||
|
||||
@@ -10,4 +10,13 @@ add_owsd_object_wifi() {
|
||||
fi
|
||||
}
|
||||
|
||||
add_dnsmasq_lease_hwmask() {
|
||||
local ubusx="$(uci -q get owsd.ubusproxy.enable)"
|
||||
if [ "$ubusx" == "1" ]; then
|
||||
uci -q set dhcp.@dnsmasq[0].lease_hwmask='0x000000'
|
||||
uci commit dhcp
|
||||
fi
|
||||
}
|
||||
|
||||
add_owsd_object_wifi
|
||||
add_dnsmasq_lease_hwmask
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f /tmp/nodefinder.pid ]; then
|
||||
kill -9 $(cat /tmp/nodefinder.pid) 2>/dev/null
|
||||
rm -f /tmp/nodefinder.pid
|
||||
fi
|
||||
|
||||
[ "$1" == "stop" ] && exit
|
||||
|
||||
radio5g=$(uci show wireless | grep "band='a'" | cut -d'.' -f2)
|
||||
wiface5g=$(uci show wireless | grep wifi-iface | grep "device='$radio5g'" | head -1 | cut -d'.' -f2)
|
||||
ifname5g="$(uci -q get wireless.$wiface5g.ifname)"
|
||||
ssid5g="$(uci -q get wireless.$wiface5g.ssid)"
|
||||
[ -n "$ssid5g" -a -n "$ifname5g" ] || exit
|
||||
|
||||
[ "$(uci -q get owsd.ubusproxy.enable)" == "1" ] || exit
|
||||
[ -f /usr/sbin/wlctl ] || exit
|
||||
|
||||
while true; do
|
||||
for wifix in $(ubus list | grep "/wifix"); do
|
||||
mac5g=$(ubus call $wifix status '{"vif":"rai0"}' | grep bssid | awk '{print$2}' | tr -d '",')
|
||||
wlctl -i $ifname5g rrm_nbr_list | grep -qi "$mac5g" || ubus call wifix scan "{\"radio\":\"$radio5g\",\"ssid\":\"$ssid5g\"}"
|
||||
done
|
||||
sleep 10
|
||||
done &
|
||||
|
||||
echo $! >/tmp/nodefinder.pid
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
if [ -f /tmp/nodexcluder.pid ]; then
|
||||
kill -9 $(cat /tmp/nodexcluder.pid) 2>/dev/null
|
||||
rm -f /tmp/nodexcluder.pid
|
||||
fi
|
||||
|
||||
[ "$1" == "stop" ] && exit
|
||||
|
||||
[ "$(uci -q get owsd.ubusproxy.enable)" == "1" ] || exit
|
||||
|
||||
MACS=""
|
||||
|
||||
ubus listen ubus.object.add | \
|
||||
while read event ; do
|
||||
json_load "$event"
|
||||
if json_select ubus.object.add >/dev/null; then
|
||||
json_get_var path path
|
||||
case $path in
|
||||
*/wifix)
|
||||
MAC=$(ubus call $path status '{"vif":"rai0"}' | grep bssid | awk '{print$2}' | tr -d '",')
|
||||
MACS="$MACS $MAC"
|
||||
for wa in $(ubus list | grep wifi.agent); do
|
||||
for mac in $MACS; do
|
||||
ubus call $wa cmd "{\"id\":3,\"data\":\"$mac\"}"
|
||||
done
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done &
|
||||
|
||||
echo $(($!-1)) $! >/tmp/nodexcluder.pid
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
START=96
|
||||
STOP=10
|
||||
PROG=/usr/sbin/wifiagent
|
||||
|
||||
ENABLE=/tmp/owsd_enable
|
||||
USE_PROCD=1
|
||||
EXTRA_COMMANDS="enable_check"
|
||||
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG} -d -l
|
||||
procd_set_param command ${PROG} -d -l -f -o /tmp/wifiagent.log
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
@@ -16,25 +18,42 @@ start_service() {
|
||||
config_load owsd
|
||||
config_get enable ubusproxy enable
|
||||
if [ "$enable" == "1" ]; then
|
||||
procd_set_param command ${PROG} -c -d -l
|
||||
echo $enable > $ENABLE
|
||||
procd_set_param command ${PROG} -c -d -l -f -o /tmp/wificntlr.log
|
||||
fi
|
||||
procd_close_instance
|
||||
|
||||
nodexcluder
|
||||
nodefinder
|
||||
}
|
||||
|
||||
stop_service()
|
||||
{
|
||||
nodexcluder stop
|
||||
nodefinder stop
|
||||
service_stop ${PROG}
|
||||
}
|
||||
#stop_service()
|
||||
#{
|
||||
# service_stop ${PROG}
|
||||
#}
|
||||
|
||||
reload_service() {
|
||||
procd_send_signal wifiagent
|
||||
# procd_send_signal wifilife # use SIGHUP
|
||||
stop
|
||||
start
|
||||
|
||||
config_load owsd
|
||||
config_get enable ubusproxy enable
|
||||
if [ "$enable" == "1" ]; then
|
||||
ubus call netmode sync_wifilife
|
||||
fi
|
||||
}
|
||||
|
||||
enable_check() {
|
||||
config_load owsd
|
||||
config_get enable ubusproxy enable
|
||||
|
||||
prev=$(cat $ENABLE)
|
||||
|
||||
if [ "$enable" != "$prev" ]; then
|
||||
echo $enable > $ENABLE
|
||||
reload
|
||||
fi
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger wifiagent
|
||||
procd_add_config_trigger "config.change" "wifilife" /etc/init.d/wifilife reload
|
||||
procd_add_config_trigger "config.change" "owsd" /etc/init.d/wifilife enable_check
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=1.0.2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=cfaf7a3f3bd688257b108ad8c5e73d3a91c6c2d4
|
||||
PKG_SOURCE_VERSION:=c7228ea031f407580ff8e4801e0ba544aeadd050
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user