From: Daniel M. <dan...@er...> - 2011-08-30 11:44:34
|
I have been trying to port efifmt utility using the tutorial present in the shell developer´s guide and this is what I got: In Shell.inf in [sources.common] I added: EfiDiskUtility\efifmt\efifmt.cxx In the DSC build file, in order to compile the cxx: [compile.x64.cxx] In efifmt.cxx there is this code: ------------------------------------- extern "C" EFI_STATUS EFIAPI InitializeEfiFmtApplication( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ); extern "C" { EFI_APPLICATION_ENTRY_POINT (InitializeEfiFmtApplication) } extern "C" { EFI_STATUS EFIAPI InitializeEfiFmtApplication( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_LOADED_IMAGE *LoadedImage; EFI_STATUS Status; /* * Initialize the.... ------------------------------------- And then in the cmddisp.c I added this in the "SEnvInternalCommands[] = {": InitializeEfiFmtApplication, L"efifmt", And this in the "EFI_MONOSHELL_CODE" : EFI_STATUS EFIAPI InitializeEfiFmtApplication( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ); I think I have followed the steps in the tutorial (which had worked for me using other applications made by my own) nevertheless I continue to get this message when trying to build the shell: ShellLocal.lib(cmddisp.obj) : error LNK2001: unresolved external symbol InitializeEfiFmtApplicat ion C:\EDK\Sample\Platform\X64\Build\X64\Shell.dll : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: 'C:\WINDDK\3790.1830\bin\win64\x86\amd64\link' : return code '0x460' Stop. ProcessDsc : error E0000: Multi-thread build components 0 failure NMAKE : fatal error U1077: 'C:\EDK\Sample\Platform\X64\Build\Tools\ProcessDsc' : return code '0x 2' Stop. What do you think am I doing wrong? Thanks _____________________________________________ From: Daniel Moral Sent: den 24 augusti 2011 14:22 To: efi...@li...; 'edk...@li...' Subject: Porting disk utilities to internal commands Hi! I have been using the EFI Disk Utilities: http://www.intel.dk/technology/efi/agree_diskutil.htm and the mkramdisk in EFI toolkit to create a RAM filesystem. I am trying to port the applications so they can be used as internal commands in my EFI Shell. I have successfully ported diskpart utility, cause it is written as any other kind of Shell application. Nevertheless, I am not able to port efifmt or eficheck. I mean, how should I modify Shell.inf file according to the EFI_Shell_Developer_Guide_Ver0-91 or the shell dispatcher, which are the entry points? Which .c files should I add to sources.common knowing the the sources are in .cxx format? And so on, I know that there must be a way, but I am a bit lost. I will really appreciate some help :) Thank you |