public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* writing EDK compatible application.
@ 2017-07-04 17:20 Amit kumar
  2017-07-04 17:35 ` Marvin H?user
  2017-07-04 20:10 ` Laszlo Ersek
  0 siblings, 2 replies; 10+ messages in thread
From: Amit kumar @ 2017-07-04 17:20 UTC (permalink / raw)
  To: edk2-devel@lists.01.org


HI,

I have written a code (say helloworld program ) using edk2 framework, named the output efi file as BOOTx64.efi and placed it on a removable media in EFI/BOOT/ directory so that the application is listed in one time boot menu. When selected from boot menu it prints "Hello World".
Which works as expected when tested on UEFI 2.3 and above platforms.
But the same code fails to execute on EFI 1.10 platforms. Which i suppose is the problem with application entry point.
Can somebody suggest me a way so that the application entry function can be compatible to both the platform. Even when written according to UEFI 2.5+ Spec ?

Thanks 
Amit    

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 17:20 writing EDK compatible application Amit kumar
@ 2017-07-04 17:35 ` Marvin H?user
  2017-07-04 17:46   ` Amit kumar
  2017-07-04 20:10 ` Laszlo Ersek
  1 sibling, 1 reply; 10+ messages in thread
From: Marvin H?user @ 2017-07-04 17:35 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hey,

The entry point declarations and the calling conventions have not changed since EFI 1.10, though X64 was not a supported platform for 1.10 if I remember correctly.
To be honest, I never saw an x64 EFI 1.10 implementation other than Apple's, though even if it still signals that version, it's actually more UEFI by now.
I don't own a Mac, so if it's the platform you tested your app on, I can't tell you why it didn't work, but I would suggest you to run the app from an EFI Shell.

Regards,
Marvin.

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Amit kumar
> Sent: Tuesday, July 4, 2017 7:21 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] writing EDK compatible application.
> 
> 
> HI,
> 
> I have written a code (say helloworld program ) using edk2 framework,
> named the output efi file as BOOTx64.efi and placed it on a removable media
> in EFI/BOOT/ directory so that the application is listed in one time boot menu.
> When selected from boot menu it prints "Hello World".
> Which works as expected when tested on UEFI 2.3 and above platforms.
> But the same code fails to execute on EFI 1.10 platforms. Which i suppose is
> the problem with application entry point.
> Can somebody suggest me a way so that the application entry function can
> be compatible to both the platform. Even when written according to UEFI
> 2.5+ Spec ?
> 
> Thanks
> Amit
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 17:35 ` Marvin H?user
@ 2017-07-04 17:46   ` Amit kumar
  2017-07-04 17:51     ` Marvin Häuser
  0 siblings, 1 reply; 10+ messages in thread
From: Amit kumar @ 2017-07-04 17:46 UTC (permalink / raw)
  To: Marvin H?user; +Cc: edk2-devel@lists.01.org

Hi,
Yes intact it’s MacBook, but is there another way to do it without UEFI shell. In edk2/shellpkgbin are 2.2+, even shell fails to execute on Mac.
Although efi shell 1.0 works. Is there a to do it without shell ?
Thanks
Amit
> On Jul 4, 2017, at 11:05 PM, Marvin H?user <Marvin.Haeuser@outlook.com> wrote:
> 
> Hey,
> 
> The entry point declarations and the calling conventions have not changed since EFI 1.10, though X64 was not a supported platform for 1.10 if I remember correctly.
> To be honest, I never saw an x64 EFI 1.10 implementation other than Apple's, though even if it still signals that version, it's actually more UEFI by now.
> I don't own a Mac, so if it's the platform you tested your app on, I can't tell you why it didn't work, but I would suggest you to run the app from an EFI Shell.
> 
> Regards,
> Marvin.
> 
>> -----Original Message-----
>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>> Amit kumar
>> Sent: Tuesday, July 4, 2017 7:21 PM
>> To: edk2-devel@lists.01.org
>> Subject: [edk2] writing EDK compatible application.
>> 
>> 
>> HI,
>> 
>> I have written a code (say helloworld program ) using edk2 framework,
>> named the output efi file as BOOTx64.efi and placed it on a removable media
>> in EFI/BOOT/ directory so that the application is listed in one time boot menu.
>> When selected from boot menu it prints "Hello World".
>> Which works as expected when tested on UEFI 2.3 and above platforms.
>> But the same code fails to execute on EFI 1.10 platforms. Which i suppose is
>> the problem with application entry point.
>> Can somebody suggest me a way so that the application entry function can
>> be compatible to both the platform. Even when written according to UEFI
>> 2.5+ Spec ?
>> 
>> Thanks
>> Amit
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 17:46   ` Amit kumar
@ 2017-07-04 17:51     ` Marvin Häuser
  2017-07-04 17:55       ` Amit kumar
  0 siblings, 1 reply; 10+ messages in thread
From: Marvin Häuser @ 2017-07-04 17:51 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Well, if EFI Shell 1.0 works, why not use it?
Mac EFI exposes the ConsoleControl protocol, which lets you switch between text and graphics mode.
That might be the reason your text outputs don't show, because graphics is the default mode on Mac EFI,
though I could never test this myself as I lack the hardware.

Regards,
Marvin.

> -----Original Message-----
> From: Amit kumar [mailto:akamit91@hotmail.com]
> Sent: Tuesday, July 4, 2017 7:46 PM
> To: Marvin H?user <Marvin.Haeuser@outlook.com>
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] writing EDK compatible application.
> 
> Hi,
> Yes intact it’s MacBook, but is there another way to do it without UEFI shell.
> In edk2/shellpkgbin are 2.2+, even shell fails to execute on Mac.
> Although efi shell 1.0 works. Is there a to do it without shell ?
> Thanks
> Amit
> > On Jul 4, 2017, at 11:05 PM, Marvin H?user
> <Marvin.Haeuser@outlook.com> wrote:
> >
> > Hey,
> >
> > The entry point declarations and the calling conventions have not changed
> since EFI 1.10, though X64 was not a supported platform for 1.10 if I
> remember correctly.
> > To be honest, I never saw an x64 EFI 1.10 implementation other than
> Apple's, though even if it still signals that version, it's actually more UEFI by
> now.
> > I don't own a Mac, so if it's the platform you tested your app on, I can't tell
> you why it didn't work, but I would suggest you to run the app from an EFI
> Shell.
> >
> > Regards,
> > Marvin.
> >
> >> -----Original Message-----
> >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf
> >> Of Amit kumar
> >> Sent: Tuesday, July 4, 2017 7:21 PM
> >> To: edk2-devel@lists.01.org
> >> Subject: [edk2] writing EDK compatible application.
> >>
> >>
> >> HI,
> >>
> >> I have written a code (say helloworld program ) using edk2 framework,
> >> named the output efi file as BOOTx64.efi and placed it on a removable
> >> media in EFI/BOOT/ directory so that the application is listed in one time
> boot menu.
> >> When selected from boot menu it prints "Hello World".
> >> Which works as expected when tested on UEFI 2.3 and above platforms.
> >> But the same code fails to execute on EFI 1.10 platforms. Which i
> >> suppose is the problem with application entry point.
> >> Can somebody suggest me a way so that the application entry function
> >> can be compatible to both the platform. Even when written according
> >> to UEFI 2.5+ Spec ?
> >>
> >> Thanks
> >> Amit
> >> _______________________________________________
> >> edk2-devel mailing list
> >> edk2-devel@lists.01.org
> >> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 17:51     ` Marvin Häuser
@ 2017-07-04 17:55       ` Amit kumar
  2017-07-04 18:13         ` Amit kumar
  0 siblings, 1 reply; 10+ messages in thread
From: Amit kumar @ 2017-07-04 17:55 UTC (permalink / raw)
  To: Marvin Häuser; +Cc: edk2-devel@lists.01.org

Thanks for the suggestion Marvin, I will try switching to text mode.
Amit
> On Jul 4, 2017, at 11:21 PM, Marvin Häuser <Marvin.Haeuser@outlook.com> wrote:
> 
> Well, if EFI Shell 1.0 works, why not use it?
> Mac EFI exposes the ConsoleControl protocol, which lets you switch between text and graphics mode.
> That might be the reason your text outputs don't show, because graphics is the default mode on Mac EFI,
> though I could never test this myself as I lack the hardware.
> 
> Regards,
> Marvin.
> 
>> -----Original Message-----
>> From: Amit kumar [mailto:akamit91@hotmail.com]
>> Sent: Tuesday, July 4, 2017 7:46 PM
>> To: Marvin H?user <Marvin.Haeuser@outlook.com>
>> Cc: edk2-devel@lists.01.org
>> Subject: Re: [edk2] writing EDK compatible application.
>> 
>> Hi,
>> Yes intact it’s MacBook, but is there another way to do it without UEFI shell.
>> In edk2/shellpkgbin are 2.2+, even shell fails to execute on Mac.
>> Although efi shell 1.0 works. Is there a to do it without shell ?
>> Thanks
>> Amit
>>> On Jul 4, 2017, at 11:05 PM, Marvin H?user
>> <Marvin.Haeuser@outlook.com> wrote:
>>> 
>>> Hey,
>>> 
>>> The entry point declarations and the calling conventions have not changed
>> since EFI 1.10, though X64 was not a supported platform for 1.10 if I
>> remember correctly.
>>> To be honest, I never saw an x64 EFI 1.10 implementation other than
>> Apple's, though even if it still signals that version, it's actually more UEFI by
>> now.
>>> I don't own a Mac, so if it's the platform you tested your app on, I can't tell
>> you why it didn't work, but I would suggest you to run the app from an EFI
>> Shell.
>>> 
>>> Regards,
>>> Marvin.
>>> 
>>>> -----Original Message-----
>>>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf
>>>> Of Amit kumar
>>>> Sent: Tuesday, July 4, 2017 7:21 PM
>>>> To: edk2-devel@lists.01.org
>>>> Subject: [edk2] writing EDK compatible application.
>>>> 
>>>> 
>>>> HI,
>>>> 
>>>> I have written a code (say helloworld program ) using edk2 framework,
>>>> named the output efi file as BOOTx64.efi and placed it on a removable
>>>> media in EFI/BOOT/ directory so that the application is listed in one time
>> boot menu.
>>>> When selected from boot menu it prints "Hello World".
>>>> Which works as expected when tested on UEFI 2.3 and above platforms.
>>>> But the same code fails to execute on EFI 1.10 platforms. Which i
>>>> suppose is the problem with application entry point.
>>>> Can somebody suggest me a way so that the application entry function
>>>> can be compatible to both the platform. Even when written according
>>>> to UEFI 2.5+ Spec ?
>>>> 
>>>> Thanks
>>>> Amit
>>>> _______________________________________________
>>>> edk2-devel mailing list
>>>> edk2-devel@lists.01.org
>>>> https://lists.01.org/mailman/listinfo/edk2-devel
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 17:55       ` Amit kumar
@ 2017-07-04 18:13         ` Amit kumar
  2017-07-04 21:30           ` Andrew Fish
  0 siblings, 1 reply; 10+ messages in thread
From: Amit kumar @ 2017-07-04 18:13 UTC (permalink / raw)
  To: Marvin Häuser; +Cc: edk2-devel@lists.01.org

Hey,
I just can find any spec on ConsoleControl protocol, can you tell what/where to refer ?
Amit
On Jul 4, 2017, at 11:25 PM, Amit kumar <akamit91@hotmail.com<mailto:akamit91@hotmail.com>> wrote:

Thanks for the suggestion Marvin, I will try switching to text mode.
Amit
On Jul 4, 2017, at 11:21 PM, Marvin Häuser <Marvin.Haeuser@outlook.com<mailto:Marvin.Haeuser@outlook.com>> wrote:

Well, if EFI Shell 1.0 works, why not use it?
Mac EFI exposes the ConsoleControl protocol, which lets you switch between text and graphics mode.
That might be the reason your text outputs don't show, because graphics is the default mode on Mac EFI,
though I could never test this myself as I lack the hardware.

Regards,
Marvin.

-----Original Message-----
From: Amit kumar [mailto:akamit91@hotmail.com]
Sent: Tuesday, July 4, 2017 7:46 PM
To: Marvin H?user <Marvin.Haeuser@outlook.com<mailto:Marvin.Haeuser@outlook.com>>
Cc: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Subject: Re: [edk2] writing EDK compatible application.

Hi,
Yes intact it’s MacBook, but is there another way to do it without UEFI shell.
In edk2/shellpkgbin are 2.2+, even shell fails to execute on Mac.
Although efi shell 1.0 works. Is there a to do it without shell ?
Thanks
Amit
On Jul 4, 2017, at 11:05 PM, Marvin H?user
<Marvin.Haeuser@outlook.com<mailto:Marvin.Haeuser@outlook.com>> wrote:

Hey,

The entry point declarations and the calling conventions have not changed
since EFI 1.10, though X64 was not a supported platform for 1.10 if I
remember correctly.
To be honest, I never saw an x64 EFI 1.10 implementation other than
Apple's, though even if it still signals that version, it's actually more UEFI by
now.
I don't own a Mac, so if it's the platform you tested your app on, I can't tell
you why it didn't work, but I would suggest you to run the app from an EFI
Shell.

Regards,
Marvin.

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf
Of Amit kumar
Sent: Tuesday, July 4, 2017 7:21 PM
To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Subject: [edk2] writing EDK compatible application.


HI,

I have written a code (say helloworld program ) using edk2 framework,
named the output efi file as BOOTx64.efi and placed it on a removable
media in EFI/BOOT/ directory so that the application is listed in one time
boot menu.
When selected from boot menu it prints "Hello World".
Which works as expected when tested on UEFI 2.3 and above platforms.
But the same code fails to execute on EFI 1.10 platforms. Which i
suppose is the problem with application entry point.
Can somebody suggest me a way so that the application entry function
can be compatible to both the platform. Even when written according
to UEFI 2.5+ Spec ?

Thanks
Amit
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
https://lists.01.org/mailman/listinfo/edk2-devel


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 17:20 writing EDK compatible application Amit kumar
  2017-07-04 17:35 ` Marvin H?user
@ 2017-07-04 20:10 ` Laszlo Ersek
  2017-07-05 12:24   ` Amit kumar
  2017-07-05 12:58   ` Rod Smith
  1 sibling, 2 replies; 10+ messages in thread
From: Laszlo Ersek @ 2017-07-04 20:10 UTC (permalink / raw)
  To: Amit kumar, edk2-devel@lists.01.org

On 07/04/17 19:20, Amit kumar wrote:
> 
> HI,
> 
> I have written a code (say helloworld program ) using edk2 framework, named the output efi file as BOOTx64.efi and placed it on a removable media in EFI/BOOT/ directory so that the application is listed in one time boot menu. When selected from boot menu it prints "Hello World".
> Which works as expected when tested on UEFI 2.3 and above platforms.
> But the same code fails to execute on EFI 1.10 platforms. Which i suppose is the problem with application entry point.
> Can somebody suggest me a way so that the application entry function can be compatible to both the platform. Even when written according to UEFI 2.5+ Spec ?

I don't think you can develop for EFI 1 using edk2 -- unless you use
EdkCompatibilityPkg I guess. But, I don't know how much
EdkCompatibilityPkg is maintained.

Here's some links:

https://github.com/tianocore/tianocore.github.io/wiki/EdkCompatibilityPkg

https://github.com/tianocore/tianocore.github.io/wiki/EDK

The entry point is likely the least of your problems. The library
instances pulled in from under MdePkg, MdeModulePkg etc are full of UEFI
2.* dependencies, I'm pretty sure. I would suggest ignoring EFI 1...

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 18:13         ` Amit kumar
@ 2017-07-04 21:30           ` Andrew Fish
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Fish @ 2017-07-04 21:30 UTC (permalink / raw)
  To: Amit kumar; +Cc: Marvin Häuser, edk2-devel@lists.01.org


> On Jul 4, 2017, at 11:13 AM, Amit kumar <akamit91@hotmail.com> wrote:
> 
> Hey,
> I just can find any spec on ConsoleControl protocol, can you tell what/where to refer ?


Amit,

It was defined as part of the Tiano stuff, so that is Intel Framework, and it did not make it to the PI spec or edk2 open source. 

The definition of the protocol is here. That should be enough documentation. 
https://github.com/tianocore/edk2/blob/master/EdkCompatibilityPkg/Foundation/Protocol/ConsoleControl/ConsoleControl.h

The entry point has never changed for (U)EFI, but remember in the edk2 the AutoGen.c code (build generated in the build output) actually calls library constructors and then calls your entry point. The issue I've seen trying to run edk2 code on older machines is the library constructor will error out and the App will not launch. 

If you want to make an Application that does not call the library constructors you need to name the entry point _ModuleEntryPoint, and don't list UefiApplicationEntryPoint in the [LibraryClasses] section of the INF file. Not to mention I'd leave off PcdLib too as that is an edk2 open source concept originally. 

Thanks,

Andrew Fish


> Amit
> On Jul 4, 2017, at 11:25 PM, Amit kumar <akamit91@hotmail.com <mailto:akamit91@hotmail.com><mailto:akamit91@hotmail.com <mailto:akamit91@hotmail.com>>> wrote:
> 
> Thanks for the suggestion Marvin, I will try switching to text mode.
> Amit
> On Jul 4, 2017, at 11:21 PM, Marvin Häuser <Marvin.Haeuser@outlook.com <mailto:Marvin.Haeuser@outlook.com><mailto:Marvin.Haeuser@outlook.com <mailto:Marvin.Haeuser@outlook.com>>> wrote:
> 
> Well, if EFI Shell 1.0 works, why not use it?
> Mac EFI exposes the ConsoleControl protocol, which lets you switch between text and graphics mode.
> That might be the reason your text outputs don't show, because graphics is the default mode on Mac EFI,
> though I could never test this myself as I lack the hardware.
> 
> Regards,
> Marvin.
> 
> -----Original Message-----
> From: Amit kumar [mailto:akamit91@hotmail.com <mailto:akamit91@hotmail.com>]
> Sent: Tuesday, July 4, 2017 7:46 PM
> To: Marvin H?user <Marvin.Haeuser@outlook.com <mailto:Marvin.Haeuser@outlook.com><mailto:Marvin.Haeuser@outlook.com <mailto:Marvin.Haeuser@outlook.com>>>
> Cc: edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org><mailto:edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org>>
> Subject: Re: [edk2] writing EDK compatible application.
> 
> Hi,
> Yes intact it’s MacBook, but is there another way to do it without UEFI shell.
> In edk2/shellpkgbin are 2.2+, even shell fails to execute on Mac.
> Although efi shell 1.0 works. Is there a to do it without shell ?
> Thanks
> Amit
> On Jul 4, 2017, at 11:05 PM, Marvin H?user
> <Marvin.Haeuser@outlook.com <mailto:Marvin.Haeuser@outlook.com><mailto:Marvin.Haeuser@outlook.com <mailto:Marvin.Haeuser@outlook.com>>> wrote:
> 
> Hey,
> 
> The entry point declarations and the calling conventions have not changed
> since EFI 1.10, though X64 was not a supported platform for 1.10 if I
> remember correctly.
> To be honest, I never saw an x64 EFI 1.10 implementation other than
> Apple's, though even if it still signals that version, it's actually more UEFI by
> now.
> I don't own a Mac, so if it's the platform you tested your app on, I can't tell
> you why it didn't work, but I would suggest you to run the app from an EFI
> Shell.
> 
> Regards,
> Marvin.
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org <mailto:edk2-devel-bounces@lists.01.org>] On Behalf
> Of Amit kumar
> Sent: Tuesday, July 4, 2017 7:21 PM
> To: edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org><mailto:edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org>>
> Subject: [edk2] writing EDK compatible application.
> 
> 
> HI,
> 
> I have written a code (say helloworld program ) using edk2 framework,
> named the output efi file as BOOTx64.efi and placed it on a removable
> media in EFI/BOOT/ directory so that the application is listed in one time
> boot menu.
> When selected from boot menu it prints "Hello World".
> Which works as expected when tested on UEFI 2.3 and above platforms.
> But the same code fails to execute on EFI 1.10 platforms. Which i
> suppose is the problem with application entry point.
> Can somebody suggest me a way so that the application entry function
> can be compatible to both the platform. Even when written according
> to UEFI 2.5+ Spec ?
> 
> Thanks
> Amit
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org><mailto:edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org>>
> https://lists.01.org/mailman/listinfo/edk2-devel <https://lists.01.org/mailman/listinfo/edk2-devel>
> 
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org><mailto:edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org>>
> https://lists.01.org/mailman/listinfo/edk2-devel <https://lists.01.org/mailman/listinfo/edk2-devel>
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel <https://lists.01.org/mailman/listinfo/edk2-devel>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 20:10 ` Laszlo Ersek
@ 2017-07-05 12:24   ` Amit kumar
  2017-07-05 12:58   ` Rod Smith
  1 sibling, 0 replies; 10+ messages in thread
From: Amit kumar @ 2017-07-05 12:24 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel@lists.01.org, Andrew Fish,
	Marvin Häuser

Laszlo, Andrew, Marvin


Thank you very much for your suggestions and for sharing information.

It really did help a lot.

Thanks and Regards

Amit

________________________________
From: Laszlo Ersek <lersek@redhat.com>
Sent: Wednesday, July 5, 2017 1:40:49 AM
To: Amit kumar; edk2-devel@lists.01.org
Subject: Re: [edk2] writing EDK compatible application.

On 07/04/17 19:20, Amit kumar wrote:
>
> HI,
>
> I have written a code (say helloworld program ) using edk2 framework, named the output efi file as BOOTx64.efi and placed it on a removable media in EFI/BOOT/ directory so that the application is listed in one time boot menu. When selected from boot menu it prints "Hello World".
> Which works as expected when tested on UEFI 2.3 and above platforms.
> But the same code fails to execute on EFI 1.10 platforms. Which i suppose is the problem with application entry point.
> Can somebody suggest me a way so that the application entry function can be compatible to both the platform. Even when written according to UEFI 2.5+ Spec ?

I don't think you can develop for EFI 1 using edk2 -- unless you use
EdkCompatibilityPkg I guess. But, I don't know how much
EdkCompatibilityPkg is maintained.

Here's some links:

https://github.com/tianocore/tianocore.github.io/wiki/EdkCompatibilityPkg

https://github.com/tianocore/tianocore.github.io/wiki/EDK

The entry point is likely the least of your problems. The library
instances pulled in from under MdePkg, MdeModulePkg etc are full of UEFI
2.* dependencies, I'm pretty sure. I would suggest ignoring EFI 1...

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: writing EDK compatible application.
  2017-07-04 20:10 ` Laszlo Ersek
  2017-07-05 12:24   ` Amit kumar
@ 2017-07-05 12:58   ` Rod Smith
  1 sibling, 0 replies; 10+ messages in thread
From: Rod Smith @ 2017-07-05 12:58 UTC (permalink / raw)
  To: edk2-devel

On 07/04/2017 04:10 PM, Laszlo Ersek wrote:
> On 07/04/17 19:20, Amit kumar wrote:
>>
>> HI,
>>
>> I have written a code (say helloworld program ) using edk2 framework, named the output efi file as BOOTx64.efi and placed it on a removable media in EFI/BOOT/ directory so that the application is listed in one time boot menu. When selected from boot menu it prints "Hello World".
>> Which works as expected when tested on UEFI 2.3 and above platforms.
>> But the same code fails to execute on EFI 1.10 platforms. Which i suppose is the problem with application entry point.
>> Can somebody suggest me a way so that the application entry function can be compatible to both the platform. Even when written according to UEFI 2.5+ Spec ?
> 
> I don't think you can develop for EFI 1 using edk2 -- unless you use
> EdkCompatibilityPkg I guess. But, I don't know how much
> EdkCompatibilityPkg is maintained.

Actually, I think it is possible -- or at the very least, it's possible
to write something that works on both UEFI-based PCs and EFI 1.1-based
Macs. My rEFInd (https://sourceforge.net/projects/refind/) does this.
I've used it with Macs as early as a first-generation 32-bit Mac Mini. I
have NOT tested it with any non-Apple EFI 1.x implementations, though. I
recall I had to fiddle with the .inf file to get it to work with Macs.
Comparing my refind.inf to other .inf files included in EDK2, I think
the relevant line(s) were one or both of the following:

  EDK_RELEASE_VERSION		= 0x00020000
  EFI_SPECIFICATION_VERSION	= 0x00010000

This is in the [Defines] section.

Note that, if you want to look more closely at the rEFInd code or
configuration files, I've made some significant improvements to the
compilation procedures under EDK2 (vs. GNU-EFI) since the latest 0.10.8
release. Thus, you should pull down the latest unreleased code via git,
rather than download the source code tarball.

-- 
Rod Smith
rodsmith@rodsbooks.com
http://www.rodsbooks.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-05 12:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-04 17:20 writing EDK compatible application Amit kumar
2017-07-04 17:35 ` Marvin H?user
2017-07-04 17:46   ` Amit kumar
2017-07-04 17:51     ` Marvin Häuser
2017-07-04 17:55       ` Amit kumar
2017-07-04 18:13         ` Amit kumar
2017-07-04 21:30           ` Andrew Fish
2017-07-04 20:10 ` Laszlo Ersek
2017-07-05 12:24   ` Amit kumar
2017-07-05 12:58   ` Rod Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox