Hello kernel developers/compilers!
I'd like to ask you, if you are so kind, to include the kernel headers with the official Raspbian image from now on. The entire folders structure is around 71MB:
du -s -h /usr/src/linux-headers-4.4.48-v7+/
71M /usr/src/linux-headers-4.4.48-v7+/
Raspberry Pi should be an open platform for developers and hacking enthusiasts, patching and compiling kernel modules should therefore be granted by default. To this date, the Raspbian official kernel is compiled with CONFIG_MODVERSIONS enabled (I'm always wondering why) and in order to be able to patch or compile a kernel module the afferent Module.symvers are always needed, hence at least the kernel headers are always requested.
Until now, every time I needed these kernel headers I was getting them from:
https://www.niksula.hut.fi/~mhiienka/Rp ... aders-rpi/
but with the kernel 4.4.50-v7+ included in the latest official Raspbian image from 10.04.2017 I got
some issues apparently because the Module.symvers from the official Raspbian kernel are different.
I know there are many ways to obtain them, discussed on forums, but all of them are pretty complicated and involve downloading some gigabytes of useless historical kernel data from git.
Again. If you'd like to make my (our) life happier, please include at least those kernel headers and the afferent Module.symvers with the official Raspbian image, as they only cost 71MB extra and it'll save a lot of bandwidth for the git servers where the kernel sources are located.
On this occasion, I'd also like to share the simple way I'm compiling modules on this forum
(prepare the environment):
Get the kernel headers for your running kernel from:
https://www.niksula.hut.fi/~mhiienka/Rp ... aders-rpi/
- get .config:
modprobe configs
config.gz is to be found in /proc
cp /proc/config.gz /usr/src/linux-headers-XXX
rmmod configs
cd /usr/src/linux-headers-XXX
gunzip config.gz
mv config .config
Prepare kernel headers / config:
make -j 4 oldconfig && make -j 4 prepare
make -j 4 modules_prepare
- compile your module(s) & install
Thanks!
P.S. Please do something with the authentication timeout on this forum. I had to rewrite the whole post again after I pressed submit and was redirected to the login page.