cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
772 Views
Registered: ‎02-21-2020

Petalinux 2020.1 changes

Hi, Can anyone explain the reasoning behind the following changes made in Petalinux 2020.1?

  • Default PetaLinux build images are INITRD based
    • Why was this reversed from INITRAMFS being the default?
  • In earlier releases for Zynq UltraScale+ MPSoC and Zynq devices, petalinux-config → Auto
    Config Settings → kernel autoconfig/u-boot autoconfig would be enabled by default. From
    this release onwards, to support the distro feature by default, kernel autoconfig and u-boot
    autoconfig are disabled. Setting that are enabled as part Linux or U-Boot defconfig is built. If
    you want read the kernel/U-Boot configs from the design (xsa file), enable the above
    configurations.
    • What is the distro feature? Is it documented anywhere?
  • To switch between bitbake and devtool, select petalinux-config → Yocto Settings → Build tool
    • Why would one chose devtool vs using bitbake?

 

Thanks!

 

0 Kudos
8 Replies
Highlighted
Mentor
Mentor
696 Views
Registered: ‎01-28-2008

Great questions, @inve7 

  Can anyone from Xilinx expand on the flimsy content regarding Migration in the ug1144, please? It's honestly aggravating there's one page explaining what has changed from the previous version in such a complex piece of software!

  The guide explains "what" to do to set those options, but no explanation whatsoever "why" those options changed or "when" are they supposed to be used.

 

Thanks in advance for any insight.

-Pat

 

https://tuxengineering.com/blog
Highlighted
652 Views
Registered: ‎02-24-2020

I know the answer to one of these:

To switch between bitbake and devtool, select petalinux-config → Yocto Settings → Build tool

  • Why would one chose devtool vs using bitbake?

"devtool" as the name implies is a development tool used to create, modify and deploy Yocto/Bitbake recipes. It's actually a Yocto feature not a PetaLinux one, but PetaLinux has (finally) provided a way to interact with it. In past releases I have noticed that devtool was being used under the hood by PetaLinux, but there was no way to really use it directly.

So what is devtool good for? Well there's a lot of documentation from the Yocto project on it, but here are a couple of very useful things it can do:

  • Help you create a new recipe
    devtool can easily create new recipe templates for you in your layer. What's nice is you can actually point it to an upstream source (or a tarball) and if it is a common build system, it will try to guess and create the needed structure for you. While you often need to modify it, it can save a lot of time and guessing by providing a nice starting point
  • Modify an existing recipe
    Say for example you want to modify a recipe in your build, like U-Boot. Rather than externally downloading and configuring U-boot, you can do so in the PetaLinux/Yocto project build system. devtool will essentially create a git workspace with the recipe you want to modify, where you can directly build and make changes to it. When you are done, you can either push the changes upstream (if you own the source repo) or it will create a set of patches for you which will then be added to your recipe.

See the PetaLinux guide for Xilinx for steps for the specific PetaLinux commands:

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug1144-petalinux-tools-reference-guide.pdf

https://www.yoctoproject.org/software-item/devtool/

So you wouldn't normally use this for doing full builds, but rather when you are developing or tweaking a specific recipe with source that lies outside your user layer.

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com
Highlighted
Visitor
Visitor
537 Views
Registered: ‎02-21-2020

@ksloatdesignlinx Thanks for the explanation! Sounds like it could be a powerful tool, I'll have to dig into it.

Can any Xilinx employees please comment on the other questions? 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
455 Views
Registered: ‎07-12-2018

"Default PetaLinux build images are INITRD based"
Please see the below explanation why we moved to initrd as default.
Initramfs:
This feature is made up from a cpio archive of files that enables an initial root filesystem and init program to reside in kernel memory cache,
rather than on a ramdisk, as with initrd filesystems.
Bootargs: "earlycon clk_ignore_unused".

Image = kernel + initramfs+dtb(create 2019.1 zcu102 project and check prebuilt “Image” you will know the diff)

image.ub(kernel + initramfs +dtb) is fitimage again contains the same but compressed.

Problem:
1. If the initramfs size increases most of the time kernel will crash.
2.one more point if we want build only rootfs also it will rebuild kernel everytime.



Initrd:
Thi feature requires at least one file system driver be compiled into the kernel. A disk created by Initrd has some fixed size
Bootargs: "earlycon clk_ignore_unused root=/dev/ram rw"

Image = kernel + dtb

image.ub(kernel + initrd +dtb) is fitimage again contains the same but compressed.

Yocto will support initrd not initramfs that is the reason we moved to initrd as default but still user can use initramfs by changing the menuconfig.

"In earlier releases for Zynq UltraScale+ MPSoC and Zynq devices, petalinux-config → Auto
Config Settings → kernel autoconfig/u-boot autoconfig would be enabled by default. From
this release onwards, to support the distro feature by default, kernel autoconfig and u-boot
autoconfig are disabled. Setting that are enabled as part Linux or U-Boot defconfig is built. If
you want read the kernel/U-Boot configs from the design (xsa file), enable the above configurations."

Yes, we disabled the u-boot and kernel auto configs(generating configs from design) in this release to move to distro boot, we made this decision.
Distro Boot is an attempt to standardize a way for distributions to boot in a board-agnostic manner.
Example: If we take zynqmp we will have zcu102, zcu106, zcu111 and zcu104 etc...
the same u-boot def config should work for all the zynqmp platforms.
so the same set of u-boot and linux should work across all zynqmp boards. If we derive the configs from the design then distro boot wont work.

Highlighted
Mentor
Mentor
424 Views
Registered: ‎01-28-2008

Hi @varalaxm and welcome to the forums!

  Appreciate the details about moving to initrd from initramfs, and the change to distro boot.

  The distro boot move makes sense but is not documented anywhere, afaict. Could you provide some pointer where this is explained in more detail? As a custom platform designer, I need some guidance how to create a "distro", in a similar way the Xilinx devel boards have their own.

  For example, I see the ZCU102 platform creates files and configurations but it's not clear where these details come from. For instance, the recipes-bsp/u-boot/files/bsp.cfg comes from somewhere in Petalinux. In a similar way, the tmp/work/zcu102_zynqmp-xilinx-linux is populated. Is there a file that has all this configuration/git repos/etc. and is used to get it all?

  In other words, how can a developer get instructions and details on how to create a custom distro? In my opinion, Petalinux is wonderful until something breaks (and boy it does!). More documentation would help us developers get under the hood and work our way out.

 

Thanks in advance for any insight,

-Pat

 

https://tuxengineering.com/blog
Highlighted
Visitor
Visitor
415 Views
Registered: ‎02-21-2020

Thank @varalaxm for the explanations. They're definitely helpful

> Distro boot

I made another post with questions about the proper way to use distro boot with QSPI (I have a custom board where I use QSPI as the boot flash). Could you please read that post and offer your suggestions? Thanks!

https://forums.xilinx.com/t5/Embedded-Linux/U-boot-boot-scr-script-with-QSPI/m-p/1139815

 

> Yocto will support initrd not initramfs that is the reason we moved to initrd as default

Does this mean Yocto is removing support for initramfs? Could you point to any Yocto documentation that talks about this?

 


0 Kudos
Highlighted
Visitor
Visitor
413 Views
Registered: ‎02-21-2020

Hi @patocarr ....I did some more research myself into distro boot, and it seems to have nothing to do with Xilinx's BSPs. It's a feature of u-boot to more "automatically" boot the kernel in a way that's more agnostic to the board being used. You'll probably find these links helpful:

https://gitlab.denx.de/u-boot/u-boot/blob/master/doc/README.distro

https://developer.toradex.com/knowledge-base/distro-boot-linux

Highlighted
Mentor
Mentor
389 Views
Registered: ‎01-28-2008

Hi @inve7 

  Thanks for the pointers! I see that Xilinx have very recently added Using Distro Boot to the wiki. Looks promising!

 

Best regards,

-Pat

 

https://tuxengineering.com/blog
0 Kudos