cros_generate_update_payload: Use e2cp instead of mounting STATE.

In old test images (about 1 year or older) we need to patch the kernel
in KERN-A with a vblock found in a file in the STATE partition. This
file was accessed mount the stateful partition read-only and copying the
file there, requiring this script to be run as root and leading to some
race conditions stated in crbug.com/358933.

This patch uses the e2cp tool instead to copy this file out of the
stateful partition and patch the kernel with it.

CQ-DEPEND=CL:283508
BUG=chromium:507422,chromium:305832
TEST=`cros_generate_update_payload --extract` on old lumpy 2913.331.0 test image extracts the same kernel.

Change-Id: I48e4ad369f7451d8ad824450bfad8f7d0d6c7b2c
Reviewed-on: https://chromium-review.googlesource.com/283564
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
1 file changed