From df9bf4eef39afffb296ed5332fdecdc7af01813f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 9 Sep 2015 17:00:57 -0400 Subject: [PATCH] image_signing: use sparse copying when creating the signed image This should speed up the copies significantly by using less disk storage & I/O when the unpacked file is not sparse already. This option has been in cp for a long time, and works in Ubuntu Precise (coreutils-8.13) & Trusty (coreutils-8.21). BUG=chromium:530730 TEST=`./signing_unittests.py` passes BRANCH=None Change-Id: I82192455a623eabf96abf4f25296f3dc0c129ca2 Reviewed-on: https://chromium-review.googlesource.com/299440 Commit-Ready: Mike Frysinger Tested-by: Mike Frysinger Reviewed-by: David Riley Reviewed-by: Amey Deshpande --- scripts/image_signing/sign_official_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh index 668989eada..f3def18a0f 100755 --- a/scripts/image_signing/sign_official_build.sh +++ b/scripts/image_signing/sign_official_build.sh @@ -691,7 +691,7 @@ sign_image_file() { local kernB_keyblock="$7" local kernB_privkey="$8" echo "Preparing ${image_type} image..." - cp "${input}" "${output}" + cp --sparse=always "${input}" "${output}" resign_firmware_payload "${output}" # We do NOT strip /boot for factory installer, since some devices need it to # boot EFI. crbug.com/260512 would obsolete this requirement.