Commit Graph
585 Commits
Author SHA1 Message Date
Mateusz Kusiak 1d5d6d174c login_to_dpp_server: fix check if logged in
Check for validating if user email is set for alias was overly
optimistic. Short logins like "a" would false-positively trigger `grep`.
Fix the if statement to instead check if alias exists at all.
Fixes: https://github.com/Dasharo/dasharo-issues/issues/1578

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-02-09 10:07:57 +01:00
Mateusz Kusiak 9187e47a7f get_dpp_creds: clean creds file on new creds
If new credentials were specified, and they're not empty, overwrite the
last credentials file.
Fixes: https://github.com/Dasharo/dasharo-issues/issues/1463

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-02-09 09:57:27 +01:00
Mateusz Kusiak 075743e3a3 get_dpp_creds: Do not allow empty creds
Do not allow empty credentials nor spaces in the middle.
Fixes:
* https://github.com/Dasharo/dasharo-issues/issues/1326
* https://github.com/Dasharo/dasharo-issues/issues/1589

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-02-09 09:57:13 +01:00
Mateusz Kusiak b952a103d2 verify_artifacts: drop sig_result
The wrapper for catching sig_result simply does not work. It captures
nothing and just prints redundant empty line. Drop catching this at it
is not used at all.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-02-05 11:10:02 +01:00
Michał Iwanicki 5117404a1d dasharo-deploy & mock: check return value of cap_upd_tool & add mock
Print error and exit if queueing capsule update fails. Mention that most
common case is enabled ME and print link to known issues describing it
in more details along with solution.
Modify cap_upd_tool mocking so we can test failures.

Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
2026-01-29 11:44:57 +01:00
Danik Klimuk 66fb70522a Merge pull request #143 from Dasharo/fix-msi-romhole-migration
Fix MSI ROMHOLE migration.
2026-01-22 09:37:38 +01:00
Daniil Klimuk 207ef83d42 scripts: dasharo-deploy: quote variables in romhole_migration
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-22 09:22:36 +01:00
Daniil Klimuk 3e034d38f4 scripts: dasharo-deploy: fix typos, clarify ROMHOLE comments
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-21 17:27:50 +01:00
Daniil Klimuk 6f4b0d8729 scripts: dasharo-deploy: prevent ROMHOLE migration from CBFS
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-21 14:56:04 +01:00
Daniil Klimuk 47e394d25f scripts: dasharo-deploy: add error_check to every cbfstool that
modifies firm. in romhole_migration

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-21 14:33:40 +01:00
Daniil Klimuk fd25c91d18 include: hal: common-mock-func: add TEST_READ_ROMHOLE_FAIL
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-21 14:33:40 +01:00
Daniil Klimuk 0af84fa82c scripts: dasharo-deploy: exit during ROMHOLE migration issues
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-21 14:33:32 +01:00
Daniil Klimuk ae45c8d81c scripts: dasharo-deploy: romhole_migration: do not use grep -q with pipe
Such combinatoin can cause async. execution and issues with profile
logging.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-21 13:57:48 +01:00
Daniil Klimuk 55600508f0 include: hal: common-mock-func: enable controlling of ROMHOLE migration
source and destination

will be usefull for unit testing of some conditions in romhole_migration
func.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-21 13:57:40 +01:00
Daniil Klimuk f4cdb258ad add TEST_ROMHOLE_CBFS_MIGRATION
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-20 19:45:49 +01:00
Daniil Klimuk 6ab3a0bb15 scripts: dasharo-deploy: add ROMHOLE migration to CBFS
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-20 19:45:19 +01:00
Daniil Klimuk 11c5c46bb8 scripts: dasharo-deploy: add ORMHOLE migration to update and Heads
trasition workflows

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2026-01-20 14:10:17 +01:00
Mateusz Kusiak 3b88b776b9 Merge pull request #139 from Dasharo/heads_trans
Add a last resort check for validating flashrom jobs. For regular updates, check if the regions to update are not locked. For heads update, always check if FD, ME, and BIOS regions are flashed and if FE and ME are unlocked.

Fixes: https://github.com/Dasharo/dasharo-issues/issues/1536
2026-01-16 14:20:04 +01:00
Mateusz Kusiak 44bcb2c834 Menu: disable HCL FW restore
Disable the option to restore FW from HCL report as it is currently not
tested and has potential to brick devices.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-01-15 17:01:39 +01:00
Mateusz Kusiak d1e640f610 Dasharo-deploy: add missing commas
Ensure the commas are printed in the error message that prints locked
regions in flashrom_region_check().

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-01-15 16:37:44 +01:00
Mateusz Kusiak 17c368ac11 Dasharo-deploy: refine flashrom_check_for_region
Refine and simplify flashrom_check_for_region() function.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-01-15 16:25:06 +01:00
Mateusz Kusiak 7a5842b544 Dasharo-deploy: rework flashrom_region_check()
Rework and refine flashrom_region_check() function. Split logic into
three blocks: gather info, generic update, heads update. The major
functional change is generic update is no longer possible if region is
specified but locked.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-01-15 12:09:54 +01:00
Mateusz Kusiak b1f4be7879 Dasharo-deploy: heads: force fd, me and bios
This commit adds a check that enforces flashing FD, ME and BIOS regions
for heads update. The reason has been added inline with the changes.

This commit will break compatibility with some existing platforms and
that is intended.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
2026-01-15 10:29:58 +01:00
Michał Iwanicki ab1190c910 Merge pull request #140 from Dasharo/fuse-key-verification
Fuse key verification
2026-01-14 14:11:47 +01:00
Michał Iwanicki 26828e4183 common-mock: mock btg_key_validator so we can test failure states
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
2026-01-14 12:23:08 +01:00