cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Observer
Observer
418 Views
Registered: ‎06-27-2017

zynqmp u-boot not working when built from repository

Jump to solution

I have a xczu4ev device (trenz TE0820-04) that I want to boot Linux from SD Card. When using petalinux 2020.1, I can get FSBL and u-boot up and running. But I would like to build all components without petalinux as I have done successfully with the standard Zynq devices.

FSBL works and I use the same u-boot 2020.1 version from the xilinx github repo with the exact same defconfig as petalinux but a simpler device tree. The boot process stops at stage 4. I can use the u-boot.elf from petalinux and it works. Using FSBL etc from petalinux with my u-boot.elf doesn't.

The console log stops after

 

Xilinx Zynq MP First Stage Boot Loader 
Release 2020.1   Nov 30 2020  -  22:08:28
Reset Mode      :       System Reset
Platform: Silicon (4.0), Cluster ID 0x80000000
Running on A53-0 (64-bit) Processor, Device Name: XCZU4EV
Processor Initialization Done 
================= In Stage 2 ============ 
SD1 Boot Mode 
SD: rc= 0
File name is 1:/BOOT.BIN
Multiboot Reg : 0x0 
Image Header Table Offset 0x8C0 
*****Image Header Table Details******** 
Boot Gen Ver: 0x1020000 
No of Partitions: 0x3 
Partition Header Address: 0x440 
Partition Present Device: 0x0 
Initialization Success 
======= In Stage 3, Partition No:1 ======= 
UnEncrypted data Length: 0x31EC 
Data word offset: 0x31EC 
Total Data word length: 0x31EC 
Destination Load Address: 0xFFFEA000 
Execution Address: 0xFFFEA000 
Data word offset: 0xF540 
Partition Attributes: 0x117 
Partition 1 Load Success 
======= In Stage 3, Partition No:2 ======= 
UnEncrypted data Length: 0x102E0 
Data word offset: 0x102E0 
Total Data word length: 0x102E0 
Destination Load Address: 0x8000000 
Execution Address: 0x8000000 
Data word offset: 0x12730 
Partition Attributes: 0x114 
Partition 2 Load Success 
All Partitions Loaded 
================= In Stage 4 ============ 
Protection configuration applied
Running ��UjT�'$HP�� running on XCZU4EG/EV/silicon v4/RTL5.1 at 0xfffea000
NOTICE:  BL31: v2.2(release):d7784d4-dirty
NOTICE:  BL31: Built : 09:55:16, Dec  1 2020

 

 

Attached are my defconfig and devicetree used. I compile u-boot with

 

make -C build/u-boot-xlnx-xilinx-v2020.1 ARCH=arm te0820_04_4di21fa_defconfig
make -C build/u-boot-xlnx-xilinx-v2020.1 ARCH=arm DEVICE_TREE="zynqmp-te0820-04-4di21fa" CFLAGS="-O2 -mcpu=cortex-a53 -DDEBUG" -j12 CROSS_COMPILE=aarch64-linux-gnu- all

 

 

0 Kudos
Reply
1 Solution

Accepted Solutions
Observer
Observer
297 Views
Registered: ‎06-27-2017

including

#include "zynqmp-clk-ccf.dtsi"

in the devicetree fixed the issue and uboot runs fine now. Thanks for the help, your debugging hints helped tremendously!

 

View solution in original post

0 Kudos
Reply
8 Replies
Moderator
Moderator
340 Views
Registered: ‎09-12-2007

Since the uboot is executing from DDR. Have you verified that this is working.

Looks like you built the ATF from GiT too:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842107/Arm+Trusted+Firmware

You should enable the debug when compiling so you have a better idea what is happening

However, I guess the issue is the uboot entry address:

https://github.com/Xilinx/arm-trusted-firmware/blob/master/plat/xilinx/zynqmp/include/platform_def.h#L69

In Petalinux, the CONFIG_SYS_TEXT_BASE is populated in the uboot recipe. However, if you are building from 

GiT you would need to pass this to ATF manually. Or change it in the defconfig.

 

Also, if you want to debug the ATF (enable the debug in the ATF) and uboot:

https://forums.xilinx.com/t5/Design-and-Debug-Techniques-Blog/PetaLinux-Image-Debug-Series-Debugging-ARM-Trusted-Firmware-and/ba-p/1151076

 

 

Observer
Observer
320 Views
Registered: ‎06-27-2017

Thanks for the help! Building ATF with debug enabled works, loading from DDR which shows that DDR is working (I also ran the memtest app from vitis).

 

I can debug the application and u-boot stops at

panic_str("No serial driver found");

 

 although I enabled the UART0 in the device tree.

/dts-v1/;
#include "zynqmp.dtsi"
/ {
	model = "Trenz TE0820-04 4DI21FA";
	compatible = "xlnx,zynqmp-te0820-04-4di21fa", "xlnx,zynqmp-te0820-04", "xlnx,zynqmp";

	aliases {
		serial0 = &uart0;
	};

	chosen {
		bootargs = " earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/ram0 rw";
		stdout-path = "serial0:115200n8";
	};
};

&uart0 {
	status = "okay";
};

 Enabling CONFIG_SERIAL_SEARCH_ALL=y in u-boot didn't yield success either.

 

Are any power domain/clocks not initialized?

0 Kudos
Reply
Moderator
Moderator
311 Views
Registered: ‎09-12-2007

What defconfig are you using for uboot?

Observer
Observer
298 Views
Registered: ‎06-27-2017

including

#include "zynqmp-clk-ccf.dtsi"

in the devicetree fixed the issue and uboot runs fine now. Thanks for the help, your debugging hints helped tremendously!

 

View solution in original post

0 Kudos
Reply
Moderator
Moderator
289 Views
Registered: ‎09-12-2007

Great. Yes, not enough people ever try to debug uboot. I try to make it easy in the blog and Im glad this helped.

Moderator
Moderator
285 Views
Registered: ‎09-12-2007

Also, if you thought the blog was helpful can you give it a kudo please?

Moderator
Moderator
270 Views
Registered: ‎09-12-2007

Thanks. I meant the blog post though

0 Kudos
Reply
Observer
Observer
265 Views
Registered: ‎06-27-2017
No worries, you deserve all the kudos
0 Kudos
Reply