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:
- First, go to your project directory and run petalinux-config tool
- In a main manu select 'System boot device' submenu.
- Inside 'System boot device' menu switch to 'SD card' option.
- Save configuration and exit.
- Now, lets clean and rebuild images - in our project directory:
- To Re-generate BOOT.BIN in our project directory run:
- 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.
- 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.
d9@ubuntu:~$ cd Projects/Avnet-Digilent-ZedBoard-2013.3/
petalinux-build -x mrproper
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.
sudo apt-get purge modemmanager