Base System Petalinux

From ift

Create PetaLinux Platform

$ petalinux-new-platform -c <cpu-arch> -v <VENDOR> -p <PLATFORM>
  • -c <cpu type> As of PetaLinux 1.3, supported CPU types are 'microblaze' and 'ppc440'.
  • -v <VENDOR> This is the vendor name – often you will use your company's name
  • -p <PLATFORM> The name of the platform or product you are building.

The configuration files of the software platform are created in the directory $PETALINUX/software/petalinux-dist/vendors/<VENDOR>/<PLATFORM>. The new platform is automatically selected when running the petalinux-new-platform command, so there is no need to launch the toplevel configuration menu, and select the new platform.

Configure Software Platform

Generate the hardware configuration files and copy the configuration files to the right place in PetaLinux.

$ cd /opt/petalinux-v1.3-final-full/hardware/user-platforms/YourProject
$ petalinux-copy-autoconfig

Launch the Linux kernel configuration menu and do some configuration if needed.

$ petalinux-config-kernel

Launch the user applications and system settings configuration menu.

$ petalinux-config-apps

Build PetaLinux

This step take some time

$ cd $PETALINUX/software/petalinux-dist
$ make

The compilation log stores in build.log file in the petalinux-dist/ directory.

Run On Board

Run XMD by typing xmd in the terminal. Downlad the hardware bitstream to the fpga and connect to the board.

XMD% fpga -f /opt/petalinux-v1.3-final-full/hardware/user-platforms/YourProject/implementation/download.bit
XMD% connect mb mdm -debugdevice devicenr #

Check the value of Instruction Cache Base Address, i.e.:

  • Instruction Cache Base Address.....0xb0000000

Download PetaLinux binary image to board at the instruction cache base address, set program counter to that location and tell the board to start/continue.

XMD% dow -data /opt/petalinux-v1.3-final-full/software/petalinux-dist/images/linux.bin 0xb0000000
XMD% rwr pc 0xb0000000
XMD% con


Connect to UART with settings 115200 8-N-1. Log in as "root" with password "root". Have fun!

Digilent Atlys

When using XMD on the Atlys, it is necessary to provide extra statements to communicate with the hardware:

-cable type xilinx_plugin modulename digilent_plugin

i.e.

fpga -f download.bit -cable type xilinx_plugin modulename digilent_plugin
connect mb mdm -cable type xilinx_plugin modulename digilent_plugin

From here you just do as usual, i.e.

dow -data linux.bin 0xb0000000
<...>


ISE DS Version 13.1

Ethernet MAC Address

The MAC address is randomized by default.

Use the PetaLinux System Configuration Menu to specify the new MAC address.

$ petalinux-config-apps

System Settings ---> Network Addresses Untick "Randomise MAC address" and enter appropriate MAC address in the next field. Exit and save.

Rebuild U-boot and the images within PetaLinux:

 [petalinux/software/petalinux-dist]$ make u-boot image

New in platform configuration

$ petalinux-platform-config --update


PetaLinux User Guide - Updating Ethernet MAC Address