From fe6a544606ec14250d84ecd001dfe1523b598fe0 Mon Sep 17 00:00:00 2001 From: Apaczer <94932128+Apaczer@users.noreply.github.com> Date: Tue, 30 May 2023 18:50:51 +0200 Subject: [PATCH] [BOARD] add "dialog" box for RESIZE procedure (#36) in firstboot script --- board/miyoo/boot/firstboot | 8 +++++--- board/miyoo/boot/resize | 0 board/miyoo/genimage-sdcard.cfg | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 board/miyoo/boot/resize diff --git a/board/miyoo/boot/firstboot b/board/miyoo/boot/firstboot index 49c9176b..08688707 100755 --- a/board/miyoo/boot/firstboot +++ b/board/miyoo/boot/firstboot @@ -53,10 +53,12 @@ if test -r "${BASEDIR}/firstboot.custom.sh"; then fi -echo - +echo " " +sleep 1 # resize the main partition if requested -if test -e "${MOUNTDIR}/resize"; then +if ((test -e "${MOUNTDIR}/resize") && !(dialog --defaultno --yes-label NO --no-label YES --stdout --timeout 10 --title " Expand MAIN partition?" \ + --colors --yesno "\n\n \ZuSelect an option & press START\Zn\n\n \ZbWARNING:\Zn\n After 10s auto-resize\n of FAT32 partition will begin." 12 60)); then + clear echo "Going to resize the MAIN partition." | tee -a ${LOG} echo "This can take A LONG TIME, so be patient." | tee -a ${LOG} umount /dev/mmcblk0p4 | tee -a ${LOG} diff --git a/board/miyoo/boot/resize b/board/miyoo/boot/resize new file mode 100644 index 00000000..e69de29b diff --git a/board/miyoo/genimage-sdcard.cfg b/board/miyoo/genimage-sdcard.cfg index 63976ef1..857d218b 100644 --- a/board/miyoo/genimage-sdcard.cfg +++ b/board/miyoo/genimage-sdcard.cfg @@ -11,7 +11,8 @@ image bootfs.vfat { "boot/firstboot", "boot/firstboot.custom.sh-OFF", "boot/modules.custom.sh", - "boot/normalboot.custom.sh" + "boot/normalboot.custom.sh", + "boot/resize" } file configs/manifest { image = "boot/configs/manifest"