Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12453 Discussions

Adding custom drivers for Linux-Altera 3.7

Altera_Forum
Honored Contributor II
840 Views

Hi all, 

 

I'm currently working on adding a custom FPGA peripherical in an Arrow SoCKIT dev board (Cyclone V), then use it within Linux. 

 

My work is based on multiple tutorials and Workshop documentations: 

- Arrow SoCKIT workshop 

- Altera Wiki 

- RocketBoard tutorial about Arrow and Yocto 

- Yocto user manual 

 

I have completed HW part as usual (quartus/qsys), and prepared a simple .sopcinfo based on Arrow recommendation with HPS, sysid, jtag debug IP and one custom IP. I have tested my IP with Qsys system tool, so far everything seems ok. 

 

I'm not sure how to properly add a driver to Linux distribution. 

 

From now I have tried multiple ways to do this: 

 

- I have generated 2 uImage including my driver, one from Yocto the other from arm-eabi compiler as described in Altera-Wiki 

- I have generated .dts from .sopcinfo with sopc2dts, wich is very different from SoCKIT prebuild dts. 

- I have created a new dts based on original DTS from SoCKIT prebuild + my custom device. 

- I have generated multiple DTB with Yocto and stand alone compiler from different DTS 

 

I suspect my uImage are good, but everytime I add a new device on dts the resulting dtb seems to be wrong and Kernel does not start anymore. 

 

Has anyone here already tried and succeeded on adding a custom FPGA IP and access it from Linux system? 

 

Another question, is u-boot spl impacted by this kind of modification? I guess not but I am not 100% sure about that.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
107 Views

I tried it once with Linux 3.7. 

 

The result is that the dts generated with the 13.0SP1 tools does not work. 

 

For testing purposes I've modified the example dts file that comes in the repository to add my custom component. I haven't used any bridge, just used the address with the hps2fpga bridge offset. 

 

I hope this information helps.
Reply