Commit Graph

47 Commits

Author SHA1 Message Date
Pawel Langowski 23c6ed7f2a Use uppercase Enter
Signed-off-by: Pawel Langowski <pawel.langowski@3mdeb.com>
2024-11-21 14:28:16 +01:00
Daniil Klimuk fd823a96b5 scripts: dasharo-deploy: got to handle_fw_switching in case of Heads
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-20 12:52:07 +01:00
Daniil Klimuk 0cd3f0a534 Ask only for enter to continue
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-20 12:52:01 +01:00
Daniil Klimuk 750629b88d scripts: dasharo-deploy: fix version comparison in update workflow
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 17:43:06 +01:00
Daniil Klimuk e85031f1a2 scripts: dasharo-deploy: rework update routine to always reboot
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 16:52:47 +01:00
Daniil Klimuk 79e40334f9 check for Capsule Update compatibility with currently installed firm
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 16:52:47 +01:00
Daniil Klimuk c4e607a015 scripts: dasharo-deploy: send logs before trying to reboot
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 16:52:47 +01:00
Daniil Klimuk 55256f51e5 do not use flashrom with QEMU
flashrom does not support QEMU and fails every time. I have not found a
better way to handle it, but we should not place hardwere related
configs all around the code.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 16:52:47 +01:00
Daniil Klimuk 965a1bf8e1 scripts: dasharo-deploy: standardize firmware access warn
This warning serves as a checkpoint in tests in Dasharo/OSFV repo, it
was unconvenient to have different warnings all other dasharo-deploy
script, so this commit brings it to one format.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 16:52:46 +01:00
Daniil Klimuk 4f7f237998 scripts: dasharo-deploy: check for EC firmware in update_workflow
Some platforms do not have EC firmware, so update for them would fail
without this commit.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 16:52:45 +01:00
Daniil Klimuk 0004f910ef scripts: dasharo-deploy: add check_flash_chip
Size of flashchip should be checked before board_config func. because the
func. assigns some configs based on the chip size detected for ASUS boards.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 16:52:45 +01:00
Daniil Klimuk 6d53e2cf05 integrate HAL
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-18 16:17:36 +01:00
Daniil Klimuk a99ba0254d scripts: dasharo-deploy: installation_workflow: fix downloading and
verifying

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:39 +01:00
Daniil Klimuk 3910890fe4 scripts: dasharo-deploy: add some collors to output
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:39 +01:00
Daniil Klimuk 61f68f01b0 remove -x flag from all files permissions
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:38 +01:00
Daniil Klimuk 97aebd817f scripts: dasharo-deploy: pre-commit fixes
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:38 +01:00
Daniil Klimuk 2aef6c34f4 Add more comments
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:38 +01:00
Daniil Klimuk 05606c728d scripts: dasharo-deploy: delete backup option
This code is currently used inside dasharo-deploy only.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:38 +01:00
Daniil Klimuk 6b3eee91a3 scripts: dasharo-deploy: pre-commit fixes
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:38 +01:00
Daniil Klimuk fd45d4e408 scripts: dasharo-deploy: add UEFI Capsule Update workflows
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:37 +01:00
Daniil Klimuk bebd97bf18 scripts: dasharo-deploy: clean up installation and update funcs
The installation workflows must be as linear as possbile for better
readability and scalability.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:37 +01:00
Daniil Klimuk c584d6ecf5 scripts: dasharo-deploy: add UEFI Capsule Update configuration
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:37 +01:00
Daniil Klimuk 4a80617bb2 scripts: dasharo-deploy: rework deploying config
Before deploing we do some configuration based on the list of the
firmware versions the target supports and on DPP subscription user
has.

Previously this configuration lived beside the code responsible for
deploying, as a result, the deploying workflows was messy, had nesting
levels over 3, and nonlinear and complex logic.

This commit tries to separate this configuration and deploying to make
it more readable and scallable.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:37 +01:00
Daniil Klimuk ca790b3e6c scripts: dasharo-deploy: rework display_warning func
This function is useful not unly during update workflow, but every time
firmware is being deployed

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:37 +01:00
Daniil Klimuk e6d4617067 scripts: dasharo-deploy: add check_for_firmware_access func
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-11-14 10:39:37 +01:00