mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Merge branch 'devel' of public.inteno.se:feed-inteno-packages into devel
This commit is contained in:
commit
16d6b52429
12 changed files with 186 additions and 37 deletions
|
|
@ -11,6 +11,7 @@ config_get bindintf SIP bindintf
|
|||
|
||||
if [ -n "$bindintf" ]; then
|
||||
network_get_ipaddr bindaddr "$bindintf"
|
||||
[ -z "$bindaddr" ] && network_get_ipaddr6 bindaddr "$bindintf"
|
||||
bindaddr="${bindaddr:-0.0.0.0}"
|
||||
sed -i "s/bindaddr=.*/bindaddr=$bindaddr/g" /etc/asterisk/sip.conf
|
||||
[ -e /var/run/asterisk/asterisk.ctl ] && /etc/init.d/asterisk reload
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ PKG_RELEASE:=1
|
|||
|
||||
PKG_SOURCE_VERSION:=f614cba983d827d5185c60a6a5a35530621d44d2
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:ated
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/ated
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=3.0-2017-04-26
|
||||
PKG_VERSION:=3.0-2017-05-01
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=3c7a7a95ea6a31e52d7127710d142c1cde8bcbc2
|
||||
PKG_SOURCE_VERSION:=5a1b5c439524c56dca7a1921d4cf2fcd2d4c1ff0
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
|
|
|||
|
|
@ -30,14 +30,22 @@ set_disabled() {
|
|||
|
||||
test_ip() {
|
||||
if [ -n "$(echo $ip | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')" ]; then
|
||||
# private IP
|
||||
set_disabled 1
|
||||
else
|
||||
# public IP
|
||||
set_disabled 0
|
||||
[ "$1" -eq "1" ] && {
|
||||
uci set netmode.setup.repeaterready=0
|
||||
uci commit netmode
|
||||
local pid="$(ps | grep wificontro[l] | awk '/repeater/ {print $1}')"
|
||||
[ "$pid" != "" ] && kill $pid
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
case "$(uci -q get netmode.setup.curmode)" in
|
||||
repeater*) test_ip ;;
|
||||
*) [ "$(uci -q get netmode.setup.repeaterready)" == "1" ] && test_ip ;;
|
||||
*) [ "$(uci -q get netmode.setup.repeaterready)" == "1" ] && test_ip 1;;
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
config mcpd 'mcpd'
|
||||
option igmp_proxy_interfaces 'wan'
|
||||
option igmp_default_version '2'
|
||||
option igmp_query_interval '125'
|
||||
option igmp_query_response_interval '100'
|
||||
option igmp_last_member_query_interval '10'
|
||||
option igmp_robustness_value '2'
|
||||
option igmp_max_groups '25'
|
||||
option igmp_max_sources '10'
|
||||
option igmp_max_members '25'
|
||||
option igmp_fast_leave '1'
|
||||
option igmp_proxy_enable '1'
|
||||
option igmp_snooping_enable '2'
|
||||
option igmp_snooping_interfaces 'br-lan'
|
||||
|
|
@ -9,13 +9,16 @@ get_if_creds() {
|
|||
local net dev ssid key encryption band
|
||||
config_get net $section "network"
|
||||
if [ "$net" == "$network" ]; then
|
||||
json_add_object
|
||||
config_get dev $section "device"
|
||||
band="$(uci -q get wireless.$dev.band)"
|
||||
config_get ssid $section ssid
|
||||
config_get key $section key
|
||||
config_get encryption $section encryption
|
||||
config_get disabled $section disabled 0
|
||||
echo "disabled for $band = $disabled" >>/tmp/dbg
|
||||
[ $disabled -eq 1 ] && return
|
||||
[ "$ssid" == "" -o "$band" == "" ] && return
|
||||
json_add_object
|
||||
json_add_string "ssid" "$ssid"
|
||||
json_add_string "band" "$band"
|
||||
json_add_string "key" "$key"
|
||||
|
|
@ -45,6 +48,43 @@ write_error(){
|
|||
exit 1
|
||||
}
|
||||
|
||||
duplicate_if_single_radio() {
|
||||
json_select "wifi-ifaces"
|
||||
local i=1
|
||||
local dummy band dup_band num_radios
|
||||
|
||||
num_radios="$(uci -q show wireless | grep wifi-device | wc -l)"
|
||||
|
||||
[ "$num_radios" == "2" ] && return
|
||||
|
||||
band="$(uci -q get wireless.@wifi-device[0].band)"
|
||||
|
||||
[ "$band" == "a" ] && dup_band="b"
|
||||
[ "$band" == "b" ] && dup_band="a"
|
||||
[ -z "$dup_band" ] && return
|
||||
|
||||
|
||||
while json_get_var dummy $i; do
|
||||
i=$((i+1))
|
||||
done
|
||||
i=$((i-1))
|
||||
local ssid key encryption
|
||||
while [ $i -gt 0 ]; do
|
||||
json_select $i
|
||||
json_get_var ssid ssid
|
||||
json_get_var key key
|
||||
json_get_var encryption encryption
|
||||
json_select ..
|
||||
json_add_object
|
||||
json_add_string "ssid" "$ssid"
|
||||
json_add_string "band" "$dup_band"
|
||||
json_add_string "key" "$key"
|
||||
json_add_string "encryption" "$encryption"
|
||||
json_close_object
|
||||
i=$((i-1))
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "get_creds": { "network": "str", "file": "str" }, "set_creds": { "file": "str" } }'
|
||||
|
|
@ -69,6 +109,8 @@ case "$1" in
|
|||
config_foreach get_if_creds "wifi-iface" "$network"
|
||||
json_close_array
|
||||
|
||||
duplicate_if_single_radio
|
||||
|
||||
if [ "$file" == "" ]; then
|
||||
json_dump
|
||||
else
|
||||
|
|
|
|||
|
|
@ -144,16 +144,6 @@ function genconfig {
|
|||
}
|
||||
|
||||
|
||||
use_local_mirror()
|
||||
{
|
||||
if wget -T 3 -t 2 -O /dev/null $LOCAL_MIRROR >/dev/null 2>/dev/null; then
|
||||
echo "mirror [$LOCAL_MIRROR] exists. Using local mirror"
|
||||
sed -i "s;CONFIG_LOCALMIRROR=.*;CONFIG_LOCALMIRROR=\"$LOCAL_MIRROR\";" .config
|
||||
else
|
||||
echo "mirror [$LOCAL_MIRROR] does not exist. Not using local mirror"
|
||||
fi
|
||||
}
|
||||
|
||||
generate_config()
|
||||
{
|
||||
DIFFFILE="$1"
|
||||
|
|
@ -355,10 +345,6 @@ function genconfig {
|
|||
done
|
||||
setup_dirs
|
||||
create_and_copy_files "$1" "$2"
|
||||
|
||||
if [ $masterconfig -eq 1 ]; then
|
||||
use_local_mirror
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ function generate_tarballs {
|
|||
build_ice_consumer
|
||||
elif [ "$stk_target" == "mediatek" ]; then
|
||||
build_mediatek_kernel
|
||||
build_ice_consumer
|
||||
else
|
||||
echo "Invalid target: $stk_target"
|
||||
print_usage
|
||||
|
|
|
|||
41
mtk-bndstrg/Makefile
Normal file
41
mtk-bndstrg/Makefile
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mtk-bndstrg
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=8a804320c53dead1c9b9f3650cbbc58908c76832
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/mtk-bndstrg
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/mtk-bndstrg
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libpthread +librt
|
||||
TITLE:=Band steering daemon for Mediatek
|
||||
endef
|
||||
|
||||
define Package/mtk-bndstrg/description
|
||||
Band steering for Mediatek
|
||||
endef
|
||||
|
||||
#define Build/Compile
|
||||
#endef
|
||||
|
||||
define Build/Configure
|
||||
#$(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR))
|
||||
endef
|
||||
|
||||
define Package/mtk-bndstrg/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bndstrg $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mtk-bndstrg))
|
||||
|
|
@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
PKG_NAME:=questd
|
||||
PKG_VERSION:=3.1.38
|
||||
|
||||
PKG_SOURCE_VERSION:=16de648470f316aa3b2658e8870141d594aff074
|
||||
PKG_SOURCE_VERSION:=a8145170c3978e3dc92da9e0daab56da7ff049b6
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/questd
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=u-boot
|
||||
PKG_VERSION:=2016.08
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:uboot
|
||||
PKG_RELEASE:=2
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/uboot
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=08fb2b839326c3bc2a2a0472b5dae6ee0288e483
|
||||
PKG_SOURCE_VERSION:=fccb9d5ee720a9f60cba917ded83e5cebe221eef
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
|
@ -61,6 +61,11 @@ endif
|
|||
define Build/Configure
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
$(UBOOT_CONFIG)_config
|
||||
|
||||
$(SED) "s,CONFIG_INTENO_MAJOR=\"0\",CONFIG_INTENO_MAJOR=\"$(PKG_RELEASE)\"," $(PKG_BUILD_DIR)/.config
|
||||
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
oldconfig
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
|
@ -71,6 +76,7 @@ define Build/Compile
|
|||
endef
|
||||
|
||||
define Package/uboot/install/default
|
||||
$(CP) ./files/* $$(1)/
|
||||
$(INSTALL_DIR) $(BIN_DIR)/$(TARGET)
|
||||
$(INSTALL_DIR) $$(1)/boot
|
||||
$(CP) \
|
||||
|
|
|
|||
78
uboot/files/etc/init.d/uboot
Executable file
78
uboot/files/etc/init.d/uboot
Executable file
|
|
@ -0,0 +1,78 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=50
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
|
||||
sanity_check_env(){
|
||||
|
||||
# make sure iboot is used to start board, but only if verify_boot != 1
|
||||
# that allows a person to change the bootcmd and not have it overwritten automatically
|
||||
# but still force it to iboot for old boards.
|
||||
vb=$(fw_printenv -n verify_boot 2>/dev/null)
|
||||
|
||||
if [ "1" != "$verify_boot" ]
|
||||
then
|
||||
if ! fw_printenv -n bootcmd 2>/dev/null| grep iboot >/dev/null
|
||||
then
|
||||
echo "update uboot boot command"
|
||||
fw_setenv bootcmd "rescue;iboot"
|
||||
fw_setenv verify_boot 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# just set 115200 baudrate as it is really hardcoded in the binary blob
|
||||
fw_setenv baudrate 115200
|
||||
}
|
||||
|
||||
uboot_upgrade(){
|
||||
echo "doing upgrade of u-boot old version $cur_Major.$cur_Minor new version $Major.$Minor"
|
||||
mtd erase /dev/mtd0
|
||||
mtd write /boot/uboot.img /dev/mtd0
|
||||
|
||||
sanity_check_env
|
||||
}
|
||||
|
||||
|
||||
start() {
|
||||
iver=$(fw_printenv -n uboot_inteno_version 2>/dev/null)
|
||||
|
||||
if [ -z "$iver" ]
|
||||
then
|
||||
# if this variable is not set by u-boot the u-boot version is too old.
|
||||
uboot_upgrade
|
||||
return
|
||||
fi
|
||||
|
||||
# read in current version into Major Minor variables
|
||||
json_init
|
||||
json_load $(echo $iver |sed -e 's/938f0820-2ffb-11e7-bbc9-2f21351ee6fb: //')
|
||||
json_get_vars Major Minor
|
||||
|
||||
# echo "Major $Major"
|
||||
# echo "Minor $Minor"
|
||||
|
||||
cur_Major=$Major
|
||||
cur_Minor=$Minor
|
||||
|
||||
# read in new uboot version into Major Minor variables
|
||||
json_load $(strings /boot/uboot.img | grep 938f0820-2ffb-11e7-bbc9-2f21351ee6fb |sed -e 's/938f0820-2ffb-11e7-bbc9-2f21351ee6fb: //')
|
||||
json_get_vars Major Minor
|
||||
|
||||
# echo "Major $Major"
|
||||
# echo "Minor $Minor"
|
||||
|
||||
if [ $Major -gt $cur_Major ]
|
||||
then
|
||||
uboot_upgrade
|
||||
return
|
||||
fi
|
||||
|
||||
if [ $Major -eq $cur_Major -a $Minor -gt $cur_Minor ]
|
||||
then
|
||||
uboot_upgrade
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue