Forum Discussion
Ok, I will try to lay out the original problem I have been encountering.
Currently I am experiencing a persistent issue with a QMTech Cyclone V SoC board (a very close clone of the Terasic DE10-Nano Board), trying to load the fpga configuration (.rbf) while the board is booting (U-Boot). While the .rbf is being loaded, I get an error: 'Command 'load' failed: Error -6' .
Overall, the whole booting process works, my system is able to go through the whole process: UBoot SPL -> UBoot -> Linux (logjn prompt). But a phase in between - which is the FPGA configuration loading is failing.
Here's the U-Boot shell excerpt, where I prompt the system for a couple of things and then try to fpga load the .rbf file:
=> fpga info
Altera Device
Descriptor @ 0x3ffec7a0
Family: SoC FPGA
Interface type: Fast Passive Parallel (FPP)
Device Size: 4294967295 bytes
Cookie: 0x0 (0)
No Device Function Table.
=>
=> printenv
arch=arm
baudrate=115200
board=c5soc-kfb-dual-sdram
board_name=c5soc-kfb-dual-sdram
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr -q ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 qspi pxe dhcp
bootcmd=load mmc 0:1 ${loadaddr} soc_system.rbf && fpga load 0 ${loadaddr} $filesize; sysboot mmc 0:1 any ${scriptaddr} /extlinux/extlinux.conf
bootcmd_dhcp=devtype=dhcp; run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_qspi=run qspiload; run qspiboot
bootdelay=2
bootm_size=0xa000000
bootmode=sd
cpu=armv7
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fatscript=if fatload mmc 0:1 ${scriptaddr} ${scriptfile};then source ${scriptaddr}; fi
fdt_addr_r=0x02000000
fdtcontroladdr=3bf74610
fdtfile=socfpga_cyclone5_kfb_dual_sdram.dtb
fpgatype=cv_se_a6
kernel_addr_r=0x01000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x01000000
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
mtdids=nor0=ff705000.spi.0
prog_core=if load mmc 0:1 ${loadaddr} fit_spl_fpga.itb;then fpga loadmk 0 ${loadaddr}:fpga-core-1; fi
pxefile_addr_r=0x02200000
ramdisk_addr_r=0x02300000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then part uuid ${devtype} ${devnum}:${distro_bootpart} distro_bootpart_uuid ; run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo EXTLINUX FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x02100000
scriptfile=u-boot.scr
soc=socfpga
socfpga_legacy_reset_compat=1
stderr=serial
stdin=serial
stdout=serial
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=qmtech
ver=U-Boot 2024.07-36780-g67806ba5853-dirty (May 09 2026 - 16:08:17 +0300)
Environment size: 4441/8188 bytes
=>
=>
=> fatls mmc 0:1
6275664 zImage
extlinux/
2082772 soc_system.rbf
25844 socfpga_cyclone5_kfb_dual_sdram.dtb
3 file(s), 1 dir(s)
=> load mmc 0:1 ${loadaddr} soc_system.rbf;
2082772 bytes read in 111 ms (17.9 MiB/s)
=> fpga load 0 ${loadaddr} $filesize;
Command 'load' failed: Error -6
=>
=>I've attached a zip which contains a full boot log, defconfig and .config file produced after building U-Boot. Also pics of what my Quartus projects settings are - regarding the generated and used .rbf file.
FYI, I've tried several MSEL Dip Sw settings : "00000" and "01010" but nothing works.
Please advise :?
-Monk