public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Booting UEFI with QEMU arm
@ 2021-05-04 11:32 Pintu Agarwal
  2021-05-04 19:12 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 2+ messages in thread
From: Pintu Agarwal @ 2021-05-04 11:32 UTC (permalink / raw)
  To: edk2-devel, devel

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

Hi,
Is it possible to boot UEFI on a qemu arm based emulator?
Since I am working from home and my uefi related work leads to device crash
many times, which becomes painful for me.

So I wanted to do all my experiments on a qemu environment before I verify
the final changes on a real hardware.
So, I am just wondering is this possible?

According to my search I see its possible but still I could not find a
proper way to do it.
Please help me if someone has already tried it.

I already have the qemu-arm setup on my Linux/Ubuntu PC.


Thanks,
Pintu

[-- Attachment #2: Type: text/html, Size: 1659 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [edk2-devel] Booting UEFI with QEMU arm
  2021-05-04 11:32 Booting UEFI with QEMU arm Pintu Agarwal
@ 2021-05-04 19:12 ` Laszlo Ersek
  0 siblings, 0 replies; 2+ messages in thread
From: Laszlo Ersek @ 2021-05-04 19:12 UTC (permalink / raw)
  To: devel, pintu.ping, edk2-devel

On 05/04/21 13:32, Pintu Agarwal wrote:
> Hi,
> Is it possible to boot UEFI on a qemu arm based emulator?
> Since I am working from home and my uefi related work leads to device crash
> many times, which becomes painful for me.
> 
> So I wanted to do all my experiments on a qemu environment before I verify
> the final changes on a real hardware.
> So, I am just wondering is this possible?
> 
> According to my search I see its possible but still I could not find a
> proper way to do it.
> Please help me if someone has already tried it.
> 
> I already have the qemu-arm setup on my Linux/Ubuntu PC.

>From "qemu-system-arm", it seems like you really mean 32-bit ARM.

Yes, there is support for that in edk2.

Build:

$ git submodule update --init --force
$ . edksetup.sh
$ nice make -C "$EDK_TOOLS_PATH" -j $(getconf _NPROCESSORS_ONLN)
$ build -a ARM -b DEBUG -p ArmVirtPkg/ArmVirtQemu.dsc -t GCC5
$ for FD in QEMU_EFI.fd QEMU_VARS.fd; do
    cat -- \
        "$WORKSPACE/Build/ArmVirtQemu-ARM/DEBUG_GCC5/FV/$FD" \
        /dev/zero \
    | head -c 64m >| /tmp/"$FD.padded"
  done

Run:

$ if ! [ -e vars.fd ]; then
    cp /tmp/QEMU_VARS.fd.padded vars.fd
  fi
$ qemu-system-arm \
      -M virt \
      -cpu cortex-a15 \
      -m 1024 \
      -serial stdio \
      -drive if=pflash,unit=0,format=raw,readonly=on,file=/tmp/QEMU_EFI.fd.padded \
      -drive if=pflash,unit=1,format=raw,file=vars.fd \
      -device virtio-gpu-pci \
      -device id=xhci0,driver=qemu-xhci \
      -device usb-kbd,bus=xhci0.0 \
      -boot menu=on,splash-time=5000 \
      [...]

HTH
Laszlo

> 
> 
> Thanks,
> Pintu
> 
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-04 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-04 11:32 Booting UEFI with QEMU arm Pintu Agarwal
2021-05-04 19:12 ` [edk2-devel] " Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox