I am not very familiar with Linux, so may be my question is a little bit foolish.
I would like to compile kernel module without recompiling the kernel (USB Wi-Fi stick driver for MT7106U chip). I have the source code and instructions.
As I understand, the module should be compiled with the same gcc version, that was used for kernel build. Currently I have this configuration:
Linux raspberrypi 4.9.59+ #1047 Sun Oct 29 11:47:10 GMT 2017 armv6l GNU/Linux
gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516
How to find which compiler version was used to build kernel and how to change gcc version for this correctly? I tried
sudo update-alternatives --config gcc
but I got
update-alternatives: error: no alternatives for gcc
Should I uninstall current version of gcc or it can be installed along with this one?
Also I need Raspberry Pi linux headers using rpi-source. I have found this one:
https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source
Is this correct link?
Thanks.