mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-01-09 14:17:21 +08:00
Compare commits
61 Commits
cwmpnotif
...
maptopo-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e635ad768e | ||
|
|
8a5b49d585 | ||
|
|
ac69ea616e | ||
|
|
f358d6338d | ||
|
|
c514903145 | ||
|
|
dd69c371ae | ||
|
|
4a1ab17bd4 | ||
|
|
208b2cc8e5 | ||
|
|
2e934a7169 | ||
|
|
b06980688a | ||
|
|
29b9605e02 | ||
|
|
0afa721bca | ||
|
|
3c0de388d1 | ||
|
|
aa1741e87a | ||
|
|
3040359e85 | ||
|
|
237286f42d | ||
|
|
7758b30397 | ||
|
|
7b0dce915c | ||
|
|
b6fdd0115a | ||
|
|
392e08e2fc | ||
|
|
2ae2110799 | ||
|
|
773e7af7f6 | ||
|
|
75e9a5360f | ||
|
|
db5e42434e | ||
|
|
00fd7efa3b | ||
|
|
34f495f0a5 | ||
|
|
e3b7c9c238 | ||
|
|
e3f2e715c1 | ||
|
|
4c149ff680 | ||
|
|
959b0546bc | ||
|
|
e39430ceaf | ||
|
|
6ea9942320 | ||
|
|
a5e812f785 | ||
|
|
a604987a3e | ||
|
|
7b2d8edacf | ||
|
|
47b2b4fc51 | ||
|
|
6b3e6bcd11 | ||
|
|
52726289cc | ||
|
|
6c2aac5db5 | ||
|
|
bfc2b17a72 | ||
|
|
e98422f81e | ||
|
|
841a76a7e6 | ||
|
|
1760ea526c | ||
|
|
b5a493e540 | ||
|
|
7f00d0419f | ||
|
|
64da6686af | ||
|
|
8cc1877efd | ||
|
|
6673a85a21 | ||
|
|
3e07ea7f8d | ||
|
|
8b4ef46681 | ||
|
|
f35e41cc0c | ||
|
|
0aff258e29 | ||
|
|
d919f4440e | ||
|
|
9d20839041 | ||
|
|
36ec134e33 | ||
|
|
ea57418313 | ||
|
|
c61aa804ce | ||
|
|
19bbb87682 | ||
|
|
3ee01927b1 | ||
|
|
d9f6b37bd7 | ||
|
|
c3dd0a996b |
21
bbf/Makefile
21
bbf/Makefile
@@ -5,11 +5,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=2.4-2020-10-07
|
||||
PKG_VERSION:=2.3-2020-09-29
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=994d5e6466edb2e4f7b097d5480894f70a84b4d6
|
||||
PKG_SOURCE_VERSION:=240b7b7488676fc1adddd0bc0b71a74582f91237
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -102,14 +102,25 @@ endef
|
||||
define Package/libbbfdm/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/postinst
|
||||
#!/bin/sh
|
||||
echo "" > /etc/bbfdm/dmmap
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/prerm
|
||||
#!/bin/sh
|
||||
rm -rf /etc/bbfdm/*
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
|
||||
|
||||
@@ -118,7 +118,7 @@ static int addObjBulkDataProfile(char *refparam, struct dmctx *ctx, void *data,
|
||||
last_inst = get_last_instance_bbfdm("dmmap_bulkdata", "profile", "profile_instance");
|
||||
snprintf(prof_id, sizeof(prof_id), "%d", last_inst ? atoi(last_inst)+1 : 1);
|
||||
|
||||
dmuci_add_section_and_rename("bulkdata", "profile", &profile, &value);
|
||||
dmuci_add_section("bulkdata", "profile", &profile, &value);
|
||||
dmuci_set_value_by_section(profile, "profile_id", prof_id);
|
||||
dmuci_set_value_by_section(profile, "enable", "0");
|
||||
dmuci_set_value_by_section(profile, "nbre_of_retained_failed_reports", "0");
|
||||
@@ -228,7 +228,7 @@ static int addObjBulkDataProfileParameter(char *refparam, struct dmctx *ctx, voi
|
||||
|
||||
last_inst = get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_bulkdata", "profile_parameter", "parameter_instance", "profile_id", prev_profile_id);
|
||||
|
||||
dmuci_add_section_and_rename("bulkdata", "profile_parameter", &profile_parameter, &value);
|
||||
dmuci_add_section("bulkdata", "profile_parameter", &profile_parameter, &value);
|
||||
dmuci_set_value_by_section(profile_parameter, "profile_id", prev_profile_id);
|
||||
|
||||
browse_args.option = "profile_id";
|
||||
@@ -282,7 +282,7 @@ static int addObjBulkDataProfileHTTPRequestURIParameter(char *refparam, struct d
|
||||
|
||||
last_inst = get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_bulkdata", "profile_http_request_uri_parameter", "requesturiparameter_instance", "profile_id", prev_profile_id);
|
||||
|
||||
dmuci_add_section_and_rename("bulkdata", "profile_http_request_uri_parameter", &profile_http_request_uri_parameter, &value);
|
||||
dmuci_add_section("bulkdata", "profile_http_request_uri_parameter", &profile_http_request_uri_parameter, &value);
|
||||
dmuci_set_value_by_section(profile_http_request_uri_parameter, "profile_id", prev_profile_id);
|
||||
|
||||
browse_args.option = "profile_id";
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=5.3.15
|
||||
PKG_VERSION:=5.3.14
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=a2289131c5d1f602568a2e8cac1295442504827f
|
||||
PKG_SOURCE_VERSION:=33a3b440dd413dfa6febbc4d92d5a57cba9aee4d
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=5.0-2020-10-07
|
||||
PKG_VERSION:=5.0-2020-09-29
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=9bbaf84db3e432fc040be55a85cf225fb9f61803
|
||||
PKG_SOURCE_VERSION:=f8e695e35c04b60ae38d1a53d518d15ac052b24c
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
@@ -10,6 +10,7 @@ STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG="/usr/sbin/icwmpd"
|
||||
PROG098="/usr/sbin/icwmp_tr098d"
|
||||
|
||||
EXTRA_COMMANDS="notify"
|
||||
EXTRA_HELP=" start [GetRPCMethods] Start icwmpd service and send GetRPCMethods"
|
||||
@@ -178,7 +179,6 @@ set_wan_interface() {
|
||||
}
|
||||
|
||||
start_service() {
|
||||
/usr/sbin/icwmp-notify stop
|
||||
if [ ! -f /tmp/.icwmpd_boot ]; then
|
||||
touch /etc/icwmpd/.icwmpd_boot
|
||||
touch /tmp/.icwmpd_boot
|
||||
@@ -196,7 +196,11 @@ start_service() {
|
||||
get_acs_url
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
if [ "$(uci -q get cwmp.cpe.datamodel)" == "tr098" ]; then
|
||||
procd_set_param command "$PROG098"
|
||||
else
|
||||
procd_set_param command "$PROG"
|
||||
fi
|
||||
if [ "$1" = "GetRPCMethods" ];then
|
||||
procd_append_param command -g
|
||||
elif [ -f /etc/icwmpd/.icwmpd_boot ]; then
|
||||
@@ -204,11 +208,12 @@ start_service() {
|
||||
fi
|
||||
procd_set_param respawn "3" "7" "0"
|
||||
procd_close_instance
|
||||
#procd_open_instance
|
||||
#[ "$(uci -q get cwmp.cpe.notification)" == "1" ] && procd_append_param command "/usr/sbin/icwmp_notifd"
|
||||
#procd_close_instance
|
||||
procd_open_instance
|
||||
if [ "$(uci -q get cwmp.cpe.notification)" == "1" ]; then
|
||||
procd_append_param command "/usr/sbin/icwmp_notifd"
|
||||
fi
|
||||
procd_close_instance
|
||||
fi
|
||||
/usr/sbin/icwmp-notify &
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
@@ -224,6 +229,7 @@ service_triggers() {
|
||||
procd_add_config_trigger "config.change" "cwmp" /etc/init.d/icwmpd reload
|
||||
if [ "$(uci -q get cwmp.cpe.notification)" == "1" ]; then
|
||||
for conf in $(ls /etc/config/); do
|
||||
[ "$conf" == "cwmp" ] && continue
|
||||
procd_add_config_trigger "config.change" "$conf" /etc/init.d/icwmpd notify
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
# Copy defaults by the factory to the cwmp UCI user section.
|
||||
|
||||
|
||||
@@ -14,19 +15,10 @@ mac=$(printf "%12.12X" $((0x$baseMac)))
|
||||
# Get system serial number.
|
||||
serial=$(db -q get hw.board.serial_number)
|
||||
|
||||
# Get userid values
|
||||
acs_userid=$(uci -q get cwmp.acs.userid)
|
||||
cpe_userid=$(uci -q get cwmp.cpe.userid)
|
||||
uci -q batch <<-EOF
|
||||
set cwmp.acs.userid="${mac:0:6}-${serial}"
|
||||
set cwmp.cpe.userid="${mac:0:6}-${serial}"
|
||||
EOF
|
||||
|
||||
# Only set if they are empty
|
||||
if [ -z "$acs_userid" ]
|
||||
then
|
||||
uci -q set cwmp.acs.userid="${mac:0:6}-${serial}"
|
||||
fi
|
||||
|
||||
if [ -z "$cpe_userid" ]
|
||||
then
|
||||
uci -q set cwmp.cpe.userid="${mac:0:6}-${serial}"
|
||||
fi
|
||||
|
||||
# No need for commit here, it is done by uci_apply_defaults().
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f /tmp/icwmp-notify.pid ]; then
|
||||
kill -9 $(cat /tmp/icwmp-notify.pid) 2>/dev/null
|
||||
rm -f /tmp/icwmp-notify.pid
|
||||
fi
|
||||
|
||||
[ "$1" == "stop" ] && exit
|
||||
|
||||
[ "$(uci -q get cwmp.cpe.notification)" == "1" ] || exit
|
||||
|
||||
ubus listen network.interface wifi.* client dsl usb | \
|
||||
while read event ; do
|
||||
ubus call tr069 notify
|
||||
done &
|
||||
|
||||
echo $(($!-1)) $! >/tmp/icwmp-notify.pid
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=2.0.29
|
||||
PKG_VERSION:=2.0.28
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=6e4666101c6927a163480c00fadc0bf2a6f8894c
|
||||
PKG_SOURCE_VERSION:=bcbeae0a8bc09102a8b809cdcbcab0d956880ce0
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
10
iop/config
10
iop/config
@@ -7,7 +7,6 @@ CONFIG_PACKAGE_6in4=y
|
||||
CONFIG_PACKAGE_6rd=y
|
||||
CONFIG_PACKAGE_6to4=y
|
||||
CONFIG_PACKAGE_alsa-lib=y
|
||||
CONFIG_PACKAGE_bulkdata=y
|
||||
CONFIG_PACKAGE_chat=y
|
||||
CONFIG_PACKAGE_comgt=y
|
||||
CONFIG_PACKAGE_comgt-directip=y
|
||||
@@ -15,16 +14,18 @@ CONFIG_PACKAGE_comgt-ncm=y
|
||||
CONFIG_PACKAGE_ddns-scripts=y
|
||||
CONFIG_PACKAGE_ds-lite=y
|
||||
CONFIG_PACKAGE_ethtool=y
|
||||
CONFIG_PACKAGE_fatrace=y
|
||||
CONFIG_PACKAGE_gdb=m
|
||||
CONFIG_PACKAGE_getopt=y
|
||||
CONFIG_PACKAGE_glib2=y
|
||||
CONFIG_PACKAGE_icwmp=y
|
||||
CONFIG_PACKAGE_icwmp-curl=y
|
||||
CONFIG_PACKAGE_ieee1905=y
|
||||
CONFIG_PACKAGE_map-1905=y
|
||||
CONFIG_PACKAGE_map-topology=y
|
||||
CONFIG_PACKAGE_wfadatad=y
|
||||
CONFIG_PACKAGE_imonitor=m
|
||||
CONFIG_PACKAGE_inbd=y
|
||||
CONFIG_PACKAGE_iopupgrade=m
|
||||
CONFIG_PACKAGE_iopupgrade=y
|
||||
CONFIG_PACKAGE_ip-full=y
|
||||
CONFIG_PACKAGE_iperf3=y
|
||||
CONFIG_PACKAGE_ipset=y
|
||||
@@ -48,6 +49,7 @@ CONFIG_PACKAGE_libdaemon=y
|
||||
CONFIG_PACKAGE_libgmp=y
|
||||
CONFIG_PACKAGE_libreadline=y
|
||||
CONFIG_PACKAGE_libwifi=y
|
||||
CONFIG_PACKAGE_loop-detector=m
|
||||
CONFIG_PACKAGE_lscpu=y
|
||||
CONFIG_PACKAGE_map=y
|
||||
CONFIG_PACKAGE_miniupnpd=y
|
||||
@@ -81,6 +83,7 @@ CONFIG_PACKAGE_relayd=y
|
||||
CONFIG_PACKAGE_resolveip=y
|
||||
CONFIG_PACKAGE_rpcd=y
|
||||
CONFIG_PACKAGE_rpcd-mod-rpcsys=y
|
||||
CONFIG_PACKAGE_rsync=y
|
||||
CONFIG_PACKAGE_rulengd=y
|
||||
CONFIG_PACKAGE_strace=y
|
||||
CONFIG_PACKAGE_swmodd=m
|
||||
@@ -93,7 +96,6 @@ CONFIG_PACKAGE_uqmi=y
|
||||
CONFIG_PACKAGE_usb-modeswitch=y
|
||||
CONFIG_PACKAGE_usbreset=y
|
||||
CONFIG_PACKAGE_uspd=y
|
||||
CONFIG_PACKAGE_vsftpd-tls=m
|
||||
CONFIG_PACKAGE_wget=y
|
||||
CONFIG_PACKAGE_wwan=y
|
||||
CONFIG_PACKAGE_wifimngr=y
|
||||
|
||||
@@ -13,7 +13,7 @@ function genconfig {
|
||||
export VERBOSE=0
|
||||
export DEVELOPER=0
|
||||
target="bogus"
|
||||
config_path=""
|
||||
target_config_path=""
|
||||
brcm63xx_mips="target/linux/iopsys-brcm63xx-mips"
|
||||
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
|
||||
ramips="target/linux/iopsys-ramips"
|
||||
@@ -103,7 +103,7 @@ function genconfig {
|
||||
|
||||
if [ $pfound -eq 1 ]; then
|
||||
target="$(echo $TARGET | tr '-' '_')"
|
||||
config_path="$targetpath/config"
|
||||
target_config_path="$targetpath/config"
|
||||
fi
|
||||
|
||||
return
|
||||
@@ -135,7 +135,7 @@ function genconfig {
|
||||
for p in $iopsys_brcm63xx_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_mips"
|
||||
config_path="$brcm63xx_mips/config"
|
||||
target_config_path="$brcm63xx_mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -143,7 +143,7 @@ function genconfig {
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
config_path="$brcm63xx_arm/config"
|
||||
target_config_path="$brcm63xx_arm/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -151,7 +151,7 @@ function genconfig {
|
||||
for p in $iopsys_ramips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_ramips"
|
||||
config_path="$ramips/config"
|
||||
target_config_path="$ramips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -159,7 +159,7 @@ function genconfig {
|
||||
for p in $iopsys_intel_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="intel_mips"
|
||||
config_path="$intel_mips/config"
|
||||
target_config_path="$intel_mips/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -167,7 +167,7 @@ function genconfig {
|
||||
for p in $iopsys_x86; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_x86"
|
||||
config_path="$x86/config"
|
||||
target_config_path="$x86/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -175,7 +175,7 @@ function genconfig {
|
||||
for p in $iopsys_armvirt; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_armvirt"
|
||||
config_path="$armvirt/config"
|
||||
target_config_path="$armvirt/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -339,11 +339,13 @@ function genconfig {
|
||||
v "cp $CONFIGPATH/config .config"
|
||||
cp $CONFIGPATH/config .config
|
||||
|
||||
if [ -f $config_path/config ]; then
|
||||
cat $config_path/config >> .config
|
||||
if [ -f $target_config_path/config ]; then
|
||||
cat $target_config_path/config >> .config
|
||||
echo "" >> .config
|
||||
fi
|
||||
if [ -f $config_path/$BOARDTYPE/config ]; then
|
||||
cat $config_path/$BOARDTYPE/config >> .config
|
||||
if [ -f $target_config_path/$BOARDTYPE/config ]; then
|
||||
cat $target_config_path/$BOARDTYPE/config >> .config
|
||||
echo "" >> .config
|
||||
fi
|
||||
|
||||
#special handling for intel_mips/iopsys_ramips which use TARGET_DEVICES
|
||||
@@ -386,10 +388,12 @@ function genconfig {
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
|
||||
echo "" >> .config
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
|
||||
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
|
||||
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
|
||||
echo "" >> .config
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -280,6 +280,14 @@ function ssh_upgrade {
|
||||
set_config_string CONFIG_TARGET_BOARD
|
||||
firmwares=$(cd bin/targets/$CONFIG_TARGET_BOARD/generic/; ls -t *[0-9].y[3])
|
||||
|
||||
# if target uses pkgtb
|
||||
if [ -z "$firmwares"]
|
||||
then
|
||||
# pkgtb files can not be streamed so copy over the file witch scp
|
||||
use_scp=1
|
||||
firmwares=$(cd bin/targets/$CONFIG_TARGET_BOARD/generic/; ls -t *[0-9].pkgtb)
|
||||
fi
|
||||
|
||||
for upd_fw_base in $firmwares
|
||||
do
|
||||
#echo "firmware $upd_fw"
|
||||
@@ -313,7 +321,16 @@ function ssh_upgrade {
|
||||
[ $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"
|
||||
if [ "$use_scp" == "1" ]
|
||||
then
|
||||
echo "ken"
|
||||
echo "iopu $extra_arg -f /tmp/$upd_fw_base"
|
||||
echo "ken"
|
||||
scp $upd_fw root@$upd_host:/tmp/ &&
|
||||
ssh -o ConnectTimeout=60 root@$upd_host "iopu $extra_arg -f /tmp/$upd_fw_base"
|
||||
else
|
||||
cat $upd_fw | pv -s ${file_size_kb}k | ssh root@$upd_host "iopu $extra_args"
|
||||
fi
|
||||
else
|
||||
scp $upd_fw root@$upd_host:/tmp/ &&
|
||||
ssh -o ConnectTimeout=60 root@$upd_host "sysupgrade -v $3 /tmp/$upd_fw_base" &&
|
||||
|
||||
@@ -163,6 +163,7 @@ function usage {
|
||||
echo " -x Force install even if firmware is not for this board"
|
||||
echo " -b Force install of bootloader regardless of version installed"
|
||||
echo " -r Jump into chroot env of other system"
|
||||
echo " -f Firmware file to use"
|
||||
echo " -C \"command\" Execute command in chroot env of other system"
|
||||
}
|
||||
|
||||
@@ -177,6 +178,64 @@ function newroot_exec {
|
||||
|
||||
}
|
||||
|
||||
function system_is_y_image {
|
||||
|
||||
# find out what rootfs volume is active.
|
||||
cur_vol=$(get_flashbank_current)
|
||||
upd_vol=$(get_flashbank_next)
|
||||
|
||||
# convert volume name "rootfs_$upd_vol" into ubi volume id
|
||||
upd_ubi_id=$(ubinfo -d 0 -N rootfs_$upd_vol | awk "/Volume ID:/ {print \$3}")
|
||||
log "installing Root Fileystem into UBI volume rootfs_$upd_vol"
|
||||
|
||||
# prepare to match dsl.
|
||||
function_call upd_conf_dsl
|
||||
|
||||
log "now starting writing data to flash with [ iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id ]"
|
||||
run_cleanup=1 # When we start to actually write data there might be some
|
||||
# things that need cleanup if we get an error/crash
|
||||
if ! iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id; then
|
||||
log "iopupgrade program Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Firmware programmed to flash."
|
||||
|
||||
# Force upgrade of boot loader
|
||||
[ $upd_forceboot -eq 1 ] && chroot_cmdline="$chroot_cmdline -b"
|
||||
|
||||
if [ $upd_keepconfig -eq 1 ]; then
|
||||
log "Transfering configuration to new system."
|
||||
chroot_cmdline="$chroot_cmdline -c"
|
||||
fi
|
||||
|
||||
mount_newroot
|
||||
if ! chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline; then
|
||||
log "Configuration migration failed!"
|
||||
exit 1
|
||||
fi
|
||||
umount_newroot
|
||||
|
||||
log "New firmware fully installed."
|
||||
run_cleanup=0
|
||||
|
||||
|
||||
# Now make sure that we actually boot the new system on the next reboot
|
||||
upd_finnish
|
||||
|
||||
}
|
||||
|
||||
function system_is_FIT_image {
|
||||
|
||||
# prepare to match dsl.
|
||||
#function_call upd_conf_dsl
|
||||
|
||||
#here we write data
|
||||
bcm_flasher $firmware_file
|
||||
bcm_bootstate 1
|
||||
log "Firmware programmed to flash."
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
# just one instance
|
||||
@@ -194,7 +253,7 @@ trap ctrl_c INT
|
||||
trap timeout SIGALRM
|
||||
trap sig_pipe SIGPIPE
|
||||
|
||||
while getopts "nrxbhcC:" opt; do
|
||||
while getopts "nrxbhcC:f:" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
upd_noreboot=1
|
||||
@@ -216,6 +275,9 @@ while getopts "nrxbhcC:" opt; do
|
||||
newroot_exec "${OPTARG}"
|
||||
exit
|
||||
;;
|
||||
f)
|
||||
firmware_file="${OPTARG}"
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 1
|
||||
@@ -235,59 +297,18 @@ log "Firmware upgrade started"
|
||||
# Should board name be checked
|
||||
if [ $upd_forceimage -eq 0 ]
|
||||
then
|
||||
board=$(db get hw.board.iopVerBoard)
|
||||
board=$(db get hw.board.model_name)
|
||||
cmdline_match="board=$board"
|
||||
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 ubi volume id
|
||||
upd_ubi_id=$(ubinfo -d 0 -N rootfs_$upd_vol | awk "/Volume ID:/ {print \$3}")
|
||||
log "installing Root Fileystem into UBI volume rootfs_$upd_vol"
|
||||
|
||||
# prepare to match dsl.
|
||||
function_call upd_conf_dsl
|
||||
|
||||
# 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 -M "$cmdline_match" -u ubi0_$upd_ubi_id ]"
|
||||
run_cleanup=1 # When we start to actually write data there might be some
|
||||
# things that need cleanup if we get an error/crash
|
||||
if ! iopupgrade $cmdline -M "$cmdline_match" -u ubi0_$upd_ubi_id; then
|
||||
log "iopupgrade program Failed"
|
||||
exit 1
|
||||
# BUG: should probably read a config file.
|
||||
if [ -f /proc/nvram/boardid ]
|
||||
then
|
||||
system_is_FIT_image
|
||||
else
|
||||
system_is_y_image
|
||||
fi
|
||||
|
||||
log "Firmware programmed to flash."
|
||||
|
||||
# Force upgrade of boot loader
|
||||
[ $upd_forceboot -eq 1 ] && chroot_cmdline="$chroot_cmdline -b"
|
||||
|
||||
if [ $upd_keepconfig -eq 1 ]; then
|
||||
log "Transfering configuration to new system."
|
||||
chroot_cmdline="$chroot_cmdline -c"
|
||||
fi
|
||||
|
||||
mount_newroot
|
||||
if ! chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline; then
|
||||
log "Configuration migration failed!"
|
||||
exit 1
|
||||
fi
|
||||
umount_newroot
|
||||
|
||||
log "New firmware 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 ]
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-1905
|
||||
PKG_VERSION:=0.0.11
|
||||
PKG_VERSION:=0.0.10
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=bf13ed6117078177e9ba170b671d25afc044f246
|
||||
PKG_SOURCE_VERSION:=7cdc6d38674bef2c6003a4b60b63be8a789421be
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-agent
|
||||
PKG_VERSION:=2.0.1
|
||||
PKG_VERSION:=2.0.3
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=362ddbaf2b9a5510c89b740fcc23d8425770da3d
|
||||
PKG_SOURCE_VERSION:=6bb0bba83e4c5189c93ed339ed061b86d7766f4d
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
@@ -23,7 +23,7 @@ define Package/map-agent
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libmaputils
|
||||
endef
|
||||
|
||||
define Package/map-agent/description
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=3a55c1f41f0e2c233c28834dea0e881cd2cd0c22
|
||||
PKG_SOURCE_VERSION:=f1b50ed876f14347480e9e131ac6de76922e131a
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -22,7 +22,7 @@ define Package/map-controller
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi Multi-AP Controller (EasyMesh R2)
|
||||
DEPENDS:=+libuci +libubox +ubus
|
||||
DEPENDS:=+libuci +libubox +ubus +libmaputils
|
||||
endef
|
||||
|
||||
define Package/map-controller/description
|
||||
|
||||
@@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=map-topology
|
||||
PKG_VERSION:=1.5.5
|
||||
PKG_VERSION:=1.5.6
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_VERSION:=55ae3fea1a6eb5372610452e3ad965ad5afa828c
|
||||
PKG_SOURCE_VERSION:=8d008ef712227986263e9a2a1b188ce3a27e17f8
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=2.0.22
|
||||
PKG_VERSION:=2.0.21
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=06270b7a45b77d6d883eb244e6d854efce10f17f
|
||||
PKG_SOURCE_VERSION:=25b920c13160360de16300a8d04a068feb197c50
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
@@ -37,4 +37,4 @@ populate_config(){
|
||||
[ $DEBUG ] && cat /etc/config/ports
|
||||
}
|
||||
|
||||
[ -f /sbin/db -a -f /lib/db/config/hw ] && populate_config
|
||||
[ -f /sbin/db -a -f /etc/board-db/config/hw ] && populate_config
|
||||
|
||||
@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=5.1.12
|
||||
PKG_VERSION:=5.2.1
|
||||
|
||||
PKG_SOURCE_VERSION:=5de841c629d13bd8a5b90081343aaf5b75afc7c2
|
||||
PKG_SOURCE_VERSION:=d4ac29b535bf1ec0f58c4c9eea08ec7db08775d1
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_INSTALL:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/rulengd.git
|
||||
PKG_SOURCE_VERSION:=d7a4d24e653ea0dc02679e24f8ec3c817aafdb37
|
||||
PKG_SOURCE_VERSION:=ad94ccdd82b22527ab32937ca1a2682030319ed3
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_INSTALL:=1
|
||||
|
||||
@@ -144,7 +144,7 @@ static int get_IPDiagnosticsUDPEchoConfig_EchoPlusSupported(char *refparam, stru
|
||||
static inline char *udpechoconfig_get(char *option, char *def)
|
||||
{
|
||||
char *tmp;
|
||||
dmuci_get_varstate_string("udpechoserver", "udpechoserver", option, &tmp);
|
||||
varstate_get_value_string("udpechoserver", "udpechoserver", option, &tmp);
|
||||
if(tmp && tmp[0] == '\0')
|
||||
return dmstrdup(def);
|
||||
else
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uspd
|
||||
PKG_VERSION:=2.0.6
|
||||
PKG_VERSION:=2.0.5
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f4cb4407c275befee87cf761a51687d3b9869e99
|
||||
PKG_SOURCE_VERSION:=31f7beca9175b1503aa49fd9d762fc917c9b736f
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
@@ -7,12 +7,15 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=8.2.9
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=ff879d814caba6807f64288de22db6f78c03438c
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -38,6 +41,12 @@ TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/wifimngr/ $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/wifimngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/wifimngr.init $(1)/etc/init.d/wifimngr
|
||||
|
||||
@@ -9,7 +9,7 @@ PROG=/usr/sbin/wifimngr
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
# procd_set_param env IOP_LLA_LIBS_DEBUG=3 #for debugging only
|
||||
procd_set_param env LIBWIFI_DEBUG_LEVEL=3 #for debugging only
|
||||
# procd_set_param stderr 1 #for debugging only
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
@@ -32,14 +32,14 @@ static int add_xmpp_connection(char *refparam, struct dmctx *ctx, void *data, ch
|
||||
last_inst = get_last_instance_bbfdm("dmmap_xmpp", "connection", "con_inst");
|
||||
dmasprintf(&id, "%d", (last_inst) ? atoi(last_inst) + 1 : 1);
|
||||
|
||||
dmuci_add_section_and_rename("xmpp", "connection", &xmpp_con, &con_name);
|
||||
dmuci_add_section("xmpp", "connection", &xmpp_con, &con_name);
|
||||
dmuci_set_value_by_section(xmpp_con, "xmpp_id", id);
|
||||
dmuci_set_value_by_section(xmpp_con, "enable", "0");
|
||||
dmuci_set_value_by_section(xmpp_con, "interval", "30");
|
||||
dmuci_set_value_by_section(xmpp_con, "attempt", "16");
|
||||
dmuci_set_value_by_section(xmpp_con, "serveralgorithm", "DNS-SRV");
|
||||
|
||||
dmuci_add_section_and_rename("xmpp", "connection_server", &xmpp_con_srv, &con_srv_name);
|
||||
dmuci_add_section("xmpp", "connection_server", &xmpp_con_srv, &con_srv_name);
|
||||
dmuci_set_value_by_section(xmpp_con_srv, "con_id", id);
|
||||
dmuci_set_value_by_section(xmpp_con_srv, "enable", "0");
|
||||
dmuci_set_value_by_section(xmpp_con_srv, "port", "5222");
|
||||
|
||||
Reference in New Issue
Block a user