-
Notifications
You must be signed in to change notification settings - Fork 35
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
BaseTools: Python VfrCompiler implementation #109
base: master
Are you sure you want to change the base?
Conversation
This python VfrCompiler tool is the python implementation of the edk2 VfrCompiler tool which C implementation locates at https://github.com/tianocore/edk2/tree/master/BaseTools/Source/C/VfrCompile. This python implementation not only covers the same usage as the C version VfrCompiler, but also extends several new features. Edk2 Basetools issue link: Signed-off-by: Yuting Yang <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #109 +/- ##
==========================================
- Coverage 4.27% 0.00% -4.27%
==========================================
Files 182 171 -11
Lines 81605 102585 +20980
==========================================
- Hits 3490 8 -3482
- Misses 78115 102577 +24462
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build files should be ignored from review commit.
from VfrCompiler.IfrCtypes import EFI_GUID | ||
from Common.BuildToolError import PARAMETER_INVALID | ||
|
||
# Enumeration of EFI_STATUS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many tools are going to need this. I would suggest figuring out a common way to do this. See https://github.com/tianocore/edk2-pytool-library/blob/master/edk2toollib/uefi/status_codes.py as an example.
|
||
|
||
# Converts a string to an EFI_GUID. | ||
def StringToGuid(AsciiGuidBuffer: str, GuidBuffer: EFI_GUID): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for guid support we have found the uuid module works pretty good and avoids having to write python code that looks like C. :)
For some examples seem this search. https://github.com/search?q=repo%3Atianocore%2Fedk2-pytool-library+uuid&type=code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good suggestion. Perhaps this feedback can be clubbed in the list of known issues Christine mentioned below? This will allow for upstreaming the present work to allow for more usage and learning from these improvements & feature additions. Sort of the 1.0->2.0->.. model of learning by shipping.
Thanks for the feedbacks, I will add them to Known issues: Known issues
Since it will not block the basetools usage and will not immediately enabled into build, is that possible to merge it firstly, and solve these issues one by one in the future? It is important for extended features testing (If so, will update the Known issues into ReadMe file and update the patch with basetools's import path) |
This approach makes sense to me. |
BaseTools: Python VfrCompiler implementation
This python VfrCompiler tool is the python implementation
of the edk2 VfrCompiler tool which C implementation locates at
https://github.com/tianocore/edk2/tree/master/BaseTools/Source/C/VfrCompile.
This python implementation not only covers the same usage as
the C version VfrCompiler, but also extends several new features.
Edk2 Basetools issue link:
#68
Cc: Rebecca Cran [email protected]
Cc: Liming Gao [email protected]
Cc: Bob Feng [email protected]
Signed-off-by: Yuting Yang [email protected]
Signed-off-by: Yuwei Chen [email protected]