From: EDK <ed...@gm...> - 2011-09-01 04:01:11
|
Any response? On Tue, Aug 30, 2011 at 1:06 PM, EDK <ed...@gm...> wrote: > In addition I have below questions: > > I have C++ source which I have been building using EDK 1.06. > > How do I port this to EDK II? > > > > When I attempted to build this using UDK 2010 UP4, I see that it auto > generates header and C file and it attempts to compare this with my C++ > source file and it fails as it doesn’t match. > > > > How do I resolve this issue? > > > > Appreciate the response! > > Thanks, > Daniel > On Mon, Aug 29, 2011 at 7:08 PM, EDK <ed...@gm...> wrote: > >> Hi, >> >> How would I ensure that EDK Compatibility Package is included? >> >> Porting EDK 1.06 source to EDK II (UDK 2010 UP4)... To build my source in >> EDK II I needed to do the following: >> >> >> · Convert INF file to new format >> >> · >> Remove header files “Tiano.h”, “EfiDriverLib.h”, “PciIO.h”, etc and >> include <Uefi.h>, <Library/UefiLib.h>, <Protocol/LoadedImage.h>, etc >> >> · >> Some macro definitions were missing in UDK2010, so we have to >> define them by ourselves. I have included those macros below >> >> o #define EFI_SIGNATURE_16(A, B) ((A) | (B << 8)) >> >> o #define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | >> (EFI_SIGNATURE_16 (C, D) << 16)) >> >> o #define DevicePathNodeLength(a) ( ((a)->Length[0]) | >> ((a)->Length[1] << 8) ) >> >> o #define SetDevicePathNodeLength(a,l) { \ >> >> (a)->Length[0] = (UINT8) (l); \ >> >> (a)->Length[1] = (UINT8) ((l) >> 8); \ >> >> } >> >> · Make the “EFI_BOOT_SERVICES *gBS; EFI_RUNTIME_SERVICES *gRT; ” >> statement in our file because the EfiDriverLibaray is no longer having this >> gBS and gRT declaration. >> >> o We need to get these pointer via “gBS = >> SystemTable->BootServices; gRT = SystemTable->RuntimeServices;” >> >> · All EfiDriverLibrary functions need to be renamed. >> >> o EfiLibAllocateZeroPool to AllocateZeroPool; >> >> o EfiZeroMem to ZeroMem; >> >> o EfiCopyMem to CopyMem; >> o EfiSetMem to SetMem; >> EfiLibLookupUnicodeString to LookupUnicodeString; >> >> Questions: >> Is it true that every developer need to go through this... or is there a >> way to avoid this? Should I not expect to build my EDK I source as is >> without any issue in EDK II env? >> >> Appreciate the assistance! >> >> Thanks, >> Dan >> > > |