User Tools

Site Tools


xilinx_petalinux

This is an old revision of the document!


Overview

Installing/using Petalinux – installation on unsupported Fedora 30.

Workarounds

Fixing bash

Add this sed wrapper to get around a whitespace issue with newer bash:

#!/bin/sh

# Remove newlines if called by the silly Xilinx PetaLinux 2018.1 installer
if [ "$2" = "s/^.*minimal-\(.*\)-toolchain.*/\1/" ] ; then
        /bin/sed "$@" | tr '\n' ' '
else
        /bin/sed "$@"
fi

Fixing tr

If you see this when you source settings.sh:

INFO: Checking installed tools
tr: extra operand ‘k’
Try 'tr --help' for more information.
tr: extra operand ‘k’
Try 'tr --help' for more information.
tr: extra operand ‘k’
Try 'tr --help' for more information.
...

just move to a directory that does not contain any single-letter file or directory names. The problem is that the arguments to tr are not being quoted properly.

Installation

Latest version

$ ./petalinux-v2018.3-final-installer.run ~/xilinx/install/petalinux_2018.3

Installation dirs (WRT ${PETALINUX}):

  • components/
    • apps/
      • gpio-demo/
      • peekpoke/
    • misc/
      • config/
      • plnx-generated/
      • rootfs_config/
    • yocto/
      • downloads/
      • source/
        • aarch64/
        • arm/
        • microblaze_full/
        • microblaze_lite/

* …/aarch64/

  • buildtools/
  • conf/
  • downloads/
  • layers/
  • sstate-cache/
  • sysroots/
  • workspace/

Earlier versions on Fedora 30

Version 2017.4:

ERROR: You are missing the following system tools required by PetaLinux:

 - xvfb-run
 - ccache
 - glib2-devel

Version 2018.2:

ERROR: You are missing the following system tools required by PetaLinux:

 - xvfb-run

Fix:

$ sudo dnf install xorg-x11-server-Xvfb ccache glib2-devel

Building a project

petalinux-create

Usage:
  petalinux-create [options] <-t|--type <TYPE> <-n|--name <COMPONENT_NAME>

Required:
  -t, --type <TYPE>                     Available type:
                                          * project : PetaLinux project
                                          * apps    : Linux user application
                                          * modules : Linux user module
  -n, --name <COMPONENT_NAME>           specify a name for the component or
                                        project. It is OPTIONAL to create a
                                        PROJECT. If you specify source BSP when
                                        you create a project, you are not
                                        required to specify the name.
Options:
  -p, --project <PROJECT>               specify full path to a PetaLinux project
                                        this option is NOT USED for PROJECT CREATION.
                                        default is the working project.
  --force                               force overwriting an existing component
                                        directory.
  -h, --help                            show function usage
  --enable                              this option applies to all types except
                                        project.
                                        enable the created component

Options for project:
  --template <TEMPLATE>                 zynqMP|zynq|microblaze
                                        user needs specify which template to use.
  -s|--source <SOURCE>                  specify a PetaLinux BSP as a project
                                        source.

Building from BSP

$ petalinux-create \
  --type project \
  --source ~/xilinx/petalinux/projects/zed/avnet-digilent-zedboard-v2018.3-final.bsp \
  --name zed_from_bsp

Building with newer version

$ petalinux-build
WARNING: Your PetaLinux project was last modified by PetaLinux SDK version "2017.4",
WARNING: however, you are using PetaLinux SDK version "2018.3".
Please input "y" to continue. Otherwise it will exit![n]
xilinx_petalinux.1557313175.txt.gz · Last modified: 2019/05/08 10:59 by rpjday