Adding FS-Boot

FS-Boot is pre-installed into the hardware reference designs in PetaLinux. FS-Boot can be added into custom hardware project build using the Xilinx EDK tools. This section describes this process.

Requirements

FS-Boot requires a minimium of 8K bytes of BRAM memory. Ensure that this value is met before enabling FS-Boot.

Source code location

The FS-Boot source code is located in the $PETALINUX/hardware/fs-boot directory.

Xilinx Platform Studio (XPS)

Start XPS on the command line and open the hardware project in XPS.

Create A Software Application

Create a new software application for FS-Boot, using the following attributes:

Attribute Value
Project Name fs-boot
Processor microblaze_0

For more information on creating application projects, refer to the Creating a New Software Application Project Using XPS section in the Xilinx XPS Documentation.

Add Existing Source / Header Files

Add the following source files to the 'fs-boot' application project. The FS-Boot files are located in the '$PETALINUX/hardware/fs-boot/' directory.

Attribute Value
Source File fs-boot.c
Source File srec.c
Source File time.c
Header File fs-boot.h
Header File srec.h
Header File time.h

Set Up Compiler Options

Use the attributes in the following table to set up the compiler options for FS-Boot. Refer to the Setting the Compiler Environment Variables Section of the Xilinx XPS Documentation.

Attribute Value
Environment
Application Mode executable
Output ELF file default value
Linker Script Use default Linker Script
Stack Size 1K
Debug and Optimisation
Optimization Level Size Optimized (-Os)
Advance
Other Compiler Options to Append -Wall

Mark to Initialize BRAMs

Set the 'Mark to Initialize BRAMs' option on the FS-Boot project. Ensure that no other application has this option set else the init_bram make procedure will failed.

At this point the FS-Boot bootloader is added to the project. The user can now build the FS-Boot application.