2

I've just started to study UEFI development, as a playground I've got a custom AARCH64 platform with EDK2-based sources provided for building full firmware image (to be burned into flash).

"Hello world" in DXE driver is already done, so I've selected a practical task: to include iPXE into firmware to avoid chain loading.

The idea is to build iPXE EFI application and put it into firmware volume. Then I hope to be able to call it from UEFI shell, the final step is to add it to boot manager.

And here I stuck: I can't find any information on how to add EFI application to FV.

Please advise if it possible at all and where to read about it.

Thank you!

1 Answers1

1

Okay, the solution was close in this inf file: https://github.com/tianocore/edk2-non-osi/blob/master/Drivers/Realtek/Bus/Usb/UsbNetworking/RtkUsbUndiDxe.inf

I've put pre-compiled ipxe.efi and now it's included in firmware volume.

  • Can you elaborate on how to then boot on the included ipxe.efi? – izissise Mar 25 '22 at 18:52
  • 1
    You need to add driver that treats UEFI volume as filesystem, then executable EFI files will be parsed by BDS. I can provide more details on Monday, there are literally two modules that need to be added, both are from EDK2 source tree. – Konstantin Klubnichkin Mar 26 '22 at 19:38
  • 1
    Finally found it!, I needed to add MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf in the .dsc the ipxe efi appication will then appears on a fs and you can run it with the Uefi Shell – izissise Mar 27 '22 at 17:13
  • 1
    Exactly. I've also added MdeModulePkg/Universal/LoadFileOnFv2/LoadFileOnFv2 for it appear in list of bootable devices. – Konstantin Klubnichkin Mar 28 '22 at 09:30