How to link DXE_DRIVER from UEFI_APPLICATION?


joseph@...
 

Hi,

I want to include Tcg2PhysicalPresenceLib in my UEFI Application.

Tcg2PhysicalPresenceLib is located in SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf in EDK2.

========================================
This is what I tried:

Package dsc:
[LibraryClasses.common]
Tpm2DeviceLibTcg2|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf

Application inf:
[LibraryClasses]
Tcg2PhysicalPresenceLib
========================================

If you do the above, you will get this error.

.../edk2/MyPkg/MyPkg.dsc(...): error 1001: Module type [UEFI_APPLICATION] is not supported by library instance [.../edk2/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf]
consumed by [.../edk2/MyPkg/MyApp/MyApp.inf]

How do I use Tcg2PhysicalPresenceLib in Application?

Kind regards,
Joseph

Join discuss@edk2.groups.io to automatically receive all group messages.