mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-24 11:46:30 +00:00
Merge branch 'thingos' into dev
This commit is contained in:
commit
2f6e43fc41
Binary file not shown.
@ -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
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
build.sh
5
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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user