From: Andrew Fish <afish@apple.com>
To: Amit kumar <akamit91@hotmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: How to make my application automatically launch like uefi shell ?
Date: Mon, 05 Jun 2017 08:28:14 -0700 [thread overview]
Message-ID: <6525C3C0-AA65-46AF-8A7A-A57CABDFAF6C@apple.com> (raw)
In-Reply-To: <MWHPR11MB182243EAE5E6D998415A75F0DCCA0@MWHPR11MB1822.namprd11.prod.outlook.com>
> On Jun 5, 2017, at 4:42 AM, Amit kumar <akamit91@hotmail.com> wrote:
>
>
> Hi,
>
> I have created a uefi application and i want to directly launch from the Pen Drive, just like uefi shell.
> I made a EFI/BOOT directory in USB and copied my application in this director and name it BOOTX64.efi it seems to works in some PCs,
> But there are some PCs where it doesn't work even in boot menu i can see no entry.
> Can somebody help me ?
>
Amit,
Is your test case edk2 Shell at EFI\BOOT\BOOTX64.efi vs. your App on the same USB Key. If not try that. Some of the edk2 libraries don't like to run on older systems, so it would be good to make sure that is not the issue.
You can write an UEFI App without any edk2 libraries by using this as a template:
https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Application/HelloWorld
In HelloWorld.c replace the code with.
#include <Uefi.h>
EFI_STATUS
EFIAPI
_ModuleEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
return SystemTable->ConOut->OutputString (SystemTable->ConOut, L"Hello World\r\n");
}
In HelloWorld.inf comment out all the library classes listed under [LibraryClasses]
If the issue is specific to your App, and you know the App entry point C code is not getting called then you need to look at the library constructor. This code is auto generated by the build system in the Build results output as AutoGen.c. You can look at the ProcessLibraryConstructorList() and that will show you the code that is going be running before your entry point gets called.
You could also try a release build of your App as that would remove the ASSERT macros in ProcessLibraryConstructorList() from the equation.
Thanks,
Andrew Fish
prev parent reply other threads:[~2017-06-05 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 11:42 How to make my application automatically launch like uefi shell ? Amit kumar
2017-06-05 15:28 ` Andrew Fish [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6525C3C0-AA65-46AF-8A7A-A57CABDFAF6C@apple.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox