Thanks for that tip! Unfortunately, the EFI shell (or, more accurately, the way that the EFI console handles input) makes the way I use it a bit difficult. Since I use a screen reader, I use -nographic with qemu, and the EFI console doesn't seem to work well with my terminal; if I for example type "help" things get to be jumbled up when scrolling. I don't know if that's a deficiency with my terminal or EFI though. But that does seem like a QOL improvement.
On 6/23/21, Laszlo Ersek <ler...@redhat.com> wrote: > On 06/11/21 19:06, Ethin Probst wrote: >> Hey all, >> >> So Leif and I have discussed this at length but I thought I'd reach >> out to all of you for more help. >> >> I'm having a lot of trouble debugging my UEFI app. Here's how I do >> things: >> >> - I load the app using uefi-run >> (https://github.com/Richard-W/uefi-run) like this (from the main EDK >> II directory): uefi-run -b Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd >> Build/OvmfX64/DEBUG_GCC5/X64/Shell.efi -- -M q35 -m 24G -usb -device >> qemu-xhci -device usb-audio,audiodev=audio -audiodev alsa,id=audio -s >> -debugcon file:../debug.log -global isa-debugcon.iobase=0x402 >> -nographic >> Or: >> uefi-run -b Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd >> Build/OvmfX64/DEBUG_GCC5/X64/Shell.efi -- -M q35 -m 24G -usb -device >> qemu-xhci -device usb-audio,audiodev=audio -audiodev alsa,id=audio -s >> -debugcon stdio -global isa-debugcon.iobase=0x402 > > Side comment: > > OVMF supports virtio-fs, and using virtio-fs could speed up your > develop/build/test cycle. > > Assuming your UEFI application does not crash or hang (i.e., assuming it > exits cleanly and you can continue using the same UEFI shell session), > virtio-fs could be a small productivity boost for you, as you wouldn't > have to re-launch QEMU every time. > > The idea is to build your application through some platform DSC file as > follows -- note that it need not be an OVMF DSC file, but it may be one, > if you prefer that: > > build -a X64 -b NOOPT -p MyAppPkg/MyApp.dsc -t GCC5 \ > -m MyAppPkg/MyApp/MyApp.inf > > You don't need an FDF file for this, just grab the resultant "MyApp.efi" > binary from the Build directory. > > Then copy "MyApp.efi" (on the host side) under the virtio-fs root > directory somewhere. When the copy operation completes (on the host > side), just switch your focus to the guest UEFI shell window, and you > can immediately execute the just-built application. > > I find using virtio-fs by far the easiest with libvirt, but you can use > it from the bare QEMU command line, too. > > https://libvirt.org/kbase/virtiofs.html > https://virtio-fs.gitlab.io/howto-qemu.html > > This assumes that your development environment is Linux-based, as the > virtio-fs daemon (which runs in tandem with QEMU on the host) is > Linux-only. > > Thanks, > Laszlo > > -- Signed, Ethin D. Probst -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77003): https://edk2.groups.io/g/devel/message/77003 Mute This Topic: https://groups.io/mt/83473484/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-