diff options
author | John Klug <john.klug@multitech.com> | 2021-02-15 18:29:22 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-02-15 18:32:19 -0600 |
commit | cbc3f04361f9e8602e0359317f255f5db70ac98f (patch) | |
tree | 7efc5d6aaff6a60a7af1713be38652ba833f3d88 /recipes-core/initscripts | |
parent | 1bb19350497986cf795c8d37537a1344d8ec7049 (diff) | |
download | meta-mlinux-cbc3f04361f9e8602e0359317f255f5db70ac98f.tar.gz meta-mlinux-cbc3f04361f9e8602e0359317f255f5db70ac98f.tar.bz2 meta-mlinux-cbc3f04361f9e8602e0359317f255f5db70ac98f.zip |
Add a supercap-full check to flash_upgrade
Diffstat (limited to 'recipes-core/initscripts')
-rw-r--r-- | recipes-core/initscripts/initscripts-1.0/umountfs | 10 | ||||
-rw-r--r-- | recipes-core/initscripts/initscripts_1.0.bbappend | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/recipes-core/initscripts/initscripts-1.0/umountfs b/recipes-core/initscripts/initscripts-1.0/umountfs index 0827d72..b044a4a 100644 --- a/recipes-core/initscripts/initscripts-1.0/umountfs +++ b/recipes-core/initscripts/initscripts-1.0/umountfs @@ -80,11 +80,21 @@ err_leds() { flash_upgrade() { supercap=$(mts-io-sysfs show capability/supercap 2>/dev/null) if ((supercap == 1)) ; then + count=0 + while ((count < 180)) ; do powerfail=$(mts-io-sysfs show power-fail) if ((powerfail == 1)) ; then logger -s -t 'flash_upgrade' -p daemon.err 'Power has failed. Skipping flash upgrade. Try again later' return fi + full=$(mts-io-sysfs show supercap-full) + if ((full == 1)); then + break # Continue with flash + fi + logger -s -t 'flash_upgrade' -p daemon.err 'Supercap is not yet full. Wait for flash upgrade.' + ((count++)) + sleep 1 + done # Looping on 3 minute timeout fi if [ $# -ne 1 ]; then echo "need to specify flash-root" diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend index c07757c..537fbee 100644 --- a/recipes-core/initscripts/initscripts_1.0.bbappend +++ b/recipes-core/initscripts/initscripts_1.0.bbappend @@ -3,4 +3,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" # flash on reboot/umountfs needs regular umount (not busybox) RDEPENDS_${PN} += "util-linux-umount util-linux-mount bash" -PR .= ".45" +PR .= ".46" |