Use SDCard to boot ZedBoard using PetaLinux 13.10

Up until now, I was using JTAG to boot my ZedBoard using PetaLinux builds. But at some point we will neet to switch to QSPI or SDCard. This post will be about using SD Card. And PetaLinux 13.10 made this process very easy. For default U-boot 2013.07 all we need to do is to change boot device in PetaLinux configurations.

I will use Avnet-Digilent-ZedBoard-2013.3 project I used before. See here for more details about how to install it:

  1. First, go to your project directory and run petalinux-config tool
  2. d9@ubuntu:~$ cd Projects/Avnet-Digilent-ZedBoard-2013.3/
    d9@ubuntu:~/Projects/Avnet-Digilent-ZedBoard-2013.3$ petalinux-config

  3. In a main manu select 'System boot device' submenu.
  4. zynq4_001

  5. Inside 'System boot device' menu switch to 'SD card' option.
  6. zynq4_002

  7. Save configuration and exit.
  8. Now, lets clean and rebuild images - in our project directory:
  9. petalinux-build -x mrproper
    petalinux-build

  10. To Re-generate BOOT.BIN in our project directory run:
  11. petalinux-package --boot --fsbl pre-built/linux/images/zynq_fsbl.elf --fpga pre-built/linux/implementation/download.bit --uboot --force -o images/linux/BOOT.BIN

    INFO: Generating zynq binary package BOOT.BIN...
    INFO: Binary is ready.

  12. Copy BOOT.BIN and image.ub from our project Avnet-Digilent-ZedBoard-2013.3/images/linux directory to SD card. And we done. Umount SD card, install it into ZedBoard, set jumpers to SDCard boot mode (MIO3 to ground position, MIO4 and MIO5 to high) and power board.
  13. Run gtkterm to monitor the process.
    Btw, if you expireince 20-40 seconds delay before you can access port with error "cannot open /dev/ttyACM0: Device or resource busy" and/or sometimes U-boot process stopped without any error and will continue to boot when you type 'boot' command - you may want to uninstall Ubuntu's ModemManager which cause all this things by trying to access/control our port once it powered.
  14. sudo apt-get purge modemmanager