update_kernel: Save .5 seconds by avoiding tmp copy for kernel image

There's no need to store to a temporary file when updating the kernel
partition.  Just stream straight to the right partition.  This appears
to save about .5 seconds.

BUG=None
TEST=Time update_kernel and see savings; verify that kernel still gets
updated.

Change-Id: I5afead3e70720ee6dc9e6a822ef1a98032d93b79
Reviewed-on: https://gerrit.chromium.org/gerrit/39783
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
This commit is contained in:
Doug Anderson 2012-12-17 11:40:34 -08:00 committed by Gerrit
parent 3d01db2603
commit adf8a003e8

View File

@ -90,8 +90,7 @@ make_kernelimage() {
}
copy_kernelimage() {
remote_cp_to $TMP/new_kern.bin /tmp
remote_sh dd if=/tmp/new_kern.bin of="${FLAGS_partition}"
remote_sh dd of="${FLAGS_partition}" bs=4K < "${TMP}/new_kern.bin"
}
check_kernelbuildtime() {