Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

PS Software Petalinux

This is a simple manual on how to prepare the linux environment that can be deployed on the board.

Setup Vmware

  • Install the latest vmware player

  • download Ubuntu 18 LTS desktop iso

  • Create an VM Machine with the minimum specs

    • 300Gib of hdd

    • 8 CPU Cores

    • 16 Gib ram

...

Code Block
sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000

Requirments:

Make sure to download petalinux beforehand, it takes 2 hours to download

  • Download petalinux petalinux-v2019.2-final-installer.run

  • Download the sdk documentation

  • make bash the default shell

    Code Block
    sudo dpkg-reconfigure dash
  • install dependencies:

    Code Block
    languagebash
    sudo apt-get install -y python gawk gcc git make net-tools libncurses5-dev tftpd zlib1g:i386 libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev screen pax gzip
  • install petalinux:

    Code Block
    mkdir -p /home/ryven/petalinux20192
    ./petalinux-v2019.2-final-installer.run /home/ryven/petalinux20192
  • everytime you need to work with petalinux you need to setup the env

    Code Block
    source /home/ryven/petalinux20192/settings.sh
  • if you use a share folder, mount it

    Code Block
    sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000

Build a demo sample

These are board steps to build a sample, specific demos need the proper options picked on rootfs and kernel

...

  • This files can now be copied to an sd card formated with FAT32

Boot the hardware

  • Mount the SD card on your host machine.

  • Copy the following files from <plnx-proj-root>/pre-built/linux/images/ into the
    root directory of the first partition which is in FAT32 format in the SD card:

    • BOOT.BIN

    • image.ub

  • Connect an Usb cable from the computed to the usb-uart plug

  • Open a console on the workstation and start the putty communication program. (serial, 115200)

  • Set the boot mode of the board to SD boot using the dip switch S7

    • set it to 11, both switches on

  • Connect a 12V power supply to the main power plug

  • Power on the board.

  • Watch the serial console

Specific samples

VGA demo

  • To build the petalinux image you should follow the general steps described above. Make sure you pick the proper kernel and rootfs options, they are listed here

  • After building the petalinux image one needs to build the boot.bin on vivado, a prebuilt version of boot.bin is available here. copy that file to the sd card.

PCIe Demo

To run the pcie demo you only need the boot.bin file from the prebuild folder on the samples repo. petalinux image is not needed. Place boot.bin on the sdcard and plug the sdcard on the board.

...

Connect the board on the PCIe slot of the host computer. make sure you don’t have the external power plugged in the board.

Power the computer.

PCIe host linux machine setup

Install ubuntu 18.04. (last tested with 18.04.03)

...

Code Block
languagebash
cd ../tools
#Set LEDS
sudo ./reg_rw /dev/xdma0_user 0x00000000 32 1
#Read DIP Switches
sudo ./reg_rw /dev/xdma0_user 0x00000000

Related documents

...