From 267973cf1d40ae7717a42d2bfee13bb799c53aeb Mon Sep 17 00:00:00 2001 From: Apaczer <94932128+Apaczer@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:04:50 +0100 Subject: [PATCH] [FIRSTBOOT] allow overwrite of logs & increase min unall. SDsize --- board/miyoo/boot/firstboot | 4 ++-- board/miyoo/rootfs/etc/main | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/board/miyoo/boot/firstboot b/board/miyoo/boot/firstboot index 9d77ad56..6791fa51 100755 --- a/board/miyoo/boot/firstboot +++ b/board/miyoo/boot/firstboot @@ -540,7 +540,7 @@ if (dialog --clear --stdout --ok-label YES --cancel-label NO --title " AUTO-RE SD_MAX_AVAIL_SIZE_IN_GBx10=$(echo "$SD_MAX_AVAIL_SIZE_IN_GB" | tr -d ".") P4_SIZE_IN_GBx10=$(echo "$P4_SIZE_IN_GB" | tr -d ".") #Sanity checks if we don't down- or over-resize partition: - if (test "$P4_SIZE_IN_GBx10" -ge "$SD_MAX_AVAIL_SIZE_IN_GBx10" || test "$SD_MAX_UNALL_SIZE_IN_MiB" -le 0); then + if (test "$P4_SIZE_IN_GBx10" -ge "$SD_MAX_AVAIL_SIZE_IN_GBx10" || test "$SD_MAX_UNALL_SIZE_IN_MiB" -le 15); then echo "Your MAIN partition is greater than available space for resizing or you lack unallocated sectors space" | tee -a ${LOG} sleep 1.5 RESIZE_ABORT=true @@ -612,5 +612,5 @@ if ($CONSOLE_OVERWRITE || $RESIZE_COMMENCED || test -r "${BASEDIR}/firstboot.cus safe_reboot_func else #just grep logs from temp directory before continuing - mv ${LOG} ${HOME}/log_firstboot.txt + yes | mv ${LOG} ${HOME}/log_firstboot.txt fi diff --git a/board/miyoo/rootfs/etc/main b/board/miyoo/rootfs/etc/main index 599d5004..e7eb6a8e 100755 --- a/board/miyoo/rootfs/etc/main +++ b/board/miyoo/rootfs/etc/main @@ -40,8 +40,7 @@ params=`cat ${BOOTDIR}/uEnv.txt |grep -a "CONSOLE_PARAMETERS" | cut -d "=" -f 2- BACKLIGHT=$(cat ${HOME}/.backlight.conf) # TVout scripting backend -tvout=`cat ${HOME}/tvout` -if ((test -r "${HOME}/tvout")); then +if test -r "${HOME}/tvout"; then echo 0 > /sys/class/backlight/backlight/brightness echo 0 > /sys/class/vtconsole/vtcon1/bind if test $BACKLIGHT -ne 0; then @@ -122,7 +121,7 @@ fi if test "x${DEBUG_MSG}" == "xyes"; then sleep 1 dmesg > ${HOME}/dmesg.txt - mv ${LOGS} ${HOME}/log.txt + yes | mv ${LOGS} ${HOME}/log.txt fi while [ 1 ]