summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2015-09-10 16:18:03 -0400
committerchrome-bot <chrome-bot@chromium.org>2016-04-04 20:05:00 -0700
commitf482470b72086d5ba672513434f3da5d62599538 (patch)
tree706357c10141058e69ef30ee15b1025cb41c0f10
parent65f61f90ccae5f0b5f37ea3bdf86735bc58709a0 (diff)
downloadvboot-f482470b72086d5ba672513434f3da5d62599538.tar.gz
image_signing: use sparse partition extraction [reland]
Often the partitions we extract have extra space in them, but the dd utility will still write out the excess zeros. That can mean we write out hundreds of megs of data which could otherwise be skipped. We thus waste a good amount of I/O and storage. For now, only use this flag when extracting a partition to a new file as this should be safe (there's no pre-existing data to clobber/merge). Now that the signers have been upgraded to Trusty, we can land this. BUG=chromium:530730 TEST=`./signing_unittests.py` passes BRANCH=None Change-Id: I275973ebfc028c15a8d1ef33dd9b3dcf6ca726a2 Reviewed-on: https://chromium-review.googlesource.com/306420 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Amey Deshpande <ameyd@google.com>
-rw-r--r--scripts/image_signing/common_minimal.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/image_signing/common_minimal.sh b/scripts/image_signing/common_minimal.sh
index fa566761..ad84c501 100644
--- a/scripts/image_signing/common_minimal.sh
+++ b/scripts/image_signing/common_minimal.sh
@@ -246,7 +246,7 @@ extract_image_partition() {
local offset=$(partoffset "$image" "$partnum")
local size=$(partsize "$image" "$partnum")
dd if=$image of=$output_file bs=512 skip=$offset count=$size \
- conv=notrunc 2>/dev/null
+ conv=notrunc,sparse 2>/dev/null
}
# Replace a partition in an image from file