Package Management - 2024.1 English

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2024-06-21
Version
2024.1 English

PetaLinux supports package management system for Zynq 7000, Zynq UltraScale+ MPSoC, and AMD Versalâ„¢ devices. Use the following steps to configure and use the package management system:

Figure 1. Package Management
  1. Enable DNF through petalinux-config -c rootfs. Enable the following configs to use DNF.
    • Image Features > [*] package management
    • No need to set the base package feed url in Image features > package-management > package-feed-uris.

    • No need to set the package feed architecture in Image features > package management > package-feed-archs.

      From 2021.1, specifying package-feed-uris and package-feed-archs is optional. PetaLinux or Yocto set the uris and set the archs based on the project.

      The possible archs are available in https://petalinux.xilinx.com/sswreleases/rel-v2021.2/generic/rpm

  2. Build the project.
    #petalinux-build
  3. Boot Linux in SD or in JTAG boot mode.
  4. Check for .repo file on target in /etc/yum.repos.d/ as follows:
    
    [oe-remote-repo-sswreleases-rel-v2022-generic-rpm-noarch]
    name=OE Remote Repo: sswreleases rel-v<PETALINUX_VER> generic rpm noarch
    baseurl=http://petalinux.xilinx.com/sswreleases/rel-v<PETALINUX_VER>/generic/rpm/noarch
    gpgcheck=0
    
    [oe-remote-repo-sswreleases-rel-v<PETALINUX_VER>-generic-rpm-aarch64]
    name=OE Remote Repo: sswreleases rel-v<PETALINUX_VER> generic rpm aarch64
    baseurl=http://petalinux.xilinx.com/sswreleases/rel-v<PETALINUX_VER>/generic/rpm/aarch64
    gpgcheck=0
    
    [oe-remote-repo-sswreleases-rel-v<PETALINUX_VER>-generic-rpm-zynqmp]
    name=OE Remote Repo: sswreleases rel-v<PETALINUX_VER> generic rpm zynqmp
    baseurl=http://petalinux.xilinx.com/sswreleases/rel-v<PETALINUX_VER>/generic/rpm/zynqmp
    gpgcheck=0
    
    [oe-remote-repo-sswreleases-rel-v<PETALINUX_VER>-generic-rpm-zynqmpeg]
    name=OE Remote Repo: sswreleases rel-v<PETALINUX_VER> generic rpm zynqmpeg
    baseurl=http://petalinux.xilinx.com/sswreleases/rel-v<PETALINUX_VER>/generic/rpm/zynqmpeg
    gpgcheck=0
    
    [oe-remote-repo-sswreleases-rel-v<PETALINUX_VER>-generic-rpm-zynqmp_generic]
    name=OE Remote Repo: sswreleases rel-v<PETALINUX_VER> generic rpm zynqmp_generic
    baseurl=http://petalinux.xilinx.com/sswreleases/rel-v2022/generic/rpm/zynqmp_generic
    gpgcheck=0
    
    
  5. List all available packages.
    #dnf repoquery
  6. Install a specific package.
    #dnf install <pkg name>

    Example: #dnf install packagegroup-petalinux-matchbox

    Once the matchbox package is installed, reboot the target and you should get the desktop environment.