Skip to content

Preparing Raspberry Pi for building additional kernel modules.

Preparing Raspberry Pi for building additional kernel modules. published on No Comments 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 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).

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.

Raspberry Pi 2b as a home router with Cisco switch and VLANs

Raspberry Pi 2b as a home router with Cisco switch and VLANs published on 5 Comments on Raspberry Pi 2b as a home router with Cisco switch and VLANs

Hi!

Some time ago I configured my Raspberry Pi as a home router. Below, in short brief is shown my configuration.
raspberry_cisco_switch

On the Cisco switch, I have created two vlans:
vlan10 – WAN (Internet connection)
vlan20 – LAN (Home network)

The first port of the Cisco switch is connected to the the Internet, and is configured as access port for vlan10. The second port is connected to the Raspberry Pi as trunk port – traffic from vlan10 and vlan20 is tagged on this port. Third port is in access mode and is connected to the home access point.

Network configuration on Raspberry Pi looks as follows:

On eth0 interface I have set 192.168.100.1 address for management purpose in case of problems with access to the Raspberry Pi from vlan’s side. On vlan10 interface I have to set the custom mac address to obtain IP address from my internet provider. Vlan20 with addresses 192.168.50.1/24 is for my home network.
The rest of my configuration like NAT, dhcp, dns is pretty standard and will not be posted about it here. If you have questions, I will be happy to answer in the comments 🙂

How Raspberry Pi performs as a router on my 100/50 Mb/s internet connection? Quite nicely for a network card supported by USB – which has Raspberry.
4931071421