使用petalinux编译工程,报错:Unable to parse input tree,已解决

报错信息如下:

| ERROR: Function failed: do_compile (log file is located at /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.58672)
ERROR: Task (/opt/pkg/petalinux/2018.3/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2271 tasks of which 2267 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /opt/pkg/petalinux/2018.3/components/yocto/source/arm/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 project
jwcai@jwcai:~/zynqLinux/Demo/petalinux/ryZDB/petaDemo$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |################################################################| Time: 0:00:00
Loaded 3444 entries from dependency cache.
Parsing recipes: 100% |##############################################################| Time: 0:00:04
Parsing of 2569 .bb files complete (2536 cached, 33 parsed). 3445 targets, 149 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###########################################################| Time: 0:00:06
Checking sstate mirror object availability: 100% |###################################| Time: 0:00:21
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/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.95689)
ERROR: Logfile of failure stored in: /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.95689
Log data follows:
| DEBUG: Executing shell function do_compile
| Error: /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/../components/plnx_workspace/device-tree/device-tree/pl.dtsi:239.24-25 syntax error
| FATAL ERROR: Unable to parse input tree
| WARNING: /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/run.do_compile.95689:1 exit 1 from 'dtc -I dts -O dtb -R 8 -p 0x1000 -b 0 -i /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/../components/plnx_workspace/device-tree/device-tree -i /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/tmp/work-shared/plnx-zynq7/kernel-source/include -i /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/tmp/work-shared/plnx-zynq7/kernel-source/include -i /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0 -o ${DTS_NAME}.dtb `basename ${DTS_FILE}`.pp'
| ERROR: Function failed: do_compile (log file is located at /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.95689)
ERROR: Task (/opt/pkg/petalinux/2018.3/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1'

注意到上述信息中的:

| Error: /home/jwcai/zynqLinux/Demo/petalinux/ryZDB/petaDemo/build/../components/plnx_workspace/device-tree/device-tree/pl.dtsi:239.24-25 syntax error

根据报错信息,打开pl.dtsi文件,发现如下代码:
在这里插入图片描述
其中“1e+08”必然有问题,这里我在vivado的BD文件中设置AXI的clk频率是100MHz,于是想到将“1e+08”改为“100000000”,如下图
在这里插入图片描述
保存后重新编译通过。

你可能感兴趣的:(zynq,linux)