Re: Running LibC application from shell causes "Command Error Status: Unsupported" on real hardware, works in VM

JackMacWindows <jackmacwindowslinux@...>

Nope, I’m building for X64 in my targets.txt file. Running objdump on the file returns "craftos-efi/CraftOS.efi: file format pei-x86-64" so it’s definitely an X64 image.

On Jan 31, 2020, at 10:34 AM, Laszlo Ersek <lersek@...> wrote:

On 01/26/20 01:00, JackMacWindows wrote:
I’m writing an application for UEFI that provides a Lua shell for users to interact with. I have successfully gotten the code to run inside QEMU with OVMF, but any time I try to run it on real hardware I get "Command Error Status: Unsupported" from the shell. The testing machine I’m using is an Ivy Bridge Dell laptop with UEFI 2.31, but it also didn’t work when testing it on a Kaby Lake laptop with UEFI 2.60. The build files (.inf, .dsc) are almost exactly the same as the Lua 5.2 example listed in AppPkg in LibC. I have added print statements around the program, but none of them appear, including one at the absolute beginning of the entry point. (I overrode ShellCEntryLib to do this.) This indicates that the error is likely relating to linking/executable generation. I’m able to compile and run other applications on real hardware, including the shell as well as Main and Lua in AppPkg.

I have absolutely no idea what I can do to debug this further, as everything I have done to try to fix this has failed. Does anybody have any idea what could be going wrong? The source code can be found at
Dumb question but it's worth a shot: are you perchance building both
your application and OVMF for IA32, but trying to run your IA32
application binary on an X64 physical platform? That would give you
EFI_UNSUPPORTED, from the platform's LoadImage() boot service.


Join to automatically receive all group messages.