[meta-xilinx] load fpga bitstream in u-boot SPL on pyro

Nathan Rossi nathan at nathanrossi.com
Fri Oct 13 05:36:59 PDT 2017

On 13 October 2017 at 18:33,  <yohan.boyer at ioterop.com> wrote:
> Hello,
> I was upgrading my build from morty to pyro and I fall into an issue I
> think.
> We discuss some day ago to read MAC address from I2C EEPROM attached via the
> PL.
> It seems it was not done by default on u-boot 2016.03, but ok in u-boot
> 2017.01.
> So I’m now using u-boot 2017.01. The new build with pyro is now working.
> But in morty, the fpga bitstream was loaded in u-boot SPL, before booting in
> u-boot right ? But not in pyro ?
> There is not the patch zynq-Add-fpga-support-to-u-boot-SPL.patch in pyro.

That patch was removed as it was never upstreamed or updated for newer
u-boot's, and was replaced with the auto generated uEnv.txt which uses
U-Boot to do the bitstream loading by default.

> So my question is : Am I missing something ?
> I think u-boot can’t read the MAC address if the bitstream is not loaded
> before u-boot try to read it.

That is right, its a limitation of using the PL for I2C EEPROM which
provides boot data, the same limits apply to most u-boot functionality
if the device being accessed is in the PL.

If you are making a design that has the MAC address in an I2C EEPROM,
I would recommend that you attach it to the MIO I2C, or if you are
using SPI flash store it there.

If you are stuck with using the I2C EEPROM via the PL you have a
number of options, here are just some ideas that come to mind.

 * Do some trickery with U-Boot and environment setup to run U-Boot
loading the bitstream then re-load U-Boot
 * Modify U-Boot to allow reloading of the MAC via a cmd, which is
executed after you have loaded the bitstream
 * Use the SPL patch to load the bitstream early
 * On first boot into linux load the EEPROM content and store it in
the u-boot environment in the flash/etc. Or just load it in linux if
you are not using the ethernet during boot.

> Also, I find in pyro the uenv.txt is generated, very nice !
> But in case the bitstream will be load in u-boot SPL, it will cause issue ?
> Since the uenv.txt load it in u-boot.

You would just be loading the bitstream twice which would slow the
boot time down. But it should be functional. Though you can remove the
bitstream load from the uEnv.txt.


More information about the meta-xilinx mailing list