Part 15 - Boot PetaLinux from SD Card
Missing Image!Missing Image!Missing Image!

Introduction

This tutorial details the steps required to boot PetaLinux using a SD card.

Aims

The aims of this tutorial are as follows :-
  1. Setup environment
  2. Change present working directory
  3. Package project to produce boot image
  4. Copy files to SD Card
  5. Deploy on Zedboard via SD Card
  6. Launch terminal emulator
  7. Check the SD card boot is working

1. Setup environment

Setup Xilinx design environment for the 2020.2 toolset.
steve@Linux-Steve:/home/steve$ source xilinx.sh
Xilinx tools available tools at /opt/Xilinx :-
1) 2020.2 - Vivado - SDK - Vitis - PetaLinux
0) Exit
Please select tools required or exit : 1

Tools are as follows :-
vivado @ /opt/Xilinx/Vivado/2020.2/bin/vivado
vitis @ /opt/Xilinx/Vitis/2020.2/bin/vitis
petalinux-build @ /opt/Xilinx/PetaLinux/2020.2/tool/tools/common/petalinux/bin/petalinux-build

2. Change present working directory

Change the present working directory to be the project directory.
steve@Linux-Steve:/home/steve$ cd /home/steve/projects/petalinux/avnet-digilent-zedboard-2020.2

3. Package project to produce boot image

Package the project to produce the boot image BOOT.BIN, this will include the first stage boot loader zynq_fsbl.elf, the programmable logic system.bit, the Linux boot loader u-boot.elf and the device tree blob system.dtb.
steve@Linux-Steve:/home/steve/projects/petalinux/avnet-digilent-zedboard-2020.2$ petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --uboot images/linux/u-boot.elf

4. Copy files to SD Card

Mount a FAT32 formatted SD card on the Xubuntu desktop and copy the required files onto it, then unmount the card so that it is ready for use on the Zedboard.
steve@Linux-Steve:/home/steve/projects/petalinux/avnet-digilent-zedboard-2020.2$ cp /tftpboot/{BOOT.BIN,boot.scr,image.ub} /media/steve/petalinux

5. Deploy on Zedboard via SD Card

Power off the Zedboard, set the boot mode jumpers for SD card boot, insert the SD card and then power on the board. Missing Image!

6. Launch terminal emulator

Launch the MiniCom terminal emulator if not already running.
steve@Linux-Steve:/home/steve/projects/petalinux/avnet-digilent-zedboard-2020.2$ minicom -D /dev/ttyACM0 -b 115200

7. Check the SD card boot is working

The SD card boot is much the same as the JTAG boot. The blue done LED should illuminate early on in the boot process indicating that the PL part of the FPGA has been programmed. PetaLinux should then boot up in the PS and ultimately provide a login prompt via the terminal emulator.

'projects' location : 'repos' location : 'downloads' location :
Copyright © 2021 Steve Haywood
Missing Image!
Missing Image!Missing Image!Missing Image!