Re: Some questions about UEFI


Pete Batard
 

Hi Elena,

Glad to hear that you got Debian 10 installed.

For the record, we should have finalized notes on how to install Debian 10 on the Pi 3 soon, in this platform's Systems.md [1] (I send a patch for that last week, that expands a bit more on the draft notes I sent you earlier, that has not been committed yet), and, if I may, I'm also going to point out that I posted a more informal but also more detailed guide on how to achieve this same installation on my blog too [2]. I have also recently started to produce binary releases of Rasbperry Pi 3 UEFI firmware packages [3] (built from the latest EDK2 sources through AppVeyor), that might be of interest to you as they include the non-free WLAN drivers that Debian asks for during install.

At any rate, to answer your question, if the actual architectures you tried are "ARM, X64 and IA32", then your issue is simple:

The Raspberry Pi 3 is using an Arm64 CPU, so the architecture you *must* use to compile any UEFI application is "AARCH64" (not ARM, which is only for 32-bit and therefore incompatible). By the looks of it, this is the one you haven't tried so far whereas this is the one that you should use.

Note that, for the sake of completeness, compiling for the EBC arch should also work, since we include the EBC interpreter in the firmware. But really, what you want to compile a UEFI application to run it on a Pi 3, you should only use AARCH64 for the architecture. If you do just that, I'm confident that you will find that it fixes your issue.

Regards,

/Pete

[1] https://github.com/tianocore/edk2-platforms/blob/master/Platform/RaspberryPi/RPi3/Systems.md
[2] https://pete.akeo.ie/2019/07/installing-debian-arm64-on-raspberry-pi.html
[3] https://github.com/pbatard/RPi3

On 2019.07.31 11:26, Elena WILLIS wrote:
Hi Leif and Pete,
I now have a working UEFI on my Raspberry PI model 3B, which can boot into Debian 10.
The standalone GRUB executable (grubstand.efi) works when I execute it in the UEFI Shell.
I have also installed EDKII (https://github.com/tianocore/edk2, the 2018 stable version) and followed build instructions to generate a simple HelloWorld.efi application.
But when I execute HelloWorld.efi in my UEFI Shell, I always get the same error :
*Command Error Status : Unsupported. *
**
• I am executing my application like this :
Øfs0:
ØHelloWorld.efi
• I have tried different TARGET_ARCH build options : ARM, X64 and IA32, but they all produce the same error when I try to execute HelloWorld.efi.
Do you have any idea how I could fix this?
Best Regards,
Elena**
-----Original Message-----
From: Leif Lindholm <leif.lindholm@linaro.org>
Sent: vendredi 19 juillet 2019 11:11
To: discuss@edk2.groups.io; Elena WILLIS <elena.willis@st.com>
Cc: Pete Batard <pete@akeo.ie>
Subject: Re: [edk2-discuss] Some questions about UEFI
Hi Elena, (+cc Pete)
On Thu, Jul 18, 2019 at 11:54:38AM +0000, Elena WILLIS wrote:

> I am using EDK2 https://github.com/tianocore/edk2 on a Raspberry PI
3B model.

> Installation went fine and I can access the UEFI Shell interface,
where the commands work.

>

> But I'm now stuck and have a few questions :

>

> -          Do you have a simple .efi script that I could use to test

> -          my setup ?
.efi indicated an application (or driver), as opposed to a script.
My go-to test case is a standalone GRUB executable.
Generated with grub-mkstandalone -O arm64-efi -o grubstand.efi

> -          Once I am on the UEFI interface, I can't seem to boot

> -          back onto my OS (Raspbian). Could you please explain how

> -          to do this?
Does 'exit' bring you back to a "BIOS" menu system where you can select boot options?
Best Regards,
Leif

Join discuss@edk2.groups.io to automatically receive all group messages.