temp/u-boot-pinephone: add -s|--skip-delay option (MR 2155)

skip delay when updating automatically
This commit is contained in:
Bobby The Builder 2021-05-13 10:23:52 -04:00 committed by Oliver Smith
parent b3ba1b4c45
commit cd1b1640b6
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 14 additions and 4 deletions

View file

@ -52,5 +52,5 @@ package() {
sha512sums="
73b132cdc26113a83d060f0d243320ca989b4efa98fe95a2205526a42f615ced7046bb9d4878c67a9a550b04c2519d90be3c2272be97c878d759bf5d027cf536 u-boot-7492749fec31b1086bc8933bf113a766aea021aa.tar.gz
3cba8a0e899be8cb0b9260b7a86d4115f74c279a1bac8c1403ee669adf91dca8215d8d2d6395ebb3cd67ce000f37a51d6e033b62a8d616b346a9072fa58a4b70 0001-expose-DRAM-clock-speed.patch
df23f3009430dfb8afc4129a47cd73f182178c91eefef5fa9dab65088115c87e66d37f13e72a9f4280c3f6aeb18bbea0f28830905e260d872a01cae1da00b0e8 update-u-boot
a616ed442b281df7122437e3e6ed344d13ba799626c020ee27b2ce8074a2b6835d5c91aece001ead5c498ccbe16ab616881b9787601c332c8fbb19692c5af7a6 update-u-boot
"

View file

@ -7,6 +7,7 @@ dryrun=
imagedir=
default_freq=528
freq=
skip_delay=
get_boot_blockdev() {
# Find the blockdevice where /boot is mounted from
@ -62,7 +63,7 @@ usage() {
get_defaults
cat <<EOF
usage: $0 [-n,--dry-run] [-i,--imagedir <imagedir>] [-b|--board <board-type>] [-d|--device <device>] [-r|--ram-freq <freq>]
usage: $0 [-n,--dry-run] [-i,--imagedir <imagedir>] [-b|--board <board-type>] [-d|--device <device>] [-r|--ram-freq <freq>] [-s|--skip-delay]
options:
@ -82,6 +83,8 @@ options:
* 552 (default before v21.03 / edge 2021-04-05)
* 624
-s,--skip-delay Skip delay and flash the image immediately
EOF
}
@ -140,6 +143,9 @@ while [ $# -gt 0 ]; do
esac
shift
;;
-s|--skip-delay)
skip_delay="yes"
;;
--)
break
;;
@ -171,8 +177,12 @@ if [ -z "$dryrun" ]; then
exit 0
fi
fi
echo "Updating $board u-boot in $device in 3 seconds..."
sleep 3
if [ -z "$skip_delay" ]; then
echo "Updating $board u-boot in $device in 3 seconds..."
sleep 3
else
echo "Updating $board u-boot in $device"
fi
fi
if [ -z "$freq" ]; then