SLD Hub on old Linux Kernel

Hello, I need to debug a Cyclone V SoC FPGA using the SLD Hub driver. I need to compile the driver for my Linux version, and it is an old version “4.1.22-ltsi”. This Linux version is running well since long time and we need to change a lot of things to upgrade it. So we prefer to avoid the Linux upgrade.

The issue is that I need to have the headers sources to compile the driver, and since old tags have been removed from the altera-opensource/linux-socfpga Github repo I cannot find the correct headers for my Linux version.

I also wanted to use a precompiled version of the driver that I have with a very close version, but “insmod” doesn’t accept it as the version magic is slightly different, only a “-dirty” differ… Moreover, I cannot run “modprobe -f” to force the insertion of the driver because the command seems broken, I get “modprobe: can’t change directory: No such file or directory”.

Do someone know how I can use the SLD Hub on my system without requiring to update the Linux version ? Does it exist an equivalent of the SLD Hub driver but only running in the user space (for example mapping /dev/mem …) ?

Thanks !