When Shell2 (ShellPkg) is started it records the ImageDevPath and
FileDevPath for itself for use in gEfiShellProtocol->Execute() (which any
other app is allowed to call to parse and execute a shell command line).
 However if the Shell is, for example, the payload for a PXE boot, the call
to GetDevicePathsForImageAndFile() in Shell.c fails (because the shell.efi
binary cannot be accessed locally) and the Shell code ASSERTs.

Older shells didn't ASSERT and this made them usable as PXE payloads.
 Shell2 can also be used as a PXE payload if the ASEERT is removed - all
shell functions work as intended except for Execute().


However, to get Execute() to work on a system where Shell2 is the PXE
Payload, a copy of the Shell.efi needs to be accessible locally (on a
volume that get's mapped one way or another while the boot shell is
executing), and then the boot shell must launch this second shell as
follows:

    fs0:\> Shell.efi -nomap -nostartup
    UEFI Interactive Shell v2.0 UEFI v2.31 (EDKII, xxx). Revision 1.02
    fs0:\>

This new prompt, running in a second shell, has ImageDevPath and
FileDevPath set correctly so Execute() can now be called from subsequent
apps.


Likewise, I suspect that if the boot volume with shell.efi goes away
somehow, starting a second copy of the shell from a different volume may
avert some errors when Exexcute() is used by other apps.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to