Booting xen using uboot+efi on Rock64

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Booting xen using uboot+efi on Rock64

Todd Stellanova
Hello,

I'm trying to get Xen running on the Rock64 SBC (Rockchip RK3328).
The long details of my setup are here: https://forum.pine64.org/showthread.php?tid=6059

Basically I'm at a point where I am able to manually kick off efi boot from a uboot command line and getting a couple of errors (FDT_ERR_BADMAGIC and one that looks like it's coming from the EFI loader)-- see the output from uboot below.

Any suggestions on what to try next? Thanks for any ideas. 

=> set devtype mmc

=> set devnum 1

=> set distro_bootpart 6

=> run boot_efi_binary

reading efi/boot/bootaa64.efi

885072 bytes read in 129 ms (6.5 MiB/s)

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

## Starting EFI application at 02000000 ...

Card did not respond to voltage select!

mmc_init: -95, time 10

Scanning disk [hidden email]...

Scanning disk [hidden email]...

Found 2 disks

Xen 4.11-rc (c/s Tue May 1 09:03:13 2018 +0100 git:0306a1311d) EFI loader

Couldn't obtain the File System Protocol Interface: ErrCode: 0x8000000000000003

## Application terminated, r = 0



_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Booting xen using uboot+efi on Rock64

Julien Grall-3
(+Andre)

On 24/05/18 14:35, Todd Stellanova wrote:
> Hello,

Hi Todd,

I have CCed Andre who has some knowledge about UEFI in U-boot.

>
> I'm trying to get Xen running on the Rock64 SBC (Rockchip RK3328).
> The long details of my setup are here:
> https://forum.pine64.org/showthread.php?tid=6059
>
> Basically I'm at a point where I am able to manually kick off efi boot
> from a uboot command line and getting a couple of errors
> (FDT_ERR_BADMAGIC and one that looks like it's coming from the EFI
> loader)-- see the output from uboot below.
>
> Any suggestions on what to try next? Thanks for any ideas.
>
> => set devtype mmc
>
> => set devnum 1
>
> => set distro_bootpart 6
>
> => run boot_efi_binary
>
> reading efi/boot/bootaa64.efi
>
> 885072 bytes read in 129 ms (6.5 MiB/s)
>
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>
> ## Starting EFI application at 02000000 ...
>
> Card did not respond to voltage select!
>
> mmc_init: -95, time 10
>
> Scanning disk [hidden email] <mailto:[hidden email]>...
>
> Scanning disk [hidden email] <mailto:[hidden email]>...
>
> Found 2 disks
>
> Xen 4.11-rc (c/s Tue May 1 09:03:13 2018 +0100 git:0306a1311d) EFI loader
>
> Couldn't obtain the File System Protocol Interface: ErrCode:
> 0x8000000000000003

I suspect the File System Protocol Interface error is related to the
"FDT_ERR_BADMAGIC" above. The latter usually indicates that U-boot was
not able to find the FDT at the emplacement provided.

Do you know if the firmware provide a Device-Tree? You can check with
from the U-boot prompt with "fdt /". You should get some output with it.
If not you will need to load a Device-Tree from a storage or network.

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Booting xen using uboot+efi on Rock64

Todd Stellanova
Hi Julien,  thanks for the suggestions.

I do have a dtb file that works with the (debian stretch) image that is on the boot partition.  
Initially "fdt /" at the u-boot prompt yields "No FDT memory address configured."  
However, if I execute "fdt addr 0x01f00000" and then "fdt header" I can see the expected magic = 0xd00dfeed.

Starting from reset, here's what I'm trying at the u-boot prompt:

=> fdt addr 0x01f00000

=> set devtype mmc

=> set devnum 1

=> set distro_bootpart 6

=> run boot_efi_binary

reading efi/boot/bootaa64.efi

885072 bytes read in 128 ms (6.6 MiB/s)

## Starting EFI application at 02000000 ...

Card did not respond to voltage select!

mmc_init: -95, time 9

Scanning disk [hidden email]...

Scanning disk [hidden email]...

Found 2 disks

Xen 4.11-rc (c/s Tue May 1 09:03:13 2018 +0100 git:0306a1311d) EFI loader

Couldn't obtain the File System Protocol Interface: ErrCode: 0x8000000000000003

## Application terminated, r = 0


So the FDT_ERR_BADMAGIC is eliminated but the "ErrCode: 0x8000000000000003" remains.

I'm not clear what this error code means.  Any help appreciated!




On Thu, May 24, 2018 at 7:34 AM, Julien Grall <[hidden email]> wrote:
(+Andre)

On 24/05/18 14:35, Todd Stellanova wrote:
Hello,

Hi Todd,

I have CCed Andre who has some knowledge about UEFI in U-boot.


I'm trying to get Xen running on the Rock64 SBC (Rockchip RK3328).
The long details of my setup are here: https://forum.pine64.org/showthread.php?tid=6059

Basically I'm at a point where I am able to manually kick off efi boot from a uboot command line and getting a couple of errors (FDT_ERR_BADMAGIC and one that looks like it's coming from the EFI loader)-- see the output from uboot below.

Any suggestions on what to try next? Thanks for any ideas.

=> set devtype mmc

=> set devnum 1

=> set distro_bootpart 6

=> run boot_efi_binary

reading efi/boot/bootaa64.efi

885072 bytes read in 129 ms (6.5 MiB/s)

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

## Starting EFI application at 02000000 ...

Card did not respond to voltage select!

mmc_init: -95, time 10

Scanning disk [hidden email] <mailto:[hidden email]>...

Scanning disk [hidden email] <mailto:[hidden email]>...

Found 2 disks

Xen 4.11-rc (c/s Tue May 1 09:03:13 2018 +0100 git:0306a1311d) EFI loader

Couldn't obtain the File System Protocol Interface: ErrCode: 0x8000000000000003

I suspect the File System Protocol Interface error is related to the "FDT_ERR_BADMAGIC" above. The latter usually indicates that U-boot was not able to find the FDT at the emplacement provided.

Do you know if the firmware provide a Device-Tree? You can check with from the U-boot prompt with "fdt /". You should get some output with it.
If not you will need to load a Device-Tree from a storage or network.

Cheers,

--
Julien Grall


_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Booting xen using uboot+efi on Rock64

Andre Przywara-3
In reply to this post by Julien Grall-3
Hi,

On 24/05/18 15:34, Julien Grall wrote:

> (+Andre)
>
> On 24/05/18 14:35, Todd Stellanova wrote:
>> Hello,
>
> Hi Todd,
>
> I have CCed Andre who has some knowledge about UEFI in U-boot.
>
>>
>> I'm trying to get Xen running on the Rock64 SBC (Rockchip RK3328).
>> The long details of my setup are here:
>> https://forum.pine64.org/showthread.php?tid=6059
>>
>> Basically I'm at a point where I am able to manually kick off efi boot
>> from a uboot command line and getting a couple of errors
>> (FDT_ERR_BADMAGIC and one that looks like it's coming from the EFI
>> loader)-- see the output from uboot below.

As you figured already, this error means that U-Boot didn't find a
specifically loaded dtb. In this case it will use the DT that U-Boot
itself uses. Last time I checked there were subtle incompatibilities
between the two. I started with patches fixing this, but this will take
some time.
So in the meantime I recommend using the .dtb from the latest mainline
kernel.

>> Any suggestions on what to try next? Thanks for any ideas.
>>
>> => set devtype mmc
>>
>> => set devnum 1
>>
>> => set distro_bootpart 6
>>
>> => run boot_efi_binary
>>
>> reading efi/boot/bootaa64.efi
>>
>> 885072 bytes read in 129 ms (6.5 MiB/s)
>>
>> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>>
>> ## Starting EFI application at 02000000 ...
>>
>> Card did not respond to voltage select!
>>
>> mmc_init: -95, time 10
>>
>> Scanning disk [hidden email] <mailto:[hidden email]>...
>>
>> Scanning disk [hidden email] <mailto:[hidden email]>...
>>
>> Found 2 disks
>>
>> Xen 4.11-rc (c/s Tue May 1 09:03:13 2018 +0100 git:0306a1311d) EFI loader
>>
>> Couldn't obtain the File System Protocol Interface: ErrCode:
>> 0x8000000000000003

So this smells like a missing interface in U-Boot's EFI implementation.
CCing Akashi and Alex, who are working on extending this.
What version of U-Boot are you running? If possible, try to upgrade to
the latest version, as the EFI support is continually improving.

What should work already is grub, though. So you could take the detour
of loading grub as an EFI application from U-Boot, then loading Xen from
there. That should give you more comfort anyway.

Or you take the old road and load Xen directly from U-Boot. Check the
Espressobin instruction for a reference on this:
https://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/ESPRESSObin


Cheers,
Andre.

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Booting xen using uboot+efi on Rock64

AKASHI, Takahiro
On Fri, May 25, 2018 at 10:05:47AM +0100, Andre Przywara wrote:

> Hi,
>
> On 24/05/18 15:34, Julien Grall wrote:
> > (+Andre)
> >
> > On 24/05/18 14:35, Todd Stellanova wrote:
> >> Hello,
> >
> > Hi Todd,
> >
> > I have CCed Andre who has some knowledge about UEFI in U-boot.
> >
> >>
> >> I'm trying to get Xen running on the Rock64 SBC (Rockchip RK3328).
> >> The long details of my setup are here:
> >> https://forum.pine64.org/showthread.php?tid=6059
> >>
> >> Basically I'm at a point where I am able to manually kick off efi boot
> >> from a uboot command line and getting a couple of errors
> >> (FDT_ERR_BADMAGIC and one that looks like it's coming from the EFI
> >> loader)-- see the output from uboot below.
>
> As you figured already, this error means that U-Boot didn't find a
> specifically loaded dtb. In this case it will use the DT that U-Boot
> itself uses. Last time I checked there were subtle incompatibilities
> between the two. I started with patches fixing this, but this will take
> some time.
> So in the meantime I recommend using the .dtb from the latest mainline
> kernel.
>
> >> Any suggestions on what to try next? Thanks for any ideas.
> >>
> >> => set devtype mmc
> >>
> >> => set devnum 1
> >>
> >> => set distro_bootpart 6
> >>
> >> => run boot_efi_binary
> >>
> >> reading efi/boot/bootaa64.efi
> >>
> >> 885072 bytes read in 129 ms (6.5 MiB/s)
> >>
> >> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> >>
> >> ## Starting EFI application at 02000000 ...
> >>
> >> Card did not respond to voltage select!
> >>
> >> mmc_init: -95, time 10
> >>
> >> Scanning disk [hidden email] <mailto:[hidden email]>...
> >>
> >> Scanning disk [hidden email] <mailto:[hidden email]>...
> >>
> >> Found 2 disks
> >>
> >> Xen 4.11-rc (c/s Tue May 1 09:03:13 2018 +0100 git:0306a1311d) EFI loader
> >>
> >> Couldn't obtain the File System Protocol Interface: ErrCode:
> >> 0x8000000000000003
>
> So this smells like a missing interface in U-Boot's EFI implementation.
> CCing Akashi and Alex, who are working on extending this.

0x3 means "UNSUPPORTED."

> What version of U-Boot are you running? If possible, try to upgrade to
> the latest version, as the EFI support is continually improving.

"Simple File System Protocol" has been supported since v2017.11.

Thanks
-Takahiro AKASHI

> What should work already is grub, though. So you could take the detour
> of loading grub as an EFI application from U-Boot, then loading Xen from
> there. That should give you more comfort anyway.
>
> Or you take the old road and load Xen directly from U-Boot. Check the
> Espressobin instruction for a reference on this:
> https://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/ESPRESSObin
>
>
> Cheers,
> Andre.

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users