UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
9,055 Views
Registered: ‎09-28-2016

what's the advantages of petalinux or Yocto?

Jump to solution

Hi,all

 

I am a newbie , I found some guys use yocto and others guys use petalinux in this forum, what's the advantages of petalinux or yocto?

 

Thanks in advance

 

Tom

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
14,859 Views
Registered: ‎11-22-2015

Re: what's the advantages of petalinux or Yocto?

Jump to solution
 

  As mentioned, Yocto is huge and takes a while to build but you could eliminate what you don't need.  It's nice since you can build everything from scratch and there are recipes for most packages you may want.

  Petalinux is just to hard to customize and there are to many hidden things.

 

  And the other option, which is what I do, is just a homebrew.  I wrote a shell script which uses a config file that I manage with menuconfig(like the kernel) and it know how to build everything things like the FSBL and boot.bin.  Depending on how functional you want your script this may take some time; however,  I can do exactly what I want with my builds.

 

jeff

View solution in original post

0 Kudos
7 Replies
Observer julian3
Observer
9,029 Views
Registered: ‎07-14-2016

Re: what's the advantages of petalinux or Yocto?

Jump to solution

As far as I understand, there are three common ways to build Linux for Zynq7 in 2016:

  1. Using Petalinux (an interface to gcc toolchain for xilinx-linux)
  2. Using Poky/Bitbake/Openembedded (an interface to gcc toolchain for yocto)
  3. Using Xilinx SDK

Poky takes two or three hours to build Linux depending on your system (I built in 20 minutes on an AWS EC2 instance), but it seems somewhat more customizable through the use of bbappend files. Petalinux will build inside 15 minutes even on my computer at home, but customization is a bear. I am currently frustrated with why my Zybo USB port doesn't work with Petalinux. I've not had a successful Linux build with Xilinx SDK yet, though the standalone Hello World application is fairly straightforward.

Petalinux is a good starting point IMHO. Takes forever to download and install, but it's hard to break the instructions in UG1144.

 

Anyways I'll get back to you on which is the best when I've completed a satisfactory build :p

Explorer
Explorer
14,860 Views
Registered: ‎11-22-2015

Re: what's the advantages of petalinux or Yocto?

Jump to solution
 

  As mentioned, Yocto is huge and takes a while to build but you could eliminate what you don't need.  It's nice since you can build everything from scratch and there are recipes for most packages you may want.

  Petalinux is just to hard to customize and there are to many hidden things.

 

  And the other option, which is what I do, is just a homebrew.  I wrote a shell script which uses a config file that I manage with menuconfig(like the kernel) and it know how to build everything things like the FSBL and boot.bin.  Depending on how functional you want your script this may take some time; however,  I can do exactly what I want with my builds.

 

jeff

View solution in original post

0 Kudos
Adventurer
Adventurer
8,930 Views
Registered: ‎12-03-2015

Re: what's the advantages of petalinux or Yocto?

Jump to solution

There is another option (there always is!). I use petalinux to configure and build the image and boot files, but all of my applications and libraries are built seperately. My code repo is setup with CMake to cross compile using the arm-xilinx-linux-gnueabi toolchain. I have a script that compiles and then copies everything into the components directories in petalinux. It works well if you don't need a lot of customization of the kernel, u-boot, etc.

 

Ron

0 Kudos
Adventurer
Adventurer
8,834 Views
Registered: ‎11-27-2010

Re: what's the advantages of petalinux or Yocto?

Jump to solution

To discussing folks ===========================

 

http://www.xfest2014.com/forum/what-flavor-linux-xilinx-distribution

 

This link says "Yocto is also not a distribution, it is a build system specifically for building/maintaining embedded Linux systems"

 

from above link {{ Petalinux = Xilinx linux [fork of embedded linux kernel] + Yocto like build system }} 

 

what do you mean by "Petalinux is just to hard to customize and there are to many hidden things". can you please detail it.

 

when in understanding its the xilinx flavour of linux kernel + yocto build system. 

 

=========================================================

to Xilinx folks,

                     by providing 2 flavours of linux, its a big confusion, unless someone does his study on it.

             1. Being experts at it, can you detail which one to choose and why?

              2. ease of patches, drivers support

              3. going further, is there any chance of discontinuing petalinux or Yocto effort?

 

Thanks

RC Reddy

 

0 Kudos
Highlighted
Observer semp
Observer
8,783 Views
Registered: ‎04-29-2013

Re: what's the advantages of petalinux or Yocto?

Jump to solution

Yes, both Yocto & PetaLinux are Linux build systems.  PetaLinux is specific to Xilinx, while Yocto is a generic build system for any embedded Linux target.

 

Both also include a distribution, in the context of an embedded Linux distribution.  The default Yocto distribution is Poky, while the PetaLinux distribution is simply also called PetaLinux.  In this context, distribution is mostly referring to the contents of the root file system.

 

Now for Xilinx products, PetaLinux can be thought of as sort of Yocto "wrapper".  That is, Yocto is the underlying, low-level, high-complexity build system.  PetaLinux is the simplified and abstracted version of essentially the same build process.

 

So, for example, you can use Yocto to build the PetaLinux-distribution.  It's just that building it with the PetaLinux-tool is much easier and more streamlined for Xilinx products.  But like any abstraction/wrapper, the PetaLinux tool provides simplicity at the cost of reduced flexibility.

 

Additionally, if somebody is finding it too difficult to customize the PetaLinux-distro using the PetaLinux-tool, then they're probably trying to get at things that the wrapper was designed to abstract!  But that's okay.  If that happens too much then consider yourself as graduating to the next level of embedded Linux build systems.  That is, lift off the wrapper and get your hands dirty with the underlying nuts & bolts (i.e. Yocto).  And this transition is fully supported by Xilinx.  That is, Xilinx provides the appropriate Yocto meta-layers to build the PetaLinux-distro (rather than the default Poky distro) with Yocto.

 

Also note that whether you use the PetaLinux-tool or Yocto, you can build the _same_ Linux kernel.  So the choice of tool is irrelevant with respect to kernel and distro.  Both build systems can build the same thing.  

 

 

So which to use?  The best person to answer this is yourself!  You know your own skills and system best.  If you're already very comfortable with Linux build concepts or if the system you're building requires a lot of customization not supported through the 'wrapper', then there's a good chance you'll want to use Yocto.  But if you're a Linux newbie and creating a relatively simple Linux system, PetaLinux will probably be your best bet.  Or, as somebody already mentioned, maybe even a mix of both worlds.

 

Hope that helps.

 

Adventurer
Adventurer
8,767 Views
Registered: ‎11-27-2010

Re: what's the advantages of petalinux or Yocto?

Jump to solution

good excellent statements,

                       going yocto 

 

Thanks

0 Kudos
Scholar wzab
Scholar
8,744 Views
Registered: ‎08-24-2011

Re: what's the advantages of petalinux or Yocto?

Jump to solution

Hi,

 

Just to make things, more complicated...

I prefer Buildroot instead of both Petalinux and Yocto.

However, last time, when developing for ZCU102 board I was forced to switch to Petalinux.

Buildroot didn't support secure boot, and I had no time to clean it up.

 

Regards,

Wojtek

0 Kudos