Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

Error while loading rbf file from linux with overlay method

DPaul4
Beginner
4,410 Views

We are trying to load rbf using linux as per the method referenced in this blog

https://forum.rocketboards.org/t/load-fpga-rbf-from-device-tree-overlay-example/999/17 

 

However we are getting the below error. 

 

@socfpga:~# echo load_rbf.dtbo > /config/device-tree/overlays/test/path

[ 6126.498665] OF: overlay: of_build_overlay_info() failed for tree@/

[ 6126.504860] create_overlay: Failed to create overlay (err=-19)

-sh: echo: write error: No such device

 

The overlay dts file contents are as below

 

/dts-v1/ /plugin/;

/ {

fragment@0 {

target-path = "/soc/base-fpga-region";

#address-cells = <1>;

#size-cells = <1>;

overlay {

firmware-name = "de10_soc.rbf";

#address-cells = <1>;

#size-cells = <1>;

};

};

};

 

0 Kudos
5 Replies
Fawaz_Al-Jubori
Employee
1,885 Views

Hello,

I would like to know if your FPGA was configured before doing the overlay. Furthermore, does the system hangs after doing this overlay? Which Device is this?

 

Thanks

0 Kudos
DPaul4
Beginner
1,885 Views

Fpga is configured from u-boot. rbf is loaded with load command in u-boot on boot time. problem is when loading from linux. The board used is de10-nano which has altera cyclone V SOC. System doesn't hang after doing the overlay. What is the meaning of the error. Is it like the nodes that we are provide in the overlay file is not present in the base dtb file. It also says no such device. Also do we have to avoid configuring the fpga from u-boot for overlay to work? I tried removing the rbf file which is loaded from u-boot. In this case linux doesn't boot.

0 Kudos
Fawaz_Al-Jubori
Employee
1,885 Views

The Linux will not boot if FPGA is not configured. This is due to the dtb file. It has some drivers that are loaded by kernel. if anything wrong happens to the FPGA, the kernel will break. The recommended flow would be using the generic dtb (which has only the HPS related stuff). Once linux is booting, you can overlay the custom dtb (where it has information about the FPGA image, FPGA IPs, and drivers needed for Linux).

 

Thanks

DPaul4
Beginner
1,885 Views

We used the linux image downloaded from the terasic website (Linux Console (kernel 4.5)).

https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=1046&PartNo=4

When we look into the ./arch/arm/boot/dts/socfpga.dtsi file the node mentioned in overlay is present.

 

  base_fpga_region: base-fpga-region {

            compatible = "fpga-region";

            fpga-mgr = <&fpgamgr0>;

 

            #address-cells = <0x1>;

            #size-cells = <0x1>;

        };

any other idea how to debug?

0 Kudos
DPaul4
Beginner
1,885 Views

Hi, this issue is resolved by adding following change in

arch/arm/boot/dts/socfpga.dtsi. Now i'm able to load rbf

 

base_fpga_region: base-fpga-region {

compatible = “fpga-region”;

fpga-mgr = <&fpgamgr0>;

fpga-bridges = <&fpga_bridge0>;

#address-cells = <0x1>;

#size-cells = <0x1>;

};

I have added this in dtsi file. This seems to be not correct. Could we specify the (fpga-bridges = <&fpga_bridge0>;) modification in overlay? How to do it?

0 Kudos
Reply