diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-01-02 10:39:52 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-06 18:12:29 +0000 |
commit | 5a98268b9634e4996e4a69f624c09d896645a4a2 (patch) | |
tree | a6605863ca4982f50d1b9fde0d8bfb9797cabb4d /common/update_fw.c | |
parent | 127975b6c3efe77b6e92af6b153504c2607d5a07 (diff) | |
download | chrome-ec-5a98268b9634e4996e4a69f624c09d896645a4a2.tar.gz |
common/vboot: Add rwsig info command
The rwsig info command provides additional details on the verified boot
key used to sign the RW firmware. The information about the key can be
used by factory tests to validate that the factory is flashing firmware
that is signed by the expected key.
In addition, we refactor the "rwsig"-related commands into a generic
"rwsig" command that takes additional subcommands. This allows adding an
"rwsig dump" command that allows displaying individual fields, which is
useful in scripts and tests.
"rwsigstatus" becomes "rwsig status"
"rwsigaction" becomes "rwsig action"
The old commands are preserved for backward compatibility.
BRANCH=none
BUG=b:144958737
TEST=(kohaku) $ ectool --name=cros_fp rwsig info
TEST=(kohaku) $ ectool --name=cros_fp rwsig dump key_id
TEST=(kohaku) $ ectool --name=cros_fp reboot_ec; sleep 0.5;
ectool --name=cros_fp rwsig action abort; sleep 2;
ectool --name=cros_fp version | grep "Firmware copy"
=> Firmware copy: RO
TEST=On dragonclaw v0.2 console: rwsiginfo
Change-Id: Ib0ee4be33e6636ff702eeaef941cc3abed0594cb
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1999607
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common/update_fw.c')
-rw-r--r-- | common/update_fw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/update_fw.c b/common/update_fw.c index 2501f29934..f9927fec9d 100644 --- a/common/update_fw.c +++ b/common/update_fw.c @@ -17,6 +17,7 @@ #include "update_fw.h" #include "util.h" #include "vb21_struct.h" +#include "vboot.h" #if defined(CONFIG_TOUCHPAD_VIRTUAL_OFF) && defined(CONFIG_TOUCHPAD_HASH_FW) #define CONFIG_TOUCHPAD_FW_CHUNKS \ @@ -203,7 +204,7 @@ void fw_update_start(struct first_response_pdu *rpdu) #endif #ifdef CONFIG_RWSIG_TYPE_RWSIG - vb21_key = (const struct vb21_packed_key *)CONFIG_RO_PUBKEY_ADDR; + vb21_key = vb21_get_packed_key(); rpdu->common.key_version = htobe32(vb21_key->key_version); #endif |