Cyclone V: uboot-socfpga with SPL/fpga load

Hi, it’s me again. Just a small update is that if I hard fix the “$fpgadata” in the command “fatload mmc 0:1 $fpgadata output_file.rbf”, everything works. So it’s the error with the address, I will look into how to make a dynamic address, though, if you can give some idea, it will be appreciated. Cheer.

See the below boot script. I may have run into your problem and made this fix. I am now using ext4load instead of fatload. I’m not a u-boot expert. I think that maybe fatload worked at one point. I got my original script (the one with fatload) from a guide from a Cornell grad student the link to which is in post 7 I believe, but he was using a version of u-boot from 2013 I think.

setenv fdtimage socfpga_cyclone5_socdk.dtb
setenv bootimage zImage
setenv root /dev/mmcblk0p2

setenv fpga 0
setenv fdtaddr 0x1000
setenv kerneladdr 0x200000
setenv fpgadata 0x2000000
setenv bootargs console=ttyS0,115200 debug ignore_loglevel earlyprintk=ttyS0,115200 break=y root=${root} rootwait rw ${bootargs_extra} ${runlevel}

# load FPGA config
ext4load mmc 0:2 0x2000000 /boot/hps_only.rbf
fpga load 0 0x2000000 7007204

# load kernel and DT
ext4load mmc 0:2 ${kerneladdr} /boot/${bootimage}
ext4load mmc 0:2 ${fdtaddr} /boot/${fdtimage}

# setup bridges
bridge enable 0xffffffff

# boot kernel
bootz ${kerneladdr} - ${fdtaddr}

As for using extlinux.conf, I didn’t really feel like diving into syslinux. My goal was to get the FPGA programmed before kernel boot by any means necessary so I was happy enough with the solution detailed in this post. I suppose you could use extlinux, but I can’t help you there.

1 Like

This is an older thread, but I just wanted to share the steps I took to get the u-boot-with-spl working on a de10-nano. I’ve documented all the steps here on this github wiki including how to create a debian file system on which you can flash the design at boot or while the OS is running without restarting the device.

If you are using a de10-nano board, I’ve also made the SD Card images available for download.

I think many of the steps can be used for the de0 also.

PS: Apologies for the shamless plug.