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 andu-boot
binariesec-firmware-no-watchdog.bin
: firmware for the E320 Embedded Controller (EC)uEnv.txt
: configuration foru-boot
wlan.bit
: configuration bitstream for Zynq PL with MAC software embeddedimage.ub
: FIT image with Linux kernel, DTB, and root filesystemarm0.elf
: bootloop application for ARM Core #0 loded afteru-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
ORarm0.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
ORarm0.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.
- Zynq PS loads Zynq boot image (
BOOT.bin
) from microSD card- ARM core #0 boots the Zynq FSBL from the boot image
- FSBL hands off ARM core #0 to the
u-boot
second-stage bootloader from the boot imageu-boot
executes the boot flow fromuEnv.txt
:
- Checks EC firmware version; if necessary flashes new RW image and reboots EC
- 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
- Configures Zynq PL from
wlan.bit
- this boots the 802.11 design FPGA design and MAC software- Reboots ARM core #0 from
arm0.elf
(standalone MAC) orimage.ub
(Linux)
Boot Examples¶
Linux with Mango 802.11 MAC/PHY¶
Recommended configuration for booting Linux on the E320:
SD Card files |
|
USB Flash drive files |
|
uEnv.txt options |
|
Standalone AP¶
Recommended configuration for booting the standalone AP design on the E320:
SD Card files |
|
USB Flash drive files |
|
uEnv.txt options |
|
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, defaultwlan.bit
arm0_app
: binary to reboot ARM core afteru-boot
, defaultarm0.elf
ec_firmware
: EC RW firmware image, defaultec-firmware-no-watchdog.bin
- Boot Flow Steps: the following variables must be set to
1
(default) or0
do_use_usb
: use USB flash drive if detecteddo_flash_ec_fw
: check EC firmware version and reflash if necessarydo_load_fpga_bit
: configure Zynq PLdo_reboot_arm
: reboot ARM #0 afteru-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.