HPS Linux software handle FPGA irq, drivers device tree overlay

I’m trying to create a project in order to generate an interrupt from FPGA and handling it in the HPS software.
I try do it on DE0/nano Atlas board using Quartus Lite edition, and SOC EDS , I’m working under CentOS (centos-release-7-3.1611.el7.centos.x86_64) .
I have encountered many obstacle to do it. Because I found many information on roketboards.org to do various step, but There seems to be no glue between information, many link are missing or are obsolete internet path, sometimes there are incredible and undebuggable makefile that after tons of instruction arrive to mysterious and incomprehensible for beginner.
Moreover there are multiple way to do the same work, but the difference between them not are explained.

Someone could point to the guidelines to follow to create their own simple IP like as GPIO that triggers a visible interrupt from FPGA to HPS. The question not is how to do the IP but how to integrate the fpga irq / linux driver / linux kernel and or filesystem / software

Basically I mean the guide step like, this can helps also other beginners to understand how to:

  1. Create Quartus project following the procedure described by GHRD

??? In this case must be erased some IP because you need full license of quartus, the compilation arrive to the end but after is impossible convert SOF FILE to RBF ???

  1. Create QSYS custom IP containing interrupt source
  2. In QSYS Interconnect Custom IP to HPS
  3. In Quartus Compile design
  4. Convert sof file to rbf file (the name must match the name used in device-tree file *.dts).
  5. Generate preloader
  6. Generate bootloader
  7. Generating uboot
  8. Generate device tree
  9. Downloading linux and other toolchain

**??? How and where is the last and correct version **
Is really necessary rebuild Zimage considering that we will add some software drivers ? ???

  1. Compiling linux kernel (zImage)
  2. Compiling linux root filesystem (ext3)
    ??? I try to use Buildroot procedure but don’t work ???

??? how customize filesystem with custom software and driver ???

  1. Compiling linux uboot and device tree

For example just at this point I don’t know how match the device-tree and uboot generate by GSRD makefile and by Linux.
14) Write software driver for interrupt
_??? How to integrate the drivers on file system _
I try to use de device tree overlay instruction but don’t’ work
Perhaps I don’t have correct root file system ???

  1. Create sd image

I understand that this topic touch many arguments but, it is !

hi diego,
Unless you have some specific requirements, steps 5,6,7,8 are often unneeded - you can start with a reference SD card image and just leave those parts unchanged.
Depending on your needs, 12 may also be the same - file system is persistent on the card, so you can just start with the reference binary and add stuff, rather than building the filesystem.

  1. Check what revision was on the reference SD card (by booting it) and then locate it (or the closest one) on the altera github. No need to update beyond that unless you run into problems.
    You are right that it may not really be necessary to build your own zImage, but in practice you need the source tree if you are going to build a kernel module to handle the interrupt.

  2. create the device tree by making additions to the default device tree in the kernel source, then doing ‘make dtbs’

sorry for the mistake above, (5) is obviously needed

Hi Solney,
considering I will need to build a linux driver for interrupt handling, I’m trying to compiling linux kernel and root filesystem
but using indicate procedure from https://rocketboards.org/foswiki/Documentation/AtlasSoCCompilingLinux
and sourcing /atlas-soc-ghrd/scripts/atlas_socdk_setup_angstrom_1.7.sh script
the procedure fails because bitbake fails to retrive some repository, more than one
is this the corretc way to compiling linux kernel ?