UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
5,290 Views
Registered: ‎05-09-2016

Petalinux 2017.1 Generate Device Tree Error

I am moving from a Petalinux 2016.4 setup. I seem to be having issues with the Petalinux Build during device tree generation and don't know if I am missing something.

 

I get the following error:

 

ERROR: [Common 17-167] Type error
ERROR: [Common 17-39] 'rdi::col_lreplace' failed due to earlier errors.
ERROR: [Hsi 55-1545] Problem running tcl command ::sw_device_tree::post_generate : ERROR: [Common 17-39] 'rdi::col_lreplace' failed due to earlier err

I exported the bitstream using Vivado 2017.1, and setup a basic project using Zynq template.

I ran

petalinux-config --get-hw-description

in the appropriate folder. The following also checks out, using similar to previous settings:

petalinux-config
petalinux-config -c kernel
petalinux-config -c rootfs

Any advice for something I can try or am missing?

0 Kudos
9 Replies
Adventurer
Adventurer
5,242 Views
Registered: ‎05-09-2016

Re: Petalinux 2017.1 Generate Device Tree Error

Full error information:

 

| ERROR: [Common 17-167] Type error
| ERROR: [Common 17-39] 'rdi::col_lreplace' failed due to earlier errors.
| ERROR: [Hsi 55-1545] Problem running tcl command ::sw_device_tree::post_generate : ERROR: [Common 17-39] 'rdi::col_lreplace' failed due to earlier errors.
| 
|     while executing
| "lreplace $all_drivers $first_occur_pos $first_occur_pos $console_element"
|     ("foreach" body line 12)
|     invoked from within
| "foreach drv_handle $all_drivers {
| 		set alias_str [get_property CONFIG.dtg.alias $drv_handle]
| 		if {[string match -nocase $alias_str "serial"]} {
| 			i..."
|     (procedure "update_alias" line 25)
|     invoked from within
| "update_alias $os_handle"
|     (procedure "::sw_device_tree::post_generate" line 3)
|     invoked from within
| "::sw_device_tree::post_generate device_tree"
| ERROR: [Hsi 55-1443] Error(s) while running TCL procedure post_generate()
| generate_target failed
|     while executing
| "error "generate_target failed""
|     invoked from within
| "if {[catch {hsi generate_target -dir $project} res]} {
| 	error "generate_target failed"
| }"
0 Kudos
Moderator
Moderator
5,215 Views
Registered: ‎10-06-2016

Re: Petalinux 2017.1 Generate Device Tree Error

Hi @gavenant,

 

The error log points a device-tree generation tool issue so you could reproduce the issue just using "petalinux-build -c devicetree" command once the HDF file is imported.

 

Does the it work properly in 2016.4?

Could you share your HDF file? cause the log messages that you pointed does not point with which IP had the issue, so replicating the issue may help to find where is the root cause.


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Adventurer
Adventurer
5,192 Views
Registered: ‎05-09-2016

Re: Petalinux 2017.1 Generate Device Tree Error

Hi @ibaie,

I do not wish to share my .hdf due to general privacy reasons. I am developing using a custom Zynq implementation - could it possible be due to the following warnings?

 

| WARNING: ps7_i2c_0: No reset found
| WARNING: ps7_i2c_1: No reset found
| ERROR: [Common 17-167] Type error
| ERROR: [Common 17-39] 'rdi::col_lreplace' failed due to earlier errors.
| ERROR: [Hsi 55-1545] Problem running tcl command ::sw_device_tree::post_generate : ERR

 

Where should I add these resets?

 

 

 

 

0 Kudos
Moderator
Moderator
5,187 Views
Registered: ‎10-06-2016

Re: Petalinux 2017.1 Generate Device Tree Error

Hi @gavenant

 

It's fine if you don't want to share your HDF file, it just makes easier sometimes to reproduce the issues :)

 

Reviewing again the error log and checking the code in the device-tree generator, it seems that the issue might be with the serial interface and linux console interface. Which serial interfaces do you have in your design? which one are you planning to use as a console for Linux?


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Adventurer
Adventurer
5,177 Views
Registered: ‎05-09-2016

Re: Petalinux 2017.1 Generate Device Tree Error

Hi @ibaie

I am using UART0 at 115200kbps as a debug serial interface. Therefore console=ttyPS0, 115200. Is this what you wanted to know?

0 Kudos
Moderator
Moderator
5,168 Views
Registered: ‎10-06-2016

Re: Petalinux 2017.1 Generate Device Tree Error

Hi @gavenant

 

Yes, I was looking for your serial configuration just to check if there was something non common that may cause the error.

 

According to the device-tree generator code, the procedure that is failing in your design seems to be trying to update the node list to put the console and uart nodes at the first possition.

 

# Update all_drivers list such that console device should be the first
# uart device in the list.

 

 

The first error message points to a type issue, so not sure if it can be for naming convention issues or just some IP in your design is making fail it.

 

You can try to reproduce the issue maybe with a simpler design which can you share :)


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Adventurer
Adventurer
5,157 Views
Registered: ‎05-09-2016

Re: Petalinux 2017.1 Generate Device Tree Error

Hi @ibaie

 

I think this problem could be related to the following post: Petalinux-v2017-1-device-tree-and-serial-ports .

The problem goes away when I activate both uart0 and uart1. So there seems to be a multitude of bugs around the handling of the uart in the device tree generator.

 

I also see the following in system-top.dts then:

/ {
	chosen {
		bootargs = "earlycon";
		stdout-path = "serial0:115200n8";
	};
	aliases {
		ethernet0 = &gem0;
		ethernet1 = &gem1;
		serial0 = &uart1;
		serial1 = &uart0;
		spi0 = &qspi;
		spi1 = &spi1;
		spi2 = &rfu_lib_spi_pl_rfu;
	};
0 Kudos
5,140 Views
Registered: ‎04-10-2015

Re: Petalinux 2017.1 Generate Device Tree Error

Hello everyone,

 

Just to mention: we do have the same problem here. I am trying to prepare a stripped down .hdf file I could share, but this is not obvious to do.

 

The same issue is also reported here: https://forums.xilinx.com/t5/Embedded-Linux/petalinux-build-fails-on-device-tree-generation/td-p/762108

0 Kudos
Moderator
Moderator
5,015 Views
Registered: ‎10-06-2016

Re: Petalinux 2017.1 Generate Device Tree Error

Hi @gavenant

 

Take a look to the AR69126, as it looks like there is a well known issue in the latest release which makes the device-tree buiding process fail when the console makes uses of the uart1 as a console.

 

In your case I would say that it's pretty extrange as your are using the UART0 device, but as long as the generated device-tree switched to serial1 alias, maybe that was causing the issue.


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos