edk2 icon indicating copy to clipboard operation
edk2 copied to clipboard

[WIP] Shell protocol refactor

Open benjamindoron opened this issue 1 year ago • 3 comments

Description

In this PR, we refactor the core shell functionality or environment into a library, allowing it to be consumed by other apps.

The purpose is to allow tools written for the shell, in development environments, to be easily modified to work in automated ways in production.

This patchset also allows us to reduce the coupling between the UI, the user interaction, and the shell protocol (etc) internals, but for the moment, this hasn't been done.

  • [x] Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • [ ] Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • [ ] Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

UefiPayload was built and booted into the shell.

Integration Instructions

If you're developing an out-of-tree platform, add library definitions for ShellProtocolInteractivityLib and ShellProtocolsLib when this is merged.

benjamindoron avatar Sep 27 '24 18:09 benjamindoron

WARNING: Cannot add some reviewers: A user specified as a reviewer for this PR is not a collaborator of the repository. Please add them as a collaborator to the repository so they can be requested in the future.

Non-collaborators requested:

  • @bibo-mao
  • @corvink
  • @lixianglai

Attn Admins:

  • @jljusten
  • @bcran
  • @lgao4
  • @mdkinney
  • @vincent-j-zimmer
  • @jkmathews
  • @miki-intel-work

Admin Instructions:

  • Add the non-collaborators as collaborators to the appropriate team(s) listed in teams
  • If they are no longer needed as reviewers, remove them from Maintainers.txt

I still want to go back and review how the headers are separated between public and private. This is mostly out of WIP status, but do not merge yet.

I need to find areas of poor separation between the shell and libraries, this may indicate the presence of a bug if they're used separately. For example, the device paths are in the interactive area, but the shell app populates them.

benjamindoron avatar Sep 27 '24 18:09 benjamindoron

This should diff more easily if you grab a copy of the shell app from before, then diff it against the larger of the two libraries to prove it's largely the same code. This way, we can review this without looking at thousands of irrelevant, changed lines. I preserved the filenames for this reason

benjamindoron avatar Sep 30 '24 16:09 benjamindoron

PR can not be merged due to conflict. Please rebase and resubmit

mergify[bot] avatar Oct 29 '24 02:10 mergify[bot]

This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

github-actions[bot] avatar Jan 03 '25 23:01 github-actions[bot]

This pull request has been automatically been closed because it did not have any activity in 60 days and no follow up within 7 days after being marked stale. Thank you for your contributions.

github-actions[bot] avatar Jan 10 '25 23:01 github-actions[bot]