Home › Forums › snickerdoodle › • Getting Started › Petalinux-build error on devicetree compilation

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • jeff2148
      Participant
      Post count: 3

      Hello,

       

      I’m trying to build petalinux for the snickerdoodle-black with the same environment as the below guidance. (Vivado+Vitis 2019.2 and PetaLinux 2019.2 on Ubuntu 18.04)

      https://www.hackster.io/whitney-knitter/petalinux-on-snickerdoodle-black-pismasher-baseboard-b23833#comments

      However, I met petalinux-config errors with kernel and petalinux-build errors as below. Please help me to solve this issue.

       

      Best Regards,

      Jeff

      ubuntu@ubuntu:~/pkg/petalinux/2019.2/snkrddl_blk_0$ petalinux-build
      [INFO] building project
      [INFO] sourcing bitbake
      [INFO] generating user layers
      [INFO] generating workspace directory
      INFO: bitbake petalinux-user-image
      Loading cache: 100% |################################################################################################| Time: 0:00:00
      Loaded 3978 entries from dependency cache.
      Parsing recipes: 100% |##############################################################################################| Time: 0:00:04
      Parsing of 2893 .bb files complete (2891 cached, 2 parsed). 3980 targets, 169 skipped, 0 masked, 0 errors.
      NOTE: Resolving any missing task queue dependencies
      Initialising tasks: 100% |###########################################################################################| Time: 0:00:02
      Checking sstate mirror object availability: 100% |###################################################################| Time: 0:00:25
      Sstate summary: Wanted 149 Found 3 Missed 292 Current 730 (2% match, 83% complete)
      NOTE: Executing SetScene Tasks
      NOTE: Executing RunQueue Tasks
      NOTE: linux-xlnx: compiling from external source tree /home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/components/plnx_workspace/sources/linux-xlnx
      ERROR: device-tree-xilinx-v2019.2+gitAUTOINC+a8b39cf536-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:
      File: ‘exec_python_func() autogenerated’, lineno: 2, function: <module>
      0001:
      *** 0002:devicetree_do_compile(d)
      0003:
      File: ‘/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/meta/classes/devicetree.bbclass’, lineno: 131, function: devicetree_do_compile
      0127: if not(os.path.isfile(dtspath)) or not(dts.endswith(“.dts”) or devicetree_source_is_overlay(dtspath)):
      0128: continue # skip non-.dts files and non-overlay files
      0129: except:
      0130: continue # skip if can’t determine if overlay
      *** 0131: devicetree_compile(dtspath, includes, d)
      0132:}
      0133:
      0134:devicetree_do_install() {
      0135: for DTB_FILE in ls *.dtb *.dtbo; do
      File: ‘/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/meta/classes/devicetree.bbclass’, lineno: 119, function: devicetree_compile
      0115: dtcargs += [“-i”, i]
      0116: dtcargs += [“-o”, “{0}.{1}”.format(dtname, “dtbo” if isoverlay else “dtb”)]
      0117: dtcargs += [“-I”, “dts”, “-O”, “dtb”, “{0}.pp”.format(dts)]
      0118: bb.note(“Running {0}”.format(” “.join(dtcargs)))
      *** 0119: subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
      0120:
      0121:python devicetree_do_compile() {
      0122: includes = expand_includes(“DT_INCLUDE”, d)
      0123: listpath = d.getVar(“DT_FILES_PATH”)
      File: ‘/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py’, lineno: 398, function: run
      0394: raise
      0395: retcode = process.poll()
      0396: if check and retcode:
      0397: raise CalledProcessError(retcode, process.args,
      *** 0398: output=stdout, stderr=stderr)
      0399: return CompletedProcess(process.args, retcode, stdout, stderr)
      0400:
      0401:
      0402:def list2cmdline(seq):
      Exception: subprocess.CalledProcessError: Command ‘[‘dtc’, ‘-R’, ‘8’, ‘-b’, ‘0’, ‘-p’, ‘0x1000’, ‘-i’, ‘/home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work-shared/plnx-zynq7/kernel-source/include’, ‘-i’, ‘/home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0’, ‘-i’, ‘/home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/../components/plnx_workspace/device-tree/device-tree’, ‘-i’, ‘/home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work-shared/plnx-zynq7/kernel-source/scripts/dtc/include-prefixes’, ‘-i’, ‘/home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work-shared/plnx-zynq7/kernel-source/arch/arm/boot/dts’, ‘-o’, ‘system-top.dtb’, ‘-I’, ‘dts’, ‘-O’, ‘dtb’, ‘system-top.dts.pp’]’ returned non-zero exit status 2

      Subprocess output:
      system-top.dtb: ERROR (phandle_references): /amba/ethernet@e000b000: Reference to non-existent node or label “phy1”

      system-top.dtb: ERROR (phandle_references): /amba/ethernet@e000b000/mdio/gmii_to_rgmii_0@0: Reference to non-existent node or label “phy1”

      system-top.dtb: ERROR (phandle_references): /amba/ethernet@e000c000: Reference to non-existent node or label “phy1”

      system-top.dtb: ERROR (phandle_references): /amba/ethernet@e000c000/mdio/gmii_to_rgmii_1@0: Reference to non-existent node or label “phy1”

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

      ERROR: device-tree-xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0 do_compile: Function failed: devicetree_do_compile
      ERROR: Logfile of failure stored in: /home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx-v2019.2+gitAUTOINC+a8b39cf536-r0/temp/log.do_compile.34028
      ERROR: Task (/home/ubuntu/pkg/petalinux/2019.2/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 2188 tasks of which 2175 didn’t need to be rerun and 1 failed.

      Summary: 1 task failed:
      /home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile
      Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
      ERROR: Failed to build project
      ubuntu@ubuntu:~/pkg/petalinux/2019.2/snkrddl_blk_0$

      ubuntu@ubuntu:~/pkg/petalinux/2019.2/snkrddl_blk_0$ petalinux-config
      [INFO] generating Kconfig for project
      [INFO] menuconfig project

      *** End of the configuration.
      *** Execute ‘make’ to start the build or try ‘make help’.

      [INFO] sourcing bitbake
      [INFO] generating plnxtool conf
      [INFO] generating meta-plnx-generated layer
      [INFO] generating user layers
      [INFO] generating workspace directory
      [INFO] generating machine configuration
      [INFO] generating bbappends for project . This may take time !
      [INFO] generating u-boot configuration files
      [INFO] generating kernel configuration files
      [INFO] generating kconfig for Rootfs
      [INFO] silentconfig rootfs
      [INFO] generating petalinux-user-image.bb
      [INFO] successfully configured project

      ubuntu@ubuntu:~/pkg/petalinux/2019.2/snkrddl_blk_0$ petalinux-config -c kernel
      [INFO] generating Kconfig for project
      [INFO] sourcing bitbake
      [INFO] generating plnxtool conf
      [INFO] generating meta-plnx-generated layer
      [INFO] generating user layers
      [INFO] generating workspace directory
      [INFO] generating machine configuration
      [INFO] configuring: kernel
      [INFO] generating kernel configuration files
      [INFO] Specified component linux-xlnx already exists in workspace, Using the same…
      [INFO] devtool menuconfig -a linux-xlnx
      NOTE: Starting bitbake server…
      Loading cache: 100% |################################################################################################| Time: 0:00:00
      Loaded 3979 entries from dependency cache.
      Parsing recipes: 100% |##############################################################################################| Time: 0:00:04
      Parsing of 2893 .bb files complete (2887 cached, 6 parsed). 3980 targets, 169 skipped, 0 masked, 0 errors.
      NOTE: Launching menuconfig
      Loading cache: 100% |################################################################################################| Time: 0:00:07
      Loaded 3978 entries from dependency cache.
      Parsing recipes: 100% |##############################################################################################| Time: 0:00:04
      Parsing of 2893 .bb files complete (2891 cached, 2 parsed). 3980 targets, 169 skipped, 0 masked, 0 errors.
      NOTE: Resolving any missing task queue dependencies
      Initialising tasks: 100% |###########################################################################################| Time: 0:00:00
      Checking sstate mirror object availability: 100% |###################################################################| Time: 0:00:00
      Sstate summary: Wanted 4 Found 0 Missed 8 Current 44 (0% match, 91% complete)
      NOTE: Executing SetScene Tasks
      NOTE: Executing RunQueue Tasks
      ERROR: linux-xlnx-4.19-xilinx-v2019.2+git999-r0 do_menuconfig: Unable to spawn terminal auto: Execution of ‘/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/scripts/oe-gnome-terminal-phonehome /tmp/tmphfurn3sn /home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.2+git999-r0/temp/run.do_terminal.30269’ failed with exit code 1:
      Traceback (most recent call last):
      File “/usr/bin/gnome-terminal”, line 9, in <module>
      from gi.repository import GLib, Gio
      ModuleNotFoundError: No module named ‘gi’

      ERROR: linux-xlnx-4.19-xilinx-v2019.2+git999-r0 do_menuconfig: Function failed: do_menuconfig
      ERROR: Logfile of failure stored in: /home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.2+git999-r0/temp/log.do_menuconfig.30269
      ERROR: Task (/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.2.bb:do_menuconfig) failed with exit code ‘1’
      NOTE: Tasks Summary: Attempted 365 tasks of which 364 didn’t need to be rerun and 1 failed.

      Summary: 1 task failed:
      /home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.2.bb:do_menuconfig
      Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
      Traceback (most recent call last):
      File “/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/scripts/devtool”, line 347, in <module>
      ret = main()
      File “/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/scripts/devtool”, line 334, in main
      ret = args.func(args, config, basepath, workspace)
      File “/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/scripts/lib/devtool/menuconfig.py”, line 78, in menuconfig
      exec_build_env_command(config.init_path, basepath, ‘bitbake -c menuconfig %s’ % pn, watch=True)
      File “/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/scripts/lib/devtool/__init__.py”, line 57, in exec_build_env_command
      return exec_watch(‘%s%s’ % (init_prefix, cmd), **options)
      File “/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/scripts/lib/devtool/__init__.py”, line 83, in exec_watch
      raise bb.process.ExecutionError(cmd, process.returncode, buf, None)
      bb.process.ExecutionError: Execution of ‘script -e -q -c “bitbake -c menuconfig linux-xlnx” /dev/null’ failed with exit code 1:
      Loading cache: 100% |################################################################################################| Time: 0:00:07
      Loaded 3978 entries from dependency cache.
      Parsing recipes: 100% |##############################################################################################| Time: 0:00:04
      Parsing of 2893 .bb files complete (2891 cached, 2 parsed). 3980 targets, 169 skipped, 0 masked, 0 errors.
      NOTE: Resolving any missing task queue dependencies
      Initialising tasks: 100% |###########################################################################################| Time: 0:00:00
      Checking sstate mirror object availability: 100% |###################################################################| Time: 0:00:00
      Sstate summary: Wanted 4 Found 0 Missed 8 Current 44 (0% match, 91% complete)
      NOTE: Executing SetScene Tasks
      NOTE: Executing RunQueue Tasks
      ERROR: linux-xlnx-4.19-xilinx-v2019.2+git999-r0 do_menuconfig: Unable to spawn terminal auto: Execution of ‘/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/core/scripts/oe-gnome-terminal-phonehome /tmp/tmphfurn3sn /home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.2+git999-r0/temp/run.do_terminal.30269’ failed with exit code 1:
      Traceback (most recent call last):
      File “/usr/bin/gnome-terminal”, line 9, in <module>
      from gi.repository import GLib, Gio
      ModuleNotFoundError: No module named ‘gi’

      ERROR: linux-xlnx-4.19-xilinx-v2019.2+git999-r0 do_menuconfig: Function failed: do_menuconfig
      ERROR: Logfile of failure stored in: /home/ubuntu/pkg/petalinux/2019.2/snkrddl_blk_0/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.2+git999-r0/temp/log.do_menuconfig.30269
      ERROR: Task (/home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.2.bb:do_menuconfig) failed with exit code ‘1’
      NOTE: Tasks Summary: Attempted 365 tasks of which 364 didn’t need to be rerun and 1 failed.

      Summary: 1 task failed:
      /home/ubuntu/pkg/petalinux/2019.2/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.2.bb:do_menuconfig
      Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

      ERROR: Failed to config kernel.

       

       

    • jeff2148
      Participant
      Post count: 3

      It is solved by the device tree updates.

      /include/ “system-conf.dtsi” / {
      aliases{
      eth0 = &gem0;
      eth1 = &gem1;
      };
      };
      &gem0{
      phy-handle = <&eth0>;
      phy-mode = “rgmii-id”;
      status = “okay”;
      gmii2rgmii-phy-handle = <&gmii_to_rgmii_0>;
      ps7_ethernet_0_mdio: mdio{
      #address-cells = <1>;
      #size-cells = <0>;
      eth0: phy@0 {
      device_type=”ethernet-phy”;
      phy-mode = “rgmii-id”;
      xlnx,phy-type = <0x5>;
      reg = <0>;
      };
      gmii_to_rgmii_0: gmii_to_rgmii_0@0 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      phy-handle = <&eth0>;
      reg = <0>;
      };
      };
      };

      &gem1{
      phy-handle = <&eth1>;
      phy-mode = “rgmii-id”;
      status = “okay”;
      gmii2rgmii-phy-handle = <&gmii_to_rgmii_1>;
      ps7_ethernet_1_mdio: mdio{
      #address-cells = <1>;
      #size-cells = <0>;
      eth1: phy@0 {
      device_type=”ethernet-phy”;
      phy-mode = “rgmii-id”;
      xlnx,phy-type = <0x5>;
      reg = <0>;
      };
      gmii_to_rgmii_1: gmii_to_rgmii_1@0 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      phy-handle = <&eth1>;
      reg = <1>;
      };
      };

Viewing 1 reply thread
  • You must be logged in to reply to this topic.