如何在 Petalinux 下定位 decice-tree 错误

本文介绍了如何在 Petalinux 工程中定位和解决 device-tree 错误。当遇到错误时,可以查看 Petalinux 工具的 error log,如示例中的 'duplicate_label' 错误,根据错误提示删除重复定义。如果 log 无法提供足够的信息,可以使用 dtc 工具手动编译 device tree 文件,通过预处理和编译步骤,获取更具体的错误信息。
摘要由CSDN通过智能技术生成

首先我们来了解下 Petalinux 工程中 device-tree 的文件位置: 

工具自动生成的device-tree文件位于

components/plnx_workspace/device-tree/device-tree, 

该文件夹下的文件请勿自行修改,供用户编辑的 device-tree 文件位于

project-spec/meta-user/recipes-bsp/device-tree/files

对于大部分错误,通过 petalinux 工具的 error log 已经足够定位错误类型和位置。比如下面,

ERROR: device-tree-xilinx-v2020.1+gitAUTOINC+f725aaecff-r0 do_compile: Error executing a python function in exec_python_func() autogenerated: 

The stack trace of python calls that resulted in this exception/failure was 

…… 

Subprocess output: 

/tmp/xilinx-zcu102-2020.2-2021.02.08-01.47.20-87H/work/zynqmp_generic-xilinx-linux/device-tree/xilinx-v2020.1+gitAUTOINC+f725aaecff-r0/system-user.dtsi:3.31-15.9: ERROR (duplicate_label): /ethernet@ff0b0000: Duplicate label 'gem0' on /ethernet@ff0b0000 and /amba/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

BinaryStarXin

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值