Author Topic: u-boot for TE0803 hangs with ethernet  (Read 3844 times)

spiwoks

  • Active Member
  • *
  • Posts: 7
u-boot for TE0803 hangs with ethernet
« on: August 16, 2018, 09:08:30 AM »
Hello!

We have a TE0803-01-03EG-1EA with a TE0803. I have been trying to build u-boot using Yocto
with versions pyro and rocko. I have tried the default device tree for the zynqmp-zcu102-revB and
the one from the SDK of a very simple (PS only desgin). Whatever I try, the u-boot always
   HANGS WHEN STARTING THE ETHERNET.

I have tried with the u-boot from the reference starter kit, which works fine. So, I am wondering:
- is there a Yocto recipe that builds u-boot?
- what configs and patches does petalinux apply when building u-boot?

Any help on this is most welcome.

Cheers,
                                Ralf Spiwoks, CERN.

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: u-boot for TE0803 hangs with ethernet
« Reply #1 on: August 17, 2018, 04:34:40 PM »
Hi,

which reference  design version did you use?

Xilinx has changed a lot between 2017.4 and 2018.1( or newer )

So there are many differences between xilinx git hub versions.

We only use petalinux (it's also Yocto based and has additional features), so I can't help so much.

Petalinux/SDK use also zynqmp-zcu102-revB as template and add changes during HDF import. We did not backup this changes, only changes, we must be add manually. See:
See especially device tree entry for ETH, maybe this is missing on your environment. We use also special FSBL (initialise SI5338). Xilinx FSBL, PMU and ATF(BL31) is not compatible during 2017.4 and newer version. So try to use all from the same version, also the correct Xilinx git hub version. We add FSBL templates to our project. For 2018.2 only: Remove compiler flags "-Os -flto -ffat-lto-objects" on 2018.2 SDK to generate FSBL.

To see default device tree after hdf import, you must create either petalinux project (we add a template into the reference design) or include the device tree git hub into SDK and generate default device tree. you must add device tree git hub, see "Generate a Device Tree Source (.dts/.dtsi) files from SDK" on  http://www.wiki.xilinx.com/Build+Device+Tree+Blob

I hope this helps a little bit.
br
John

spiwoks

  • Active Member
  • *
  • Posts: 7
Re: u-boot for TE0803 hangs with ethernet
« Reply #2 on: August 20, 2018, 09:40:22 AM »
Dear John,

Thanks for your reply.

It is a pity that you are not using Yocto. Anyway, I have been able to boot my board finally by using:
   the PMUFW, BL31, and UBOOT from the Starterkit tarball, and
   the FSBL from the zynqmp_fsbl application with the SDK
I can boot my kernel with my rootfs system, but had to patch the device tree with the ethernet phy
as described on your web page. Then it works fine.

I am currently using Yocto/pyro which for the UBOOT uses u-boot-xnlx v2017.1. But since it works from
the Starterkit I will use the latter. And I will continue using that one even when I move to Yocto/rocko soon.

Thanks for your help. Cheers,

Ralf

spiwoks

  • Active Member
  • *
  • Posts: 7
Re: u-boot for TE0803 hangs with ethernet
« Reply #3 on: August 20, 2018, 10:20:23 AM »
Dear John,

Me again. I am only realizing now that the kernel only brings up one CPU. For the others it says:
[    1.200550] CPU1: failed to come online
[    1.200559] CPU1: failed in unknown state : 0x0
[    2.321079] CPU2: failed to come online
[    2.321088] CPU2: failed in unknown state : 0x0
[    3.441611] CPU3: failed to come online
[    3.441620] CPU3: failed in unknown state : 0x0
[    3.441686] Brought up 1 CPUs
[    3.441693] SMP: Total of 1 processors activated.
[    3.441704] CPU features: detected feature: 32-bit EL0 Support
[    3.441715] CPU: All CPU(s) started at EL2
Any idea on what needs changing? The device tree again? Or something in the FSBL?

Cheers,
                      Ralf.

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: u-boot for TE0803 hangs with ethernet
« Reply #4 on: August 20, 2018, 10:29:56 AM »
FSBL, PMU...it's hard to say.

Check that all your sources use the same vivado version --> also your git checkouts.

Especially during 2018.1 update:
http://www.wiki.xilinx.com/FSBL
http://www.wiki.xilinx.com/PMU+Firmware

PS: Petalinux use also Yocto and this is more open since 2016.4. Newest Version:

br
John

spiwoks

  • Active Member
  • *
  • Posts: 7
Re: u-boot for TE0803 hangs with ethernet
« Reply #5 on: August 20, 2018, 12:54:12 PM »
Hi John,

As I wrote I am using the PMU and UBOOT from the starter kit. Shouldn't that enable all four CPUs?
Or is there something specific in the design that needs to be set to enable the CPUs?
In the latter case I would have to recompile the FSBL, am I right?

Cheers,
                      Ralf.

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: u-boot for TE0803 hangs with ethernet
« Reply #6 on: August 20, 2018, 01:10:56 PM »
Hi,

which version of the reference design?
https://shop.trenz-electronic.de/en/Download/?path=Trenz_Electronic/Modules_and_Module_Carriers/5.2x7.6/TE0803/Reference_Design

If you use the complete prebuilt boot files from the reference design, also petalinux image.ub, do you have this issue?

br
John

spiwoks

  • Active Member
  • *
  • Posts: 7
Re: u-boot for TE0803 hangs with ethernet
« Reply #7 on: August 20, 2018, 01:36:06 PM »
John,

Sorry, I forgot to specify this: I am using 2017.4. I tried with the image.ub
from the same starterkit and get the same behaviour:
    only one CPU comes up!
That should exclude the linux device tree to be the problem. So, it could
still be the PMU or the FSBL, right?

Cheers,
                    Ralf.

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: u-boot for TE0803 hangs with ethernet
« Reply #8 on: August 20, 2018, 02:19:17 PM »
Hi Ralf,

this should not happens with the reference design, if you use prebuilt Boot.bin and image.ub from the reference design. For EG normally 4 should be come online, for CG only 2. One is used only on the reference design, so we use the same linux resources (only changed on different memory) for both variants.
Can you send me the serial number of the module please. Email is also possible: support@trenz-electronic.de

Do you use TE0803 with TEBF0808 standalone or as Starterkit with enclosure and ATX power supply?

Can you try out one time a simple barmetal application (hello world  or so). Select first time core0 if this works another one and try again.
PS: use our modfied FSBL sources to initialize SI5338.

br
John

 

spiwoks

  • Active Member
  • *
  • Posts: 7
Re: u-boot for TE0803 hangs with ethernet
« Reply #9 on: August 21, 2018, 09:51:25 AM »
Dear John,

I had sent the following message to support@trenz-electronic.de and they did reply, but apparently
did not forward the mail to you. Anyway, I am repeating the message here:

---------------------------------------------------------------------------------------------------------------------------------------
Dear John,

We do have a starterkit of type TEBF0808-04A with serial number 504372 and
a type TE0803-01 with serial number 502563 mounted on it.

I have tried running "Hello World" on a CPU #0 and CPU #1 and CPU #3, and
that works. In each of the cases the CPU in question is running while the
others are held in reset catch (e.g. CPU #3):
     "Cortex-A53 #3 (Reset Catch, EL3(S)/A64)"

Thanks for your help. Cheers,

Ralf
---------------------------------------------------------------------------------------------------------------------------------------

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: u-boot for TE0803 hangs with ethernet
« Reply #10 on: August 21, 2018, 10:46:17 AM »
I've got the email and wrote back at 10:04.

Quote
...
So every CPU itself works. I would only only check, if there is no HW issue with the single CPUs itself.

On linux normally following output should appear:

I've tested with a TE0808 EG, for TE0803, i've only a CG, but with CG 2 cores will be booted.

To be on the save side, you use the prebuilt files only, correct?

Boot.bin and image.ub from the download?

    https://shop.trenz-electronic.de/de/Download/?path=Trenz_Electronic/Modules_and_Module_Carriers/5.2x7.6/TE0803/Reference_Design/2018.2/StarterKit
        TE0803-Starterkit-vivado_2018.2-build_02_20180814103204.zip

TE0803-01-03EG-1EA is:

    Starterkit\prebuilt\boot_images\3eg_sk\u-boot\Boot.bin
    Starterkit\prebuilt\os\petalinux\default\image.ub

Can you send me the whole log from the boot process with this files.


br
John

spiwoks

  • Active Member
  • *
  • Posts: 7
Re: u-boot for TE0803 hangs with ethernet
« Reply #11 on: August 21, 2018, 05:37:23 PM »
Dear John,

Thanks for your patience and your suggestions. The solution came from the Xilinx Community Forum:
https://forums.xilinx.com/t5/Embedded-Boot-and-Configuration/Booting-ZynqMP-brings-up-only-ONE-CPU/m-p/883646/highlight/false#M1227

I added "maxcpus=4" to the kernel command-line parameters and the kernel brought up the FOUR CPUs.
I guess you have that in the SD boot? I really should have checked.

Cheers,
                         Ralf.