Ubuntu Mate 16.04 (RPI 3) - Linux Headers 4.1.9-v7+

Hi there,

I have recently installed Ubuntu Mate 16.04 for Raspberry PI 3 and I am quite happy with it. But the issue I am struggling with since a few days is to get the exact Linux header sources used to compile the kernel that comes with it.

I need this to compile a kernel module, I do not need to replace the whole kernel.

uname -r returns 4.1.9-v7+

So far I tried with: https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.1.19.tar.xz

and also with the 4.1.y RPI branch https://github.com/raspberrypi/linux/commits/rpi-4.1.y

I am compiling these with generating the current .config file from the actual kernel build but no use. When I am building *.ko modules for ARM, the insmod refuses to load them saying that they are incompatible. It seems that 4.1.9-v7+ has extra customizations made and the exact sources are required in order to build the modules.

So does anyone know where to get the exact Linux headers used in Raspberry PI 3 Ubuntu Mate 16.04 distribution (4.1.9-v7+)?

Thanks a lot!