[edk2] regarding the chapter 4 sample program in the book Beyond Bios
Hello I'm reading the Beyond Bios book in conjunction with the stuff on tianocore. The example code in chapter 4 of that book talks about a HelloApplication. The format looks different from the sample code in AppPkg\Hello directory of the EDK2 src. Is that format/api shown in the book obsolete? The book does not say how to compile it or even where to put it and I am confused. -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] regarding the chapter 4 sample program in the book Beyond Bios
The Hello in the AppPkg\Applications\Hello\ uses the “Print” function that is part of the UefiLib Library. While the Helloworld.c in the Beyond BIOS book is making a call using the EFI_SERVICES SystemTable pointer that is passed into its entry point. Both are correct and both are current. For writing and compiling look at the links for http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Getting_Started_with_EDK_II This show how to compile EDK II in several OS/Compiler environments For another example: http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Getting_Started_Writing_Simple_Application thanks, Laurie laurie.jarlst...@intel.commailto:laurie.jarlst...@intel.com EFI / Framework Technical Marketing Engineering Team (503) 712-9395 From: John Davis [mailto:davi...@gmail.com] Sent: Thursday, January 30, 2014 12:38 PM To: edk2-devel@lists.sourceforge.net Subject: [edk2] regarding the chapter 4 sample program in the book Beyond Bios Hello I'm reading the Beyond Bios book in conjunction with the stuff on tianocore. The example code in chapter 4 of that book talks about a HelloApplication. The format looks different from the sample code in AppPkg\Hello directory of the EDK2 src. Is that format/api shown in the book obsolete? The book does not say how to compile it or even where to put it and I am confused. -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] regarding the chapter 4 sample program in the book Beyond Bios
On Jan 30, 2014, at 12:38 PM, John Davis davi...@gmail.com wrote: Hello I'm reading the Beyond Bios book in conjunction with the stuff on tianocore. The example code in chapter 4 of that book talks about a HelloApplication. The format looks different from the sample code in AppPkg\Hello directory of the EDK2 src. Is that format/api shown in the book obsolete? The book does not say how to compile it or even where to put it and I am confused. I’m guessing the one in the book looks more like: https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Application/HelloWorld/HelloWorld.c This is a the generic UEFI Application/Driver entry point. The application in the AppPkg depends on the shell. So these are not UEFI applications, they are UEFI shell applications. They depend on the shell being loaded to function. I think you will find that the entry point for the UefisShellCEntryLib is the same as a UEFI Application. This library looks up info from a protocol produced by the shell to figure out the arguments. https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c Thanks, Andrew Fish -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] regarding the chapter 4 sample program in the book Beyond Bios
Hello Laurie, Thank you for letting me know the source is still valid. I'll look at the references you provided to see if I can get it working. I do have that massive 400+ page pdf and I have built the emulator. It just takes a while to dig though. It seems the answer is in there, I just haven't found it yet. Thank you -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] regarding the chapter 4 sample program in the book Beyond Bios
Hello Andrew, It kind of looks like the one you show. Kind of. For reference here it is -- #include efi.h EFI_STATUS InitializeHelloApplication( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) { UINTN Index; SystemTable-ConOut-OutputString(SystemTable-ConOut,LHello application started\n\r); SystemTable-ConOut-OutputString(SystemTable-ConOut,L\n\r\n\r Hit any key to exit\n\r); SystemTable-BootServices-WaitForEvent(1,(SystemTable-ConIn-WaitForKey),Index); return EFI_SUCCESS; } On Thu, Jan 30, 2014 at 12:57 PM, Andrew Fish af...@apple.com wrote: On Jan 30, 2014, at 12:38 PM, John Davis davi...@gmail.com wrote: Hello I'm reading the Beyond Bios book in conjunction with the stuff on tianocore. The example code in chapter 4 of that book talks about a HelloApplication. The format looks different from the sample code in AppPkg\Hello directory of the EDK2 src. Is that format/api shown in the book obsolete? The book does not say how to compile it or even where to put it and I am confused. I’m guessing the one in the book looks more like: https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Application/HelloWorld/HelloWorld.c This is a the generic UEFI Application/Driver entry point. The application in the AppPkg depends on the shell. So these are not UEFI applications, they are UEFI shell applications. They depend on the shell being loaded to function. I think you will find that the entry point for the UefisShellCEntryLib is the same as a UEFI Application. This library looks up info from a protocol produced by the shell to figure out the arguments. https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c Thanks, Andrew Fish -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] regarding the chapter 4 sample program in the book Beyond Bios
Yeah, I don't think this code will build. I understand what you guys were telling me about it being a higher abstraction. Kind of like programming in Xt versus programming in Motif but when I try to massage it into building it does not work. It complains about not being able to find efi.h. I did a search on efi.h the ones I found are commented out of the Nt32Pkg build file. I give, I'll move on. On Thu, Jan 30, 2014 at 1:59 PM, John Davis davi...@gmail.com wrote: Hello Andrew, It kind of looks like the one you show. Kind of. For reference here it is -- #include efi.h EFI_STATUS InitializeHelloApplication( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) { UINTN Index; SystemTable-ConOut-OutputString(SystemTable-ConOut,LHello application started\n\r); SystemTable-ConOut-OutputString(SystemTable-ConOut,L\n\r\n\r Hit any key to exit\n\r); SystemTable-BootServices-WaitForEvent(1,(SystemTable-ConIn-WaitForKey),Index); return EFI_SUCCESS; } On Thu, Jan 30, 2014 at 12:57 PM, Andrew Fish af...@apple.com wrote: On Jan 30, 2014, at 12:38 PM, John Davis davi...@gmail.com wrote: Hello I'm reading the Beyond Bios book in conjunction with the stuff on tianocore. The example code in chapter 4 of that book talks about a HelloApplication. The format looks different from the sample code in AppPkg\Hello directory of the EDK2 src. Is that format/api shown in the book obsolete? The book does not say how to compile it or even where to put it and I am confused. I’m guessing the one in the book looks more like: https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Application/HelloWorld/HelloWorld.c This is a the generic UEFI Application/Driver entry point. The application in the AppPkg depends on the shell. So these are not UEFI applications, they are UEFI shell applications. They depend on the shell being loaded to function. I think you will find that the entry point for the UefisShellCEntryLib is the same as a UEFI Application. This library looks up info from a protocol produced by the shell to figure out the arguments. https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c Thanks, Andrew Fish -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] regarding the chapter 4 sample program in the book Beyond Bios
On Jan 30, 2014, at 3:20 PM, John Davis davi...@gmail.com wrote: Yeah, I don't think this code will build. I understand what you guys were telling me about it being a higher abstraction. Kind of like programming in Xt versus programming in Motif but when I try to massage it into building it does not work. It complains about not being able to find efi.h. I did a search on efi.h the ones I found are commented out of the Nt32Pkg build file. efi.h implies the EDK project, not the edk2. It would be Uefi.h for edk2. I give, I'll move on. On Thu, Jan 30, 2014 at 1:59 PM, John Davis davi...@gmail.com wrote: Hello Andrew, It kind of looks like the one you show. Kind of. For reference here it is -- #include efi.h EFI_STATUS InitializeHelloApplication( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) { UINTN Index; SystemTable-ConOut-OutputString(SystemTable-ConOut,LHello application started\n\r); SystemTable-ConOut-OutputString(SystemTable-ConOut,L\n\r\n\r Hit any key to exit\n\r); SystemTable-BootServices-WaitForEvent(1,(SystemTable-ConIn-WaitForKey),Index); return EFI_SUCCESS; } On Thu, Jan 30, 2014 at 12:57 PM, Andrew Fish af...@apple.com wrote: On Jan 30, 2014, at 12:38 PM, John Davis davi...@gmail.com wrote: Hello I'm reading the Beyond Bios book in conjunction with the stuff on tianocore. The example code in chapter 4 of that book talks about a HelloApplication. The format looks different from the sample code in AppPkg\Hello directory of the EDK2 src. Is that format/api shown in the book obsolete? The book does not say how to compile it or even where to put it and I am confused. I’m guessing the one in the book looks more like: https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Application/HelloWorld/HelloWorld.c This is a the generic UEFI Application/Driver entry point. The application in the AppPkg depends on the shell. So these are not UEFI applications, they are UEFI shell applications. They depend on the shell being loaded to function. I think you will find that the entry point for the UefisShellCEntryLib is the same as a UEFI Application. This library looks up info from a protocol produced by the shell to figure out the arguments. https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c Thanks, Andrew Fish -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- John F. Davis 6 Kandes Court Durham, NC 27713 919-888-8358 独树一帜 -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___
Re: [edk2] regarding the chapter 4 sample program in the book Beyond Bios
Hello I got it working. Thanks for the help. I used the code from the book with the uefi.h include and I modeled the .inf file from the samplehelloapp in the edk2. The only problem was using the webpage to generate the guid. I don't know if that line was meant to generate a guid or simply use that site to generate one. I just wrote a random one. If I used the webpage in the file as is, it crashes the build. Thanks again John -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel