Compare commits

..

5 Commits
master ... topd

Author SHA1 Message Date
Jakob Olsson
3af55bdc8b update hash 2018-12-05 16:22:22 +01:00
Jakob Olsson
2e237e2857 update hash 2018-12-05 16:22:22 +01:00
Jakob Olsson
ad05785195 update hash 2018-12-05 16:22:22 +01:00
Jakob Olsson
20978a4f0e allow debug prints 2018-12-05 16:22:22 +01:00
Jakob Olsson
3295def312 update makefile cflags and lib dependencies 2018-12-05 16:22:22 +01:00
83 changed files with 626 additions and 1911 deletions

View File

@@ -1,4 +1,4 @@
config service 'catv'
option enable '0'
option enable 'no'
option filter '3'

View File

@@ -42,7 +42,6 @@ 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/
@@ -50,7 +49,6 @@ 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))

View File

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

View File

@@ -9,7 +9,7 @@ PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=6a311af7cd17fc410c27de3cfae33b658195fd0b
PKG_SOURCE_VERSION:=8989476ac5df494064ed94a52634be5c61fff037
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_intel_mips),y)
TARGET_PLATFORM=INTEL
TARGET_CFLAGS +=-DIOPSYS_INTEL
else ifeq ($(CONFIG_TARGET_lantiq_xrx500),y)
TARGET_PLATFORM=LANTIQ
TARGET_CFLAGS +=-DIOPSYS_LANTIQ
else
$(info (UNEXPECTED CONFIG TARGET))
endif

49
eventlog/Makefile Normal file
View File

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

View File

@@ -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.3.6
BASE_PKG_VERSION:=5.2.3
PKG_RELEASE:=
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
export PKG_VERSION
###########################--RELEASE--################################
PKG_SOURCE_VERSION:=94aab1532fef2caf2d65579614fc413252a517eb
PKG_SOURCE_VERSION:=795cf8ce3cc19ff8bbb014c8ac456784c187dcc5
ifeq ($(CONFIG_ICE_OPEN),y)
TARGET_PROFILE=$(shell echo $(CONFIG_TARGET_BOARD) | sed s/\"//g)
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/

View File

@@ -9,8 +9,6 @@ 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
uci show rpcd | grep username=.*ice.* >/dev/null || {

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=4.0-2019-04-25
PKG_VERSION:=4.0-2018-12-04
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cd777bbd2dbe7477ec7665f12d3d20e6b2e9e052
PKG_SOURCE_VERSION:=f9bbd7fb4a122dd523c2f2eaedec932c8483154f
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -75,11 +75,9 @@ handle_icwmp_restart() {
"$previpaddr" = "$curipaddr" -a \
"$prevgateway" = "$curgateway" -a \
"$prevsubnets" = "$cursubnets" -a \
"$prevdnsservers" = "$curdnsservers" \
] && {
[ "$prevopt43url" = "$curopt43url" ] && exit 0
[ -z "$prevopt43url" ] && exit 0
}
"$prevdnsservers" = "$curdnsservers" -a \
"$prevopt43url" = "$curopt43url" \
] && exit 0
/etc/init.d/icwmpd reload &
}

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2018 iopsys Software Solutions AB
# Copyright (C) 2013 Inteno
#
include $(TOPDIR)/rules.mk
@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ifbt
PKG_VERSION:=0.1
PKG_SOURCE_VERSION:=0286812ed8036dea758f904694dc416481fba64d
PKG_SOURCE_VERSION:=a0572079265293ed99dc4d69fd38528760d29be9
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ifbt.git
@@ -18,22 +18,6 @@ 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

View File

@@ -12,7 +12,7 @@ PKG_NAME:=inbd
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=12755fccb8ef87965ac684d62d56e19e73a255bd
PKG_SOURCE_VERSION:=b846ae0ff55284392de2c4d874851b33edd7a6c5
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd

View File

@@ -43,7 +43,7 @@ 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 is not set
CONFIG_PACKAGE_iwatchdog=y
CONFIG_PACKAGE_juci=y
CONFIG_PACKAGE_juci-broadcom-iptv=y
CONFIG_PACKAGE_juci-broadcom-pwrmgmt=y
@@ -155,7 +155,7 @@ CONFIG_PACKAGE_wifimngr=y
CONFIG_PACKAGE_xl2tpd=y
CONFIG_PACKAGE_zoneinfo-core=y
CONFIG_PACKAGE_zoneinfo-europe=y
CONFIG_TARGET_CUSTOMER="IOPSYS"
CONFIG_TARGET_CUSTOMER="INT"
CONFIG_TARGET_ROOTFS_TARGZ=y
# CONFIG_USE_SSTRIP is not set
CONFIG_USE_STRIP=y
@@ -226,5 +226,3 @@ 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

38
iop/configs/luci.diff Executable file
View File

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

View File

@@ -0,0 +1,67 @@
# 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
#################### switch related
CONFIG_PACKAGE_switch_cli_ugw8=y
#################### ppa related
CONFIG_PACKAGE_ppacmd=y
# CONFIG_PACKAGE_kmod-ppa-drv-gre is not set
# CONFIG_PACKAGE_kmod-ppa-drv-grx500-eth-bond is not set
# CONFIG_PACKAGE_kmod-ppa-drv-grx500-mpe is not set
# CONFIG_PACKAGE_kmod-ppa-drv-mpe-ip97 is not set
CONFIG_PACKAGE_mcast-pa=y
#################### 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
# yes intel dsl script need this.
CONFIG_BUSYBOX_CONFIG_USLEEP=y
#################### DSL related end
#################### WIFI related
CONFIG_PACKAGE_kmod-lantiq-wlan-wave-support_5_x=y
CONFIG_PACKAGE_ltq-wlan-wave_5_x=y
CONFIG_FEATURE_LTQ_WAVE_500_PCIE=y
# CONFIG_FEATURE_LTQ_WAVE_500 is not set
CONFIG_FEATURE_LTQ_WAVE_AR10_SUPPORT=y
# CONFIG_FEATURE_LTQ_WAVE_STA is not set
# CONFIG_FEATURE_LTQ_WAVE_DEBUG_TFTP_BINS is not set
# CONFIG_FEATURE_LTQ_WAVE_FGPA_DUMMY_PHY is not set
CONFIG_FEATURE_LTQ_WAVE_500B=y
####################
# 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
# CONFIG_TARGET_ROOTFS_INITRAMFS is not set
# CONFIG_TARGET_ROOTFS_SQUASHFS is not set

View File

@@ -0,0 +1,3 @@
# temporary solution for kernel
CONFIG_KERNEL_GIT_BRANCH="easy550_anywan_smart3board"
CONFIG_KERNEL_GIT_COMMIT="58796d57c6da6bba984c781c05222349f7c2b655"

View File

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

View File

@@ -0,0 +1,4 @@
# Disable kernel internal Dect. External Dect can still operate.
CONFIG_TARGET_NO_DECT=y

View File

@@ -0,0 +1,4 @@
# Disable kernel internal Dect. External Dect can still operate.
CONFIG_TARGET_NO_DECT=y

View File

@@ -0,0 +1,7 @@
CONFIG_BCM_I2C=y
# Disable kernel internal Dect. External Dect can still operate.
CONFIG_TARGET_NO_DECT=y
CONFIG_TARGET_NO_DSL=y

View File

@@ -0,0 +1,6 @@
# Disable kernel internal Dect. External Dect can still operate.
CONFIG_TARGET_NO_DECT=y
CONFIG_USE_DSL=y
CONFIG_TARGET_DSL_GFAST=y

View File

@@ -0,0 +1,6 @@
# Disable kernel internal Dect. External Dect can still operate.
CONFIG_TARGET_NO_DECT=y
CONFIG_USE_DSL=y
CONFIG_TARGET_DSL_GFAST=y

View File

@@ -0,0 +1,5 @@
# Disable kernel internal Dect. External Dect can still operate.
CONFIG_TARGET_NO_DECT=y
CONFIG_TARGET_NO_DSL=y

View File

@@ -0,0 +1,3 @@
CONFIG_TARGET_NO_DSL=y
CONFIG_BCM_I2C=y

View File

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

View File

@@ -0,0 +1,3 @@
CONFIG_BCM_I2C=y
CONFIG_TARGET_NO_DECT=y

View File

@@ -0,0 +1,3 @@
CONFIG_TARGET_NO_VOICE=y
CONFIG_BCM_I2C=y

View File

@@ -0,0 +1,2 @@
CONFIG_BCM_I2C=y

View File

@@ -0,0 +1,3 @@
CONFIG_TARGET_NO_VOICE=y
CONFIG_BCM_I2C=y

View File

@@ -0,0 +1,5 @@
CONFIG_BCM_I2C=y
CONFIG_TARGET_NO_DECT=y
CONFIG_TARGET_NO_DSL=y
CONFIG_BCM_ENDPOINT_MODULE=y

View File

@@ -0,0 +1,3 @@
CONFIG_TARGET_NO_DSL=y
CONFIG_BCM_I2C=y

View File

@@ -0,0 +1,4 @@
CONFIG_TARGET_NO_DHD=y
CONFIG_TARGET_NO_VOICE=y
CONFIG_BCM_I2C=y

View File

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

View File

@@ -34,8 +34,9 @@ _iop()
iopcmds="bootstrap cfe_upgrade cfe_upgrade_latest extract_core \
feeds_update genconfig generate_tarballs install_key \
scp_changes setup_host ssh_install_key status \
update_package update_feed_branches ssh_upgrade"
scp_changes setup_host ssh_install_key ssh_sysupgrade \
ssh_sysupgrade_latest ssh_sysupgrade_latest_w status \
update_package update_feed_branches"
if [ $COMP_CWORD -eq 1 ] ; then
@@ -75,13 +76,7 @@ _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
;;

View File

@@ -7,7 +7,7 @@ function genconfig {
export FILEDIR="files/"
export THEMEDIR="themes"
CURRENT_CONFIG_FILE=".current_config_file"
export CONFIGPATH="package/feeds/iopsys/iop"
export CONFIGPATH="package/feeds/iopsys/iop/configs"
CUSTPATH="customerconfigs"
export CUSTCONF="customerconfigs/customers"
export VERBOSE=0
@@ -15,16 +15,17 @@ function genconfig {
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
target="bogus"
config_path=""
masterconfig=1
# Takes a board name and returns the target name in global var $target
set_target() {
local profile=$1
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)
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 easy350 speedport_smart3"
local ramips="mt7621"
if [ "$profile" == "LIST" ]
then
@@ -38,13 +39,13 @@ function genconfig {
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
@@ -52,7 +53,6 @@ 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
@@ -60,7 +60,14 @@ function genconfig {
for p in $iopsys_ramips; do
if [ $p == $profile ]; then
target="iopsys_ramips"
config_path="target/linux/iopsys-ramips/config"
return
fi
done
for p in $ramips; do
if [ $p == $profile ]; then
target="ramips"
masterconfig=0
return
fi
done
@@ -68,7 +75,6 @@ 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
@@ -104,16 +110,17 @@ function genconfig {
usage() {
echo
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer [customer2 ]...]"
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer ]"
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 -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)"
@@ -207,42 +214,62 @@ function genconfig {
create_and_copy_files()
{
local BOARDTYPE=$1
shift
local CUSTOMERS=$@
local CUSTOMER=$2
# Validate seleced board and customers
# Validate seleced board and customer
set_target $BOARDTYPE
if [ $target == "bogus" ]; then
echo "Hardware profile does not exist"
exit 1
elif [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ ! -d "$CUSTCONF/$CUSTOMER/" ]; then
echo "Customer profile for '$CUSTOMER' does not exist"
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
exit 1
elif [ ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
echo "'$BOARDTYPE' board profile does not exist for customer '$CUSTOMER'"
if [ -f "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
echo "Common profile configuration will be used"
else
exit 1
fi
fi
done
fi
fi
# Generate base config
# Used only for iopsys targets, not openwrt targets
rm -f .config
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/config .config"
cp $CONFIGPATH/config .config
if [ $masterconfig -eq 1 ]; then
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/config .config"
cp $CONFIGPATH/config .config
fi
if [ -f $config_path/config ]; then
cat $config_path/config >> .config
# Add target (soc/board specific )
if [ -f $CONFIGPATH/target/config ]; then
cat $CONFIGPATH/target/config >> .config
fi
if [ -f $config_path/$BOARDTYPE/config ]; then
cat $config_path/$BOARDTYPE/config >> .config
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
else
v "No profile selected! Using default."
fi
# Set target and profile
#special handling for intel_mips which use TARGET_DEVICES
if [ "$target" = "intel_mips" ]; then
@@ -258,33 +285,31 @@ function genconfig {
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
fi
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE
echo "$CUSTOMER $BOARDTYPE" > $CURRENT_CONFIG_FILE
# Add customerconfig diff if a customer is selected
if [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
fi
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
fi
if [ -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
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
fi
# Set target version
@@ -326,11 +351,20 @@ 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)"
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
# 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
# Clean base-file package to force rebuild when changing profile
v "$(make package/base-files/clean 2>&1)"
@@ -375,7 +409,7 @@ function genconfig {
CUSTREPO="${CUSTREPO:-git@private.inteno.se:customerconfigs}"
setup_dirs
create_and_copy_files "$@"
create_and_copy_files "$1" "$2"
fi
}

View File

@@ -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-latest"
ssh $SERVER "[ -f $FPATH/bcmopen-$board-$bcmkernelcommith.tar.gz ] && ln -sf $FPATH/bcmopen-$board-$bcmkernelcommith.tar.gz $FPATH/bcmopen-$board-$majver.$minver.tar.gz"
rm -f $tarfile
cd "$curdir"
}

View File

@@ -1,326 +0,0 @@
# 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"

View File

@@ -0,0 +1,56 @@
# 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"

View File

@@ -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 'dev.iopsys.eu' feeds.conf | awk '{print$2}' | tr '\n' ' ')"
ifeeds="$(grep -r feed_inteno feeds.conf | awk '{print$2}' | cut -d'_' -f3 | tr '\n' ' ')"
for f in $ifeeds; do
commith=$(grep $f feeds.conf | cut -d'^' -f2)
cd $ipath/feeds/$f
commith=$(grep feed_inteno_$f feeds.conf | cut -d'^' -f2)
cd $ipath/feeds/feed_inteno_$f
git branch -D $release 2>/dev/null
echo "$f: updating release branch $release to commit $commith"
echo "feed_inteno_$f: updating release branch $release to commit $commith"
git checkout $commith
git push origin :$release
git checkout -b $release

View File

@@ -496,7 +496,6 @@ 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)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,3 +0,0 @@
config certs 'certs'
option private '/etc/mqtt-ciotc/rsa_private.pem'
option root '/etc/mqtt-ciotc/roots.pem'

View File

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

View File

@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=netmode
PKG_VERSION:=0.2.0
PKG_SOURCE_VERSION:=9fa23664b3bdd963e4556f5921c9f9be1c9c578f
PKG_SOURCE_VERSION:=82fd6c196a3b990e105cef867a69ce52979b27fa
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/netmoded

View File

@@ -18,7 +18,7 @@ config wifi-device 'wl0'
option bandwidth '80'
option hwmode 'auto'
option channel 'auto'
option scantimer '60'
option scantimer '15'
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 '60'
option scantimer '15'
option wmm '1'
option wmm_noack '0'
option wmm_apsd '1'

View File

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

View File

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

View File

@@ -18,7 +18,7 @@ config wifi-device 'wl0'
option bandwidth '80'
option hwmode 'auto'
option channel 'auto'
option scantimer '60'
option scantimer '15'
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 '60'
option scantimer '15'
option wmm '1'
option wmm_noack '0'
option wmm_apsd '1'

View File

@@ -18,7 +18,6 @@ config wifi-device ra0
option hwmode auto
option htmode HT20
option country 'DE'
option scantimer '60'
config wifi-iface
option device ra0
@@ -38,7 +37,6 @@ config wifi-device rai0
option htmode VHT80
option country 'DE'
option beamforming 1
option scantimer '60'
config wifi-iface
option device rai0

View File

@@ -180,7 +180,6 @@ 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 ;;
@@ -189,9 +188,6 @@ 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
@@ -386,9 +382,7 @@ 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

View File

@@ -10,7 +10,7 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/owsd.git
PKG_SOURCE_VERSION:=f0eedeb6fd061edf3784d6bf86fa60b176bf3fe7
PKG_SOURCE_VERSION:=b3f52463a50d56af80bfd8b3f63960885379f150
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>

View File

@@ -308,10 +308,10 @@ start_service() {
procd_close_instance
}
#stop_service()
#{
# service_stop ${PROG}
#}
stop_service()
{
service_stop ${PROG}
}
reload_service() {
stop

View File

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

View File

@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=02903ce5b594420331f80c6973fa3635921d7080
PKG_SOURCE_VERSION:=fe43108d986a02d3a14f079d58bfa666c1089471
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/peripheral-manager

View File

@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=3.1.40
PKG_SOURCE_VERSION:=9edeefb6942c1a806a82274d124d8889bfb4f8e7
PKG_SOURCE_VERSION:=7a0a7427d339736e3ee555e816d40c985651632c
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd

View File

@@ -11,11 +11,6 @@ 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
@@ -56,30 +51,6 @@ 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
@@ -109,12 +80,11 @@ 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
name=`echo -e "$name" | head -1`
workgroup=`echo -e "$workgroup" | head -1`
description=`echo -e "$description" | head -1`
interfaces=`echo -e "$interfaces" | head -1`
charset=`echo -e "$charset" | head -1`
mkdir -p /var/etc
sed -e "s#|NAME|#$name#g" \
@@ -174,22 +144,13 @@ 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
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf
echo -e "\n[$name]\n\tpath = ${path%%\\n*}" >> /var/etc/smb.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" | head -1 >> /var/etc/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" | head -1 >> /var/etc/smb.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" | head -1 >> /var/etc/smb.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" | head -1 >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" | head -1 >> /var/etc/smb.conf
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" | head -1 >> /var/etc/smb.conf
}
start_service() {

72
syslog-ng3/Makefile Normal file
View File

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

View File

@@ -0,0 +1,37 @@
@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);
};

View File

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

View File

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

View File

@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=topologyd
PKG_VERSION:=0.1
PKG_SOURCE_VERSION:=23b812bb512189487484182ab736e957d54da9f3
PKG_SOURCE_VERSION:=b520fe65d2469ff52cc70328fce753f67cf998e5
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/topologyd.git

View File

@@ -17,7 +17,7 @@ start_service() {
fi
procd_set_param respawn
# procd_set_param stdout 1
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}

View File

@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
ifdef CONFIG_TARGET_intel_mips
PKG_SOURCE_URL:=git@dev.iopsys.eu:intel/uboot.git
PKG_SOURCE_VERSION:=a6292375108a6d5f200f234f5eef3fe17f427092
PKG_SOURCE_VERSION:=b3bc3af5831f14d9cd4d983522bc45a1fd9fa26c
else
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/uboot.git
PKG_SOURCE_VERSION:=3ef2ba866a99205496e0ce01935c89a1778d9b85
@@ -59,29 +59,21 @@ define uboot/grx500
TITLE:=U-Boot for the grx
UBOOT_IMG:=u-boot-nand.bin
DEPENDS:=@TARGET_intel_mips
PKG_RELEASE:=8
PKG_RELEASE:=5
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
PKG_RELEASE:=5
endef
UBOOTS := \
ex400 \
sdx810_ap \
grx500 \
grx500_speedport_smart3 \
grx500_norrland
grx500_speedport_smart3
define Package/uboot/template
define Package/uboot-$(1)
@@ -103,14 +95,13 @@ 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=\"$(UBOOT_IOPSYS_VERSION)\"," $(PKG_BUILD_DIR)/.config
$(SED) "s,CONFIG_INTENO_MAJOR=\"0\",CONFIG_INTENO_MAJOR=\"$(PKG_RELEASE)\"," $(PKG_BUILD_DIR)/.config
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
oldconfig

View File

@@ -40,10 +40,6 @@ 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.

View File

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

View File

@@ -1,14 +0,0 @@
;
; 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)})}

View File

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

View File

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

View File

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

View File

@@ -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=force_rport,comedia
nat=yes
directmedia=no
sipdebug=no
session-timers=refuse
@@ -49,6 +49,7 @@ 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

View File

@@ -9,7 +9,7 @@ insecure = port,invite
canreinvite = no
insecure = invite
;qualify = yes
nat = force_rport,comedia
nat = yes
context = incoming_calls
port=|PORT|
transport = |TRANSPORT|

View File

@@ -9,7 +9,7 @@ insecure = port,invite
canreinvite = no
insecure = invite
;qualify = yes
nat = force_rport,comedia
nat = yes
context = incoming_calls
port=|PORT|
transport = |TRANSPORT|

View File

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

View File

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

View File

@@ -67,7 +67,6 @@ 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
@@ -76,9 +75,6 @@ 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
@@ -154,11 +150,6 @@ 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

View File

@@ -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:=6971890314a06200f60d4c949d9b9654029b9fc3
PKG_SOURCE_VERSION:=25af2498b09575990031b1c5754a0893f1d44b80
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
ifeq ($(CONFIG_WIFILIFE_OPEN),y)
@@ -55,7 +55,8 @@ 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/* $(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_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wifiagent $(1)/usr/sbin/
endef

View File

@@ -10,13 +10,4 @@ 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

View File

@@ -3,16 +3,12 @@
START=96
STOP=10
PROG=/usr/sbin/wifiagent
ENABLE=/tmp/owsd_enable
USE_PROCD=1
EXTRA_COMMANDS="enable_check"
USE_PROCD=1
start_service() {
[ "$(uci -q get wifilife.@wifilife[0].enabled)" == "0" ] && return
procd_open_instance
procd_set_param command ${PROG} -d -l -f -o /tmp/wifiagent.log
procd_set_param command ${PROG} -d -l
procd_set_param respawn
procd_close_instance
@@ -20,42 +16,22 @@ start_service() {
config_load owsd
config_get enable ubusproxy enable
if [ "$enable" == "1" ]; then
echo $enable > $ENABLE
procd_set_param command ${PROG} -c -d -l -f -o /tmp/wificntlr.log
procd_set_param command ${PROG} -c -d -l
fi
procd_close_instance
}
#stop_service()
#{
# service_stop ${PROG}
#}
stop_service()
{
service_stop ${PROG}
}
reload_service() {
# 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_config_trigger "config.change" "wifilife" /etc/init.d/wifilife reload
procd_add_config_trigger "config.change" "owsd" /etc/init.d/wifilife enable_check
procd_add_reload_trigger "wifilife"
}

View File

@@ -8,7 +8,7 @@ PKG_NAME:=wifimngr
PKG_VERSION:=1.0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=c7228ea031f407580ff8e4801e0ba544aeadd050
PKG_SOURCE_VERSION:=a6b9256971aee59bb1049c8ac439ecb51619c72a
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>