Forum Discussion

DPaul4's avatar
DPaul4
Icon for New Contributor rankNew Contributor
7 years ago

Error while loading rbf file from linux with overlay method

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>;

};

};

};

5 Replies

  • FawazJ_Altera's avatar
    FawazJ_Altera
    Icon for Frequent Contributor rankFrequent Contributor

    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

  • FawazJ_Altera's avatar
    FawazJ_Altera
    Icon for Frequent Contributor rankFrequent Contributor

    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

    • DPaul4's avatar
      DPaul4
      Icon for New Contributor rankNew Contributor

      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.

  • DPaul4's avatar
    DPaul4
    Icon for New Contributor rankNew Contributor

    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?