I have a UEFI application that needs to download (TFTP) the file "bootmgfw.efi" which is the Windows EFI boot loader. I can successfully call Mtftp(), LoadImage(), and StartImage() to download and execute the image. However, the Microsoft boot loader determines it is executing locally instead of over the network and looks for required files locally instead of downloading them via TFTP. How do I spawn an application such that it knows it is from a network?
I have two ideas, but so far I have been unable to make either work.
After calling LoadImage() but before calling StartImage() I need to obtain the EFI_LOADED_IMAGE for the new image and modify it. I think I need to modify the DevicePath to indicate it is network loaded, but I do not know how to do this.
Skip Mtftp() and call LoadImage() with TRUE for BootPolicy. I believe this will download and load the file, but I do not know how to tell it what file to load. My guess is the DevicePath passed into LoadImage() would contain this, but I do not know how to construct the DevicePath.
We had a UEFI developer who wrote this application, but he left the company before completing the work. So I am forced to pick up this code base and learn UEFI to try and complete this. Thanks for any help!