Skip to content

Conversation

@3mkusiak
Copy link
Contributor

@3mkusiak 3mkusiak requested a review from m-iwanicki December 10, 2025 14:23
@3mkusiak
Copy link
Contributor Author

Flow

For now tested under qemu

*********************************************************
**     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.0.0
Latest available Dasharo version for your subscription: 0.9.0 (coreboot+Heads)
Downloading Dasharo firmware...
y
y
y
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]: 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]: 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 Flash Descriptor and Management Engine update...
Executing job 1 of 3... OK
Executing job 2 of 3... OK
Executing job 3 of 3... OK
All jobs completed successfully!
Successfully switched to Dasharo Heads firmware.
On first boot you will see a warning about unsealing TOTP secrets.
This is expected. Run OEM Factory Reset / Re-Ownership to finish deploying Heads.
Press Enter to continue.Syncing disks... Done.
The computer will reboot automatically in 5 seconds
Rebooting in 5 s:
5...
4...
3...
2...
1...
Rebooting
common_mock: using reboot...

Profile example

Flow: Heads update for z790 DDR5 under qemu.

cbfstool /tmp/bios.bin layout -w 0                                                                                                                                                                                  
cbfstool /tmp/biosupdate layout -w 0                                                                                                                                                                                
flashrom -p internal --ifd -i FD -w /tmp/biosupdate 0                                                                                                                                                               
flashrom -p internal -N --fmap -i COREBOOT -w /tmp/biosupdate 0                                                                                                                                                     
flashrom -p internal -N --ifd -i fd -i me -w /tmp/biosupdate 0  

@m-iwanicki
Copy link
Contributor

@3mkusiak

pre-commit install

Also this change will require updating probably every profile we have in OSFV

Instead of executing flashrom in place, schedule them and execute one
after another. This is basically a workaround for fragmented flashrom
parameter logic. This way we know all flashrom jobs before executing
them.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
If FD is to be flashed, flash the FD before flashing anything else. The
reason is regions are FD dependent.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Make progress bar standalone to be reusable. It should be used only for
drawing the progress bar, and not contain any logic.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Move drawing progress bar function to dts-functions.sh

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Use progress bar for flashrom jobs instead of printing messages. Add
scheduling info for remaining fobs.

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

Rebased on top of newest main.

Add progress bar wrapper to avoid code repetition.

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

This is how it currently looks like:

Details


 Dasharo Tools Suite Script 2.7.2
 (c) Dasharo <contact@dasharo.com>
 Report issues at: https://github.com/Dasharo/dasharo-issues
*********************************************************
**                HARDWARE INFORMATION
*********************************************************
**    System Inf.: Micro-Star International Co., Ltd. MS-7E06
** Baseboard Inf.: Micro-Star International Co., Ltd. PRO Z790-P WIFI (MS-7E06)
**       CPU Inf.: TBD_variable_not_set_and_should_be_defined_in_platform_config_if_needed
*********************************************************
**                FIRMWARE INFORMATION
*********************************************************
** BIOS Inf.: 3mdeb Dasharo (coreboot+UEFI) v0.0.0
*********************************************************
**                DPP credentials
*********************************************************
**      Email: ***************
**   Password: ***************
*********************************************************
**    SSH status: ON IP: 10.0.2.15/24
*********************************************************
**     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 ...
Current Dasharo version: 0.0.0
Latest available Dasharo version for your subscription: 0.9.4
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-uefi/MS-7E06/v0.9.4/msi_ms7e06_v0.9.4_ddr5.rom
  - hash: 88dcb050cec25ceda18868a7ce58b6e8b2cbb30addb23287eafbb7e3dce2df42

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!
Backing up firmware configuration... Done.
Checking flash layout.
Checking vboot keys.
Scheduling main firmware update...
Scheduling Flash Descriptor and Management Engine update...
Scheduling dedicated FD update...
[###################################################################] 3/3
All jobs completed successfully!
Successfully updated Dasharo firmware.
Syncing disks... Done.
The computer will reboot automatically in 5 seconds
Rebooting in 5 s:
5...
4...
3...
2...
1...
Rebooting
common_mock: using reboot...
Press Enter to continue.

For the scheduling to work reliably, the parameters must be stored as
arrays, not as strings. Use dynamic arrays for adding flashrom
parameters. Additionally improve fd flashing detection mechanism.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
@3mkusiak 3mkusiak marked this pull request as draft December 17, 2025 10:29
@3mkusiak
Copy link
Contributor Author

Converted to draft, need to run E2E to verify this truly works.

3mkusiak added a commit to Dasharo/open-source-firmware-validation that referenced this pull request Dec 17, 2025
This commit updates profiles for platforms that need FD flashing in
deployment, update and heads transition workflows. The change is that if
FD is being flashed, it'll get a dedicated job first.

Related to:
Dasharo/dts-scripts#130

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

Proved this works, need to documment that code though.

@m-iwanicki
Copy link
Contributor

There are still couple of places where we are possibly flashing fd once:

Those places also have to be fixed to close issue:

Flash Descriptor being flashed separately before flashing other regions.

Transition is more important than recovery as we don't even have tests for those.

Add wrapper function for transition and recovery workflows that detects
if fd is being flashed, and if so, runs dedicated flashrom job for FD
flashing.

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

Addressed, though still need to test it.

3mkusiak added a commit to Dasharo/open-source-firmware-validation that referenced this pull request Dec 18, 2025
This commit updates profiles for platforms that need FD flashing in
deployment, update and heads transition workflows. The change is that if
FD is being flashed, it'll get a dedicated job first.

Related to:
Dasharo/dts-scripts#130

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
@3mkusiak 3mkusiak marked this pull request as ready for review December 18, 2025 13:38
@3mkusiak
Copy link
Contributor Author

Added some minor documentation to the function, I believe it's ready to review.

This commit adds a bunch of comment to deploy_firmware() so the function
is more readable.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
m-iwanicki pushed a commit to Dasharo/open-source-firmware-validation that referenced this pull request Dec 19, 2025
This commit updates profiles for platforms that need FD flashing in
deployment, update and heads transition workflows. The change is that if
FD is being flashed, it'll get a dedicated job first.

Related to:
Dasharo/dts-scripts#130

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
@m-iwanicki m-iwanicki merged commit 15e6c41 into main Dec 19, 2025
1 check passed
@m-iwanicki m-iwanicki deleted the fd_first branch December 19, 2025 11:16
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.

Flash fd region separately if it's in regions to be updated

3 participants