Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16741 Discussions

on Arria10, how to load FPGA data that was not generated by UBoot mkimage tool

Yoels
Novice
1,626 Views

Hi,

 

On Arria10 that was build in Altera 20.1 environment, when using UBoot 2020.4 , how can I load FPGA data that was not created by the UBoot mkimage tool?

 

Currently my UBoot only loads (using QSPI) FPGA data that I generated using the mkimage tool . Generated the FPGA data with a similar command to this one:

tools/mkimage -E -f board/altera/arria10-socdk/fit_spl_fpga.its fit_spl_fpga.itb

(taken from this guide https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10)

 

When I try to place the RBF files directly on the flash with JTag, when they were not wrapped with mkimage tool it doesn't load and run. In this case they don't have the right header and for that reason it fails (the error message is "No FDT magic number")

 

What is the command to load FPGA data that was not created with mkimage tool?

 

Hope I was clear enough, thanks in advance,

Yoels

Labels (1)
0 Kudos
11 Replies
aikeu
Employee
1,582 Views

Hi Yoels,


Maybe you can refer to the loading method in Option 1 using fpga load:

https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Option_351_45_Separate_Configuration_Files


Thanks.

Regards,

Aik Eu


0 Kudos
Yoels
Novice
1,546 Views

Hi Aik Eu,

Thanks for your response.

I understand what your'e saying but it means I will need address them as separated rbf files when currently I receive them when they are combined one after the other without an header.

I'm looking for a way to call them (the rbf files, the fpga data to be loaded) from a certain flash address on the QSPI when they don't have an header (that's how I receive them from someone else , then I burn them using JTAG and then I run uboot ).

Thanks, Yoels

0 Kudos
aikeu
Employee
1,535 Views

Hi Yoels,


Do you mean you would like to load the fpga file from QSPI instead of sdcard?

The option 1 example which I mentioned is from the sdcard:

load mmc 0:1 ${loadaddr} ghrd_10as066n2.core.rbf

fpga load 0 ${loadaddr} ${filesize}


Thanks.

Regards,

Aik Eu


0 Kudos
Yoels
Novice
1,527 Views

Hi Aik Eu,

 

Yes,  load the fpga file from QSPI while the file don't have a header that produced with the uboot mkimage tool (just the 2 rbf files).

 

Thanks, Yoels

0 Kudos
aikeu
Employee
1,513 Views

Hi Yoels,


I do not know any method to load from QSPI flash at the meoment. I will check from the team if anyone know.

Will it be fine if you load from SDcard?


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,489 Views

Hi Yoels,


Any follow up from the previuos comment?

The inputs I get from the team as below:


On SD card there is a filesystem, so each file size is known.

The RBF files do not have a header, and since they are not in a file on a filsystem, there is no way to know their size. That is the main reason why they are encapsulated using the itb format. 


The alternative would be to store the filesize somewhere, in addition to the file itself. You could consider to do something like this:

1. Read file_size from QSPI into ${filesize}

2. Read rbf file from QSPI into at ${loadaddr}

3. Run ‘fpga load 0 ${loadaddr} ${file_size}



Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,428 Views

Hi Yoels,


I will close the thread if no further question.


Thanks.

Regards,

Aik Eu


0 Kudos
Yoels
Novice
1,415 Views

Hi Aik Eu,

Sorry for this late response. Thank you for your last suggestion regarding using "fpga load". 

It could work, and I can use it, but I would have to know in advance the size of the fpga file to be loaded, so it's just like using a header that contains that information.

 

The thing is, I upgraded the Uboot version I'm using from Uboot 2014 to Uboot 2020.

In Uboot 2014, you could load the RBF files without a header, and in Uboot 2020, you have to wrap the RBF files with a header before loading them.

I want to know if in Uboot 2020 I can still load, in some way, the RBF files without a header, and that is the main thing I'm trying to understand. Maybe I can't, and they changed the way Uboot works, so without a header (or knowing the RBF file size), you can't load the FPGA file.

 

I want to know that because it affects the way the RBF will be given to me. I receive them from someone who, until now, has produced them without a header since he doesn't know about uboot and its mkimage tool.

(I can say the excat uboot command where the calling to header exists in Uboot 2020 if it will help.)

(By the way, I looked at the Uboot information about it. That from this and this version, you have to start using a header, but I couldn't find anything.)

 

So that's what I'm trying to understand. So I'll know how to act from now on regarding it. Maybe he would just give me the RBF files, and I would add a header  to them each time, although I less prefer this option.

 

Thanks again for trying to help.

Yoels

 

0 Kudos
aikeu
Employee
1,388 Views

Hi Yoels,


I think if you are ok with booting from SD card instead of qspi flash, then there will be no header required.

As I understood for Uboot 2020 the header is required. Anyway I do not know the reason of the changes as compared to the older Uboot.


Thanks.

Regards,

Aik Eu


0 Kudos
Yoels
Novice
1,366 Views

Hi Aik Eu,

 

Ok thank for all your help. I'll also try a different approach: I will look for an altera 20.1 mkimage tool on windows that can create a header for those RBF files. 

I think someone already asked for this tool in another thread in this forum, I will look into it for now and try it.

 

Thanks,

Yoels

0 Kudos
aikeu
Employee
1,350 Views

Hi Yoels,


I will close this thread since the solution has been provided.


p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


Thanks.

Regards,

Aik Eu


0 Kudos
Reply