summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* futility: make flash --wp-status subcmd check HW statusstabilize-15432.BNikolai Artemiev2023-04-202-9/+25
| | | | | | | | | | | | | | | | Check HW WP status as well as SW WP status by default. A new `--ignore-hw` flag makes it possible to only check SW WP. BUG=b:268574030 BRANCH=none TEST=todo Change-Id: I4a45499ceda52a1e00e7e33742b0bb48d235550b Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4413354 Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
* Makefile: Respect standard CPPFLAGSstabilize-15429.BYu-Ping Wu2023-04-191-1/+1
| | | | | | | | | | | | | | | | | The Makefile should respect the standard compilation setting CPPFLAGS. For example, the cros-debug-add-NDEBUG function call in the ebuild needs that to work. BUG=none TEST=USE=cros-debug emerge-corsola vboot_reference TEST=USE=-cros-debug emerge-corsola vboot_reference BRANCH=none Change-Id: I9b3a404983b5db81fe401ef243de357c55f478b3 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4426377 Commit-Queue: Julius Werner <jwerner@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* Makefile: Disable NDEBUG by defaultYu-Ping Wu2023-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | We decided in to enable NDEBUG by default because cryptolib would spam the debug output [1]. Now that cryptolib is gone (CL:400903), we should be able to turn it on by default, so that assert() calls will no longer be no-ops. The DISABLE_NDEBUG make variable is replaced with NDEBUG. [1] https://codereview.chromium.org/3004001 BUG=none TEST=make NDEBUG=1 futil -j TEST=emerge-corsola vboot_reference BRANCH=none Change-Id: Ic97d85f0cc14c05a1084d02c6a150e4cc7d3393e Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4413341 Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Julius Werner <jwerner@chromium.org>
* futility/: host/lib: Add flash chip info subcommand supportEdward O'Callaghan2023-04-133-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The AP RO verification tooling requires a understanding of the underlying flashchip information. Provision support in the flash subcommand to report back this data from the flashrom driver. BUG=b:276981092 BRANCH=none TEST=on Nissa ``` localhost ~ # futility flash --flash-i{nfo} Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed. New value is 0x8b. Flash vendor: Winbond Flash name: W25Q256JV_M Flash vid-pid: 0xef00007019 Flash size: 0x02000000 ```. Cq-Depend: chromium:4401775, chromium:4401776 Change-Id: I58e818f06def4904693f61c6967d70b16c62fa37 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4402370 Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Jakub Czapiga <czapiga@google.com> Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
* Fix build error when compiling without -DNDEBUGYu-Ping Wu2023-04-131-5/+5
| | | | | | | | | | | | | | | | | | | | | Currently the host lib is always built with "-DNDEBUG" (added by Makefile). When NDEBUG is undefined, the symbols such as TPM_TAG_RQU_COMMAND will be undeclared, leading to build error. Since the assertion is for TPM1 only, add #ifndef guard for TPM2_MODE. BUG=none TEST=make hostlib TPM2_MODE=0 DISABLE_NDEBUG=0 TEST=make hostlib TPM2_MODE=0 DISABLE_NDEBUG=1 TEST=make hostlib TPM2_MODE=1 DISABLE_NDEBUG=0 TEST=make hostlib TPM2_MODE=1 DISABLE_NDEBUG=1 BRANCH=none Change-Id: Id2cb327e512140ed8fff04f5e54d3090d9e25dbe Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4418006 Reviewed-by: Julius Werner <jwerner@chromium.org>
* futility: Allow printing manifest for EC onlyYu-Ping Wu2023-04-122-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently `futility update --manifest` requires either -i/--image or -a/--archive to be passed. There is no way to show the EC manifest without also passing an AP image. Extend the command by allowing `futility update --manifest -e FILE`. Here are a few examples of valid commands: * futility update --manifest --archive PATH * futility update --manifest --image FILE * futility update --manifest --image FILE --ec_image FILE * futility update --manifest --ec_image FILE BUG=none TEST=make DISABLE_NDEBUG=1 futil -j TEST=sudo emerge vboot_reference TEST=futility update --manifest -e FILE BRANCH=none Change-Id: I267b90a3e5ff2891b519702558d173bb2e970052 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4413335 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Yidi Lin <yidilin@chromium.org>
* firmware/2lib: Expose vb2_clear_recovery as vb2apiMichał Żygowski2023-04-125-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | For ChromeOS platform the recovery reason is cleared in vb2api_kernel_phase2 which is probably not called by any non-ChromeOS system. It results in the platform being stuck in recovery mode, e.g. when RW firmware verification fails. Even if the RW partition is flashed with correctly signed image, the persistent non-zero recovery reason will prevent vboot from attempting the RW partition check. Expose vb2_clear_recovery as vb2api to let non-ChromeOS coreboot platform to clear the recovery reason when needed. TEST=Clear the recovery reason in mainboard_final function right before payload jump when RW partition is corrupted and RW partition is valid. In case it is corrupted, the platform stays in recovery mode, when valid the platform boots from RW partition. Tested on MSI PRO Z690-A DDR4. Change-Id: Ic2946150c404fc8e2d50d07d0746b2e42f7cbcde Signed-off-by: Michał Żygowski <miczyg94@gmail.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4414956 Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Julius Werner <jwerner@chromium.org> Tested-by: Julius Werner <jwerner@chromium.org>
* sha256_armv8a_ce_a64.S: Reuse vb2_sha256_k[] in 2sha256.cYidi Lin2023-04-121-23/+3
| | | | | | | | | | | | | | Reuse round constants defined in 2sha256.c instead of having them twice. BRANCH=none BUG=none TEST=boot to kernel Change-Id: I6fe12b5d65a7c46078781cb1632eba5bca6797a0 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4408854 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* futility/cmd_update: Describe more details in command helpJakub Czapiga2023-04-101-1/+13
| | | | | | | | | | | | | BRANCH=None BUG=None TEST=make runtests Disallow-Recycled-Builds: test-failures Change-Id: I86f0f4ea383b5fff8390a0510bc5c88bda414f2b Signed-off-by: Jakub Czapiga <czapiga@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4370239 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
* tlcl: Add `TlclReadPublic()` supportYi Chou2023-04-104-0/+114
| | | | | | | | | | | | | | | Add support for the TPM2_ReadPublic command to the TLCL. This command is used to read the public area data of an object with the object handle. BUG=b:249552664 BRANCH=None TEST=TlclReadPublic works. Signed-off-by: Yi Chou <yich@google.com> Change-Id: I5d72b8f19e02c6bdcc39f1c20ff7100f5dd0eda1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4218847 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* futility/updater: Fix legacy bios image namingstabilize-15415.BEdward O'Callaghan2023-04-066-10/+10
| | | | | | | | | | | | | | | | | | Clean up many other instances of 'bios.bin' littered everywhere over time. BUG=b:65745723 BRANCH=none TEST=`cros_run_unit_tests --host --packages vboot_reference`. Change-Id: Ie5916d003ba0a5873ce04ec96f48cd45c8253aab Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4402371 Tested-by: Edward O'Callaghan <quasisec@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
* cgpt: Expose CgptRepair in the host libTed Brandston2023-04-041-1/+2
| | | | | | | | | | | | | | | | | | | Needed by chromeos-installer in postinstall, with the new postinstall_cgpt_repair USE flag. Also fix copyright lint. BUG=b:197219816, b:257478857 BRANCH=None TEST=emerge-reven vboot_reference USE=postinstall_cgpt_repair emerge-reven chromeos-installer Cq-Depend: chromium:4377945, chromium:4377717 Change-Id: I40170da35fac4e302673614c6a8ab99d5384ad5d Signed-off-by: Ted Brandston <tbrandston@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4377068 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Jeffery Miller <jefferymiller@google.com>
* futility/cmd_*: Cleanups for maintainabilityEdward O'Callaghan2023-04-0310-117/+87
| | | | | | | | | | | | | | | | | Fix many mistyping of indexers and other itermediate variables. BUG=b:268397597 TEST=`emerge-nissa vboot_reference`. TEST=`cros_run_unit_tests --host --packages vboot_reference`. TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`. Change-Id: I49cc0e1a3e5d455c7f473e31cba528e8f227dfb6 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349562 Reviewed-by: Sam McNally <sammc@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Sam McNally <sammc@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
* futility/cmd_gbb_utility.c: Remove globalEdward O'Callaghan2023-03-311-14/+2
| | | | | | | | | | | | | | | | BUG=b:268397597 TEST=`emerge-nissa vboot_reference`. TEST=`cros_run_unit_tests --host --packages vboot_reference`. TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`. Change-Id: I3effc8651511a5b51f0948ba213bb5a00c49f55e Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349561 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
* futility/cmd_*.c: Use ERROR() macro consistentlyEdward O'Callaghan2023-03-3113-266/+198
| | | | | | | | | | | | | | | | | | Fix grammatical issues in ERROR() usage and over usage of contractions. Now errors shall now be prefixed with "ERROR:" and the function name. BUG=b:268397597 TEST=`emerge-nissa vboot_reference`. TEST=`cros_run_unit_tests --host --packages vboot_reference`. TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`. Change-Id: Ieac1f312c2e02133228ba4560197d009aed0324c Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349560 Reviewed-by: Sam McNally <sammc@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
* futility: updater: Add --unlock_me optionReka Norman2023-03-297-24/+135
| | | | | | | | | | | | | | | | | | | | Add a --unlock_me option which unlocks the Intel ME before flashing by: - Unlocking the FLMSTR values in the descriptor. - Disabling GPR0 in the descriptor. This will be used in factory to support Flexible EOM. BRANCH=None BUG=b:273168873 TEST=Flash locked yaviks firmware with --unlock_me. Read firmware back and check that FLMSTR values are unlocked and GPR0 is disabled. Change-Id: Ie29f3c997c82a1bc58fe62f568f257e9dc375d94 Signed-off-by: Reka Norman <rekanorman@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4374965 Tested-by: Reka Norman <rekanorman@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Commit-Queue: Reka Norman <rekanorman@chromium.org>
* cgpt: Add support for error counter (verity)Jae Hoon Kim2023-03-2810-5/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. so platform side daemons/process can initiate getting/setting the error counter (verity) attribute from GPT partitions of CrOS kernels. ``` $> cgpt show <IMAGE> 405504 65536 2 Label: "KERN-A" Type: ChromeOS kernel UUID: 0394A807-59A0-A84C-A443-BC3C555C8842 Attr: priority=15 tries=15 successful=1 error_counter=0 ... $> cgpt add -E1 -i2 <IMAGE> $> cgpt show <IMAGE> 405504 65536 2 Label: "KERN-A" Type: ChromeOS kernel UUID: 0394A807-59A0-A84C-A443-BC3C555C8842 Attr: priority=15 tries=15 successful=1 error_counter=1 ... $> cgpt add -E0 -i2 <IMAGE> $> cgpt show <IMAGE> 405504 65536 2 Label: "KERN-A" Type: ChromeOS kernel UUID: 0394A807-59A0-A84C-A443-BC3C555C8842 Attr: priority=15 tries=15 successful=1 error_counter=0 ... ``` BUG=b:274539529 BRANCH=None TEST=emerge vboot_reference TEST=comment above Change-Id: Ib0904378fba8219a3631278c66b7317fd86ea9d8 Signed-off-by: Jae Hoon Kim <kimjae@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4370744 Reviewed-by: Julius Werner <jwerner@chromium.org>
* futility: Drop external flashrom quarkEdward O'Callaghan2023-03-263-63/+1
| | | | | | | | | | | | | | | | | This prevents architectural changes required to make futility to make it fast and robust while providing limited to no tangible value. BUG=b:226477133 BRANCH=none TEST=none Signed-off-by: Edward O'Callaghan <quasisec@google.com> Change-Id: Ie0ea715fcf60cfb5b2b25037f4421c2dc70c0e5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4147407 Reviewed-by: Sam McNally <sammc@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
* futility/file_type_*: Use ERROR() macro consistentlyEdward O'Callaghan2023-03-254-47/+40
| | | | | | | | | | | | | | | | | | Fix grammatical issues in ERROR() usage and over usage of contractions. Now errors shall now be prefixed with "ERROR:" and the function name. BUG=b:268397597 TEST=`emerge-nissa vboot_reference`. TEST=`cros_run_unit_tests --host --packages vboot_reference`. TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`. Change-Id: Iba811c4d4714b9af1a3982613b74ca43958d7934 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349559 Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* futility/file_type*: Minor cleanups for maintainabilityEdward O'Callaghan2023-03-256-129/+87
| | | | | | | | | | | | | | | | | | | | Use C99 features to scope indexer to loop constructs and local itermediates within more constrained lexical scopes. Be canonical in predicates of branch conditions. Use const correctness. Apply clang-format where reasonable BUG=b:268397597 TEST=`emerge-nissa vboot_reference`. TEST=`cros_run_unit_tests --host --packages vboot_reference`. TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`. Change-Id: I8ce232f791a95a668ab5017cff628c199c36e917 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349558 Tested-by: Edward O'Callaghan <quasisec@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
* sign_official_build: Fix is-reven checkstabilize-15395.BNicholas Bishop2023-03-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The `get_is_reven` function added in https://crrev.com/c/4206907 was too restrictive. When run by the signer, the board name has been modified from "reven" to "reven-signed-mp-v2keys". Change the condition to accept either `reven` or `reven-signed*` (note the glob). Allowing plain "reven" is not strictly necessary, but useful for local testing. Tested the updated function by building a reven base image, then making variants with different CHROMEOS_RELEASE_BOARD values: "reven", "reven-signed-mp-v2keys", and "revenator". Running `sign_official_build.sh` on them shows that the first two are identified as reven, and the last one is not. This can be seen by checking if boot*.efi is signed or not, since that should not happen for reven. BRANCH=none BUG=b:274648121 TEST=See above TEST=FEATURES=test emerge-reven vboot_reference Change-Id: I099abf372b71ea3e064e91a57c5e8888de298028 Signed-off-by: Nicholas Bishop <nicholasbishop@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4358400 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* futility: Add `flash` subcommandstabilize-15393.48.Brelease-R113-15393.Bfirmware-skyrim-15390.BNikolai Artemiev2023-03-168-1/+408
| | | | | | | | | | | | | | | | | | | | | | | | | Add a new subcommand for getting/setting flash properties such as the flash size and writeprotect configuration. The operations provided by `futility flash` require less information from the user and are less error prone than the equivalents provided by `flashrom`. For example, --wp-enable automatically choses the protection range based on the firmware image and --wp-status gives a warning if the protection range does not match the RO firmware region. BUG=b:268574030 BRANCH=none TEST=`futility flash --{flash-size,wp-enable,wp-disable,wp-status}` Co-authored-by: Edward O'Callaghan <quasisec@google.com> Signed-off-by: Edward O'Callaghan <quasisec@google.com> Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Change-Id: I36d7468616a5bcdf3c4542d48652bd24c3377a61 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4279661 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
* futility/: Replace futil_copy_file_or_die() implfactory-skyrim-15384.BEdward O'Callaghan2023-03-155-52/+39
| | | | | | | | | | | | | | | | | | | | | | | Replace shell-script C with actual library calls to copy file content. Don't die, dying is bad. Use '0660' as the default dest file perm mask over the default system umask inherited form the environment applied to the source file permissions. Add error handling so we have a idea what happened. BUG=b:268397597 TEST=`emerge-nissa vboot_reference`. TEST=`cros_run_unit_tests --host --packages vboot_reference`. TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`. Change-Id: Ibe4745dbad20504a1ff7e39e10cbf18ed1831354 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4313546 Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org>
* tpm2_lite: Treat NV_UNINITIALIZED error as BADINDEX for TPM 2.0Julius Werner2023-03-151-0/+5
| | | | | | | | | | | | | | | This patch ports the equivalent of CB:20299 to the vboot version of the TPM library. This should fix a problem that was observed where a created but not written FWMP space gets a device stuck in recovery mode. BRANCH=none BUG=b:272310645 TEST=none Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: If0ef6fdda879b45de0444cdaeb423d01ce109e2c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4327074 Reviewed-by: Andrey Pronin <apronin@chromium.org>
* OWNERS: Add quasisecEdward O'Callaghan2023-03-151-0/+1
| | | | | | | | | | | | | | | Futility is an integral part of CrOS FW Update Team's mission. BUG=none TEST=none Change-Id: Ie6591be479268e854288f07b0825d84b086ea492 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4337534 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org>
* sign_official_build: Don't sign miniOS kernels in factory shimsstabilize-15381.BReka Norman2023-03-091-5/+7
| | | | | | | | | | | | | | | | | Factory shims contain miniOS kernels, but they are not used, so don't sign them. They will remain in the image signed with dev keys. BRANCH=None BUG=None TEST=Run sign_official_build.sh on factory shim. Logs show miniOS kernels are not signed, and shim still boots. Change-Id: I4a1b72726edb7d780a3f2c2fe783f568a012ee77 Signed-off-by: Reka Norman <rekanorman@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4321706 Tested-by: Reka Norman <rekanorman@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Reka Norman <rekanorman@chromium.org>
* futility: Prefer debug header servo over CCD when both are available.Matthew Blecker2023-03-091-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:270287312 TEST=With atlas DUT + servo_v4p1 + cr50_ccd + servo_micro: $ dut-control -o servo_type # servo_v4p1_with_servo_micro_and_ccd_cr50 $ dut-control cpu_fw_spi # unknown value but control does exist $ dut-control ccd_cpu_fw_spi # error from control not existing $ futility read --servo -v ap-fw.bin # succeeds With atlas DUT + servo_micro: $ dut-control -o servo_type # servo_micro $ dut-control cpu_fw_spi # unknown value but control does exist $ dut-control ccd_cpu_fw_spi # error from control not existing $ futility read --servo -v ap-fw.bin # succeeds With atlas DUT + servo_v4p1 + cr50_ccd: $ dut-control -o servo_type # servo_v4p1_with_ccd_cr50 $ dut-control ccd_cpu_fw_spi # off $ futility read --servo -v ap-fw.bin # succeeds Change-Id: I18e890aaa6c3fa63f2108840b8c344a6adc5a561 Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4315198 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
* vboot_reference: Change flashrom_get_wp signatureNikolai Artemiev2023-03-096-32/+40
| | | | | | | | | | | | | | | | | | | Expose more information about WP state from the flashrom_drv WP status function. The more detailed WP information is required to properly validate the system WP configuration. BUG=b:268574030 TEST=futility update Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Change-Id: If79b7d8cc68a0583cbf1f7049ac7a2dec088fdd0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4301750 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
* sign_official_build: Support a second recovery keyReka Norman2023-03-081-30/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices have a second recovery key, which is used to sign: - a second recovery kernel KERN-C in recovery images - a second installer kernel KERN-B in factory images If a device has a second recovery key, use it to sign the second recovery and installer kernels. Otherwise, don't sign the second kernels. If they are present, they'll remain in the image signed with dev keys. BRANCH=None BUG=b:266502803 TEST=- Run replace_recovery_key.sh in devkeys directory to get keys for testing. - Run sign_official_build.sh on a recovery image with KERN-C present. - Set recovery_key.vbpubk in GBB - recovery succeeds using KERN-A. - Set recovery_key.v1.vbpubk in GBB - recovery succeeds using KERN-C. - Run sign_official_build.sh on a factory shim with KERN-B present. - Set recovery_key.vbpubk in GBB - factory shim boots using KERN-A. - Set recovery_key.v1.vbpubk in GBB - factory shim boots using KERN-B. - Run sign_official_build.sh on a base image and check it boots. Change-Id: I39b209e1efd4669128a12751f1c4ee94bb722d67 Signed-off-by: Reka Norman <rekanorman@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4242686 Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Reka Norman <rekanorman@chromium.org> Tested-by: Reka Norman <rekanorman@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* futility/cmd_gbb_utility.c: Check wp status before flash write()Edward O'Callaghan2023-03-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check write-protect status before attempting to write to SPI flash. BUG=b:238694831,b:260531154 BRANCH=none TEST=``` [..] SPI Configuration is locked down. FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write. FREG1: BIOS region (0x003a0000-0x01ffffff) is read-write. FREG2: Management Engine region (0x00001000-0x0039ffff) is read-write. OK. Found Winbond flash chip "W25Q256JV_M" (32768 kB, Programmer-specific) on host. ERROR: write_to_flash: You must disable write protection before setting flags. ``` Cq-Depend: chromium:4303349 Change-Id: I46d72a8867292599bf1a7287d63c62999df41c8e Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4161094 Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Yu-Ping Wu <yupingso@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* scripts/../{g,s}et_gbb_flags.sh: Add delayEdward O'Callaghan2023-03-032-0/+4
| | | | | | | | | | | | | | | | | | Give some time to the user to reconsider and ween users off a unsupported ABI. BUG=b:260531154 TEST=none Change-Id: I9cfbd032f56d7aa3ba1f19abdd26c15a785cc876 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4269751 Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Otabek Kasimov <otabek@google.com> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* futility: updater: revise DUT type detectionHung-Te Lin2023-03-021-6/+5
| | | | | | | | | | | | | | | | | | | | | Some commands like 'cros ap flash' may pass '-p host' to the futility updater, making the updater consider itself running in the remote DUT mode. Other futility commands sharing the flash arguments (e.g., handle_flash_argument) work on files by default and only do flashing if '-p' is specified, but that is not the case for the updater. So we should double check the programmer before deciding the DUT type. BUG=b:271115449 TEST=FEATURES=test emerge vboot_reference BRANCH=None Change-Id: I5be6e4382acffced0ef9cd94f6ede9e9d3fe2efa Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4300000 Commit-Queue: Yu-Ping Wu <yupingso@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* sign_uefi: Add support for crdybootNicholas Bishop2023-03-022-3/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The crdyboot bootloader (see https://chromium.googlesource.com/chromiumos/platform/crdyboot) for the reven board requires some additional handling for signing: * A public key for verifying the kernel must be injected into the `.vbpubk` section. * Then the file must be signed with `sbsign` in the usual way. Testing commands: ``` scripts/keygeneration/make_arv_root.sh arv scripts/keygeneration/create_new_keys.sh \ --arv-root-path arv --uefi --output reven scripts/image_signing/sign_official_build.sh recovery \ ~/chromiumos/src/build/images/reven/latest/chromiumos_image.bin \ reven \ ~/chromiumos/src/build/images/reven/latest/chromiumos_image.signed Then boot the image in a UEFI VM. ``` BRANCH=none BUG=b:256176281 TEST=make runtests TEST=See testing notes above Change-Id: Id454ff0677c397b2c399f39981862ac18c2c9985 Signed-off-by: Nicholas Bishop <nicholasbishop@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4250562 Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org>
* futility: updater: Fix platform_ver property on errorfirmware-skyrim-15369.BHung-Te Lin2023-03-011-1/+8
| | | | | | | | | | | | | | | | | The platform_ver property was expected to be within 0..INT_MAX before the implementation changed from mosys to crossystem (CL:4029537). So we should return 0 instead of -1 on error. BUG=b:271115449 TEST=make; run test BRANCH=None Change-Id: I772ff53a4a13e17e6cfe8099768dba64b8736ec5 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4297882 Commit-Queue: Yu-Ping Wu <yupingso@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* lib/flashrom_drv.c: Use correct programmer name for programmer initNikolai Artemiev2023-03-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Fix the call to `flashrom_programmer_init()` in `flashrom_get_wp()`. The programmer name and parameters should be passed separately, e.g: > flashrom_programmer_init("dummy", "emulate=VARIABLE_SIZE,...") However a string containing both the name and parameters was incorrectly used instead, e.g: > flashrom_programmer_init("dummy:emulate=VARIABLE_SIZE,...", "emulate=VARIABLE_SIZE,...") This was not noticed before because it did not cause issues if there were no parameters, e.g. if the programmer was just "host" or "internal" BUG=b:238694831,b:260531154 TEST=cros_run_unit_tests --board octopus --packages vboot_reference Change-Id: I4774a82258acbb8be2b430351ccef203e26e6b27 Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4290837 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
* 2nvstorage_fields.h: indent vb2_nv_offsetGwendal Grignou2023-02-281-32/+32
| | | | | | | | | | | | | Use Tab to make sure array is indented consistently. BUG=none BRANCH=none TEST=compile. diff -w reports not change. Change-Id: Ifc1a2370ee193124278236a5cfb088d3c5ad712f Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4295785 Reviewed-by: Julius Werner <jwerner@chromium.org>
* scripts/image_signing/make_dev_ssd.sh: Replace flashrom callstabilize-15364.BEdward O'Callaghan2023-02-241-3/+1
| | | | | | | | | | | | | | | | | | | | Just use futility directly. BUG=b:260531154 TEST=``` localhost ~ # futility gbb -g --flash --rootkey=/tmp/rkey >/dev/null 2>&1 localhost ~ # od /tmp/rkey | head -130 | md5sum | sed 's/ .*$//' a13642246ef93daaf75bd791446fec9b ``` Change-Id: I1aa3b52f568a5e78255b52a15d68258cc9d9aa44 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4269750 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Commit-Queue: Yu-Ping Wu <yupingso@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
* futility/cmd_gbb_utility.c: Allow OR'ing new GBB flagsstabilize-15361.Bstabilize-15359.BEdward O'Callaghan2023-02-231-9/+32
| | | | | | | | | | | | | | | | | | | | | | | It maybe the case that the caller wishes to not clobber the current flags set and merely just OR on the new bits. BUG=b:270074866 TEST=``` # futility gbb --flash --get --flags # futility gbb --flash --set --flags=(+|-)0x1 # futility gbb --flash --get --flags as expected. ``` Change-Id: Ibd56dff986d2075b7b220c531e66b224d488b6e6 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4273505 Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Yu-Ping Wu <yupingso@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org>
* Avoid build failures with dumpRSAPublicKey on recent distrosSimon Glass2023-02-161-0/+5
| | | | | | | | | | | | | | | | | | | Emit a warning and continue when OpenSSL is newer than expected. The chroot still uses an older version. This was broken by: 0ca7a9e4 ("firmware: host: futility: Add CBFS metadata hash support") BUG=b:245993083, b:246328810, b:197114807 BRANCH=none TEST=make -C ~/cosarm/src/platform/vboot_reference/ USE_FLASHROM=0 See that the errors become warnings and the build completes Change-Id: Id4e25e4ebad1d9ae1f6ee5425b3e6fe3cbd5d5e5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4241424 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* futility: gbb: Avoid unnecessary search of FMAPYu-Ping Wu2023-02-162-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For commands such as `futility gbb --set --flags=0x140`, futility first reads the GBB section from the flash, modifies the section, and then writes back the section to the flash. The write, however, requires another search of the FMAP section, in order to locate the GBB section in the flash. This unnecessary search can be avoided by reading the FMAP section together with the GBB section. The FMAP data will be stored in the image buffer, so that the FMAP layout can be retrieved directly from the buffer for subsequent writes. This will also prevent the misleading warnings from showing up: Failed to read fmap from buffer. WARNING: flashrom_write_image: could not read fmap from image, r=1, falling back to read from rom BUG=b:260531154 TEST=emerge-corsola vboot_reference TEST=make runtests TEST=No warnings and errors were shown with `futility gbb --set --flash --flags=0x140` BRANCH=none Change-Id: I50029ae5d9c5ecb347f47e980e7c3b772ecc0f18 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4251504 Reviewed-by: Hung-Te Lin <hungte@chromium.org>
* futility: flashrom_drv: Support partial read for multiple regionsYu-Ping Wu2023-02-163-23/+42
| | | | | | | | | | | | | Similar to CL:3490388, support flashrom read for multiple regions. BUG=b:260531154 TEST=emerge-corsola vboot_reference BRANCH=none Change-Id: I1f75832f882004e879bc299be6862db089c2b71d Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4251503 Reviewed-by: Hung-Te Lin <hungte@chromium.org>
* host/lib/flashrom_drv.c: Move flag to avoid locked ME issueEdward O'Callaghan2023-02-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Older Intel DUT's have a ME in "locked" mode in the descriptor and while the write_flash() attempts to write back to flash to a specific region it needs to read the FMAP to obtain the region name. This read overlaps with the "locked" region and thus the following is observed in logs: ``` FREG2: Management Engine region (0x00001000-0x001fffff) is locked. [..] read_flash: cannot read inside Management Engine region (0x001000..0x1fffff). ``` BUG=b:269199980 TEST=builds. Change-Id: If7bebf28cd4d34cc4074700184233c83edbd2409 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4248344 Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
* {g,s}et_gbb_flags.sh: Fix removal notice messageYu-Ping Wu2023-02-162-2/+2
| | | | | | | | | | | | | | | | | Fix the futility command in the removal notice message, by adding the missing `--flash` option. BUG=b:260531154 TEST=Ran set_gbb_flags.sh BRANCH=none Change-Id: Ic1846929661a47c40b65e67ea76f776493ee2d9c Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4251505 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Matthew Blecker <matthewb@chromium.org> Reviewed-by: Matthew Blecker <matthewb@chromium.org> Reviewed-by: Alexandru Stan <amstan@chromium.org>
* vboot_reference-sys: Use --blocklist-type when invoking bindgenBob Haarman2023-02-161-3/+3
| | | | | | | | | | | | | | | Previous versions of bindgen used --blacklist-type, newer versions of bindgen use --blocklist-type. This change updates our build script to use the new spelling. BRANCH=none BUG=b:264938287 TEST=emerge-amd64-generic dev-rust/vboot_reference-sys Change-Id: I15bf4591177af89693d9f02fd3ec2a3c27c92cbb Signed-off-by: Bob Haarman <inglorion@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4250779 Reviewed-by: Allen Webb <allenwebb@google.com>
* vboot_reference-sys: Fix needless-borrow lintsBob Haarman2023-02-161-11/+11
| | | | | | | | | | | | | | Pre-submit hooks pointed out several unnecessary borrows in the build script. This fixes those. BRANCH=none BUG=None TEST=cq Change-Id: I92987004db3573084fa91db3b72f09b7b7327cfb Signed-off-by: Bob Haarman <inglorion@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4250778 Reviewed-by: Allen Webb <allenwebb@google.com>
* 2sha256_arm: Fix data abort issueYidi Lin2023-02-142-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following CPU exception when enabling ARMV8_CRYPTO_EXT. [DEBUG] exception _sync_sp_el0 [DEBUG] ELR = 0x000000000025f390 ESR = 0x96000010 [DEBUG] FAR = 0x000000000c000000 SPSR = 0x2000000c [DEBUG] X00 = 0x000000000026cf20 X01 = 0x000000000bffffe0 [DEBUG] X02 = 0x00000000ffd042de X03 = 0xffffffffffffffff [DEBUG] X04 = 0x000000000026cf88 X05 = 0x0000000000054ff8 [DEBUG] X06 = 0x0000000000000002 X07 = 0x000000000000000a [DEBUG] X08 = 0x000000000025f5f0 X09 = 0x000000000026cf30 [DEBUG] X10 = 0x000000000010b4ee X11 = 0x00000000000001fc [DEBUG] X12 = 0x0000000000000080 X13 = 0x0000000000125110 [DEBUG] X14 = 0x0000000000124f10 X15 = 0x0000000000125310 [DEBUG] X16 = 0x0000000000267580 X17 = 0x749ffa8d9d5f02ca [DEBUG] X18 = 0x0000000000125110 X19 = 0x0000000000000000 [DEBUG] X20 = 0x000000000026cf20 X21 = 0x000000000010b760 [DEBUG] X22 = 0x000000000026cf48 X23 = 0x0000000000000000 [DEBUG] X24 = 0x0000000000000000 X25 = 0x00000000000a3800 [DEBUG] X26 = 0x000000000026c970 X27 = 0x000000000026c802 [DEBUG] X28 = 0x0000000000000000 X29 = 0x0000000000000000 [DEBUG] X30 = 0x000000000025f1e0 SP = 0x000000000010b650 The issue happens when the buffer size processed by `vb2ex_hwcrypto_digest_extend` is equal to VB2_SHA256_BLOCK_SIZE. `vb2_sha256_transform_hwcrypto` is called twice in `vb2ex_hwcrypto_digest_extend`. The first call processes the whole buffer. The second call still processes the buffer even if `remaining_blocks` is equal to 0. This causes `block_nb`(see X02) underflow in the assembly code. Then ld1 instruction accesses an unexpected memory address(see X01) and raises CPU exception. Fix the issue by checking `block_nb` value before calling to `sha256_ce_transform`. BRANCH=corsola BUG=b:263514393 TEST=flash image-geralt*.bin and no CPU exception raised Change-Id: I9b74d60413b3cc571950e15c0d2b901bc4063385 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4242678 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* sign_official_build: Silence shellcheck sed lintsNicholas Bishop2023-02-141-0/+4
| | | | | | | | | | | | | | | | | | | | | Silence all current instances of "SC2001 (style): See if you can use ${variable//search/replace} instead." Replacing complicated `sed` calls without tests in place would likely lead to mistakes, so leave them alone for now. The lint is not disabled globally though, so new uses can still be flagged. BRANCH=none BUG=None TEST=cros lint scripts/image_signing/sign_official_build.sh TEST=scripts/image_signing/sign_official_build.sh recovery \ TEST= ~/chromiumos/src/build/images/reven/latest/chromiumos_image.bin TEST= tests/devkeys TEST= ~/chromiumos/src/build/images/reven/latest/chromiumos_image.signed Change-Id: I228e78033f891ee09db40b937b4d7a7750de8c18 Signed-off-by: Nicholas Bishop <nicholasbishop@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4245621 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* sign_official_build: Fix shellcheck quoting lintsNicholas Bishop2023-02-141-5/+5
| | | | | | | | | | | | | | | | | | Fix all instances of "SC2046 (warning): Quote this to prevent word splitting." BRANCH=none BUG=None TEST=cros lint scripts/image_signing/sign_official_build.sh TEST=scripts/image_signing/sign_official_build.sh recovery \ TEST= ~/chromiumos/src/build/images/reven/latest/chromiumos_image.bin TEST= tests/devkeys TEST= ~/chromiumos/src/build/images/reven/latest/chromiumos_image.signed Change-Id: I46a7f3ed0b65e930e7fb95cd97954377a9a09e20 Signed-off-by: Nicholas Bishop <nicholasbishop@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4245620 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* sign_official_build: Fix shellcheck echo lintsNicholas Bishop2023-02-141-4/+3
| | | | | | | | | | | | | | | | | | Fix all instances of "SC2005 (style): Useless echo? Instead of 'echo $(cmd)', just use 'cmd'." BRANCH=none BUG=None TEST=cros lint scripts/image_signing/sign_official_build.sh TEST=scripts/image_signing/sign_official_build.sh recovery \ TEST= ~/chromiumos/src/build/images/reven/latest/chromiumos_image.bin TEST= tests/devkeys TEST= ~/chromiumos/src/build/images/reven/latest/chromiumos_image.signed Change-Id: Ia11a30187cb79077aeee4c626dc41de9bee5a12b Signed-off-by: Nicholas Bishop <nicholasbishop@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4245619 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* futility: updater: detect DUT typeHung-Te Lin2023-02-134-3/+34
| | | | | | | | | | | | | | | | | | | Detect if we are going to update a remote DUT (by checking if the flash parameter has been changed), and ignore all the local system properties if needed. This should help 'updating a Chromebook from a Chromebox via servo' to behave the same as updating from a non-ChromeOS Linux desktop. BUG=b:247428499,b:255617349 TEST=make; run test BRANCH=None Change-Id: I4aa0e98efa21179708d8b593fc619b7f7b65f418 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4181582 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>