U-boot 2017.09 FPGA download support


#1

Does anyone know if U-boot 2017.09, either mainline (http://git.denx.de/u-boot.git/) or the altera version (https://github.com/altera-opensource/u-boot-socfpga/tree/socfpga_v2017.09) supports configuring the FPGA fabric via the CPU?

If so, how do I do that?

Thanks.


#2

Hi stevrscott,

I don’t have any experience with the 2017 U-Boot but I did that with the 2013 version as provided with the SocEDS (16.1 I used).
There’s a U-Boot command fpga that allows for loading .rbf file into the FPGA.
I would assume that this is still there in the 2017 version.

Cheers,
Harry


#3

The instructions for booting the kernel from the altera version of 2013.01.01 u-boot are here - see step 5, “Configure and Compile U-Boot”, scroll down to “Writing the Boot Script”.

This boot script executes commands in the environment variable bridge_enable_handoff to enable all the bridges after downloading the FPGA. This environment variable is not implemented in 2017.09. However, there is a new u-boot command in 2017.09 to enable the bridges. The fpga load command is still there. So, if booting from the mmc on partition 1, the commands to load the fpga are:

setenv fpgadata 0x2000000
fatload mmc 0:1 $fpgadata soc_system.rbf
fpga load 0 $fpgadata $filesize
bridge enable

  • ‘bridge enable’ is the 2017.09 u-boot command that replaces ‘run bridge_enable_handoff’ in the 2013.01.01 u-boot startup script
  • the ‘filesize’ environment variable is set by the fatload command
  • the rest of the boot sequence is the same as the 2013 boot script sequence, but you will need these definitions that 2017.09 doesn’t define:
    setenv bootimage zImage
    setenv fdtimage soc_system.dtb
    setenv fdtaddr 0x00000100
    setenv mmcloadcmd fatload

Yocto branch for Cyclone V