element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Using Xilinx Tools Forum PetaLinux 15.4 and MicroZed BSP
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 5 replies
  • Subscribers 336 subscribers
  • Views 649 views
  • Users 0 members are here
Related

PetaLinux 15.4 and MicroZed BSP

Former Member
Former Member over 9 years ago

Hi,

I'm trying to build with petalinux 15.4 and your bsp file (from http://microzed.org/support/design/1519/10).
I'm getting the build error:
[ERROR] ERROR (phandle_references): Reference to non-existent node or label "usb_phy0"

It only happens if I run "petalinux-config".
This sequence works:
$ petalinux-create -t project -s mz_7010_2015_4.bsp
$ cd mz_7010_2015_4/
$ make

This sequence doesn't work:
$ petalinux-create -t project -s mz_7010_2015_4.bsp
$ cd mz_7010_2015_4/
$ petalinux-config
$ make

Note that I do not change any configuration, I only open the petalinux-config tool and close it again.

As side note: doing a config of rootfs works
$ petalinux-config -c rootfs

I run petalinux on a virtualbox with ubuntu 14.04.

Best regards
/Fredrik


Full terminal log:
==================

fredrik@ubuntu144:~/petalinux$ petalinux-create -t project -s mz_7010_2015_4.bsp
INFO: Create project:
INFO: Projects:
INFO:     * mz_7010_2015_4
INFO: has been successfully installed to /home/fredrik/petalinux/
INFO: New project successfully created in /home/fredrik/petalinux/
fredrik@ubuntu144:~/petalinux$ cd mz_7010_2015_4/
fredrik@ubuntu144:~/petalinux/mz_7010_2015_4$ petalinux-config
INFO: Checking component...
INFO: Config linux

****** hsi v2015.4 (64-bit)
  **** SW Build 1412921 on Wed Nov 18 09:44:32 MST 2015
    ** Copyright 1986-2015 Xilinx, Inc. All Rights Reserved.

source /home/fredrik/petalinux/mz_7010_2015_4/build/linux/hw-description/hw-description.tcl -notrace
INFO: [Common 17-206] Exiting hsi at Mon Jul 11 14:30:44 2016...
[INFO ] config linux


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

[INFO ] generate DTS to /home/fredrik/petalinux/mz_7010_2015_4/subsystems/linux/configs/device-tree
INFO: [Hsi 55-1698] elapsed time for repository loading 1 seconds
WARNING: ps7_ethernet_0: No reset found
INFO: [Common 17-206] Exiting hsi at Mon Jul 11 14:31:07 2016...
[INFO ] generate BSP for zynq_fsbl
INFO: [Hsi 55-1698] elapsed time for repository loading 0 seconds
INFO: [Common 17-206] Exiting hsi at Mon Jul 11 14:31:50 2016...
INFO: Config linux/kernel
[INFO ] oldconfig linux/kernel
INFO: Config linux/rootfs
[INFO ] oldconfig linux/rootfs
INFO: Config linux/u-boot
[INFO ] generate linux/u-boot configuration files
[INFO ] generate linux/u-boot board header files
INFO: [Hsi 55-1698] elapsed time for repository loading 0 seconds
INFO: [Common 17-206] Exiting hsi at Mon Jul 11 14:32:11 2016...
[INFO ] oldconfig linux/u-boot
fredrik@ubuntu144:~/petalinux/mz_7010_2015_4$ make
petalinux-build
INFO: Checking component...
INFO: Generating make files and build linux
INFO: Generating make files for the subcomponents of linux
INFO: Building linux
[INFO ] pre-build linux/rootfs/fwupgrade
[INFO ] pre-build linux/rootfs/gpio-demo
[INFO ] pre-build linux/rootfs/httpd_content
[INFO ] pre-build linux/rootfs/iperf3
[INFO ] pre-build linux/rootfs/peekpoke
[INFO ] pre-build linux/rootfs/weaved
[INFO ] build system.dtb
[ERROR] ERROR (phandle_references): Reference to non-existent node or label "usb_phy0"
[ERROR] ERROR: Input tree has errors, aborting (use -f to force output)
[ERROR] make[2]: *** [system.dtb] Error 255
[ERROR] make[1]: *** [sub_build_component_/none/device-tree/single/device-tree-generator] Error 2
ERROR: Failed to build linux
make: *** [linux] Error 255
fredrik@ubuntu144:~/petalinux/mz_7010_2015_4$
 

  • Sign in to reply
  • Cancel
  • zedhed
    0 zedhed over 9 years ago

    Hi fredrik,

    Looking at your console output, it looks like PetaLinux is re-running device tree generation which is likely overwriting system-conf.dtsi or system-top.dts or BOTH.

    In 2015.4, we needed to add the following entries to the device tree in the respective files in order to get USB host mode working:


    In the system-top.dts file:

    &usb0 {t
    tstatus = "okay";
    tdr_mode = "host";
    tusb-phy = <&usb_phy0>;
    } ;

    In the system-conf.dtsi file:

    usb_phy0:phy0 {
    ttcompatible="ulpi-phy";
    tt#phy-cells = <0>;
    ttreg = <0xe0002000 0x1000>;
    ttview-port = <0x0170>;
    ttdrv-vbus;
    t};

    Can you take a look at either of those files and see if one or both of the entries above is missing after running petalinux-config?

    If you do not need to use USB mode, you can simply remove these entries from your device tree files in the folder subsystems/linux/configs/device-tree/ folder within your PetaLinux project folder.

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago

    Thank for your quick response.

    It is system-conf.dtsi that gets changed by petalinux-config.

    The changed part is:
    Before config:
    / {
        model = "picozed_2015_4";
        aliases {
            serial0 = &uart1;
            ethernet0 = &gem0;
            spi0 = &qspi;
        };
        chosen {
            bootargs = "console=ttyPS0,115200 earlyprintk";
        };
        memory {
            device_type = "memory";
            reg = <0x0 0x40000000>;
        };
            
        usb_phy0:phy0 {
            compatible="ulpi-phy";
            #phy-cells = <0>;
            reg = <0xe0002000 0x1000>;
            view-port = <0x0170>;
            drv-vbus;
        };
    };

    After config:
    / {
        model = "mz_7010_2015_4";
        aliases {
            serial0 = &uart1;
            ethernet0 = &gem0;
            spi0 = &qspi;
        };
        chosen {
            bootargs = "console=ttyPS0,115200 earlyprintk";
        };
        memory {
            device_type = "memory";
            reg = <0x0 0x40000000>;
        };
    };

    Do you have any suggestion how to fix this? I do need the USB functionality.

    Best regards
    /Fredrik
     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • zedhed
    0 zedhed over 9 years ago

    Hi Fredrik,

    That question is actually for you to decide.  If you don't need USB for your end application, it is fine to leave it out for now.

    If you do decide to leave it out, then remove the following lines from the system-top.dts file:

    &usb0 {
    status = "okay";
    dr_mode = "host";
    usb-phy = ;
    } ;

    That way you can eliminate the USB worries altogether.  If you decide later that you need USB, then add those sections described in my first post to the respective device tree sections before rebuilding.

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to zedhed

    (I don't know what happened to my previous comment/reply, so I'll try again.)

    Thanks for your replies.

    I diffed the device-tree files and it's system-conf.dtsi that changes during petalinux-config.
    It goes from:
    / {
        model = "picozed_2015_4";
        aliases {
            serial0 = &uart1;
            ethernet0 = &gem0;
            spi0 = &qspi;
        };
        chosen {
            bootargs = "console=ttyPS0,115200 earlyprintk";
        };
        memory {
            device_type = "memory";
            reg = <0x0 0x40000000>;
        };
            
        usb_phy0:phy0 {
            compatible="ulpi-phy";
            #phy-cells = <0>;
            reg = <0xe0002000 0x1000>;
            view-port = <0x0170>;
            drv-vbus;
        };
    };

    To:
    / {
        model = "mz_7010_2015_4";
        aliases {
            serial0 = &uart1;
            ethernet0 = &gem0;
            spi0 = &qspi;
        };
        chosen {
            bootargs = "console=ttyPS0,115200 earlyprintk";
        };
        memory {
            device_type = "memory";
            reg = <0x0 0x40000000>;
        };
    };

    I do need the USB functionality. So I tried re-adding the original part with usb_phy0:phy0{..} and now petalinux-build runs ok again.

    (While this is an acceptable work-around, I would've been nicer if I could rerun petalinux-config without manually patching afterwards.)

    Thanks and best regards
    Fredrik
     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to zedhed

    Hi,

     

    I'm having a similar issue, but adding the usb_phy0: phy0 block to my system-conf.dtsi is causing a syntax error.

    Any help would be greatly appreciated.

    -Dan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube