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 Modifying the Petalinux Yocto recipe
  • 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 Not Answered
  • Replies 8 replies
  • Subscribers 336 subscribers
  • Views 2522 views
  • Users 0 members are here
Related

Modifying the Petalinux Yocto recipe

Former Member
Former Member over 11 years ago

I would like to build a rootfs containing a bit more utilities, for example, a compiler and package manager.  Ideally I would like to load many support libraries to make the resulting image a bit more turn-key for my environment.  The default petalinux-configure for rootfs results in almost nothing installed even when development libraries are included.  For example, it seems to include libraries for apt-get/dpkg, but does not include the actual binary applications.

When I build the system, I simply used petalinux-build, no options, to build all components including the rootfs.  Could that be the reason why dpkg, etc., are not being installed on the rootfs too?

Consequently, does anyone know where the Yocto recipe is for the petalinux-* tools?  That might be of more utility.

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Try the command:

    petalinux-config -c rootfs

    And see if the options there are sufficient for your needs.   As for loading a compiler, etc, I think you will have to do that by connecting to the Internet and installing packages in the usual way one does in a Linux system.

    Ron

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

    Right - petalinux-config is what I meant to say.  But as I said, it doesn't fit the bill since the options don't seem to provide you with a way to add more to the recipe.  At best you can get things like libusb1.0 (handy, but I need a compiler).

    The usual way one would get packages onto a Linux system is the package manager.  The petalinux-build utility doesn't seem to provide a way to put a package manager into the rootfs, though it does seem to include libraries for it in the resulting rootfs.

    So those are the two issues I'm trying to resolve, really.  On the one hand, I have no options that help me add elements using petalinux-config.  That's why I would like to find the recipe they're using for Yocto and modify it (if that's even a viable option) to get the packages I need.

    The second issue is that somehow I get libraries for package management but no executables.  This leads me to believe something is wrong, but I have no way to confirm.  Have you tried using Petalinux?  When you type dpkg or apt-get, does it tell you the commands don't exist?

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

    Hi btgoodwin,

    Which target platform are you using MicroZed or ZedBoard?

    I think we tend to see two general flavors of Linux users our there: embedded (PetaLinux, Yocto) and distribution (Ubuntu).  Based upon what you describe above, it sounds like your are intending to use your Zed system as a development platform of some sort so that you can natively download, compile, and install applications directly on your Zed platform.  To me this lends itself more to the distribution Linux end of the spectrum.

    Have you considered the "Ubuntu Desktop Linux" tutorial on the ZedBoard reference designs page (http://www.microzed.org/support/design/1521/11) or the "Display Panel Ubuntu Tutorial for MicroZed I/O Carrier Card" from the 7-inch Zed Touch Display Kit reference designs page (http://www.microzed.org/support/design/1668/13) for what you are doing?  Each of these reference designs leverages Linaro Ubuntu distribution so you get apt-get and gcc as part of the rootfs automatically so that you can build applications natively.

    I think that you will find less resistance in going the Ubuntu route rather than forcing an embedded Linux flavor to do something that it was not really designed to do which is to be targeted, pre-complied, and as streamlined as possible.

    Regards,

    -Kevin

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

    Thanks for the comments Kevin.  And I agree 100% with you, but unfortunately I'm not the one making the decisions.

    The aim is to have PetaLinux since, as a workflow, it includes the necessary utilities to support development from Xilinx's tools which is what the team wants for some of our applications.  But one of the major sets of functionality we need requires many (many) libraries to be installed before it can be compiled. 

    We have had no luck using the cross-compiling toolchain to build many of those libraries, so that route is sort-of dead in the water.  That left us with cross-compiling a compiler and installing that...then compiling everything natively on the ARM.  That experience looks like a maintenance nightmare and takes many hours.

    I've had limited success with taking the petalinux targetroot's apt and dpkg for a ride using modified configuration files so that rather than pulling from the local Xilinx pool, it uses the default repos for wheezy.  The result *looks* convincingly like it's able to load packages to the targetroot, but the reality seems to be that files are not being installed. 

    Hopefully I'm just down to some arguments on apt to finish this attempt at bootstrapping the rootfs.

    - Thomas

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

    Hi btgoodwin,
    my problem is similar, because I need to have gcc on Petalinux to execute OpenMp libraries.
    Have you solved with "cross-compile of a compile"?
    Thank you.

    Giacomo

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

    Sadly, no.  Ultimately we had to go through a process of split installation.  First we generated the petalinux filesystem for the part of our team interested in using OpenCPI, and then we had to cross-compile GCC, Make, Autoconf, etc. to seed the filesystem with enough build tools to natively compile the rest of the system.

    The big hoop to all of this is how to deal with the default volatile filesystem.  Ultimately we modified the u-boot parameters to drop the volatile one and use only our non-volatile copy from a separate partition.  This was only part of the battle though since those aforementioned tools must have the filesystem path compiled into them.

    To hack around this, we re-mounted the root file system onto itself in the same location as found on the host system.  For example, if the host found the root file system at /media/rootfs, then on the native system we also added an fstab entry for the same.  This allowed all these baked-in paths to gel once we went to the native compiling.

    It's not a good solution, nor a pretty one.  But it worked in lieu of finding others in the mean time.

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

    I know it's been a while, but maybe this could be useful to you or others.
    There is a nice version of the Clang compiler that works great on Petalinux/Yocto systems. Go to:
    thttp://ellcc.org/releases/
    and click on:
    tellcc-arm-linux-engeabi-0.1.8.tgz
    Untar this to your system, and you can then build C and C++ applications using ellcc/bin/ecc. This in many ways is better than gcc. The gdb debugger is called ecc-gdb. For more info on the Clang compiler, have a look at clang.llvm.org or clang.org.

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

    hi,

    how to cross-compile GCC, Make, Autoconf, etc. before using petalinux?

    regards

    • 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