Boot Flow

The Mango 802.11 design for the USRP E320 uses a custom boot flow which enables easy design iteration. The boot flow supports both standalone operation, where the E320 boots from a local flash drive, or direct design iteration via USB/JTAG using the Xilinx Vivado and SDK tools.

Boot Files

The Mango 802.11 design boot flow for the USRP E320 relies on the following files:

  • BOOT.bin: Zynq boot image containing FSBL and u-boot binaries
  • ec-firmware-no-watchdog.bin: firmware for the E320 Embedded Controller (EC)
  • uEnv.txt: configuration for u-boot
  • wlan.bit: configuration bitstream for Zynq PL with MAC software embedded
  • image.ub: FIT image with Linux kernel, DTB, and root filesystem
  • arm0.elf: bootloop application for ARM Core #0 loded after u-boot completes - only used in standalone (non-Linux) boot

These files must be copied to the microSD card and/or a USB flash drive, as detailed below.

We strongly recommend using a USB flash drive for the 802.11 design files. This allows installing the SD card and re-mounting the E320 back panel cover.

microSD Card

The microSD card must contain files:

  • BOOT.bin
  • ec-firmware-no-watchdog.bin
  • uEnv.txt

These files are used on every boot of the E320.

Mango provides a known-good BOOT.bin. This BOOT.bin is not generated by the reference PetaLinux projects or the MAC software SDK workspace. Refer to Building Bootloaders for details on regenerating the bootloader designs if desired.

The microSD card may also contain files:

  • wlan.bit
  • image.ub OR arm0.elf

These files are only used if no USB flash drive is attached.

USB Flash Drive

If a USB flash drive is attached to the USRP E320 it must contain files:

  • wlan.bit
  • image.ub OR arm0.elf

When a USB drive is attached the boot flow will ignore any wlan.bit, arm0.elf, and image.ub files found on the microSD card.

Boot Flow

The boot flow uses two stages of bootloaders running in one ARM core of the Zynq PS. All boot files are stored on local, non-volatile storage. The node does not require an attached PC or network connection to boot.

  1. Zynq PS loads Zynq boot image (BOOT.bin) from microSD card
  2. ARM core #0 boots the Zynq FSBL from the boot image
  3. FSBL hands off ARM core #0 to the u-boot second-stage bootloader from the boot image
  4. u-boot executes the boot flow from uEnv.txt:
  1. Checks EC firmware version; if necessary flashes new RW image and reboots EC
  2. Checks if USB flash drive is connected:
  • If so, reads PL bitstream and ARM binary from USB drive
  • If not, reads Zynq PL bitstream and ARM binary from microSD card
  1. Configures Zynq PL from wlan.bit - this boots the 802.11 design FPGA design and MAC software
  2. Reboots ARM core #0 from arm0.elf (standalone MAC) or image.ub (Linux)

Boot Examples

Linux with Mango 802.11 MAC/PHY

Recommended configuration for booting Linux on the E320:

SD Card files
  • BOOT.bin
  • ec-firmware-no-watchdog.bin
  • uEnv.txt
USB Flash drive files
  • wlan.bit with high_linux_dev and low_dcf apps embedded
  • image.ub from E320 PetaLinux project
uEnv.txt options
  • do_usb_usb=1
  • do_flash_ec_fw=1
  • do_load_fpga_bit=1
  • do_bootloop_arm=0
  • do_load_fit_image_usb=1
  • do_load_fit_image_tftp=0
  • do_boot_fit_image=1

Standalone AP

Recommended configuration for booting the standalone AP design on the E320:

SD Card files
  • BOOT.bin
  • ec-firmware-no-watchdog.bin
  • uEnv.txt
USB Flash drive files
  • wlan.bit with high_ap and low_dcf apps embedded
  • arm0.elf
uEnv.txt options
  • do_usb_usb=1
  • do_flash_ec_fw=1
  • do_load_fpga_bit=1
  • do_bootloop_arm=1
  • do_load_fit_image_usb=0
  • do_load_fit_image_tftp=0
  • do_boot_fit_image=0

Customizing Boot Flow

Various parts of the default boot flow can be customized.

Zynq FSBL

By default the Mango 802.11 design uses an unmodified Zynq FSBL, generated via the FSBL application template in the Xilinx SDK. The FSBL code provides placeholders for user-defined functions which can be executed by the FSBL before it hands off execution to u-boot. Refer to Xilinx UG821 for details on customizing the FSBL.

u-boot

The u-boot binary in the default Zynq boot image (BOOT.bin) relies on the variable definitions in uEnv.txt to define all boot processes. The default uEnv.txt implements the boot flow described above. The values below may be modified in uEnv.txt to customize the boot flow:

Filenames:
  • fpga_bitstream: configuration bitstream for Zynq PL, default wlan.bit
  • arm0_app: binary to reboot ARM core after u-boot, default arm0.elf
  • ec_firmware: EC RW firmware image, default ec-firmware-no-watchdog.bin
Boot Flow Steps: the following variables must be set to 1 (default) or 0
  • do_use_usb: use USB flash drive if detected
  • do_flash_ec_fw: check EC firmware version and reflash if necessary
  • do_load_fpga_bit: configure Zynq PL
  • do_reboot_arm: reboot ARM #0 after u-boot completes

After modifying uEnv.txt the E320 must be rebooted to re-execute u-boot. The E320 can be rebooted by power cycling the node or by running apreset in the EC UART console.