Skip to content

Commit

Permalink
update bootcmd to remove sleep if necessary
Browse files Browse the repository at this point in the history
on update/install
  • Loading branch information
Shaun Inman committed Jun 24, 2022
1 parent 0afd9bd commit 327b817
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions skeleton/miyoo/app/MainUI
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ DIR=/mnt/SDCARD/miyoo/app
cd "$DIR"

export LD_LIBRARY_PATH=/lib:/config/lib:/customer/lib

# update bootcmd if necessary
contains() { [ -z "${2##*$1*}" ]; }
MIYOO_VERSION=`/etc/fw_printenv miyoo_version`
MIYOO_VERSION=${MIYOO_VERSION#miyoo_version=}
SUPPORTED_VERSION="202205010000" # date after latest known version
if [ $MIYOO_VERSION -lt $SUPPORTED_VERSION ]; then
OLD_CMD=`/etc/fw_printenv bootcmd`
NEW_CMD="gpio output 85 1; bootlogo 0 0 0 0 0; mw 1f001cc0 11; gpio out 8 0; sf probe 0;sf read 0x22000000 \${sf_kernel_start} \${sf_kernel_size}; gpio out 8 1; gpio output 4 1; bootm 0x22000000"
if contains "sleepms" "$OLD_CMD"; then
./say "Updating bootcmd"
/etc/fw_setenv bootcmd $NEW_CMD
sleep 1
fi
fi

SYSTEM_PATH=/mnt/SDCARD/.system
OLD_SYSTEM_PATH=/mnt/SDCARD/.system_old

Expand All @@ -23,6 +39,7 @@ else
fi

# then do it
./blank
./say "$VERB MiniUI"
unzip -o "/mnt/SDCARD/miyoo/app/MiniUI.zip" -d "/mnt/SDCARD"

Expand Down

0 comments on commit 327b817

Please sign in to comment.