@Muhammad_Atif
Hi, I’m fine. Hope that you are also fine.
You can create scripts directly in the u-boot terminal to load the fpga.
Right now I’m using a variable that holds the rbf file path, so if you change the variable you load another rbf file.
If you add the following variables to you u-boot env and call the “loadfpga” in your “bootcmd”, it should work.
fpgadata=0x2000000
fpgafile=/boot/TESTE2.rbf
loadfpga=echo Loading fpga with ${fpgafile} bitstream;if test -e mmc 0:2 ${fpgafile}; then load mmc 0:2 ${fpgadata} ${fpgafile};fpga load 0 ${fpgadata} ${filesize};bridge enable; else echo Fpgafile not found;fi
Now, for the u-boot scr file, I’m using another configuration on the sdcard with only 2 partitions, 1 for the spl and bootloader (I’m using u-boot with spl) and another ext4 partition with linux fs, kernel, rbf files, etc. So it might not be what you want, but maybe you can use it as a base for your needs.
I’m loading a “uenv.txt” file from the ext4 partition to change my u-boot env. To do that, I’m using a process that is almost the same as the fpga one:
loadaddr=0x01000000
envfile=/boot/uenv.txt
loadenv=echo Loading ${envfile} File; if test -e mmc 0:2 ${envfile}; then load mmc 0:2 $loadaddr ${envfile}; env import -t ${loadaddr} ${filesize}; echo ${envfile} loaded; else echo file ${envfile} not found!!!; fi;
So you can use the uenv.txt file to set a specific rbf file to load, by overwriting the “fpgafile” variable.