On 05/22/14 13:02, miguelro...@ua.pt wrote: > Thank you, > > I have done that but I'm having some alignment errors when building Ovmfg > with my driver. > > "GenFv: ERROR 3000: Invalid > Section-Alignment and File-Alignment do not match : > /home/mr/tese_clean/edk_source/edk2/Build/OvmfX64/DEBUG_GCC48/FV/Ffs/c69427e4-4a18-4c34-acb1-2af2ba8c2ae9CuCo/c69427e4-4a18-4c34-acb1-2af2ba8c2ae9.ffs. > GenFv: ERROR 3000: Invalid > Could not rebase > /home/mr/tese_clean/edk_source/edk2/Build/OvmfX64/DEBUG_GCC48/FV/Ffs/c69427e4-4a18-4c34-acb1-2af2ba8c2ae9CuCo/c69427e4-4a18-4c34-acb1-2af2ba8c2ae9.ffs." > > c69427e4-4a18-4c34-acb1-2af2ba8c2ae9 is the uuid of my driver. > > Any pointers?
This is from "BaseTools/Source/C/GenFv/GenFvInternalLib.c": case EFI_FV_FILETYPE_DRIVER: case EFI_FV_FILETYPE_DXE_CORE: // // Check if section-alignment and file-alignment match or not // if ((ImgHdr->Pe32.OptionalHeader.SectionAlignment != ImgHdr->Pe32.OptionalHeader.FileAlignment)) { // // Xip module has the same section alignment and file alignment. // Error (NULL, 0, 3000, "Invalid", "Section-Alignment and File-Alignment do not match : %s.", FileName); return EFI_ABORTED; } NewPe32BaseAddress = XipBase + (UINTN) CurrentPe32Section.Pe32Section + CurSecHdrSize - (UINTN)FfsFile; break; This could be a problem with the gnu-efi build system; it probably doesn't ensure the equality of the two PE32 fields in question. For example I just built the "apps" directory of gnu-efi: $ objdump --private-headers apps/t6.efi [...] SectionAlignment 0000000000001000 FileAlignment 0000000000000200 [...] Cf. $ objdump --private-headers Build/OvmfX64/DEBUG_GCC48/X64/QemuVideoDxe.efi [...] SectionAlignment 0000000000000020 FileAlignment 0000000000000020 [...] It could be easier to build your program inside edk2. Laszlo ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel