scripts/image_signing: Add swap_ec_rw
Move the script platform/dev/contrib/firmware/swap_ec_rw to
vboot_reference, and install it to /usr/share/vboot/bin/ in CrOS SDK,
for both manual run and platform/firmware/pack_firmware.py.
Usage:
swap_ec_rw -i ${AP_IMAGE} -e ${EC_IMAGE}
The above command will replace the "ecrw" CBFS file within ${AP_IMAGE}
with ${EC_IMAGE} (and also update "ecrw.hash").
For now, only Zephyr EC is supported. Running the command with a CrOS EC
will produce the following error:
ERROR: normal_fmap: FMAP section RW_FW not found
Add swap_ec_rw_tests.sh and some data files to test the new script.
BUG=b:325886850
TEST=swap_ec_rw -i image-brya0.bin -e ec.bin
TEST=FEATURES=test emerge-brya vboot_reference
BRANCH=none
Cq-Depend: chromium:5409975
Disallow-Recycled-Builds: tael-cq, tatl-cq
Change-Id: I7bad328f5aaacfdd386a666b31348f3fae6eac8f
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/5408908
Reviewed-by: Julius Werner <jwerner@chromium.org>
6 files changed