| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In normal/secure mode, display is not always available. Hence aux
firmware updates request reboot to initialize the display so that slow
firmware update screen can be displayed. Since this error is not
handled, the concerned firmware slot is marked as failed. This leads to
devices in the field not picking FW updates and falling back to old FW
slot. Handle VB2_REQUEST* error codes, so that the device reboots to
initialize the display.
BUG=b:210127173
BRANCH=dedede, volteer, zork, trogdor, keeby
TEST=Build and boot to OS in Drawlat. Ensure that the AP + EC + ME + PD
FW updates are applied and the system was able to boot to OS
successfully - https://paste.googleplex.com/4966135716904960.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I2b7bdd830a1141ee59e25204bf4f77adba58b679
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3350763
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Auto-Submit: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Henry Sun <henrysun@google.com>
Commit-Queue: Henry Sun <henrysun@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the default selected menu item for 2 screens in developer mode:
- VB2_SCREEN_DEVELOPER_BOOT_EXTERNAL
- VB2_SCREEN_DEVELOPER_INVALID_DISK
Previously in CL:3195521 we forgot to explicitly set it in the init()
and reinit() screen functions.
BUG=b:207448560, b:207448571
TEST=make run2tests
BRANCH=none
Change-Id: I1854502251238394a7e76ad9e676bae436ad0df5
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3298657
Reviewed-by: Henry Sun <henrysun@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Manually cherry picked from CL:3195521)
Consider the series of user actions in developer UI:
0. Screen DEVLOPER_MODE is shown
1. Insert an invalid external disk
2. Press Ctrl+U to trigger external boot
=> INVALID_DISK screen is shown
3. Unplug the invalid external disk
=> BOOT_EXTERNAL screen is shown
4. Select the "Back" button
Then, the screen will temporarily change to INVALID_DISK because it is
the previous screen in the history stack. However, in the next UI loop,
the action function of INVALID_DISK will change the screen to
BOOT_EXTERNAL because there is no external disk plugged in. This bug
causes the user to be stuck in INVALID_DISK and INVALID_DISK screens.
To solve the problem, add init() and reinit() hooks for these two
polling screens, so that when we enter either of the screens, the status
of the external disk will be checked. If it doesn't match the meaning of
the target screen, ui_screen_back() will be called to go back to the
previous screen.
This solution elegantly handles more complex situations like this:
0. Screen DEVLOPER_MODE is shown
Stack: [DEVELOPER_MODE]
1. Insert an invalid external disk
2. Press Ctrl+U to trigger external boot
=> INVALID_DISK screen is shown
Stack: [DEVELOPER_MODE, INVALID_DISK]
3. Press TAB
=> DEBUG_INFO screen is shown
Stack: [DEVELOPER_MODE, INVALID_DISK, DEBUG_INFO]
4. Unplug the invalid external disk and press Ctrl+U
=> BOOT_EXTERNAL screen is shown
Stack: [DEVELOPER_MODE, INVALID_DISK, DEBUG_INFO, BOOT_EXTERNAL]
5. Select "Back"
=> DEBUG_INFO screen is shown
Stack: [DEVELOPER_MODE, INVALID_DISK, DEBUG_INFO]
6. Select "Back"
=> DEVELOPER_MODE screen is shown (because INVALID_DISK is skipped)
Stack: [DEVELOPER_MODE]
BUG=b:201510767, b:203580383
TEST=make run2tests
BRANCH=zork, trogdor, dedede
Change-Id: Ic41321ba6aca60fd13f6d33859ec171663d68145
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3235935
Reviewed-by: Henry Sun <henrysun@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=dedede,volteer,trogdor,zork
BUG=b:182338095
TEST=none
Cq-Depend: chromium:2820828
Signed-off-by: Chung-Sheng Wu <chungsheng@google.com>
Change-Id: I865b28d8a8a6e1f3924ce94fb38b6c7799a797dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2789115
Tested-by: Chung-Sheng Wu <chungsheng@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Chung-Sheng Wu <chungsheng@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2820829
Reviewed-by: Henry Sun <henrysun@google.com>
Commit-Queue: Meng-Huan Yu <menghuan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To address a firmware bug b/180686277, a mitigation is added which
introduces an additional EC reset. But when both the kernel partitions
are corruption, this mitigiation introduces a reboot loop. To fix the
reboot loop, a firmware branch only vboot API is introduced to prepare
for the extra reboot. This work-around API stores the FW_TRIED and
FW_RESULT data into vboot's NV storage before triggering a reboot.
BUG=b:184388049
BRANCH=dedede
TEST=Build and boot to OS in Drawlat with a RO 13606.52.0 and RW
13606.199.0 + the fix. Ensure that the firmware_CorruptBothKernelAB.dev
test passes instead of boot looping.
Change-Id: Id53b9131034fcad6caeb3231c1c92d020b766338
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2915753
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL enabled the pre-boot diagolostic tools entry in recovery mode.
BRANCH=none
BUG=b:176947486
TEST=CQ
TEST=FEATURES=test P2_TEST_FILTER='*' emerge-zork vboot_reference
TEST=manually build, flash FW to device, and confirm minidiag works
Signed-off-by: Meng-Huan Yu <menghuan@chromium.org>
Change-Id: I8500cbaaa4e8d0f1aa668d56d38095ecdcf50aaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2617391
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
(cherry picked from commit 6f6efdc6fa38ed3bcacfa9e152f415d50ee8bad0)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2677618
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean up the diag request flag to avoid potential reboot loop if somehow
a forced reboot occurs.
BRANCH=puff,zork,volteer,trogdor,dedede
BUG=b:177303714
TEST=CQ
TEST=FEATURES=test P2_TEST_FILTER='*' emerge-zork vboot_reference
TEST=boot to minidiag and then do hardware reset, then expect boot to
OS instead of boot to minidiag again.
Signed-off-by: Meng-Huan Yu <menghuan@chromium.org>
Change-Id: I24815d512ca42b78dc42cafaebc666e6a53db793
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2624110
Reviewed-by: Joel Kitching <kitching@chromium.org>
(cherry picked from commit 5046e96cfa81350e53ffc4ac0f87e1b5f9c6eee1)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2677617
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Call log_page_init(ui) to initialize button states in memory tests.
Add TODO comments for splitting out log_page_update().
BUG=b:173772273
BRANCH=zork
TEST=Build locally
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Icc5504bfcbfefc264a01289cc7988e97064bc8fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2552308
Reviewed-by: Meng-Huan Yu <menghuan@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2589202
Tested-by: Chung-Sheng Wu <chungsheng@chromium.org>
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a return code `VB2_ERROR_EX_DIAG_TEST_UPDATED` to determine if
updating needed.
BUG=b:168776970
BRANCH=none
TEST=Build locally, boot recovery, select 'run diagnostics',
enter memory test (quick) screen,
and observe that the delay reduces while pressing keyboard
Cq-Depend: chromium:2423699
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I7606911bee7257e8eed4ec35d197efaa57b72e13
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2424370
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Skip calling diagnostics_memory_update_screen() action if memory test is
finished to reduce delays in memory diagnostics screens.
BUG=b:168776970, b:171852478
BRANCH=none
TEST=Build locally, boot recovery, select 'run diagnostics',
enter memory test (quick) screen, wait until test is finished,
and observe that the delay reduces while pressing keyboard
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I4f8dbadc68989112bce418119ff7405ec150a7df
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2423089
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an iteration takes longer than KEY_DELAY_MS, no extra delay.
Otherwise, delay until the iteration time reaches KEY_DELAY_MS.
BUG=b:168776970
BRANCH=none
TEST=Build locally
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ia78dbe1cc87d08c02f99f4fc9269929c12c18b77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2424373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Do not check if delay is aborted every time since we already have
an individual test item.
- Do not save the last return value of vb2ex_mtime() to allow us to use
vb2ex_mtime() elsewhere.
- Use fuzzy match for `delay finished` test items.
BUG=b:156448738
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ic211955637c67dc35ffd4c12194a8ccb77e1bf9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2508104
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add several constants in 2ui_private.h for testing:
- KEY_DELAY_MS
- DEV_DELAY_SHORT_MS
- DEV_DELAY_NORMAL_MS
- DEV_DELAY_BEEP1_MS
- DEV_DELAY_BEEP2_MS
BUG=b:156448738
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I7349d5214a90699fda67135329d7a6b93022bb27
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2513418
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For test/vb2_ui_tests.c:
- Rename mock_get_timer_last to mock_get_timer_last_ms.
- Rename mock_time to mock_time_ms.
- Rename mock_time_start to mock_time_start_ms.
For 2lib/2ui.c and 2lib/2ui_screen.c:
- Rename start_time to start_time_ms in struct vb2_ui_context.
- Rename elapsed to elapsed_ms in developer_mode_action().
BUG=b:156448738
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Icabe04003f0dc95f41c9ed8b8e2292f1f64e86bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2513417
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to find the culprit loopback device which isn't detatching on
crbug.com/1141907. We might as well log our cleanup actions anyway, and
this will allow us to see the last loopback processed in production.
BUG=chromium:1141907
TEST=just a log message
BRANCH=None
Signed-off-by: George Engelbrecht <engeg@google.com>
Change-Id: I126efceae4f67993069675c23f6c4af61c7e5667
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2514561
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently this trap initiated function will not save the orginal return
value of the script. Save it and return it on exit.
BUG=chromium:1141907
TEST=unittest and manually on a signer
BRANCH=None
Signed-off-by: George Engelbrecht <engeg@google.com>
Change-Id: Icd807f4d153e4bcc1d309fbcea43c2b3344771ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2514560
Reviewed-by: Sean McAllister <smcallis@google.com>
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium:1141907
TEST=unit tests and manual signing run
Signed-off-by: George Engelbrecht <engeg@google.com>
BRANCH=none
Change-Id: I0316f464e138dea9e77b2554a3b31250e8b92c07
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2514559
Reviewed-by: Sean McAllister <smcallis@google.com>
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
Commit-Queue: George Engelbrecht <engeg@google.com>
Tested-by: George Engelbrecht <engeg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium:1141907
TEST=unit tests and manual signing run
Signed-off-by: George Engelbrecht <engeg@google.com>
BRANCH=none
Change-Id: I39b133ca69e717576140b418fc59dd167f068d59
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2514558
Reviewed-by: Sean McAllister <smcallis@google.com>
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
Commit-Queue: George Engelbrecht <engeg@google.com>
Tested-by: George Engelbrecht <engeg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eval will terminate the shell on non-zero error code.
"POSIX says that an error in a special built-in utility
(such as eval) should cause the non-interactive shell to terminate"
This is the case and is causing cleanup to terminate android signing
with a non-zero error when it is clear the intent (given the set +e) is
that we should be best effort here.
BUG=chromium:1141907
TEST=unittest and manually on a signer
Change-Id: Ie6374b292c7982371d549b919b44328ea71a09dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2513228
Reviewed-by: George Engelbrecht <engeg@google.com>
Tested-by: George Engelbrecht <engeg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've moved to applying a file based set of selinux policies instead of
taking the ones that were snagged from the image. Remove the policy
attributes and let unsquash do whatever it would do by default.
See https://chat.google.com/room/AAAA45hbdCQ/jkXYe7jMEDk.
BUG=chromium:1141907
TEST=unittests
Change-Id: I0a976fb216e0a07c00c4bb2fb68df6fa1ea00d79
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2511121
Reviewed-by: Yury Khmel <khmel@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yury Khmel <khmel@google.com>
Commit-Queue: George Engelbrecht <engeg@google.com>
Commit-Queue: Yury Khmel <khmel@google.com>
Tested-by: George Engelbrecht <engeg@google.com>
Auto-Submit: George Engelbrecht <engeg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're getting silent errors in here somewhere.
BRANCH=none
BUG=chromium:1141907
TEST=none
Change-Id: I9af0a3ea1696920fe67c915660f82a68c1bddf34
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2504358
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
Commit-Queue: LaMont Jones <lamontjones@chromium.org>
Tested-by: LaMont Jones <lamontjones@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL would give VM boards the ability to hard reset TPM.
When clearing TPM ownership on real devices, there are two things
would happen:
1. TPM reset all of its NVRAM data.
2. mount-encrypted can't decrypt old encrypted partition.
The TPM2.0 simulator put its NV space at "/var/lib/trunks/NVChip".
And "/var/lib" is under encrypted partition.
Remove the mount-encrypted key would cause mount-encrypted lost the
encrypted partition on next boot, and it would simply achieve those
two targets.
BUG=b:170785530
BRANCH=none
TEST=crossystem clear_tpm_owner_request=1
Cq-Depend: chromium:2501904
Signed-off-by: Yi Chou <yich@google.com>
Change-Id: Ifeff0cf03bf76706849905816d22024f3d1b952f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2470577
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The firmware updater now looks at CBFS 'FW_MAIN_A' (RW A) and if a text
file 'updater_quirks' is found, the contents will be fetched to setup
default quirks.
This helps sharing same customization across multiple firmware images
(for different models) shared by same unibuild OS image. Without that,
we have to maintain a large list of hard-coded model names in firmware
updater source.
BRANCH=none
BUG=b:169284414
TEST=make runtests
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: I938bffe9f16bc3adee0dc3efb6976efe581c6d8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2426093
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we fail reading a GPT header, we memset() the respective buffer to 0
to avoid operating on uninitialized bytes. We should do the same for the
GPT entries array.
BRANCH=None
BUG=chromium:1137521
TEST=make runtests
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I1019eaf5e9ab05cd9953a15874f4931766952d88
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2469601
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In recent Intel platforms, updating Management Engine (ME) while SoC is in
S0 state is an unsupported use-case. To work-around this issue for the
devices that are in development, specifically during firmware update,
this quirk is added to preserve the ME region. In the subsequent boot,
ME region is updated as part of boot firmware update upstart script.
BUG=b:165590952
BRANCH=None
TEST=With the quirk enabled, ensured that the ME is preserved under the
following scenario:
chromeos-firmwareupdate --mode=autoupdate
chromeos-firmwareupdate --mode=recovery
futility update --mode=autoupdate -a /usr/sbin/chromeos-firmwareupdate
futility update --mode=recovery -a /usr/sbin/chromeos-firmwareupdate
In other scenarios, ME region is not preserved.
Change-Id: I81a52d11d1fb363b7e07ef3439b927449456b28a
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2465286
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support loading quirks from external files, we want to skip tab (\t)
and new line characters (\n, \r).
BRANCH=none
BUG=b:169284414
TEST=make runtests
Change-Id: If314d6cf36907837ce9c36b73337976ee0c6fad1
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2467305
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This follows steps we have in build image phase to have parity in image
packing.
* Discard reapply selinex context. This looks not needed once
re-signing should not change selinux context. Instead we could do
similar to build image, pass file context to mksquashfs
* Apply mksquashfs params based on image type, container/vm. This
fixes proper block size and image compression algorithm
* Remove old image before packing to prevent mksquashfs merge attempt
BUG=b:170400225
BUG=b:170220295
BUG=b:170219920
BRANCH=none
TEST=locally signed vm (kohaku) and container (hana): arc.Optin*,
arc.Preopt*. Also checked final image size. With this CL it is
reduced to 150Mb(vm) and very close to original image size
(delta is less than 0.1%)
Signed-off-by: Yury Khmel <khmel@chromium.org>
Change-Id: I7037bea68fc2969345a8fabc3c6a9b9b690f02d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2462005
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
Reviewed-by: George Engelbrecht <engeg@google.com>
Tested-by: Yury Khmel <khmel@google.com>
Auto-Submit: Yury Khmel <khmel@google.com>
Commit-Queue: Yury Khmel <khmel@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As promised, it's October 2020, nyan_kitty went AUE with M85, and M86
just got pushed stable. That means we can now delete this code :)
BUG=chromium:1090803
BRANCH=none
TEST=compiles
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I5a15ef1e1ad02885af135d8e42d02d492bdd6c05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2469604
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add three macros in 2api.h for bitmask operations:
- VB2_SET_BIT(mask, index)
- VB2_CLR_BIT(mask, index)
- VB2_GET_BIT(mask, index)
These macros will be used in corresponding depthcharge CLs.
Split disabled_item_mask into:
- disabled_item_mask: Disabled style, but still visible and selectable.
- hidden_item_mask: Not visible.
Ignore selecting on disabled menu items.
Set appropriate disabled_item_mask for page up/down buttons in log
screen.
Revise tests of hidden_item_mask and add unit tests of disabled_item_mask.
BUG=b:163301076, b:146399181
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang; DETACHABLE=1;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang; PHYSICAL_PRESENCE_KEYBOARD=1;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang; DIAGNOSTIC_UI=1;
make clean && make runtests
TEST=Build locally, navigate to debug info screen with <TAB>,
select page up or page down, and observe that nothing happens.
Cq-Depend: chromium:2432168
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I1607af53f6e2b5c1cde568cb24606314051d2380
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2426154
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Save parameters `timer_disabled` and `error_code` in mocked
vb2ex_displayed_ui calls to check whether the consecutive calls are
duplicate or not.
The unit tests of these parameters will be added in following CLs.
BRANCH=none
BUG=b:146399181, b:156448738
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang; DETACHABLE=1;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang; PHYSICAL_PRESENCE_KEYBOARD=1;
make clean && make runtests
TEST=FEATURES=test PKGDIR=/build/puff/test-packages
/mnt/host/source/chromite/bin/parallel_emerge
--sysroot=/build/puff --jobs=32 vboot_reference
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I2b7c9b6b05d2427e938394ff9d0769fbde81f773
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2449310
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use packed structures to avoid unexpected error about padding.
BUG=b:156448738, b:170186754
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=FEATURES=test PKGDIR=/build/puff/test-packages
/mnt/host/source/chromite/bin/parallel_emerge
--sysroot=/build/puff --jobs=32 vboot_reference
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ibdcffe81d92db2880c53282a313ffa678af7d43d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2454911
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:170156734
BRANCH=none
TEST=sign rvc-arc image
Signed-off-by: Victor HSieh <victorhsieh@chromium.org>
Change-Id: I99fc4eb19be6cc785297e223a6603c1d777c5c77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2458789
Reviewed-by: Yury Khmel <khmel@chromium.org>
Reviewed-by: George Engelbrecht <engeg@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:170156734
TEST=run signing script locally
BRANCH=None
Signed-off-by: Victor HSieh <victorhsieh@chromium.org>
Change-Id: I4f045729241b479b56fef5687b721b5b59c2eed8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2450551
Reviewed-by: George Engelbrecht <engeg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This supports new set of certificates plat_mac_permissions.xml and adds
handling media and network_stack certificates.
BRANCH=none
BUG=b:169458218
TEST=Sign test image from goldeneye per instructions in bug, deploy
it to device (kohaku) pass tast.arc.Optin.vm test
Signed-off-by: Yury Khmel <khmel@chromium.org>
Change-Id: I61c4e327eaa605ed60c0c80b3598c0f4fb6e5f5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2447430
Tested-by: Yury Khmel <khmel@google.com>
Auto-Submit: Yury Khmel <khmel@google.com>
Reviewed-by: George Engelbrecht <engeg@google.com>
Commit-Queue: Yury Khmel <khmel@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For utilities reading text file, it is easier to process as ASCIIZ input
if vb2_readfile can always return a buffer ends with '\0' so we don't
need to pass and check the size.
BUG=None
TEST=make clean && make runtests
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: Ib6294969fb325b9b7899e6295fb1817ad91a9952
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2426092
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I884ec94adc762549ad565fe0796d3db625039f64
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2428563
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow same style as MENU_ITEMS macro for clarity and safety.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I9aac27dca763c98fd5ca7e35219163d990c73ab0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2428202
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Header not needed.
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I84585909db16ce71cf4ba1beba1f6924c9e71457
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2428201
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add vb2ex_hwcrypto_modexp support to accelerate only calculation part of
RSA and we can handle the rest. Instead of relying on opaque hardware
accleration for all RSA verification process, this will enable us to
maintain our security level while enhancing overall speed of
verification.
BRANCH=zork
BUG=b:169157796
TEST=make runtests
Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I6f9fc919c4215964158815a58a9f1b338c2a76a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2444809
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To prevent flooding AU logs, we don't want flashrom to print verbose
logs especially when reading system SPI flash. However, if anything goes
wrong it will be very helpful to have all the messages logged.
With this patch, we will try reading system flash again with max verbosity.
BUG=chromium:943262,b:169026171
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None
Change-Id: I5469182f2628855e65546bef3abf8791261aabca
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1545598
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting error_code always implies we need to beep.
BUG=b:146399181
TEST=Build locally
BRANCH=zork
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I65d790a63739f36dc1db8e22321adbff26d70893
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2397017
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we only have a beep when the user presses ctrl-u. Adding
an error message to clarify what the error is.
BUG=b:164944674
BRANCH=puff, zork
TEST=boot into developer mode
make sure "boot from external disk" doesn't appear
press ctrl+U and make sure dialog box with error appears
Cq-Depend: chromium:2359765
Signed-off-by: Shelley Chen <shchen@google.com>
Change-Id: Id8fad79802cb61883758e8c7561163cc17fb0f87
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2359768
Tested-by: Shelley Chen <shchen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Discovered by CL:2353632, the regular expression for extracting rootfs
partition should include non-digit character first otherwise we won't
get correct number when the partition number is longer than one digit
(e.g., >=10).
BUG=None
TEST=./make_dev_ssd.sh
BRANCH=none
Change-Id: I155e04beec47c55df4d09cb78168ab0a7407c697
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2353776
Reviewed-by: Kuang-che Wu <kcwu@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle three different errors in alternate boot:
- VB2_UI_ERROR_ALTERNATE_BOOT_DISABLED
- VB2_UI_ERROR_NO_BOOTLOADER
- VB2_UI_ERROR_ALTERNATE_BOOT_FAILED
BUG=b:146399181, b:161092974
TEST=make clean && make runtests
BRANCH=puff, zork
Cq-Depend: chromium:2384995
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I1e6572ed4a1c756d6d3727818439de25cad03158
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2382998
Tested-by: Shelley Chen <shchen@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Force to reacquire a newer firmware log snapshot every time when the
user enters the firmware log screen.
Re-entering (e.g. back from language selection or debug info tab) will
still show the cached firmware log string.
BUG=b:146399181, b:168442372
TEST=make clean && make runtests
TEST=Build locally, navigate to the firmware log screen,
go back, and enter the firmware log screen again.
BRANCH=none
Cq-Depend: chromium:2409742
Change-Id: I8c3eea23446c58603ce698a86f1aca4b264ebb0e
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2411761
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:2353775 made the functions tested by vb2_keyblock_fuzzer and
vb2_preamble_fuzzer look at secdata, which broke the fuzzer because they
don't initialize secdata the way a normal boot would. This patch makes
the fuzzers initialize both firmware and kernel secdata explicitly (and
nvdata as well for good measure, although I think it's technically not
needed).
BRANCH=None
BUG=chromium:1125143,chromium:1124172
TEST=None
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Id9aaa4d44a20455133adc4c2bc524895629edfb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2402423
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The name of a gpiochip can in theory be up to NAME_MAX characters long
(usually 255), which exceeds the length of the 30 byte buffer allocated
for it. In practice we won't need more than the 30 bytes, but the
smaller buffer trips a -Wformat-truncation warning from GCC that makes
the build fail. Make the buffer bigger to keep GCC happy.
BUG=none
BRANCH=none
TEST=make utillib compiles on BeagleBone Black
Change-Id: I528f395033f58057846e717ff126e7a5dca504e3
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2393193
Tested-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When GBB forces developer mode (VB2_GBB_FLAG_FORCE_DEV_SWITCH_ON),
disallow Ctrl-S shortcut in developer screens. Beep and show an error
message when Ctrl-S is pressed.
BRANCH=zork
BUG=b:146399181, b:164975737
TEST=export CC=x86_64-pc-linux-gnu-clang; make runtests
TEST=emerge-nami depthcharge
Cq-Depend: chromium:2397556
Change-Id: I62d18575290498b7ae829c2b3a2ff8dda6679636
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2390593
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signer uses BLOCKLIST instead of DENYLIST. This patches make the
language match.
BUG=b:163883397
BRANCH=None
TEST=egrep -i -I -r "deny.*list"
TEST=make runtests
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I47c913eb2ca89cd3eea4ca3ff5f1accb223ba418
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2401968
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:163883397
BRANCH=None
TEST=make runtests
TEST=egrep -r -i -I '(sane|insane)'
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I109207575e2c00d6aa3b0ed17de7f699087a9658
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2369464
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|