As detailed on this post on Super User ( 
https://superuser.com/q/1749795/1742482 ) , I am trying to *add a DXE driver to 
an OVMF image* I'm building with edk2. Nobody was able to help me there so I 
turn here for your help.

I haven't found any proper documentation on exactly what I'm trying to achieve 
so I am probably missing something.

So far what I have done is:

* create the simplest DXE driver I managed

In folder *MdeModulePkg/Application/Hello* , I have:
*Hello.c* :
include

...

while ( 1 )
SystemTable -> ConOut -> OutputString ( SystemTable ->ConOut,
L " It works! \n " );
return EFI_SUCCESS ;

*Hello.inf* :
[ Defines ]
INF_VERSION = 0x00010005
BASE_NAME = Hello
FILE_GUID =...
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = UefiMain

[ Sources ]
Hello.c

[ Packages ]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec

[ LibraryClasses ]
UefiDriverEntryPoint
UefiLib

[ Depex ]
TRUE

* Set *OvmfPkg/OvmfPkgX64.dsc* as my target platform with *GCC5* as the 
toolchain
* Add *MdeModulePkg/Application/Hello/Hello.inf* to the end of the component 
section (I have tried to add it after other certain drivers) in the *.dsc* file.
* 
Add *Mde* *ModulePkg/Application/Hello/Hello.inf* to the end of the *[ 
FV.DXEFV* *]* section in *OvmfPkgX64.fdf* (I have also tried to add it after 
other certain drivers)

* 
Run *build*

* 
Run *QEMU* with the resulting *OVMF* image: *qemu-system-x86_64* *-d int -D 
log.txt -bios OVMF.fd -net none -drive file=fat:rw:bootdrv, format=raw*

* 
*QEMU* hangs with message *"Guest has not initialized display (yet)"*

* 
*log.txt* has one log: *check_exception old: 0xffffffff new 0x6*


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95863): https://edk2.groups.io/g/devel/message/95863
Mute This Topic: https://groups.io/mt/94734592/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to