aboutsummaryrefslogtreecommitdiff
path: root/flash.sh
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2018-02-27 11:25:36 -0800
committerJohn Stultz <john.stultz@linaro.org>2018-02-27 11:25:36 -0800
commitc678abfea8e4f6d009b73bd60f3323919b64da9d (patch)
treec0f65fa55de066d75d4c59e2a91d7e64ff98a628 /flash.sh
parentfdadcb9cc8569eba6540dc8b6269191988ef75bc (diff)
downloadknown-good-manifests-c678abfea8e4f6d009b73bd60f3323919b64da9d.tar.gz
flash.sh: Cleanup extracted images after we flash
Keep the compressed images, and clean up the uncompressed ones after they are flashed. Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'flash.sh')
-rwxr-xr-xflash.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/flash.sh b/flash.sh
index 757d1af..c4d1943 100755
--- a/flash.sh
+++ b/flash.sh
@@ -9,7 +9,6 @@ if [ $# -eq 0 ]; then
exit -1
fi
-echo "Flashing $BOARD"
if [ ! -d "$DIRPATH/$BOARD" ]; then
echo "ERROR: No such path: $DIRPATH/$BOARD"
@@ -18,11 +17,14 @@ fi
pushd $DIRPATH/$BOARD > /dev/null
-IMGS="boot.img.xz system.img.xz cache.img.xz userdata.img.xz dt.img.xz"
+echo "Extracting images"
+
+IMGS="boot.img system.img cache.img userdata.img dt.img"
for i in $IMGS; do
- xz -d $i
+ xz -k -d $i.xz
done
+echo "Flashing $BOARD"
#special case for hikey960 dts partition
if [$BOARD -eq "hikey960" ] ; then
fastboot flash dts dt.img
@@ -33,5 +35,9 @@ fastboot flash system system.img
# we skip flashing userdata here
fastboot reboot
+
+#cleanup
+rm -f $IMGS
+
popd >/dev/null