From: d.meneses@softi9.pt
To: devel@edk2.groups.io
Subject: How to add a DXE driver to an OVMF image?
Date: Wed, 02 Nov 2022 04:11:24 -0700 [thread overview]
Message-ID: <Q14n.1667387484732664741.IXTr@groups.io> (raw)
[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]
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*
[-- Attachment #2: Type: text/html, Size: 27957 bytes --]
next reply other threads:[~2022-11-02 11:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 11:11 d.meneses [this message]
2022-11-03 0:58 ` [edk2-devel] How to add a DXE driver to an OVMF image? Pedro Falcato
2022-11-03 1:07 ` Andrew Fish
2022-11-03 15:23 ` d.meneses
2022-11-03 16:51 ` Pedro Falcato
2022-11-03 19:11 ` d.meneses
2022-11-03 21:34 ` Andrew Fish
2022-11-03 22:02 ` d.meneses
2022-11-03 22:02 ` Pedro Falcato
2022-11-03 22:12 ` d.meneses
2022-11-04 13:20 ` d.meneses
2022-11-09 17:52 ` Andrew Fish
2022-11-09 18:29 ` d.meneses
2022-11-09 20:09 ` Andrew Fish
2022-11-10 7:43 ` d.meneses
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Q14n.1667387484732664741.IXTr@groups.io \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox