public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ethin Probst" <harlydavidsen@gmail.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: devel@edk2.groups.io
Subject: Re: [edk2-devel] Help with debugging
Date: Wed, 23 Jun 2021 12:20:20 -0500	[thread overview]
Message-ID: <CAJQtwF2xxL0rmz-+jMaKcHOds9sL56WE+Duy9vzgOD_-+UvFAA@mail.gmail.com> (raw)
In-Reply-To: <fc22133c-2691-e88d-05d5-520c95a176a2@redhat.com>

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 <lersek@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

      reply	other threads:[~2021-06-23 17:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 17:06 Help with debugging Ethin Probst
2021-06-11 18:23 ` [edk2-devel] " Andrew Fish
2021-06-11 18:39   ` Ethin Probst
2021-06-11 19:42     ` Andrew Fish
2021-06-11 20:48       ` Ethin Probst
2021-06-11 20:58         ` Andrew Fish
2021-06-11 21:29           ` Ethin Probst
2021-06-11 23:09             ` Andrew Fish
2021-06-11 23:29               ` Ethin Probst
2021-06-11 23:48                 ` Andrew Fish
2021-06-12  4:47                   ` Ethin Probst
2021-06-12 19:03                     ` Andrew Fish
2021-06-23 11:39 ` Laszlo Ersek
2021-06-23 17:20   ` Ethin Probst [this message]

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=CAJQtwF2xxL0rmz-+jMaKcHOds9sL56WE+Duy9vzgOD_-+UvFAA@mail.gmail.com \
    --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