Re: Trouble booting RELENG 13.0 on a Zynq XC7Z010 (Zybo-like) board

From: Lee D <embaudarm_at_gmail.com>
Date: Fri, 21 Jan 2022 00:22:33 UTC
On Thu, Jan 20, 2022 at 5:52 PM Milan Obuch <freebsd-arm@dino.sk> wrote:
> Hi,
>
> how is this boot loader made? All Zynq based boards I know about use
> U-Boot customized according the board's design.

Thanks for the response.  I've fixed a couple of problems, and gotten
a little further, but the kernel is still crashing before it prints
the banner.

This is a custom bootloader, for a custom PCB, that I wrote from
scratch back in 2016.

>
> I am not sure, but I think there was some change in boot process, so
> your 11-compatible bootloader is probably no longer compatible with
> 13.0 kernel. Also, you may need to create new dtb, some modification is
> probably necessary.
>

Yes, it turns out that a new dtb was needed.  I needed to:

1. update my .dts to reflect the default zybo .dts settings, and
include "zynq-7000.dtsi" from the source tree.
2. add the "xlnx,zynq-7000" string to the "compatible" key.  That
solved the problem  with the "No platform module found!" panic.
3. add "freebsd,dts-version = "5.9";" to the dts file, which is
something that the FreeBSD build system adds automatically when
compiling dts files.

> Could you verify your serial port settings? If I am not mistaken, some
> critical board setup is expected to be done in bootloader, FreeBSD
> kernel just uses what is already set. This is valid especially for
> serial port used as console.

After I did #2, above, then the serial output started working, so it
seems it is still expecting the same settings (uart 1, 115200/8/n/1)
as FreeBSD 11.

Now I am to the point of getting another crash, with no panic message,
that dumps me into the KDB debugger prompt.

>
> There is some push towards using efiloader for loading kernel. I have
> no specific answer on kernel environment...

If anyone could point me to the code that sets up the metadata and
environment so the kernel can run, that would be super helpful.  Right
now I am still using the same metadata structures that I used for
FreeBSD 11.

Thanks,

Lee