Skip to content

Conversation

@3mkusiak
Copy link
Contributor

Add last resort check before running flashrom.

For now target is fd_first branch, will change this once it gets merged.

@3mkusiak 3mkusiak requested a review from m-iwanicki December 15, 2025 16:54
@3mkusiak
Copy link
Contributor Author

Example run (qemu)

Heads transiton, FD and ME disabled scenario.

*********************************************************
**     1) Dasharo HCL report
**     2) Update Dasharo Firmware
**     3) Restore firmware from Dasharo HCL report
**     4) Edit your DPP keys
**     5) DTS extensions
**     6) Transition Dasharo Firmware
**     7) Fuse platform
*********************************************************
R to reboot  P to poweroff  S to enter shell
K to stop SSH server  L to enable sending DTS logs
C to display DPP credentials

Enter an option:
2
Gathering flash chip and chipset information...
Flash information: Opaque flash chip
Flash size: 2M
Waiting for network connection ...
Network connection have been established!
Downloading board configs repository...
Checking if board is Dasharo compatible.
Getting platform specific GPG key... Done
Waiting for system clock to be synced ...
Would you like to switch to Dasharo heads firmware? [y|n]: y

Switching to Dasharo heads firmware v0.9.0
Current Dasharo version: 0.9.4
Latest available Dasharo version for your subscription: 0.9.0 (coreboot+Heads)
Downloading Dasharo firmware...
Checking Dasharo firmware checksum... Verified.
Checking Dasharo firmware signature... Verified.


Please verify detected hardware!

Board vendor: Micro-Star International Co., Ltd.
System model: MS-7E06
Board model: PRO Z790-P WIFI (MS-7E06)

Does it match your actual specification? [y|n]: y
Following firmware will be used to deploy Dasharo:
Dasharo BIOS firmware:
  - link: dasharo-msi-heads/MS-7E06/v0.9.0/msi_ms7e06_v0.9.0_ddr5_heads.rom
  - hash: 22d12343f5ddecde32b9f3fe03314864e5397e46c31770f627c801e27e3c9b09

You can learn more about this release on: https://docs.dasharo.com/

Do you want to deploy this Dasharo Firmware on your platform [y|n]: y
Updating Dasharo firmware...
This may take several minutes. Please be patient and do not
power off your computer or touch the keyboard!
Checking flash layout.
Scheduling main firmware update...
The firmware binary to be flashed contains Flash Descriptor (FD), but FD is not writable!
The firmware binary contains Management Engine (ME), but ME is not writable!
You can read more about issues with FD or ME on
https://docs.dasharo.com/guides/firmware-update/#known-issues
Cannot proceed with heads update when FD and ME are locked!
Do you want to send console logs to 3mdeb? [y|n]: n
Press Enter to continue.

Base automatically changed from fd_first to main December 19, 2025 11:16
This commit adds last resort check before performing any flashrom
commands. For heads update, we shall not proceed if FD or ME is locked.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
@3mkusiak 3mkusiak marked this pull request as draft December 23, 2025 14:03
Split region verification flow into multiple, smaller helper functions
and make them more generic to be reusable.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Use arrays instead of namerefs in helper functions related to
dasharo-deploy. The reason is this is easier to read.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
@3mkusiak
Copy link
Contributor Author

3mkusiak commented Jan 7, 2026

I'll "un-draft" it once I run the tests

@3mkusiak 3mkusiak marked this pull request as ready for review January 7, 2026 16:24
@3mkusiak
Copy link
Contributor Author

3mkusiak commented Jan 7, 2026

E2E test pass, results in Jira task. I'll fix that "Couldn't verify" profile once I run it on HW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants