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!

Reply

building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

Highlighted
Scholar
Posts: 1,339
Registered: ‎10-10-2014

building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

[ Edited ]

I found (so far) 3 ways to build/run linux on Zynq / Zynq US+ devices (not sure if the list is complete though) :

 

1) http://www.wiki.xilinx.com/Zynq+Linux

-> 'classic / manual' way of building linux components using make/bitbake on the command line (FSBL, U-Boot, Kernel, root fs, ...) 

 

2) http://www.wiki.xilinx.com/PetaLinux

-> seems to be the Xilinx preferred way (?)

 

3) http://www.wiki.xilinx.com/Yocto

-> similar to Petalinux, but for advanced use (?). Only recently starts to appear in Xilinx doc (UG1228)

 

 

UG1228 talks about Petalinux and Yocto, however it does not mention method 1 ... while method 1 is covered by many Xilinx wiki pages...  so why doesn't UG1228 (while being a methodology guide) not mention method 1 / these wiki pages? 

 

I'm having difficulty deciding which of the 3 flows to choose, to see the pro's and con's of each method, I should probably try them all 3, and then decide. However my time is limited, so any guidance / high-level views would help here!

 

-> i.e. will the Petalinux flow disappear in the future, and be 'taken over' by Yocto?

-> why would anyone use method 1, as Petalinux automates so many things?

-> how about version control -> I want to store my 'customisations' to a complete build (FSBL, U-BOOT, kernel, dtsi, extra drivers, menuconfig, ...) in git, and from there recreate everything using a simple script -> which method integrates well with git?

...

 

** kudo if the answer was helpfull. Accept as solution if your question is answered **
Xilinx Employee
Posts: 103
Registered: ‎02-07-2018

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

HI @ronnywebers

 

You can follow this link for manual way of building the code : http://www.wiki.xilinx.com/ZCU102+Image+creation+in+OSL+flow

 

for your info Petalinux flow will not disappear in future.

You can use git for tracking your local changes.

 

Thanks & regards

Aravind

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

 

Scholar
Posts: 1,339
Registered: ‎10-10-2014

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

thanks @aravindb, if I may :

 

1) what would be the advantage of Petalinux over the 'manual' flow?

2) in the manual flow, how would you version control many different projects?  Let me give a specific example:

 

on the very interesting link you shared, take the 'build device tree' part : the repo is cloned and checked out at 'xilinx-v2017.4'

 

then there's a manual modification of the gem3 node in my_dts/system-top.dts

 

now once the file is manually edited, I want only to keep track of the difference that I made on the  git repo, and not track the entire clone of the 'device-tree-xlnx' in my git repo. Now I cannot simply '.gitignore' the folder 'device-tree-xlnx', because the system-top.dts is inside that folder somewhere

 

So I'm puzzled on how to do this : should I keep a copy of the (edited)  systemt-top.dts file, and then using a script :

1) clone my repo from my own server - this repo only contains the edited 'system-top.dts'

2) clone the 'device-tree-xlnx repo'

3) checkout at xilinx-v2017.4'

4) copy & overwrite the system-top.dts with my edited version?

 

is that a / the way of working?

 

the same would then go for all other edits : extra drivers, .menuconfig edits, ... 

** kudo if the answer was helpfull. Accept as solution if your question is answered **
Scholar
Posts: 1,339
Registered: ‎10-10-2014

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

[ Edited ]

btw, I'm still wondering what 'OSL flow' means :-)

** kudo if the answer was helpfull. Accept as solution if your question is answered **
Explorer
Posts: 209
Registered: ‎09-14-2016

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

Hi @ronnywebers,

 

I think your post is really interesting !! 

 

I have tested this 3 methods and, so in order to help a little, this is my point of vue:

 

Petalinux is made for people who doesn't need to know all about low-level and in my opinion it's really easy to add custom board 

 

Yocto really interesting ( I use it from many years now) You can modify all you want to bluid the smallest rootfs and tiny kernel !

 

With yocto it's really simple to split your work (with local git/svn server) and externals ( provided by Xilinx, Intel, poky ...).

 

OSL is a good method to learn how works an embedded system, you learn the boot process... It's my prefered method to start a new board. You can can compil/modify the kernel in few command and try the first boot.

 

I'm not sure if my reply is helpful but your question was really really interesting!

 

Cheers,

Trigger.

 

PS: I think OSL is for Open Source Lab (but not sure)

Scholar
Posts: 1,339
Registered: ‎10-10-2014

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

thanks @trigger for sharing that experience!

 

with OSL I have the impression that I better know what is happening, while Petalinux is 'more obscure'. I found it easy to use, but Xilinx would help us when they explained better what is happening under the hood.

 

If I'm correct, Petalinux is a 'stripped' down Yocto (?), where only the elements relevant to Xilinx devices are included. So mabye reading a book about Yocto would help me better understand Petalinux?

** kudo if the answer was helpfull. Accept as solution if your question is answered **
Scholar
Posts: 1,339
Registered: ‎10-10-2014

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

I think I've found what 'OSL' means : Open Source Linux.

 

after Googling a while I found this page : http://xilinx.wikidot.com/osl-drivers

 

** kudo if the answer was helpfull. Accept as solution if your question is answered **
Explorer
Posts: 209
Registered: ‎09-14-2016

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

[ Edited ]

Hi @ronnywebers,

 

In my opinion (it's maybe false) you are right Petalinux is like a wrapper of Yocto.

 

In order to share a little bit more I think it's difficult to use Petalinux with other platform ( i mean not a Xilinx Platform). 

 

 

So mabye reading a book about Yocto would help me better understand Petalinux?

I think the answer is yes!

 

hope that you will enjoy reading the book

Cheers,

Trigger

Moderator
Posts: 1,156
Registered: ‎09-12-2007

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

Yes, I wrote the wiki page as it is useful for custom boards. Petalinux wouldn't be as user friendly for this. The petalinux is for users you just want to create a working linux image without needing to understand what is going on under the hood. Yocto would be more developer friendly as it is easier to patch and would be device agnostic

Ps: OSL is open source linux
Moderator
Posts: 1,156
Registered: ‎09-12-2007

Re: building linux for Zynq : classic linux build vs Petalinux vs Yocto -> how to choose?

I'm not sure what you mean with respect tto the device tree. The system-top.dts is output from the device tree generator