diff --git a/board/bananapi/uInitrd b/board/bananapi/uInitrd index efc46c2fdd..183a1cbdd1 100644 Binary files a/board/bananapi/uInitrd and b/board/bananapi/uInitrd differ diff --git a/board/common/overlay-initramfs/init b/board/common/overlay-initramfs/init index 4030b1a887..7b953cba28 100755 --- a/board/common/overlay-initramfs/init +++ b/board/common/overlay-initramfs/init @@ -1,14 +1,12 @@ #!/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin +DISK_TIMEOUT="10" msg() { - echo "* $1" + echo " * $1" } -msg "Waiting for sdcard" -sleep 2 - msg "Mounting pseudo filesystems" mount -t devtmpfs devtmpfs /dev mount -t proc proc /proc @@ -24,12 +22,24 @@ else # e.g. /dev/sdc2 DATA_DEV=${DISK_DEV}3 fi +msg "Waiting for sdcard" +count=0 +while true; do + if [ $count -ge $DISK_TIMEOUT ]; then + break + fi + if [ -b $ROOT_DEV ]; then + break + fi + count=$(($count + 1)) + sleep 1 +done + msg "Disk device is $DISK_DEV" msg "Boot device is $BOOT_DEV" msg "Root device is $ROOT_DEV" msg "Data device is $DATA_DEV" - FW_DIR=/data/.fwupdate FW_FILE=firmware.img.gz FW_FILE_EXTR=firmware.img @@ -101,3 +111,4 @@ dd if=$FW_DIR/$FW_FILE_EXTR skip=$root_start of=$ROOT_DEV bs=1048576 count=$root msg "Cleaning up" rm -rf $FW_DIR + diff --git a/board/common/overlay/etc/init.d/S01mountall b/board/common/overlay/etc/init.d/S01mountall index 3d61d07e80..bfde44d17b 100755 --- a/board/common/overlay/etc/init.d/S01mountall +++ b/board/common/overlay/etc/init.d/S01mountall @@ -4,8 +4,10 @@ test -n "$os_version" || source /etc/init.d/base mount_fs() { msg_begin "Mounting filesystems" - /bin/mount -T /etc/fstab.disk -a - /bin/mount -T /etc/fstab.extra -a + /bin/mount -T /etc/fstab.disk -a && + /bin/mount -T /etc/fstab.extra -a && + if [ -r /data/etc/fstab.user ]; then /bin/mount -T /data/etc/fstab.user -a; fi + test $? == 0 && msg_done || msg_fail } diff --git a/board/common/overlay/etc/init.d/S50date b/board/common/overlay/etc/init.d/S50date index 8ec3871268..de4d4f8225 100755 --- a/board/common/overlay/etc/init.d/S50date +++ b/board/common/overlay/etc/init.d/S50date @@ -40,6 +40,7 @@ source $conf set_current_date_http() { date_str=$(curl -v -s -m $date_timeout -X GET http://$date_host 2>&1 | grep Date | sed -e 's/< Date: //') + test -z "$date_str" && return 1 date -u -D "%a, %d %b %Y %H:%M:%S" -s "$date_str" > /dev/null return $? } @@ -50,7 +51,7 @@ set_current_date_ntp() { start_http() { msg_begin "Setting current date using http" - set_current_date_http + set_current_date_http || set_current_date_http test $? == 0 && msg_done "$(date)" || msg_fail msg_begin "Starting http date updater" @@ -76,7 +77,7 @@ start_ntp() { rm ${ntp_conf}.tmp msg_begin "Setting current date using ntp" - set_current_date_ntp + set_current_date_ntp || set_current_date_ntp test $? == 0 && msg_done "$(date)" || msg_fail msg_begin "Starting ntpd" diff --git a/board/odroidc1/uInitrd b/board/odroidc1/uInitrd index 0a061f135d..ab987fa42b 100644 Binary files a/board/odroidc1/uInitrd and b/board/odroidc1/uInitrd differ diff --git a/board/odroidc2/uInitrd b/board/odroidc2/uInitrd index e761d4199e..f455ce372f 100644 Binary files a/board/odroidc2/uInitrd and b/board/odroidc2/uInitrd differ diff --git a/board/odroidxu4/uInitrd b/board/odroidxu4/uInitrd index 1692af7d0c..5ed854ada3 100644 Binary files a/board/odroidxu4/uInitrd and b/board/odroidxu4/uInitrd differ diff --git a/board/pine64/fwupdater.img b/board/pine64/fwupdater.img index e6a3c288cf..573fe5bdfe 100644 Binary files a/board/pine64/fwupdater.img and b/board/pine64/fwupdater.img differ diff --git a/board/raspberrypi/fwupdater.gz b/board/raspberrypi/fwupdater.gz index cc1c05d595..6bc64ad573 100644 Binary files a/board/raspberrypi/fwupdater.gz and b/board/raspberrypi/fwupdater.gz differ diff --git a/board/raspberrypi2/fwupdater.gz b/board/raspberrypi2/fwupdater.gz index cc1c05d595..6bc64ad573 100644 Binary files a/board/raspberrypi2/fwupdater.gz and b/board/raspberrypi2/fwupdater.gz differ diff --git a/board/raspberrypi3/fwupdater.gz b/board/raspberrypi3/fwupdater.gz index cc1c05d595..6bc64ad573 100644 Binary files a/board/raspberrypi3/fwupdater.gz and b/board/raspberrypi3/fwupdater.gz differ diff --git a/build.sh b/build.sh index 46e7f189c1..dac91efc6d 100755 --- a/build.sh +++ b/build.sh @@ -48,10 +48,11 @@ elif [ "$target" == "mkrelease" ]; then mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img rm -f $basedir/$osname-$board-$osversion.img.gz $gzip $basedir/$osname-$board-$osversion.img + echo "your image is ready at $basedir/$osname-$board-$osversion.img.gz" elif [ -n "$target" ]; then make O=$outputdir $target else - make O=$outputdir - test -x $boarddir/mkimage.sh && $boarddir/mkimage.sh + make O=$outputdir all + echo "build successful" fi diff --git a/configs/odroidc1_defconfig b/configs/odroidc1_defconfig index 2afbb4fec5..d4d009560d 100644 --- a/configs/odroidc1_defconfig +++ b/configs/odroidc1_defconfig @@ -10,7 +10,7 @@ BR2_OPTIMIZE_2=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y -BR2_TOOLCHAIN_EXTERNAL_URL="http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz" +BR2_TOOLCHAIN_EXTERNAL_URL="https://releases.linaro.org/archive/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz" BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-linux-gnueabihf" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1=y diff --git a/configs/odroidc1_initramfs_defconfig b/configs/odroidc1_initramfs_defconfig index 90ebefa4ce..6096ab6491 100644 --- a/configs/odroidc1_initramfs_defconfig +++ b/configs/odroidc1_initramfs_defconfig @@ -10,7 +10,7 @@ BR2_OPTIMIZE_2=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y -BR2_TOOLCHAIN_EXTERNAL_URL="http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz" +BR2_TOOLCHAIN_EXTERNAL_URL="https://releases.linaro.org/archive/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz" BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-linux-gnueabihf" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1=y diff --git a/writeimage.sh b/writeimage.sh index 3e0f943064..99895df526 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -2,7 +2,7 @@ function usage() { - echo "Usage: $0 [options...]" 1>&2 + echo "Usage: $0 [options...]" echo "" echo "Available options:" echo " <-i image_file> - indicates the path to the image file (e.g. -i /home/user/Download/file.img.gz)" @@ -14,7 +14,7 @@ function usage() { } if [ -z "$1" ]; then - usage + usage 1>&2 fi if [[ $(id -u) -ne 0 ]]; then echo "please run as root"; exit 1; fi @@ -51,13 +51,13 @@ while getopts "a:d:f:h:i:lm:n:o:p:s:w" o; do DNS=${S_IP[2]} ;; *) - usage + usage 1>&2 ;; esac done if [ -z "$SDCARD_DEV" ] || [ -z "$DISK_IMG" ]; then - usage + usage 1>&2 fi function cleanup {