3

I came a long way to encounter this problem, so several dead end steps will be omitted.

I was trying to create a TAP interface. The first step taken was to check if I have the needed tool (which I seemingly have):

root@analog:~# ip tuntap help
Usage: ip tuntap { add | del } [ dev PHYS_DEV ] 
          [ mode { tun | tap } ] [ user USER ] [ group GROUP ]
          [ one_queue ] [ pi ] [ vnet_hdr ] [ multi_queue ]

Where: USER  := { STRING | NUMBER }
       GROUP := { STRING | NUMBER }

I decided to check if I have the needed kernel module installed/compiled/inserted, and it turned out I haven't

root@analog:~# lsmod | grep tun
root@analog:~#

Installation of the module turned out to be problematic

root@analog:~# modprobe tun
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.6.0-ga94cfb9/modules.dep.bin'

Which made me question myself if everything is fine with dependencies and such

root@analog:~# depmod
depmod: ERROR: could not open directory /lib/modules/4.6.0-ga94cfb9: No such file or directory

This made the problem even more complicated since the only place I've encountered this mystical combination of symbols is

root@analog:~# uname -a
Linux analog 4.6.0-ga94cfb9 #5 SMP Mon Dec 12 10:50:01 GMT 2016 armv7l armv7l armv7l GNU/Linux

I honestly have no idea on what kind of information might be useful for solving the problem, but I beg for any ideas which could move my investigation a bit further

1 Answers1

1

More research led me to what seems to be the answer to my question.

I know for sure that some drivers are present on the device I'm having problems with, but I couldn't find them physically on the device (.o/.ko files seem to be missing somehow).

It seems like the

drivers are compiled directly into the kernel

kernel does not have module support

as was mentioned by Ulrich Dangel here.

I had to set the needed driver in .config (can be done manually or using make menuconfig)

# CONFIG_TUN is not set
CONFIG_TUN=y

compile the kernel, and replace old uImage.

I checked if the needed driver runs by dmesg | grep tun where tun is the needed driver name. Now everything works perfectly