[PATCH openbmc v2 17/34] update: Remove images as they are successfully flashed
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Mar 8 08:30:06 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
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 at us.ibm.com>
---
.../common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh | 3 +--
1 file changed, 1 insertion(+), 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 6b0d7a0..edaf195 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
--
2.7.1
More information about the openbmc
mailing list