Adding a Package Group - 2023.2 English

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2023-10-18
Version
2023.2 English

One of the best approaches for customizing images is to create a custom package group to be used for building the images. Some of the package group recipes are shipped with the PetaLinux tools.

For example:

<plnx-proj-root>/components/yocto/layers/meta-petalinux/recipes-core/packagegroups/packagegroup-petalinux-self-hosted.bb

The name of the package group should be unique and should not conflict with the existing recipe names.

You can create custom package group, for example, an ALSA package group would look like:

DESCRIPTION = "PetaLinux ALSA supported Packages"

inherit packagegroup

ALSA_PACKAGES = " \
        alsa-lib \
        alsa-plugins \
        alsa-tools \
        alsa-utils \
        alsa-utils-scripts \
        pulseaudio \
        "
RDEPENDS:${PN}:append = " \
        ${ALSA_PACKAGES} \
        "

This can be added to <plnx-proj-root>/meta-user/recipes-core/packagegroups/packagegroup-petalinux-alsa.bb.

To add this package group in RootFS menuconfig, add CONFIG_packagegroup-petalinux-alsa in <plnx-proj-root>/project-spec/meta-user/conf/user-rootfsconfig to reflect in menuconfig.

Launch petalinux-config -c rootfs, select user packages > packagegroup-petalinux-alsa, save, and exit. Run petalinux-build.