| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unit tests paired with CL:2168072.
BUG=b:146399181, b:156448738
TEST=make clean && make runtests
TEST=make clean && DETACHABLE=1; make runtests
TEST=make clean && PHYSICAL_PRESENCE_KEYBOARD=1; make runtests
BRANCH=none
Cq-Depend: chromium:2214457
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ic6b109c514e1582d7eb29040135aeaa884b243be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2198274
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have two different mock inputs currently, and soon to be three.
Since the input-solving order should not be strictly defined, it is
difficult to write complicated scenarios under current approach. We
cannot make sure if the ui_loop implementation exits earlier and
ignores certain mock inputs.
This CL synchronizes mock inputs with an iteration counter. We can
write detailed scenarios by assigning the inputs iter-by-iter.
BUG=b:146399181, b:156448738
TEST=make clean && make runtests
TEST=make clean && DETACHABLE=1; make runtests
TEST=make clean && PHYSICAL_PRESENCE_KEYBOARD=1; make runtests
BRANCH=none
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ia839a6614eb0453b9f64075298a89a2db59d4070
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2217532
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract print_passed() and print_failed() from test_eq(), and use them
consistently in all testing functions in test_common.h.
BRANCH=none
BUG=none
TEST=make runtests
Change-Id: I1d4dbf13c9ae1a8130ea7af2733044d0556fa974
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2217547
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the returned value is not an error (such as VB2_REQUEST_*), do not
call vb2api_fail() from VB2_TRY() to request recovery.
During EC sync, instead of explicitly setting VB2_NV_RECOVERY_REQUEST in
nvdata to request recovery, utilize vb2api_fail() instead to try the
other AP slot before giving up on EC sync and going into recovery.
In addition, remove the retry of EC RO sync for the following reasons.
EC sync rarely fails, and even if it does, it's not very likely to be a
transient problem that disappears on the next attempt. Besides, the RO
sync is just a debug feature that only people who have a servo attached
and can manually reflash should be using. Therefore, the retry is
removed and hence we no longer need to restore the recovery request in
nvdata.
BRANCH=none
BUG=chromium:1075488
TEST=make runtests
Change-Id: I9ad8e5e0886679a9a342449553170317b010237b
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2145272
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...also inflate my personal CL stats.
BUG=None
TEST=None
BRANCH=master
Signed-off-by: George Engelbrecht <engeg@chromium.org>
Change-Id: I4af2d8b2aa42b4e6d4d4ea36a6ca73a340aa4814
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2220336
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: George Engelbrecht <engeg@google.com>
Tested-by: George Engelbrecht <engeg@google.com>
Auto-Submit: George Engelbrecht <engeg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also add the 2api.h include for vboot2-style stubs.
BUG=b:124141368
TEST=make clean && make runtests
BRANCH=none
Change-Id: Id6522ea139126adce6cee5ba225ab3eb78f31b7e
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218539
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create VB2_ERROR_EX_SET_VENDOR_DATA error code for use in
VbExSetVendorData callback.
BUG=b:124141368, chromium:988410
TEST=make clean && make runtests
BRANCH=none
Cq-Depend: chromium:2218538
Change-Id: I9d75a608185e475837d9cb4a53b943fd2dae6438
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218537
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move VBERROR_PERIPHERAL_BUSY to vboot2 namespace as:
VB2_ERROR_EX_AUXFW_PERIPHERAL_BUSY
BUG=b:124141368, chromium:988410
TEST=make clean && make runtests
BRANCH=none
Change-Id: Iebc7d73e3a87a8bd4d999be56ad23d6b77d9785c
Signed-off-by: Joel Kitching <kitching@google.com>
Cq-Depend: chromium:2158865
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2158512
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move these functions from vboot_api.h into 2api.h:
VbExGetTimer --> vb2ex_mtime (usec -> msec)
VbExSleepMs --> vb2ex_msleep
VbExBeep --> vb2ex_beep
Rename the constants:
VB_USEC_PER_MSEC --> VB2_USEC_PER_MSEC
VB_MSEC_PER_SEC --> VB2_MSEC_PER_SEC
Remove the constant VB_USEC_PER_SEC.
The error code VBERROR_NO_BACKGROUND_SOUND is dropped since
it is not currently used.
Update a few printf lines to use VB2_DEBUG instead.
BUG=b:124141368, chromium:988410
TEST=make clean && make runtests
BRANCH=none
Change-Id: I887112ffd5f68fb6a9c4d9ad624aa420cbd55b4b
Signed-off-by: Joel Kitching <kitching@google.com>
Cq-Depend: chromium:2158665
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2158666
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When booting from internal disk failed, return error and request
recovery. This behavior is consistent with legacy UIs, and is necessary
for FAFT firmware_CorruptBothKernelAB.dev to pass.
BRANCH=none
BUG=b:146399181, b:156880836
TEST=make runtests
TEST=firmware_CorruptBothKernelAB.dev passed on puff
Change-Id: Id927961ec7fa1788ddd817c133b5bc905b1e8335
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2213210
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add hotkey to simplify FAFT mode_switcher for new Groot UI.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: I91e00c5365c8f5a587786ab7dcfa67765a342824
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2213384
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ia63537fb13be5f04ae81a6be7e0fac6eaf47cfb7
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2210017
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: I8cd47503384a8b8f48ccbc12fa6f24c71d02b755
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2210016
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This follows the logic introduced in crrev.com/i/2523754
BUG=b:148229706
TEST= ./sign_official_build.sh usb source_image \
~/trunk/src/platform/vboot_reference/tests/devkeys out_image
BRANCH=None
Cq-Depend: chrome-internal:3022044
Signed-off-by: Yury Khmel <khmel@google.com>
Change-Id: I5398a9ea2984f0be11cb512f845507309d5f8f8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2210771
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an entry storing previous status of physical presence button
to vb2_ui_context and reset it when recovery_to_dev_init is called.
BUG=b:146399181,b:157390248
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ia0294a189713f1f99db7309937ea80ff90849bd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2214457
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set FWMP to "initialized" to make accesses work, and also
implement the "Menu" variant of UI mock functions.
BUG=b:124141368
TEST=make clean && make runtests
BRANCH=none
Change-Id: I50d787c88a9682878ae7e6fe3f3e7a0578757d74
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2112396
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use "vboot_ui_legacy" prefix for all legacy UI-related files.
- Merge vboot_display.{c,h} and vboot_ui_legacy_common.c into
vboot_ui_legacy.{c,h}.
- Move VbDisplayScreen and VbDisplayMenu implementation into
their respective vboot_ui_legacy_*.c files.
- Update VbCheckDisplayKey to take |screen| argument to avoid
reading disp_current_screen global variable.
BUG=b:124141368, chromium:968464
TEST=make clean && make runtests
BRANCH=none
Change-Id: I777551e4968ca22282901d22a262a8f2ec849702
Signed-off-by: Joel Kitching <kitching@google.com>
Cq-Depend: chromium:2214615
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2112322
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rearrange and split some action tests.
Rewrite mock_ui_context related functions, and allow change_screen to
change to real screens in vb2_ui_action_tests.c.
BUG=b:146399181
TEST=make clean && make runtests
TEST=make clean && DETACHABLE=1; make runtests
BRANCH=none
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I1692c9fcdf19073f8a9810dfab769df4c87224a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2209780
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This script was added in CL:2618.
There's no references to it, and I can't find any evidence to it being
documented anywhere or anyone using it.
Let's remove it to see if anyone uses it.
BUG=chromium:1083510
BRANCH=none
TEST=emerge vboot_reference
Change-Id: I6c307d3b9f7ee4c12153baf5fcd97c98badefe7b
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2212646
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: I055499580325a43dcba3e1d037bac60deff30af8
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2210015
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No references to this. From commit history looks to be something
Mario-only?
Remove it and let's see where that goes...
BUG=chromium:1085310
BRANCH=none
TEST=emerge vboot_reference
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I7621d4673a09b85f59cdc69de1652e0b72ca1862
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2211957
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Looks like an old script from Mario. Won't run on modern chromebooks
anyway.
Not installed on any devices.
BUG=chromium:1084003,chromium:1085310
BRANCH=none
TEST=emerge vboot_reference
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I4b68183bc9bc943f273630cf12c52801a74df5be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2210762
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Looks like this was an old script meant to be run on Mario. It's
currently installed in the SDK only (not on the DUT), where it won't
even operate anyway.
I can't find any references to the script, aside from some old Mario
documentation.
BUG=chromium:1084003,chromium:1085310
BRANCH=none
TEST=emerge vboot_reference
Change-Id: I0b0bd22912170e62390e7ee1a62ef466b2ea1a7c
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2210761
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stardardize to match that of a UI action function.
Also move power_button global into vb2_ui_context object.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: I59eb3b4dbd2f4a5630e8cceaef256ff93579c965
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2192864
Reviewed-by: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Intel CSE Lite SKU error code to the recovery reason code list.
Further, use recovery subcodes to indicate specific CSE Lite SKU errors.
The recovery subcodes have been defined in the coreboot cse common lib.
BUG=b:153520354
Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.corp-partner.google.com>
Change-Id: Id24c06452d349306804ee5b0b93a6abc3fe3bdbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2148557
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If phone recovery flow is disabled according to
vb2api_phone_recovery_enabled(), then hide the "Recovery
using phone" menu item from the RECOVERY_SELECT screen.
BUG=b:146399181, b:147744345
TEST=make clean && make runtests
TEST=Upgrade secdata_kernel to v1, boot to recovery mode, check menu
BRANCH=none
Change-Id: Id2d23b5a1cc31dec12befa60a9a52790b129495c
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2201056
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename VbExGetLocalizationCount to vb2ex_get_locale_count.
Change signature to return by value instead of by parameter.
BUG=b:146399181, b:156070974
TEST=make clean && make runtests
BRANCH=none
Change-Id: I4e3986007034724f01c9d42a382398ddacd59f33
Signed-off-by: Joel Kitching <kitching@google.com>
Cq-Depend: chromium:2190612
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2193151
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Developer mode can boot internal or external disk. Support for
booting legacy firmware ("Ctrl+L") will be added in a subsequent CL.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: I45590e20727bd84375d10ca5ef906206d0ecd805
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2192863
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vb2_get_dev_boot_target() should only return:
BOOT_USB iff vb2_dev_boot_usb_allowed()
BOOT_LEGACY iff vb2_dev_boot_legacy_allowed()
Otherwise, fallback to BOOT_DISK.
BUG=None
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ic67915d0888f640f6e7b04c91f99346412cc18ee
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2203301
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
servo-v2 will eventually be deprecated.
BRANCH=none
BUG=b:145175076
TEST=Flash with servo v2, no more
"Warning: Use 'google-servo-v2' instead!"
Change-Id: Ie7ae9e173a7cbe0fcd37d1c88b5746fb89cc8e22
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2206094
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add VB2_SCREEN_LANGUAGE_SELECT to enum vb2_screen.
BRANCH=none
BUG=b:146399181
TEST=USE="menu_UI" emerge-nami depthcharge
Change-Id: I441e5dd65c8c1f91ec868d3ab477b61b0c3e9cc5
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2200577
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rearrange UI tests into three files: vb2_ui_utility_tests for utility
functions and core UI functions, vb2_ui_action_tests for hooked actions,
and vb2_ui_tests for UI entries.
This CL does not add any extra tests.
BRANCH=none
BUG=b:156448738
TEST=make clean && make runtests
TEST=make clean && DETACHABLE=1; make runtests
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I36a0a43aa3295b06cf32446dcc107652d64d2b8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2198268
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable the phone recovery functionality and UI.
BRANCH=none
BUG=b:153596126
TEST=make runtests
Change-Id: If4fc29db44903e79cecd959a9b558c509ad19e1a
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2196093
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for the SHA-224 and SHA-384 hash algorithms,
which are basically just variants of SHA-256 and SHA-512 (respectively)
with different initialization vectors and truncating a bit of the final
output. They are only added to serve vboot's role as all-purpose crypto
toolbox for callers (e.g. coreboot, where I need SHA-384 to support a
certain SoC boot descriptor right now) and not intended for actual use
as signature or firmware body hashes -- therefore, we only add the hash
algorithms themselves and don't create enum values for them in enum
vb2_crypto_algorithm or other structures.
Also clarify the difference between UNROLL_LOOPS and UNROLL_LOOPS_SHA512
in the Makefile, since it was totally not obvious to me.
BRANCH=None
BUG=None
TEST=make runtest and make runtest UNROLL_LOOPS=1
Cq-Depend: chromium:2191082
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ic132d4dfe5967f03be4666b26c47d32c1235f4a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2183551
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement advanced_options menu item and screen.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: I870133db74d773771ea92a280fdfb4864706bd71
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2186958
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some platforms (e.g., Zork) may decide to change platform name from
lower_case to CamelCase after early builds, and platform name check will
be an AU blocker in that case.
Considering there should be no devices having same name (and using
incompatible firmware), it should be fine to change the strncmp to
strncasecmp so the platform name check will be case insensitive.
BUG=b:156119908
TEST=make runtests
BRANCH=None
Change-Id: I5014c136976454dd0965a607e5a98bbe4543a41e
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2192537
Commit-Queue: Rob Barnes <robbarnes@google.com>
Tested-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Rob Barnes <robbarnes@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a quirk for futility on zork boards.
Zork boards before 13073 used lowercase for the firmware
names which causes the compatible platform check fail.
This adds the disable_compatible_platform_check quirk and
enables it by default for zork boards.
BUG=b:156119908, b:155941790
TEST=flashed Google_trembyle.13066.0.0 using servo
chromeos-firmwareupdater --force
rebooted and confirmed Google_Trembyle.13073.0.0 was flashed
BRANCH=none
Change-Id: I6fc6bf5bb42b725b5e7c9d0166f945b9c123bab4
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2191089
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Eric Peers <epeers@google.com>
Commit-Queue: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add VB2_SCREEN_DEVELOPER_MODE and VB2_SCREEN_DEVELOPER_TO_NORM to enum vb2_screen.
BRANCH=none
BUG=b:146399181
TEST=USE="menu_ui" emerge-nami depthcharge
Change-Id: Ie949eedbf5d564f73fd6288bbc3630af83335dbb
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2186571
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce three new action hooks:
- vb2_screen_info.init
Init function runs once when changing to the screen.
- vb2_screen_info.action
Action function runs repeatedly while on the screen.
- vb2_menu_item:
Action function takes precedence over target screen if non-NULL.
Create the VB2_SCREEN_RECOVERY_TO_DEV screen, and add a
keyboard shortcut to get to that screen directly when in
manual recovery mode: Ctrl+D.
The TO_DEV screen repeatedly checks for the correct physical
verification state. When that state is triggered, it switches
to dev mode and reboots. The trigger depends on physical
presence type:
- PHYSICAL_PRESENCE_KEYBOARD: wait for ENTER key on the
confirm button, pressed by internal keyboard
- !PHYSICAL_PRESENCE_KEYBOARD: wait for the physical presence
button (recovery or power) to be pressed and released
- SPACE character also cancels in order to preserve prior
behaviour
Note that currently there is no way to exit developer mode
once it has been enabled.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: If3ff248d98859d530c3a24524618c6282a5ac5b5
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2168072
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given that we are sending the full vb2_ui_context into
UI-related functions, it's impossible to fully validate that
called functions don't modify UI state in unexpected ways.
Assume UI-related functions are mutating vb2_ui_context data
correctly. Screen init functions (see CL:2168072) will be
used to set selected_item and disabled_mask before displaying
a screen for the first time.
change_screen() is also changed to return a vb2_error_t value
to be more consistent with action functions.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: Icda68f95a835b9143b8dd085d8dbdb7bced04775
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2182084
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For naming consistency, rename any variations of "AUX_FW" to "auxfw".
BRANCH=none
BUG=none
TEST=make runtests
Cq-Depend: chromium:2154265
Change-Id: Icf74215f5babf19228f2f362c3c29c9b14794dfc
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2154266
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locale_id is not tied to the current screen -- i.e. it shouldn't
revert if we return to the previous screen.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: I691bdf7938d2a14cfbe68c7f60dc0103c236733c
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2182083
Tested-by: Hsuan Ting Chen <roccochen@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Members of vb2_ui_context are undefined unless initialized.
memset() the entire struct to 0 initially.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ieeb77c576231c4a4afb204e47983e35916be8fe4
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2182082
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:124141368, chromium:988410
TEST=make runtests
Cq-Depend: chromium:2154269, chromium:2175864
Change-Id: Ib3996ecc83a69ce6780d48f1aa446e81dfd75589
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2167622
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add VB2_SCREEN_ADVANCED_OPTIONS to enum vb2_screen.
BRANCH=none
BUG=b:146399181
TEST=USE="menu_ui" emerge-nami depthcharge
Change-Id: I14f96f870c5f2f7dc462dfd138d4466b3e99d74c
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2175720
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:124141368, chromium:1016688
TEST=make clean && make runtests
BRANCH=none
Change-Id: Iabf62e4df5e554da28b191878b76d926299d73b9
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2171544
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add config DETACHABLE to control the navigation in menu UI.
Implement 4 screens:
- VB2_SCREEN_RECOVERY_SELECT
- VB2_SCREEN_RECOVERY_INVALID
- VB2_SCREEN_RECOVERY_PHONE_STEP1
- VB2_SCREEN_RECOVERY_DISK_STEP1
Handling user inputs.
- Shutdown request through VbExIsShutdownRequested.
- Navigate with up, down, and enter key.
- Navigate with volume up, volume down, and power button
in DETACHABLE.
Implement common UI loop, currently used for manual and non-manual
recovery (developer forthcoming).
BRANCH=none
BUG=b:146399181
TEST=USE="menu_ui" emerge-nami depthcharge
TEST=USE="menu_ui detachable" emerge-nami depthcharge
TEST=make clean && make runtests
TEST=DETACHABLE=1; make clean && make runtests
Cq-Depend: chromium:2152212
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I4e0f2cdf053f75935529826df215b06c8a9af4cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2117810
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:2112321 inadvertently removed the escape on a \n newline
in a VB2_DEBUG string. Put it back.
BUG=b:124141368, chromium:968464
TEST=make clean && make runtests
BRANCH=none
Change-Id: I19ee4a77d3cc58d6995212151b381ae76c602a42
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2174039
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up fix to CL:2157900. That CL put the problematic
arrays into sections with the right name, but they still didn't set the
right ELF flags for them (specifically the READONLY flag). This made the
assembler unhappy in coreboot, although it still seems to have built
things correctly in the end:
{standard input}: Assembler messages:
{standard input}:359: Warning: setting incorrect section
attributes for .rodata.vb2_hash_names
{standard input}:369: Warning: setting incorrect section
attributes for .rodata.vb2_sig_names
This patch throws more ugly hacks at the problem to make it disappear.
BRANCH=None
BUG=None
TEST=Build coreboot for both Arm and x86 boards, confirmed that error
messages are gone and objdump shows intended section flags.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Iea93788a13e9fd14d6b5a16626294d5a4b0e5411
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2169480
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error codes are renamed as follows:
VBERROR_SHUTDOWN_REQUESTED
--> VB2_REQUEST_SHUTDOWN
VBERROR_REBOOT_REQUIRED
--> VB2_REQUEST_REBOOT
VBERROR_EC_REBOOT_TO_SWITCH_RW
--> VB2_REQUEST_REBOOT_EC_SWITCH_RW
VBERROR_EC_REBOOT_TO_RO_REQUIRED
--> VB2_REQUEST_REBOOT_EC_TO_RO
VBERROR_KEEP_LOOPING
--> VB2_REQUEST_UI_CONTINUE
Since these are not really "errors", they're renamed to VB2_REQUEST_*
instead, with larger values to separate from real errors.
The old vboot1-style errors will be removed once the errors are renamed
in coreboot and depthcharge.
BRANCH=none
BUG=b:124141368, chromium:988410
TEST=make runtests
Change-Id: Ide1328f9c0f2803534fb3f1f1ecd16ad8ea36a4e
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2143030
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|