diff --git a/board/common/cleanups.sh b/board/common/cleanups.sh index 4e0ebfe97f..051799f109 100755 --- a/board/common/cleanups.sh +++ b/board/common/cleanups.sh @@ -172,6 +172,10 @@ rm -f $TARGET/usr/sbin/ctdb* rm -f $TARGET/usr/sbin/winbindd rm -f $TARGET/usr/share/perl5 +# useless mongodb binaries +rm -f $TARGET/usr/bin/mongos +rm -f $TARGET/usr/bin/mongoperf + # unused python folders rm -rf $TARGET/usr/lib/python2.7/site-packages/samba/ rm -rf $TARGET/usr/lib/python2.7/ensurepip/ diff --git a/board/common/overlay/etc/init.d/S50date b/board/common/overlay/etc/init.d/S50date index ab547004dd..be42d6e9e3 100755 --- a/board/common/overlay/etc/init.d/S50date +++ b/board/common/overlay/etc/init.d/S50date @@ -38,22 +38,10 @@ date_interval="900" 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() { - kill_after_timeout & - - timestamp=$(python -c "import calendar, httplib, email.utils; conn = httplib.HTTPConnection('$date_host'); conn.request('HEAD', '/'); \ - print calendar.timegm(email.utils.parsedate(conn.getresponse().getheader('date')))") - - if [ -n "$timestamp" ]; then - date +%s -s @$timestamp > /dev/null - else - return 1 - fi + 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 + return $? } set_current_date_ntp() { diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 66c8df6170..f9bcd4e7de 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -14,7 +14,7 @@ function exit_usage() { echo "" echo "Statuses:" echo " idle" - echo " downloading : %" + echo " downloading " echo " downloaded " echo " extracting " echo " extracted " @@ -46,8 +46,8 @@ FW_DIR=/data/.fwupdate FW_FILE=firmware.img.gz FW_FILE_EXTR=firmware.img -WGET_LOG_FILE=wget.log -WGET_PID_FILE=wget.pid +CURL_LOG_FILE=curl.log +CURL_PID_FILE=curl.pid GUNZIP_LOG_FILE=gunzip.log GUNZIP_PID_FILE=gunzip.pid @@ -130,28 +130,26 @@ function do_download() { mkdir -p $FW_DIR 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=$! - echo $pid > $FW_DIR/$WGET_PID_FILE + echo $pid > $FW_DIR/$CURL_PID_FILE wait $pid } function download_status() { - if [ -f $FW_DIR/$WGET_PID_FILE ]; then - pid=$(cat $FW_DIR/$WGET_PID_FILE) + if [ -f $FW_DIR/$CURL_PID_FILE ]; then + pid=$(cat $FW_DIR/$CURL_PID_FILE) if kill -0 $pid &>/dev/null; then - progress=$(tail -n2 $FW_DIR/$WGET_LOG_FILE | grep -oe '[[:digit:]]*%') - if [ -z "$progress" ]; then - progress="0%" - fi - - progress=($progress) - - echo ${progress[0]} + echo "running" return fi fi - + if [ -f $FW_DIR/$FW_FILE ]; then echo "done" fi @@ -326,11 +324,11 @@ function show_status() { fi status=$(download_status) - if [ "$status" == "done" ]; then - echo "downloaded $(new_version)" + if [ "$status" == "running" ]; then + echo "downloading $(new_version)" return elif [ -n "$status" ]; then - echo "downloading $(new_version): $status" + echo "downloaded $(new_version)" return fi diff --git a/configs/bananapi_defconfig b/configs/bananapi_defconfig index 414d714c27..1f72d3bdf6 100644 --- a/configs/bananapi_defconfig +++ b/configs/bananapi_defconfig @@ -102,7 +102,6 @@ BR2_PACKAGE_PPPD=y BR2_PACKAGE_PROFTPD=y BR2_PACKAGE_RSYNC=y BR2_PACKAGE_SAMBA4=y -BR2_PACKAGE_WGET=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y diff --git a/configs/odroidc1_defconfig b/configs/odroidc1_defconfig index 7175d670c4..82bcae8a82 100644 --- a/configs/odroidc1_defconfig +++ b/configs/odroidc1_defconfig @@ -107,7 +107,6 @@ BR2_PACKAGE_PPPD=y BR2_PACKAGE_PROFTPD=y BR2_PACKAGE_RSYNC=y BR2_PACKAGE_SAMBA4=y -BR2_PACKAGE_WGET=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y diff --git a/configs/odroidc2_defconfig b/configs/odroidc2_defconfig index 4ebee41d36..345f0292df 100644 --- a/configs/odroidc2_defconfig +++ b/configs/odroidc2_defconfig @@ -3,7 +3,7 @@ BR2_DL_DIR="$(TOPDIR)/.download" BR2_CCACHE=y BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-odroidc2" BR2_OPTIMIZE_2=y -BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TOOLCHAIN_EXTERNAL=y BR2_TARGET_OPTIMIZATION="-pipe" BR2_ROOTFS_SKELETON_CUSTOM=y BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" @@ -27,7 +27,6 @@ BR2_PACKAGE_FFMPEG_SWSCALE=y BR2_PACKAGE_MOTION=y BR2_PACKAGE_JQ=y BR2_PACKAGE_CIFS_UTILS=y -BR2_PACKAGE_E2FSPROGS=y # BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set # BR2_PACKAGE_E2FSPROGS_CHATTR 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_TUNE2FS is not set # BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +BR2_PACKAGE_NTFS_3G=y BR2_PACKAGE_B43_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y @@ -84,10 +84,14 @@ BR2_PACKAGE_OPENSSH=y BR2_PACKAGE_PPPD=y BR2_PACKAGE_PROFTPD=y BR2_PACKAGE_RSYNC=y +BR2_PACKAGE_SAMBA4=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_PACKAGE_BASH=y +BR2_PACKAGE_LOGROTATE=y +BR2_PACKAGE_TAR=y BR2_PACKAGE_UTIL_LINUX_BINARIES=y BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y diff --git a/configs/odroidxu4_defconfig b/configs/odroidxu4_defconfig index b85b9543ac..d99c7ca9d3 100644 --- a/configs/odroidxu4_defconfig +++ b/configs/odroidxu4_defconfig @@ -97,7 +97,6 @@ BR2_PACKAGE_PPPD=y BR2_PACKAGE_PROFTPD=y BR2_PACKAGE_RSYNC=y BR2_PACKAGE_SAMBA4=y -BR2_PACKAGE_WGET=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig index cda827cecc..4c876eb972 100644 --- a/configs/raspberrypi2_defconfig +++ b/configs/raspberrypi2_defconfig @@ -103,7 +103,6 @@ BR2_PACKAGE_PPPD=y BR2_PACKAGE_PROFTPD=y BR2_PACKAGE_RSYNC=y BR2_PACKAGE_SAMBA4=y -BR2_PACKAGE_WGET=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y diff --git a/configs/raspberrypi3_defconfig b/configs/raspberrypi3_defconfig index 9331c814a0..91f3f40fb4 100644 --- a/configs/raspberrypi3_defconfig +++ b/configs/raspberrypi3_defconfig @@ -103,7 +103,6 @@ BR2_PACKAGE_PPPD=y BR2_PACKAGE_PROFTPD=y BR2_PACKAGE_RSYNC=y BR2_PACKAGE_SAMBA4=y -BR2_PACKAGE_WGET=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig index 563c64e4f0..f6f4ab5b61 100644 --- a/configs/raspberrypi_defconfig +++ b/configs/raspberrypi_defconfig @@ -105,7 +105,6 @@ BR2_PACKAGE_PPPD=y BR2_PACKAGE_PROFTPD=y BR2_PACKAGE_RSYNC=y BR2_PACKAGE_SAMBA4=y -BR2_PACKAGE_WGET=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y