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

Nathan Rossi nathan at nathanrossi.com
Mon Oct 16 10:18:51 PDT 2017


On 14 October 2017 at 00:03,  <yohan.boyer at ioterop.com> wrote:
>
>>> 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.
>
> Ok.
>
>>> 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.
>>
>
> Thank you Nathan !
> I hesitate between 2 of these solutions.
> Option 1 is a bit stuffed !
> The option 2 or the option 3 are nice. I'm not familiar with patch and u-boot though.
> Which will be the most easy to your mind ? And do you have an idea where should I begin ?

Setting up a command in U-Boot is likely the better solution of the
two. It will give you better flexibility for bitstream loading than
relying on SPL to load the bitstream.

You probably only need to implement a command that translates the raw
eeprom data to the formatted mac address for use in the environment.
Since the eeprom read command can do the reading from eeprom to a
memory location.

Regards,
Nathan

> The option 4 is impossible because it need access ethernet during u-boot.
>
>>* 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.
>
> Ok, no problem with that.
>
>>Regards,
>>Nathan
>
> Regards,
> Yohan
>



More information about the meta-xilinx mailing list