09-17-2018 02:35 AM - edited 09-17-2018 02:37 AM
I found (so far) 3 ways to build/run linux on Zynq / Zynq US+ devices (not sure if the list is complete though) :
-> 'classic / manual' way of building linux components using make/bitbake on the command line (FSBL, U-Boot, Kernel, root fs, ...)
-> seems to be the Xilinx preferred way (?)
-> 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?
09-17-2018 03:29 AM
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
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.
09-17-2018 05:31 AM
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, ...
09-17-2018 05:32 AM - edited 09-17-2018 05:32 AM
btw, I'm still wondering what 'OSL flow' means :-)
09-18-2018 12:44 AM
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!
PS: I think OSL is for Open Source Lab (but not sure)
09-18-2018 12:52 AM
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?
09-18-2018 01:05 AM
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
09-18-2018 01:15 AM - edited 09-18-2018 01:39 AM
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!
I hope that you will enjoy reading the book
09-18-2018 07:16 AM
09-18-2018 07:19 AM
09-18-2018 07:21 AM
09-19-2018 01:30 AM
thanks a lot @stephenm, my ZCU102 just arrived :-)
could you explain in a few phrases why one would use Yocto over Petalinux? It's that kind of 'birds-eye' view that I'm looking for in this post.
I'll go through the Yocto flow over the next weeks!
09-19-2018 02:31 AM
If you are using a Xilinx development board such as the ZCU102, then I would recommend that you use the Petalinux as this will have the BSP that you can use to easily build a Linux Image for your board. The BSP will be board aware, so the PHY, I2C ext that are external to the chip will be added to the devicetree (you would have to do this manually in Yocto). Once you are more confident with the Linux flow, I would recommending using Yocto. However, I would only use the Yocto if I was developing on a custom board.
09-19-2018 03:28 AM - edited 09-19-2018 03:31 AM
thanks @stephenm, that's clear to me regarding petalinux vs Yocto, except :
Q1) can I add my own custom board to Petalinux (instead of needing to use Yocto?). Now I edit the .dtsi file in Petalinux to add my board specific stuff, but maybe I can create/add my own bsp to Petalinux?
Q2) to close this topic : how would one decide between 'OSL' instead of petalinux/Yocto? I can see many Xilinx wiki pages that use the 'OSL' flow, but there's no mention at all in the Embedded methodology guide (only Petalinux/Yocto are mentioned)
09-19-2018 04:03 AM
If you are using a custom board, you would have custom uboot files:
You could clone the u-boot-xlnx, checkout the matching version in Petalinux, make your changes, and create a patch
git diff Xilinx-v2018.2 > 0001_add_custom_board.patch
Then add this patch to the uboot recipe. See the wiki below for patching uboot in Petalinux:
Note: if you are just changing the zcu102 config, then you can do this in the platform-top.h file in the uboot recipe, and not need to patch the u-boot.
You would use the defconfig in the petalinux-config under the uboot config.
For the devicetree, you would update the system-user.dtsi in Petalinux Project.
For Linux, you can update the bsp.cfg with your custom config options in the recipe-kerne (which you would need to create)
For Linux, you can update the
10-24-2018 03:29 AM