OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 2459|回复: 5

[XILINX] ZYNQ linux 新手求助,petalinux-build 进行编译出错

[复制链接]

17

主题

48

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
310
金钱
310
注册时间
2016-12-5
在线时间
54 小时
发表于 2023-6-30 10:44:04 | 显示全部楼层 |阅读模式
10金钱
本帖最后由 dai410257573 于 2023-6-30 11:14 编辑

买了原子哥的 ZYNQ开发板来学习llinux因为公司用的是vivado 2019.2   vitis2019.2,所以我下载了petalinux2019.2,ubuntu18.04

跟着  领航者linux开发指南.PDF  来动作

导入原子哥例程的hdf文件,复制了system-user.dtsi,执行 petalinux-build  进行编译,编译出错
然后我以为是版本问题。就使用了我之前的在windows下vivado产生的xsa文件,但是没有复制dtsi文件,使用的默认的空的dtsi,按照文档经过一些列步骤之后,执行 petalinux-build  进行编译,一样的出错
错误信息如下,请大佬指点指点,不然就是从入门到劝退了
  1. NOTE: Executing SetScene Tasks
  2. NOTE: Executing RunQueue Tasks
  3. NOTE: linux-xlnx: compiling from external source tree /opt/pkg/petalinux/ALIENTEK-ZYNQ/components/plnx_workspace/sources/linux-xlnx
  4. ERROR: device-tree-xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0 do_compile: Error executing a python function in exec_python_func() autogenerated:

  5. The stack trace of python calls that resulted in this exception/failure was:
  6. File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
  7.      0001:
  8. *** 0002:devicetree_do_compile(d)
  9.      0003:
  10. File: '/opt/pkg/petalinux/2019/components/yocto/source/arm/layers/core/meta/classes/devicetree.bbclass', lineno: 131, function: devicetree_do_compile
  11.      0127:            if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)):
  12.      0128:                continue # skip non-.dts files and non-overlay files
  13.      0129:        except:
  14.      0130:            continue # skip if can't determine if overlay
  15. *** 0131:        devicetree_compile(dtspath, includes, d)
  16.      0132:}
  17.      0133:
  18.      0134:devicetree_do_install() {
  19.      0135:    for DTB_FILE in `ls *.dtb *.dtbo`; do
  20. File: '/opt/pkg/petalinux/2019/components/yocto/source/arm/layers/core/meta/classes/devicetree.bbclass', lineno: 119, function: devicetree_compile
  21.      0115:        dtcargs += ["-i", i]
  22.      0116:    dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")]
  23.      0117:    dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)]
  24.      0118:    bb.note("Running {0}".format(" ".join(dtcargs)))
  25. *** 0119:    subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  26.      0120:
  27.      0121:python devicetree_do_compile() {
  28.      0122:    includes = expand_includes("DT_INCLUDE", d)
  29.      0123:    listpath = d.getVar("DT_FILES_PATH")
  30. File: '/opt/pkg/petalinux/2019/components/yocto/source/arm/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py', lineno: 398, function: run
  31.      0394:            raise
  32.      0395:        retcode = process.poll()
  33.      0396:        if check and retcode:
  34.      0397:            raise CalledProcessError(retcode, process.args,
  35. *** 0398:                                     output=stdout, stderr=stderr)
  36.      0399:    return CompletedProcess(process.args, retcode, stdout, stderr)
  37.      0400:
  38.      0401:
  39.      0402:def list2cmdline(seq):
  40. Exception: subprocess.CalledProcessError: Command '['dtc', '-R', '8', '-b', '0', '-p', '0x1000', '-i', '/opt/pkg/petalinux/ALIENTEK-ZYNQ/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0', '-i', '/opt/pkg/petalinux/ALIENTEK-ZYNQ/build/../components/plnx_workspace/device-tree/device-tree', '-i', '/opt/pkg/petalinux/ALIENTEK-ZYNQ/build/tmp/work-shared/plnx-zynq7/kernel-source/arch/arm/boot/dts', '-i', '/opt/pkg/petalinux/ALIENTEK-ZYNQ/build/tmp/work-shared/plnx-zynq7/kernel-source/scripts/dtc/include-prefixes', '-i', '/opt/pkg/petalinux/ALIENTEK-ZYNQ/build/tmp/work-shared/plnx-zynq7/kernel-source/include', '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 2

  41. Subprocess output:
  42. system-top.dtb: ERROR (phandle_references): /amba/ethernet@e000c000: Reference to non-existent node or label "phy1"

  43. system-top.dtb: ERROR (phandle_references): /amba/ethernet@e000c000/mdio/PS_AXI_gmii_to_rgmii_0@8: Reference to non-existent node or label "phy1"

  44. ERROR: Input tree has errors, aborting (use -f to force output)

  45. ERROR: device-tree-xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0 do_compile: Function failed: devicetree_do_compile
  46. ERROR: Logfile of failure stored in: /opt/pkg/petalinux/ALIENTEK-ZYNQ/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/temp/log.do_compile.120079
  47. ERROR: Task (/opt/pkg/petalinux/2019/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1'
  48. NOTE: Tasks Summary: Attempted 3071 tasks of which 2337 didn't need to be rerun and 1 failed.

  49. Summary: 1 task failed:
  50.   /opt/pkg/petalinux/2019/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile
  51. Summary: There was 1 WARNING message shown.
  52. Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
  53. ERROR: Failed to build project
复制代码



最佳答案

查看完整内容[请看2#楼]

设备树phy1的问题,system-user.dtsi设备树以太网控制器节点怎么配置的?
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

2

主题

101

帖子

0

精华

高级会员

Rank: 4

积分
640
金钱
640
注册时间
2021-8-3
在线时间
151 小时
发表于 2023-6-30 10:44:05 | 显示全部楼层
本帖最后由 helloqds 于 2023-6-30 14:13 编辑

设备树phy1的问题,system-user.dtsi设备树以太网控制器节点怎么配置的?
回复

使用道具 举报

17

主题

48

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
310
金钱
310
注册时间
2016-12-5
在线时间
54 小时
 楼主| 发表于 2023-6-30 14:38:29 | 显示全部楼层
helloqds 发表于 2023-6-30 14:12
设备树phy1的问题,system-user.dtsi设备树以太网控制器节点怎么配置的?

第一次使用的是按照手册里面复制的例程dtsi文件,但是这个应该是2018版本生成的,第二次的使用我在windows下2019.2版本编译的xsa文件,dtsi就没有写,是空的。两次都是这种类型的错误,看前面的内容都是一致的,都是同一个文件的同一行
回复

使用道具 举报

17

主题

48

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
310
金钱
310
注册时间
2016-12-5
在线时间
54 小时
 楼主| 发表于 2023-6-30 17:59:43 | 显示全部楼层
helloqds 发表于 2023-6-30 14:12
设备树phy1的问题,system-user.dtsi设备树以太网控制器节点怎么配置的?

也是设备树的问题,因为使用的是之前的xsa文件,里面有phy1的设备,但是我还不会写,就复制了原子哥例程里面的dtsi文件,这个没有描述。
我自己导了一个很简单的硬件信息,按照PDF去编译,就没得问题了,谢谢。
回复

使用道具 举报

0

主题

2

帖子

0

精华

新手入门

积分
4
金钱
4
注册时间
2023-7-17
在线时间
0 小时
发表于 2023-7-17 18:13:40 | 显示全部楼层
楼主你好,我linux纯小白,目前也在学习Linux开发,在配置u-boot时遇到和您一样的问题,请问您最后是怎么解决的?我不太了解dtsl文件,不清楚该怎么设置导出。我使用的版本是vivado2019.1、petalinux2019.1,尝试过跟楼主一样的方法,也是同样的报错信息。
回复

使用道具 举报

17

主题

48

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
310
金钱
310
注册时间
2016-12-5
在线时间
54 小时
 楼主| 发表于 2023-7-18 18:38:43 | 显示全部楼层
nakkrio 发表于 2023-7-17 18:13
楼主你好,我linux纯小白,目前也在学习Linux开发,在配置u-boot时遇到和您一样的问题,请问您最后是怎么解 ...

   不知道,我按照文档换成了2020.2 ,就没有这个问题了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-10-4 08:26

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表