Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Qemu adn UEFI Capsule Update support #26

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft

Commits on Sep 27, 2024

  1. tests: add pre-commit fixes

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    95c70b3 View commit details
    Browse the repository at this point in the history
  2. reports: dasharo-hcl-report: delete surplus definition

    CMD_DASHARO_DEPLOY is already defined in /usr/sbin/dts-environment.sh
    and included in the beginning og the dasharo-hcl-report.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    1c87a35 View commit details
    Browse the repository at this point in the history
  3. add missing shellcheck source statements

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    2a62321 View commit details
    Browse the repository at this point in the history
  4. include: dts-functions: add QEMU q35 configuration

    QEMU q35 will use UEFI Capsule Update only.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    e59ef0e View commit details
    Browse the repository at this point in the history
  5. include: dts-functions: clean up platforms configuration

    Configurations of all the supported platforms are done insinde
    board_config function as switch/case Bash statemansts. The list of
    supported platforms has grown a lot since then, and the function became
    unreadable, so adding and managing configurations became difficult and
    error-prone.
    
    This commit adds some default configuration values as well as tries to
    reuse some configuration code.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    2693493 View commit details
    Browse the repository at this point in the history
  6. include: dts-functions: erase DTS menu after entering shell

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    90fd1e7 View commit details
    Browse the repository at this point in the history
  7. scripts: dasharo-deploy: dont use hash variables in conditions

    Variables with links to hashes of the firmware binaries are always set,
    use variables with links to firmware binaries instead.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    313399c View commit details
    Browse the repository at this point in the history
  8. use test -n instead of test -v

    "test -v" checks whether a variable has been declared, it does not check
    its value. We sometimes use "unset" for some variables, and then check
    again with "test -v". The problem is, "unset" takes variable value, but
    the variable still exists, so the "test -v" will be true before, as well
    as after the "unset".
    
    We must use "test -n" (whether a variable holds non-zero length
    string value) and "test -z" (whether a variable holds zero length string
    value) to check string values of variables. This way the "unset" will
    work.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    4f83640 View commit details
    Browse the repository at this point in the history
  9. include: dts-functions: make func verify_artifacts more reusable

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    5d6d89a View commit details
    Browse the repository at this point in the history
  10. scripts: dasharo-deploy: add check_for_firmware_access func

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    6b17c5b View commit details
    Browse the repository at this point in the history
  11. 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 <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    b4750cc View commit details
    Browse the repository at this point in the history
  12. 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 <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    fb7195e View commit details
    Browse the repository at this point in the history
  13. include: add UEFI Capusle Update configuration

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    153bc57 View commit details
    Browse the repository at this point in the history
  14. scripts: dasharo-deploy: add UEFI Capsule Update configuration

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    018cca7 View commit details
    Browse the repository at this point in the history
  15. 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 <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    e52daa0 View commit details
    Browse the repository at this point in the history
  16. scripts: dasharo-deploy: add UEFI Capsule Update workflows

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    e76fa43 View commit details
    Browse the repository at this point in the history
  17. scripts: dasharo-deploy: pre-commit fixes

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    a6c2da7 View commit details
    Browse the repository at this point in the history
  18. scripts: ec_transition: delete surplus definitions

    These veriables are already defined in dts-environment.sh, and the
    ec_transition sources it.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    8186f2a View commit details
    Browse the repository at this point in the history
  19. scripts: dasharo-deploy: delete backup option

    This code is currently used inside dasharo-deploy only.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    5c866a2 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. include: dts-functions.sh: fix QEMU config

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    d193703 View commit details
    Browse the repository at this point in the history
  2. include: dts-functions: fix footer rendering

    Before:
    
    *********************************************************
    R to reboot  P to poweroff  S to enter shell
    K to launch SSH server  L to enable sending DTS logs V to enable verbose mode
    Enter an option:
    
    Now:
    
    *********************************************************
    R to reboot  P to poweroff  S to enter shell
    K to launch SSH server  L to enable sending DTS logs
    V to enable verbose mode
    Enter an option:
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    ff4bd22 View commit details
    Browse the repository at this point in the history
  3. Add more comments

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    d2fd010 View commit details
    Browse the repository at this point in the history
  4. Use flashrom in more controlled way

    Not all platforms are supported by flashrom, but some of them may use
    other deploying means (e.g. QEMU and UEFI Capsule Update). So, the code
    that uses flashrom should only be executed in case it is possible, to
    avoid surplus issues.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    3203c59 View commit details
    Browse the repository at this point in the history
  5. scripts: dasharo-deploy: pre-cpmmit fixes

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    b1a0699 View commit details
    Browse the repository at this point in the history
  6. remove -x flag from all files permissions

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    6f835e9 View commit details
    Browse the repository at this point in the history
  7. include: dts-functions: download_bios: add capsules

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    c8ad623 View commit details
    Browse the repository at this point in the history
  8. include: dts-functions: download_ec: we only have comm ec

    We only have community EC firmware, no need to check credentials.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    54ab9a7 View commit details
    Browse the repository at this point in the history
  9. scripts: dasharo-deploy: add some collors to output

    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    50ed8f1 View commit details
    Browse the repository at this point in the history
  10. scripts: dasharo-deploy: installation_workflow: fix downloading and

    verifying
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    ddafc4c View commit details
    Browse the repository at this point in the history
  11. scripts: dts: add board_config func before printing menu

    Some menu options depend on hardware configuration.
    
    Signed-off-by: Daniil Klimuk <[email protected]>
    DaniilKl committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    45c05be View commit details
    Browse the repository at this point in the history