Device tree error in building image with custom bsp

Hi,

PYNQ version: 2.4, Utah Release
Board: ZCU-104 
Petalinux version: 2018.3
Vivado version: 2018.3
OS: Ubuntu 16.04

We are trying to build PYNQ image with a custom bsp i.e. that of reVision (version 2018.3).

I placed the zcu104-prod-rv-ss.bsp file in boards/ZCU104 directory, erased the petalinux_bsp folder there and modified .spec file to:

ARCH_ZCU104 := aarch64
BSP_ZCU104 := zcu104-prod-rv-ss.bsp

STAGE4_PACKAGES_ZCU104 := pynq ethernet sensorconf boot_leds_zcu104

Then I go to sdbuilds and modify makefile such that

  1. SDX check line is commented:     # which sdx | fgrep ${KERNEL_VERSION}
  2. Petalinux version check part was cropped to     which petalinux-config

Then I run make BOARDS=ZCU104 and here is the error:

NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks

ERROR: device-tree-xilinx+gitAUTOINC+b7466bbeee-r0 do_compile: 
Function failed: do_compile (log file is located at /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/tmp/work/zcu104_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.21190)

ERROR: Logfile of failure stored in: /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/tmp/work/zcu104_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.21190

Log data follows:
| DEBUG: Executing shell function do_compile
| /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/tmp/work/zcu104_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/run.do_compile.21190: line 112:
 /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/../
components/plnx_workspace/device-tree/device-tree/system-top.dts: 
No such file or directory

| WARNING: /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/tmp/work/zcu104_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/run.do_compile.21190:1 exit 1 from 'echo "/include/ \"pynq_zynqmp.dtsi\"" >> /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/../components/plnx_workspace/device-tree/device-tree/system-top.dts'

| ERROR: Function failed: do_compile (log file is located at /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/tmp/work/zcu104_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.21190)

ERROR: Task (/home/mustafa/Petalinux/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1'

NOTE: Tasks Summary: Attempted 711 tasks of which 602 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/mustafa/Petalinux/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

ERROR: Failed to build device-tree

Makefile:298: recipe for target '/home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/images/linux/system.dtb' failed

make: *** [/home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/images/linux/system.dtb] Error 255

and the log file it mentions contains:

DEBUG: Executing shell function do_compile
/home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/tmp/work/zcu104_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/run.do_compile.21190: line 112: /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/../components/plnx_workspace/device-tree/device-tree/system-top.dts: No such file or directory

WARNING: /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/tmp/work/zcu104_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/run.do_compile.21190:1 exit 1 from 'echo "/include/ \"pynq_zynqmp.dtsi\"" >> /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/../components/plnx_workspace/device-tree/device-tree/system-top.dts'

ERROR: Function failed: do_compile (log file is located at /home/mustafa/Desktop/PYNQ-2.4/sdbuild/build/ZCU104/petalinux_project/build/tmp/work/zcu104_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.21190)

I checked the .bsp file and it has a directory

zcu104-prod-rv-ss.bsp/src/components/plnx_workspace/device-tree/device-tree

and system-top.dts, zynqmp.dtsi and zynqmp-clk-ccf.dtsi files are there. So I wonder why they are not seen and the error raises?

Thanks.


Here is a similar problem but theirs is about do_configure but here error raises in do_compile. And I checked the MACHINE_NAME in config files and it is zcu104-revc.

Copied the directory after plnx_workspace to the place it complained as not existed, re-ran make without clean and issue was resolved.