Project Utilities

Mango provides a number of utilities to simplify using the reference PetaLinux projects.

mango_wlan_util Script

The reference PetaLinux project installs a helper shell script to /usr/sbin/mango_wlan_util. The mango_wlan_util script wraps the fpga_manager, remoteproc, and modprobe calls necessary to configure the PL, boot the RPU, and load the kernel driver. It also supports printing version information extracted from the running design to verify which binaries are loaded.

Customizing u-boot

PetaLinux uses u-boot as the second-stage boot loader. In Mango reference designs u-boot loads the image.ub image which contains the device tree, kernel image, and root filesystem.

By default u-boot will load image.ub image from the SD card.

u-boot also supports loading images via TFTP. This is a very useful flow when iterating on the PetaLinux design, as it allows rebooting a node without removing/udpating/replacing the SD card. In the TFTP flow only BOOT.BIN and uEnv.txt are stored on the SD card.

The uEnv.txt text file overrides variables in the u-boot default environment. A template is provided in <proj_root>/components/util/uEnv.txt and is copied below.

The serverip variable defines the TFTP server IP address. PetaLinux automatically sets this variable to the IP address of the PC which built the BOOT.BIN image (i.e. a Mango PC if using the reference images). Set this variable to your TFTP server’s IP address.

The uenvcmd variable defines the u-boot command that loads the final image. By default this variable is run sdboot which loads image.ub from the SD card. To boot via TFTP set this variable to run netboot.