mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 21:26:36 +00:00
Merge branch 'thingos' into better-firmware-update
This commit is contained in:
commit
907b91e142
@ -172,6 +172,10 @@ rm -f $TARGET/usr/sbin/ctdb*
|
|||||||
rm -f $TARGET/usr/sbin/winbindd
|
rm -f $TARGET/usr/sbin/winbindd
|
||||||
rm -f $TARGET/usr/share/perl5
|
rm -f $TARGET/usr/share/perl5
|
||||||
|
|
||||||
|
# useless mongodb binaries
|
||||||
|
rm -f $TARGET/usr/bin/mongos
|
||||||
|
rm -f $TARGET/usr/bin/mongoperf
|
||||||
|
|
||||||
# unused python folders
|
# unused python folders
|
||||||
rm -rf $TARGET/usr/lib/python2.7/site-packages/samba/
|
rm -rf $TARGET/usr/lib/python2.7/site-packages/samba/
|
||||||
rm -rf $TARGET/usr/lib/python2.7/ensurepip/
|
rm -rf $TARGET/usr/lib/python2.7/ensurepip/
|
||||||
|
@ -38,22 +38,10 @@ date_interval="900"
|
|||||||
|
|
||||||
source $conf
|
source $conf
|
||||||
|
|
||||||
kill_after_timeout() {
|
|
||||||
sleep $date_timeout
|
|
||||||
ps aux | grep httplib | grep -v grep | tr -s ' ' | cut -d ' ' -f 2 | xargs -r kill
|
|
||||||
}
|
|
||||||
|
|
||||||
set_current_date_http() {
|
set_current_date_http() {
|
||||||
kill_after_timeout &
|
date_str=$(curl -v -s -m $date_timeout -X GET http://$date_host 2>&1 | grep Date | sed -e 's/< Date: //')
|
||||||
|
date -D "%a, %d %b %Y %H:%M:%S" -s "$date_str" > /dev/null
|
||||||
timestamp=$(python -c "import calendar, httplib, email.utils; conn = httplib.HTTPConnection('$date_host'); conn.request('HEAD', '/'); \
|
return $?
|
||||||
print calendar.timegm(email.utils.parsedate(conn.getresponse().getheader('date')))")
|
|
||||||
|
|
||||||
if [ -n "$timestamp" ]; then
|
|
||||||
date +%s -s @$timestamp > /dev/null
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_current_date_ntp() {
|
set_current_date_ntp() {
|
||||||
|
@ -14,7 +14,7 @@ function exit_usage() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Statuses:"
|
echo "Statuses:"
|
||||||
echo " idle"
|
echo " idle"
|
||||||
echo " downloading <version>: <percent>%"
|
echo " downloading <version>"
|
||||||
echo " downloaded <version>"
|
echo " downloaded <version>"
|
||||||
echo " extracting <version>"
|
echo " extracting <version>"
|
||||||
echo " extracted <version>"
|
echo " extracted <version>"
|
||||||
@ -46,8 +46,8 @@ FW_DIR=/data/.fwupdate
|
|||||||
FW_FILE=firmware.img.gz
|
FW_FILE=firmware.img.gz
|
||||||
FW_FILE_EXTR=firmware.img
|
FW_FILE_EXTR=firmware.img
|
||||||
|
|
||||||
WGET_LOG_FILE=wget.log
|
CURL_LOG_FILE=curl.log
|
||||||
WGET_PID_FILE=wget.pid
|
CURL_PID_FILE=curl.pid
|
||||||
|
|
||||||
GUNZIP_LOG_FILE=gunzip.log
|
GUNZIP_LOG_FILE=gunzip.log
|
||||||
GUNZIP_PID_FILE=gunzip.pid
|
GUNZIP_PID_FILE=gunzip.pid
|
||||||
@ -130,28 +130,26 @@ function do_download() {
|
|||||||
mkdir -p $FW_DIR
|
mkdir -p $FW_DIR
|
||||||
echo $version > $FW_DIR/$VER_FILE
|
echo $version > $FW_DIR/$VER_FILE
|
||||||
|
|
||||||
wget --no-check-certificate -O $FW_DIR/$FW_FILE --quiet --show-progress --progress=dot "$url" &> $FW_DIR/$WGET_LOG_FILE &
|
curl_opts="-S -f -L"
|
||||||
|
if [ -n "$os_firmware_username" ]; then
|
||||||
|
curl_opts+=" --user $os_firmware_username:$os_firmware_password"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl $curl_opts -o $FW_DIR/$FW_FILE "$url" &> $FW_DIR/$CURL_LOG_FILE &
|
||||||
pid=$!
|
pid=$!
|
||||||
echo $pid > $FW_DIR/$WGET_PID_FILE
|
echo $pid > $FW_DIR/$CURL_PID_FILE
|
||||||
wait $pid
|
wait $pid
|
||||||
}
|
}
|
||||||
|
|
||||||
function download_status() {
|
function download_status() {
|
||||||
if [ -f $FW_DIR/$WGET_PID_FILE ]; then
|
if [ -f $FW_DIR/$CURL_PID_FILE ]; then
|
||||||
pid=$(cat $FW_DIR/$WGET_PID_FILE)
|
pid=$(cat $FW_DIR/$CURL_PID_FILE)
|
||||||
if kill -0 $pid &>/dev/null; then
|
if kill -0 $pid &>/dev/null; then
|
||||||
progress=$(tail -n2 $FW_DIR/$WGET_LOG_FILE | grep -oe '[[:digit:]]*%')
|
echo "running"
|
||||||
if [ -z "$progress" ]; then
|
|
||||||
progress="0%"
|
|
||||||
fi
|
|
||||||
|
|
||||||
progress=($progress)
|
|
||||||
|
|
||||||
echo ${progress[0]}
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $FW_DIR/$FW_FILE ]; then
|
if [ -f $FW_DIR/$FW_FILE ]; then
|
||||||
echo "done"
|
echo "done"
|
||||||
fi
|
fi
|
||||||
@ -326,11 +324,11 @@ function show_status() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
status=$(download_status)
|
status=$(download_status)
|
||||||
if [ "$status" == "done" ]; then
|
if [ "$status" == "running" ]; then
|
||||||
echo "downloaded $(new_version)"
|
echo "downloading $(new_version)"
|
||||||
return
|
return
|
||||||
elif [ -n "$status" ]; then
|
elif [ -n "$status" ]; then
|
||||||
echo "downloading $(new_version): $status"
|
echo "downloaded $(new_version)"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -102,7 +102,6 @@ BR2_PACKAGE_PPPD=y
|
|||||||
BR2_PACKAGE_PROFTPD=y
|
BR2_PACKAGE_PROFTPD=y
|
||||||
BR2_PACKAGE_RSYNC=y
|
BR2_PACKAGE_RSYNC=y
|
||||||
BR2_PACKAGE_SAMBA4=y
|
BR2_PACKAGE_SAMBA4=y
|
||||||
BR2_PACKAGE_WGET=y
|
|
||||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
||||||
|
@ -107,7 +107,6 @@ BR2_PACKAGE_PPPD=y
|
|||||||
BR2_PACKAGE_PROFTPD=y
|
BR2_PACKAGE_PROFTPD=y
|
||||||
BR2_PACKAGE_RSYNC=y
|
BR2_PACKAGE_RSYNC=y
|
||||||
BR2_PACKAGE_SAMBA4=y
|
BR2_PACKAGE_SAMBA4=y
|
||||||
BR2_PACKAGE_WGET=y
|
|
||||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
||||||
|
@ -3,7 +3,7 @@ BR2_DL_DIR="$(TOPDIR)/.download"
|
|||||||
BR2_CCACHE=y
|
BR2_CCACHE=y
|
||||||
BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-odroidc2"
|
BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-odroidc2"
|
||||||
BR2_OPTIMIZE_2=y
|
BR2_OPTIMIZE_2=y
|
||||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
BR2_TOOLCHAIN_EXTERNAL=y
|
||||||
BR2_TARGET_OPTIMIZATION="-pipe"
|
BR2_TARGET_OPTIMIZATION="-pipe"
|
||||||
BR2_ROOTFS_SKELETON_CUSTOM=y
|
BR2_ROOTFS_SKELETON_CUSTOM=y
|
||||||
BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton"
|
BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton"
|
||||||
@ -27,7 +27,6 @@ BR2_PACKAGE_FFMPEG_SWSCALE=y
|
|||||||
BR2_PACKAGE_MOTION=y
|
BR2_PACKAGE_MOTION=y
|
||||||
BR2_PACKAGE_JQ=y
|
BR2_PACKAGE_JQ=y
|
||||||
BR2_PACKAGE_CIFS_UTILS=y
|
BR2_PACKAGE_CIFS_UTILS=y
|
||||||
BR2_PACKAGE_E2FSPROGS=y
|
|
||||||
# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set
|
# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set
|
||||||
# BR2_PACKAGE_E2FSPROGS_CHATTR is not set
|
# BR2_PACKAGE_E2FSPROGS_CHATTR is not set
|
||||||
# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set
|
# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set
|
||||||
@ -40,6 +39,7 @@ BR2_PACKAGE_E2FSPROGS=y
|
|||||||
# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set
|
# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set
|
||||||
# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set
|
# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set
|
||||||
# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set
|
# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set
|
||||||
|
BR2_PACKAGE_NTFS_3G=y
|
||||||
BR2_PACKAGE_B43_FIRMWARE=y
|
BR2_PACKAGE_B43_FIRMWARE=y
|
||||||
BR2_PACKAGE_LINUX_FIRMWARE=y
|
BR2_PACKAGE_LINUX_FIRMWARE=y
|
||||||
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y
|
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y
|
||||||
@ -84,10 +84,14 @@ BR2_PACKAGE_OPENSSH=y
|
|||||||
BR2_PACKAGE_PPPD=y
|
BR2_PACKAGE_PPPD=y
|
||||||
BR2_PACKAGE_PROFTPD=y
|
BR2_PACKAGE_PROFTPD=y
|
||||||
BR2_PACKAGE_RSYNC=y
|
BR2_PACKAGE_RSYNC=y
|
||||||
|
BR2_PACKAGE_SAMBA4=y
|
||||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
|
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
|
||||||
BR2_PACKAGE_BASH=y
|
BR2_PACKAGE_BASH=y
|
||||||
|
BR2_PACKAGE_LOGROTATE=y
|
||||||
|
BR2_PACKAGE_TAR=y
|
||||||
BR2_PACKAGE_UTIL_LINUX_BINARIES=y
|
BR2_PACKAGE_UTIL_LINUX_BINARIES=y
|
||||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||||
|
BR2_PACKAGE_NANO=y
|
||||||
|
@ -97,7 +97,6 @@ BR2_PACKAGE_PPPD=y
|
|||||||
BR2_PACKAGE_PROFTPD=y
|
BR2_PACKAGE_PROFTPD=y
|
||||||
BR2_PACKAGE_RSYNC=y
|
BR2_PACKAGE_RSYNC=y
|
||||||
BR2_PACKAGE_SAMBA4=y
|
BR2_PACKAGE_SAMBA4=y
|
||||||
BR2_PACKAGE_WGET=y
|
|
||||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
||||||
|
@ -103,7 +103,6 @@ BR2_PACKAGE_PPPD=y
|
|||||||
BR2_PACKAGE_PROFTPD=y
|
BR2_PACKAGE_PROFTPD=y
|
||||||
BR2_PACKAGE_RSYNC=y
|
BR2_PACKAGE_RSYNC=y
|
||||||
BR2_PACKAGE_SAMBA4=y
|
BR2_PACKAGE_SAMBA4=y
|
||||||
BR2_PACKAGE_WGET=y
|
|
||||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
||||||
|
@ -103,7 +103,6 @@ BR2_PACKAGE_PPPD=y
|
|||||||
BR2_PACKAGE_PROFTPD=y
|
BR2_PACKAGE_PROFTPD=y
|
||||||
BR2_PACKAGE_RSYNC=y
|
BR2_PACKAGE_RSYNC=y
|
||||||
BR2_PACKAGE_SAMBA4=y
|
BR2_PACKAGE_SAMBA4=y
|
||||||
BR2_PACKAGE_WGET=y
|
|
||||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
||||||
|
@ -105,7 +105,6 @@ BR2_PACKAGE_PPPD=y
|
|||||||
BR2_PACKAGE_PROFTPD=y
|
BR2_PACKAGE_PROFTPD=y
|
||||||
BR2_PACKAGE_RSYNC=y
|
BR2_PACKAGE_RSYNC=y
|
||||||
BR2_PACKAGE_SAMBA4=y
|
BR2_PACKAGE_SAMBA4=y
|
||||||
BR2_PACKAGE_WGET=y
|
|
||||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||||
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
|
||||||
|
Loading…
x
Reference in New Issue
Block a user