1

I am using buildroot 2017.02 for a MicroZed board target with a Xilinx kernel and U-Boot. The Zynq programmable logic (PL) bit stream file will be custom built by me using Vivado. The PL must be incorporated to the boot.bin file that resides on the target's SD card along with the u-boot image.

How do I configure buildroot to incorporate my own PL bit stream file into boot.bin?

Luca Ceresoli
  • 1,591
  • 8
  • 19
edj
  • 523
  • 7
  • 17

1 Answers1

2

Note: I suppose the boot.bin file is produced by the U-Boot build process.

The U-Boot build process cannot generate a full-fledged boot.bin. It can only put its own SPL (and a PMUFW, on ZynqMP).

There are several ways to get your bitstream loaded. Some options, from simplest to hardest:

  1. Store the bitstream in a separate file or a separate flash address and let U-Boot load it using the fpga load command
  2. Store the bitstream in a separate file and load it from Linux (cat bitstream.bit > /dev/xdevcfg); but ensure this is done before drivers for devices in FPGA are probed
  3. Generate boot.bin using https://github.com/antmicro/zynq-mkbootimage, "an open source replacement of the Xilinx's bootgen application".
  4. Use bootgen from Xilinx. Expect troubles in integrating it in any build process, though.
Luca Ceresoli
  • 1,591
  • 8
  • 19
  • 1
    Another option that I found after posting was to use the following kernel configuration option: Device Drivers ---> Character devices ---> <*> Xilinx Device Configuration. That driver allows the bitstream to be loaded after kernel boot with "cat bitstream.bit > /dev/xdevcfg" – edj Apr 05 '18 at 13:41
  • @edj: good point, but of course you must ensure drivers for devices in FPGA are probed *after* you do `cat bitstream.bit > /dev/xdevcfg`! I'll add this to my reply – Luca Ceresoli Apr 05 '18 at 15:32