Skip to content
Tim Ansell edited this page Sep 2, 2018 · 1 revision

Images consist of;

  • Gateware for the FPGA.
  • BIOS for the Soft CPU in the Gateware
    • The BIOS is execute in place
    • On big FPGAs the BIOS is embedded into ROM inside the gateware.
      • This means that SPI flash doesn't need to be working to get the BIOS> prompt.
      • We still leave the space for the BIOS in the image, even though it isn't used.
    • The BIOS image ends in a CRC, which is checked by the BIOS.
  • Firmware loaded by the BIOS.
    • The firmware is optional, it could instead be loaded via serial using flterm or via network using tftp.
    • This is copied into external RAM and then jumped too.
    • The firmware image starts with a header of 32bit length and 32bit CRC.
    • FIXME: The firmware image header makes execute in place harder?

An image is built by the mkimage.py script.

usage: mkimage.py [-h] [--platform PLATFORM] [--target TARGET]
                  [--cpu-type CPU_TYPE] [--cpu-variant CPU_VARIANT]
                  [--iprange IPRANGE] [-Op PLATFORM_OPTION PLATFORM_OPTION]
                  [-Ot TARGET_OPTION TARGET_OPTION]
                  [-Ob BUILD_OPTION BUILD_OPTION] [--no-compile-firmware]
                  [--override-firmware OVERRIDE_FIRMWARE]
                  [--output-file OUTPUT_FILE]
                  [--override-gateware OVERRIDE_GATEWARE]
                  [--override-bios OVERRIDE_BIOS]
                  [--firmware-name FIRMWARE_NAME]
                  [--force-image-size FORCE_IMAGE_SIZE]

Flash image creation tool.

optional arguments:
  -h, --help            show this help message and exit
  --platform PLATFORM
  --target TARGET
  --cpu-type CPU_TYPE
  --cpu-variant CPU_VARIANT
  --iprange IPRANGE
  -Op PLATFORM_OPTION PLATFORM_OPTION, --platform-option PLATFORM_OPTION PLATFORM_OPTION
                        set platform-specific option
  -Ot TARGET_OPTION TARGET_OPTION, --target-option TARGET_OPTION TARGET_OPTION
                        set target-specific option
  -Ob BUILD_OPTION BUILD_OPTION, --build-option BUILD_OPTION BUILD_OPTION
                        set build option
  --no-compile-firmware
                        do not compile the firmware
  --override-firmware OVERRIDE_FIRMWARE
                        override firmware with file
  --output-file OUTPUT_FILE
  --override-gateware OVERRIDE_GATEWARE
  --override-bios OVERRIDE_BIOS
  --firmware-name FIRMWARE_NAME
  --force-image-size FORCE_IMAGE_SIZE
Clone this wiki locally