Can someone explain step by step how to install a module on a kernel with headers installed? I have Debian with Kernel 3.19.0 for banana pi from http://www.igorpecovnik.com/2014/09/07/banana-pi-debian-sd-image/comment-page-2/#comment-4729 and would like to install the smi2021 module needed for somagic easycap from https://github.com/jonjonarnearne/smi2021.

So there are 2 options:

1) Install module with full kernel source, by downloading kernel 3.19.0 from kernel.org - This does not work as the custom modules from debian-kernel3.19.0-bananapi are not compatible with the kernel from kernel.org

2) Install module without full kernel, with only using the already built in kernel headers. - I would like to use this option as I already have the kernel headers installed.

So can anyone show how to install step by step kernel modules with kernel headers already installed?

I tried to do as said in the comment from blog post posted above but can't do it. I get stuck at step 2: copy from /boot the config file to .config in /usr/src/linux

  • Did you check that your hardware is supported first? See linuxtv.org/wiki/index.php/Easycap Commented Apr 5, 2015 at 10:17
  • Hi Faheem! Sure, I have checked. My device is 1c88:0007 Somagic Easycap based on the SMI-2021. I need to install the module in order for it to work. I also tried the method of building kernel from code.google.com/p/easycap-somagic-linux/wiki/… but since I do not have the full kernel, only the headers, and do not know how to install the module with only the kernel headers. Commented Apr 5, 2015 at 11:09
  • Well, there a number of ways you could go. Take the kernel including the module you want, and build it as a Debian binary image, using kernel-package. Or you try to do a local build of just the module against your existing kernel. Or you could try Debianizing that module (assuming nobody else has done it) and install the module as a binary Debian package. Think about how you want to do it, and how much work you want to put into it. Commented Apr 5, 2015 at 11:21
  • Thanks Faheem! I would like to do it in the simplest way possible, so I think a local build of just the module against my existing kernel will be enough. Can you please tell me step by step how can I do that? Because I am unable to find any tutorials that will explain clearly what should I do. And I also tried the steps from igorpecovnik.com/2014/09/07/banana-pi-debian-sd-image/… but got stuck on step 2 (I am a newbie). Commented Apr 5, 2015 at 11:32
  • Basically, I need to install this module (the whole smi2021 folder) github.com/jonjonarnearne/smi2021/tree/smi2021v3-wip/drivers/… and its dependencies located at github.com/jonjonarnearne/smi2021/tree/smi2021v3-wip/drivers/… ( only saa7115.c ) Commented Apr 5, 2015 at 11:37

1 Answer 1


If you can go with full kernel source tree, here are the steps I have followed in order to compile and install a driver on the source tree:

Lets say you have the kernel sources extracted at /sources/linux-3.19

  1. cd /sources/linux-3.19
  2. make mrproper
  3. make menuconfig

    Here make sure to select your driver with "m" label. For instance, if you select to build and install atl1c driver, the config file produced as a result of the above command, .config, should have the following line: CONFIG_ATL1C=m Choose the right driver for your case and make sure to label it with "m".

  4. make prepare

  5. make
  6. make modules
  7. make modules_install
  8. shutdown -r 0

    Check to see if the driver is installed

  9. lsmod

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .