Change files
include/config_distro_bootcmd.h
-#define CONFIG_BOOTCOMMAND "run distro_bootcmd"
+#define CONFIG_BOOTCOMMAND "run callscript; run distro_bootcmd"
include/configs/socfpga_common.h
#define CONFIG_EXTRA_ENV_SETTINGS \
"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
"bootm_size=0xa000000\0" \
"kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \
"fdt_addr_r=0x02000000\0" \
"scriptaddr=0x02100000\0" \
"pxefile_addr_r=0x02200000\0" \
"ramdisk_addr_r=0x02300000\0" \
"socfpga_legacy_reset_compat=1\0" \
"scriptfile=u-boot.scr" "\0" \
"fpgadata=0x2000000" "\0" \
"callscript=fatload mmc 0:1 $fpgadata $scriptfile;" \
"source $fpgadata" "\0" \
BOOTENV
I cannot seem to get my FPGA to load however.
See CycloneV: Programming FPGA from U-Boot for details