Re: Compile EDK2 to set boot order to PXE

Ard Biesheuvel

On Thu, 4 Feb 2021 at 09:56, Laszlo Ersek <lersek@...> wrote:

On 02/04/21 01:22, Michael Brown wrote:
On 02/02/2021 17:06, Ard Biesheuvel wrote:
On Tue, 2 Feb 2021 at 17:41, Laszlo Ersek <lersek@...> wrote:
On 01/29/21 23:45, wernerbuck@... wrote:
I am network booting the raspberry pi firmware. Unfortunately as its
loaded from TFTP it does not retain settings nor do I believe I can
give it settings.
I am already compiling my own version of RPi4 uefi with
edk-platforms/../Rpi4/.dsc edited for some better defaults like
setting higher memory.
However, I can't find an option to force a particular boot option as
a default. Right now it tries to boot an .efi locally but that efi
is not able to be found because we are booting from TFTP.
Instead I would like it to boot to PXE again where I can boot iPXE
and control the boot process further. The end goal here is that I
can boot UEFI -> iPXE without an SD card.

Could you help me find out what option/variable I can set in the
platform dsc? I think the option should be in MdePkg.dec but I can't
find any "DefaultBootOption" or override variable.
I think you might be able to trick the BDS into loading iPXE as the
shell if you set the correct file GUID for it in the right PCD.
I'm interested to know the outcome of this experiment.

Also: the motivation behind creating was
because the Pi's VC4 PXE boot code turned out to be incredibly
unreliable (with a ~10% boot failure rate) - this is why I personally
gave up on getting the Pi to network boot without an SD card as a
Thanks for commenting.

I've attempted to wrap my brain around the initial report in this
thread, and honestly I'm lost. My standard answer would be "BDS behavior
is platform policy, so look into whatever PlatformBootManagerLib
instance is used by the RPi firmware" (and I understand that Ard's
response is somehow consistent with this). But honestly I can't figure
out whether the problem is related to the part of the RPi firmware that
runs *before* TianoCore. What exactly is PXE-booted before what else?...
I think we'd need a much more detailed issue report here.
My understanding is that the UEFI image itself is PXE booted.

But indeed, more clarity is always good

Join to automatically receive all group messages.