Skip to content

Preparing Raspberry Pi for building additional kernel modules.

Preparing Raspberry Pi for building additional kernel modules. published on 1 Comment on Preparing Raspberry Pi for building additional kernel modules.

Today I was trying to build ipt-netflow kernel module on my Raspberry Pi with Raspbian linux. For hours I was stuck with proper system setup to make it ready for compiling additional kernel modules. The problem was with make prepare modules_prepare command which gives me such error:

Google was not very helpful with this problem. Finally, basing on various trops, I got it worked. Uff.. Here is the proper way to setup Raspberry Pi for compiling additional kernel modules:

Install kernel headers and other tools:

Install rpi-source tool. This downloading full kernel sources, not only kernel headers.

Install kernel sources (Lack of this was the cause of problems).

You will see something like that:

I suggest you create a symlink to /usr/src/linux:

Copy current kernel config to downloaded kernel sources and make oldconfig:

Run module assistant:

Prepare kernel for modules compilation:

After this steps I was able to compile third party kernel modules. 🙂
At the end I would like to highly recommend ipt-netflow kernel module – it is very robust solution for sending netflows from linux machines.

1 Comment

Leave a Reply to dre Cancel reply

Your email address will not be published. Required fields are marked *