summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-02-29 07:55:49 -0600
committerMilton D. Miller II <miltonm@us.ibm.com>2016-03-04 10:51:47 -0600
commitec10f89d2fd6504b5ccbd98ef44b420b2a5f8cc1 (patch)
tree64960978f8ee3a9d3a0bbad5f90013b5475dbbdf
parent7141eb032aa613182bcc35f8ad2a53ebaeb70d8f (diff)
downloadtalos-openbmc-ec10f89d2fd6504b5ccbd98ef44b420b2a5f8cc1.tar.gz
talos-openbmc-ec10f89d2fd6504b5ccbd98ef44b420b2a5f8cc1.zip
update: Remove images as they are successfully flashed
Remove image files as they are flashed so a repeated call to update does not erase and write the image again. As we add the ability to call update at runtime repeated calls are expected. This both signals successful copy and removes the need for callers to cleanup. Also remove commented alternate flash method using eraseall that was not tested. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rwxr-xr-xmeta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
index 6b0d7a025..edaf195b2 100755
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
@@ -138,8 +138,7 @@ for f in $image*
do
m=$(findmtd ${f#$image})
echo "Updating ${f#$image}..."
- # flasheraseall /dev/$m && dd if=$f of=/dev/$m
- flashcp -v $f /dev/$m
+ flashcp -v $f /dev/$m && rm $f
done
if test "x$toram" = xy
OpenPOWER on IntegriCloud