[edk2] [RFC] Proposal to add edk2-apps repository

Leif Lindholm leif.lindholm at linaro.org
Mon Dec 3 07:07:56 PST 2018

On Mon, Dec 03, 2018 at 03:11:33PM +0100, Laszlo Ersek wrote:
> On 11/30/18 07:03, Andrew Fish wrote:
> > Mike,
> >
> > As Krishna points out there are flavors of Apps. Do we want to have
> > different packages for different flavor of apps, or different dirs in
> > a more generic App package? Maybe we should define classes of UEFI
> > Applications in the README.md and give them a place to live.
> In my opinion, this is absolutely the first step that should be done.

Yes please.

> Personally, I've just learned, from this thread, that there are *three*
> (not two) UEFI application entry point types that edk2 supports.
> * I've always known about main() -- libc app --, and ShellAppMain() --
>   shell app. I've always known these because I read about them in
>   "AppPkg/ReadMe.txt" and "StdLib/ReadMe.txt" years ago. In particular,
>   compare the description of "Hello" and "Main".
> * And now MdeModulePkg/Application has been mentioned, in this thread,
>   where I see UefiMain() as the entry point.

Well, these are defined by the application .inf though, so "UefiMain"
is just a common name picked. MdeModulePkg/Application also has
applications with entry points called 'BootManagerMenuEntry',
'SmiHandlerProfileInfoEntrypoint' and 'InitializeUserInterface'. (The
latter being UiApp.)

> I don't recall reading about UefiMain() or UefiApplicationEntryPoint on
> this list. On the other hand, I remember several discussions where
> people asked if they could write an application and invoke it from
> SysPrep#### or similar, and the answer has always been, "oh sorry you
> can't do that, because the lowest level you can go is ShellAppMain(),
> and that won't work from SysPrep####".

Huh? Who claimed that? Where?

(I suspect the meaning of "Application" has taken on some
overly-specific meaning for someone if they have claimed such - going
back to how having a proper definition is clearly quite important.)

Of course they can. Any EDK2 image itself contains a bunch of .efi
executables - and there is nothing preventing you from invoking those
from the shell.

And don't forget most platforms ship without a built-in Shell, so
there would be no way of running ... anything ... if that was true.

Also, it's pretty much the whole point of gnu-efi (combined with doing
it directly in a normal POSIX environment).


More information about the edk2-devel mailing list