Just wanted to update the list that I managed to do  a PXE boot from the EFI 
Shell using the MdeModulePkg Application BootManagerMenuApp.  It required some 
defensive code in my drivers Start() routine and loading the driver in the 
shell but *not* connecting it.

The downside is that it trashes my NVRAM, but I can live with that as this is 
just needed for a 1 time demo to a
customer.

This is happening on a 
     DELL 5810 Tower
     AMI UEFI firmware based on EFI Spec 2.13, revision 5.9.
     Ubuntu 14.04.4 LTS

Moving forward, I believe I am going to follow the suggestions of Laszlo Ersek 
and try to use the suggested 
QEMU+KVM+VIRTIO enviornment for future testing.

Thanks,

Patrick
________________________________________
From: edk2-devel <edk2-devel-boun...@lists.01.org> on behalf of Mahan, Patrick 
<patrick.ma...@caviumnetworks.com>
Sent: Wednesday, March 30, 2016 1:35 PM
To: Andrew Fish
Cc: Carsey, Jaben; edk2-devel@lists.01.org
Subject: Re: [edk2] How to initiate a PXE boot from the UEFI shell

Andrew,

Thanks, I suspect that I might need to roll my own on this.

WRT option rom, that is coming on the next revision of the NIC hardware, but I 
am currently having to make do on a NIC that does not have a working option 
rom.  That will be the next step, but I have been asked to do a demo, hence the 
looking for a method that can work via the Shell.

You specified the bcfg command which is only in the UEFI shell (ShellBinPkg).  
I have been currently using EFI shell (EdkShellBinPkg) because of a bug in the 
UEFI shell prevents me from using the shift key.  It does not look supported 
there.  However, thanks for the tip on gBS->LoadImage() and gBS->StartImage() 
so I can go attempt my own solution.

Again, thanks,

Patrick

________________________________________
From: af...@apple.com <af...@apple.com> on behalf of Andrew Fish 
<af...@apple.com>
Sent: Wednesday, March 30, 2016 12:44 PM
To: Mahan, Patrick
Cc: Carsey, Jaben; edk2-devel@lists.01.org
Subject: Re: [edk2] How to initiate a PXE boot from the UEFI shell

> On Mar 30, 2016, at 11:14 AM, Mahan, Patrick 
> <patrick.ma...@caviumnetworks.com> wrote:
>
> I'm trying to understand what the ipconfig -r command means, the help states 
> that it restarts the PXE base code and DHCP settings.
>
> There is also a '-c Instance' option that I am not sure about.  But this 
> looks like my best hope.
>

Patrick,

In UEFI the drivers (Option ROMs) don't support directly booting and they are 
not allowed to present a user interface. The boot policy is 100% controlled by 
the platform.

The method to control boot policy that is in the UEFI spec are the NVRAM 
variables. You can read about this in "Chapter 3 Boot Manager" in the UEFI 
specification.

I think you will find that ipconfig only allows configuring the networking 
stack, but in EFI the network stack does not boot. All the EFI Networking stack 
does is produce an EFI_LOAD_FILE_PROTOCOL.

If you want to simulate a PXE Boot from the shell you need to write some code 
and do a gBS->LoadImage(), gBS->StartImage(). You can read about that in "6.4 
Image Services" in the UEFI specification.

You might be able to use the shell `bcfg boot addh <handle#> "desc"` to set a 
PXE Boot option from the shell. The handle# would be the network handle that 
produces the Load File protocol.

Thanks,

Andrew Fish

> Patrick
>
> ________________________________________
> From: Carsey, Jaben <jaben.car...@intel.com>
> Sent: Wednesday, March 30, 2016 10:15 AM
> To: Mahan, Patrick; edk2-devel@lists.01.org
> Cc: Carsey, Jaben
> Subject: RE: How to initiate a PXE boot from the UEFI shell
>
> If your BDS supports PXE booting, you should be able to "exit" the shell and 
> then use BDS to initiate a PXE boot..
>
> I think you're right that there is no built in command to initiate a PXE 
> boot.  There is no command to initiate any boot type.
>
> -Jaben
>
>> -----Original Message-----
>> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
>> Mahan, Patrick
>> Sent: Wednesday, March 30, 2016 9:25 AM
>> To: edk2-devel@lists.01.org
>> Subject: [edk2] How to initiate a PXE boot from the UEFI shell
>> Importance: High
>>
>> All,
>>
>> I am testing a the UEFI driver for our new NIC and can load it via the UEFI 
>> shell,
>> ifconfig it and ping across it.  However, I now need to somehow perform a PXE
>> boot but I don't see any instructions or shell commands for doing this.  I 
>> did
>> find some (old) references back to the 2.0.0.1 release, but that is about it.
>>
>> Any pointers are welcome.
>>
>> Thanks,
>>
>> Patrick
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to