tianocore / edk2-pytool-library

Python library package that supports UEFI development
Other
56 stars 43 forks source link

[Bug]: Capsules are failing infverif validation #451

Closed jorticus-msft closed 9 months ago

jorticus-msft commented 10 months ago

Contact Details

jasanson@microsoft.com

Describe the Bug

The latest copy of infverif.exe fails on capsules generated by edk2toollib's capsule_helper with the following:

infverif.exe .\UEFI.inf
WARNING(1296) in UEFI.inf, line 22: Hardware 'UEFI' does not have an associated service using install section 'Firmware0_Install.NT'.

This warning has recently been upgraded to an error, and is now failing our tests.

The generated INF driver is missing a '.Services' section even though capsules don't actually use that feature. To be compliant, capsules now need to add the following for each firmware section:

[Firmware_Install.NT.Services]
AddService=,2     ; NULL function driver

Reproduction steps

Build a capsule using capsule_helper.create_inf_file() or capsule_helper.create_multinode_inf_file(), then run it against infverif.exe

Expected behavior

infverif should produce no warnings or errors

What Python version are you using?

Python 3.10

Execution Environment

Windows 11 infverif.exe version 10.0.19041.1

Pip packages

No response

Additional context

No response

Javagedes commented 9 months ago

@jorticus-msft I have put up a PR for you to test. #462

Please install the branch, build an INF using inf_generator and inf_generator2 and verify that both pass using the verif tool you mentioned.

You can install the branch with the following command:

pip install --force git+https://github.com/javagedes/edk2-pytool-library@inf_generator-Services

Thanks!

jorticus-msft commented 9 months ago

Thanks, I have confirmed that this fixes validation in our build system (for both cases of inf_generator & inf_generator2)

Javagedes commented 9 months ago

@jorticus-msft the changes are out in release 0.19.8