Cyclone 5 - DE10-standard

For some time I have been trying to understand how to build an embedded Linux to my terasic de10-standard board, without success.

After booting the provided Linux image that is available for download from the terasic website, I was able to check the following information:

  • U-Boot: 2013.01.01
  • Kernel version: 4.5
  • Machine model: Terasic DE1_SoC

Shall I try to build my embedded Linux using these versions of u-boot, kernel and machine model?

I’m asking this because I’ve already tried the most up-to-date versions of u-boot, kernel and already used a machine model that matches my board, but unfortunately I’m not able to change the “soc_system.rbf” to reprogram my board at booting time.

Changing the “soc_system.rbf” when using the terasic’s provided Linux image works pretty well.

The problem with the most updated versions are probably linked to changes on u-boot, which combines support for the secondary preloader and u-boot into one u-boot-with-spl binary.

Whatever, I wonder if I should invest some time building my embedded Linux using these outdated versions of u-boot, kernel and machine model or I will waste my time.

Could anyone help?

One way to do it is building the u-boot with the (in my case) socfpga_de10_nano_defconfig from the official u-boot github.

Assuming your rbf is on the mmc memory, you can then boot into the u-boot, and then type:

setenv load_fpga "load mmc 0:1 '\$loadaddr' fpga.rbf; dcache flush; fpga load 0 '\$loadaddr' '\$filesize'; bridge enable;"
setenv bootcmd "run load_fpga; run distro_bootcmd"

Rename the rbf or change the path. I have tested this with u-boot v2023.04. In u-boot you can now “run load_fpga” to configure the fpga. It will also be run automatically when booting into the kernel.

For more info read:
DE10-Nano/ at main · Chris44442/DE10-Nano · GitHub

In my other repo I also have a very simple tool to configure the de10-nano from linux, if that interests you.
GitHub - Chris44442/cyclone5_soc_fpga_config_tool: Software tool that lets you configure your Cyclone V FPGA fabric from the HPS Linux

I am guessing that all of this works for the de10-standard too.