In my fork of edk2 I've added support for using StdLib without the Shell.
It's quite hacky(setenv/getenv are stubs, no File IO and maybe other things
hidden by linker GC and me not using all features).

But depending on which StdLib features you need this can work pretty good.

here's the commit that does the magic:
https://github.com/efidroid/edk2/commit/bf7a296718486bafaf774ea8bcf187c162c3c167

and this is how you convert a Shell project to a NonShell one:
https://github.com/efidroid/uefi_apps_EFIDroidUi/commit/23f0fa08108b8f852564fae733c6a7bce62e2070

as you can see it works by using StdLib with different libraries/cflags so
you have to compile your driver separately if there are other modules which
need the normal StdLib.

Thanks
Michael

On Wed, Jun 22, 2016 at 9:38 PM, Marvin H?user <[email protected]>
wrote:

> Dear EDK2 developers,
>
> For an experimental project, I'm currently attempting to write a library
> wrapper for the disassembler library 'Capstone' in a similar manner to
> CryptoPkg's OpensslLib. As most C libraries, it also depends on the
> standard headers, which are not provided by 'stock' EDK2. My first guess
> has been to use StdLib, though its description states:
> 'Due to the execution environment built by the StdLib component, execution
> as a UEFI driver can cause system stability issues.'
>
> Inspecting OpensslLib I discovered that CryptoPkg deploys its own include
> files for StdLib. Though, from your experience, what are the issues with
> using StdLibPkg with DXE/UEFI drivers? It might be nice to reduce duplicate
> code, though I honestly don't know anything about StdLibPkg and its
> implementation and would be thankful for some insight on that manner.
>
> Thank you in advance for your time!
>
> Regards,
> Marvin.
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
>
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to