how to compile driver for Bananian?

13 7223
I am running an Ubuntu Machine 14.04 and want to compile a driver (cp210x) for my Banana Pi running Bananian.
The source is find here
But I don't know how to do. Is there any tutorial for compiling modules?
hi, I also need to compile a different driver.
My problem is that I can't download the correct kernel source from the github.
Which branch is the one for the latest stable bananian?

Alternatively, can I upgrade to a newer kernel? (It supports my device)

I think I found out how to compile a driver. I used this tutorial
BUT, the problem I have is when I clone the kernel repository (linux-sunxi.git) it is kernel version 3.4.10 but how can I get a lower version (3.4.90)?
And, do I also need the Board Support Package?

Hey all.

I managed to compile the latest Kernel, and a custom driver for my USB3.0 Gigabit Ethernet adapter.
When I get some time, I will create up an automated environment for ya
Just like my android one: ... ironment_setup.html

In order to compile your own drivers you would need headers, among other resources. So you would need to got to the maintainers of your BPi-OS and ask them for the headers, as there is at the moment no easy way to get the right ones.

If you are on bananian 4.11 you need 3.4.104+ headers -- at the moment. Lemaker, please allow us to compile our own drivers. Without proper resources like headers, documentation, source code the banana pi is a trap, feels like a prison.

Letting people "create the headers from the source code" is not in the reach of most users. Please help normal users to get their drivers by setting up a process that provide appropriate headers for all your releases.

BaPiUser stop posting this again and again in every thread. We understand you need this, I already pushed you to the right sources for Bananian (which are also linked on
We won't provide headers before we have a apt repository. But at the moment other topics are much more important, e.g. hardware support for the Banana Pro and BPI-R1.

We do not have unlimited ressources but feel free to contribute.

Hi ,

i'm newbie , but look like , if  someone want to compiles modules or own custom kernel with special module same version in bananian 141102 ,  to go  and compiled it.  after compiled complete , in output it show kernel 3.4.104+



I'm a newbie too. I tried to git clone the source from the same link ( ) and compile it,  but the kernel version is 3.4.104:

root@bpi:/lib/modules# uname -a
Linux bpi 3.4.104 #2 SMP PREEMPT Wed Jan 28 04:23:58 HKT 2015 armv7l GNU/Linux

but not 3.4.104+

Can anyone please enlighten me. Thanks!

Hello everybody.

Sorry for the span, but i still have no answer.
I'm newbie too, and i still don't understand why some modules could not be compiled without "Module.symvers" file.
This file is not provided at each release for strange reason. Well, maybe we could build it by ourself, no ?

So if i have the latest release of bananian (for banana pi), version: 15.01 (released 2015-01-11), and would like to build new module, like for example "can4linux", i should have this famous "Module.symvers" file.

So i could get the latest bananian sources, like for example:
  1. git clone
Copy the Code
  1. zcat /proc/config.gz > /root/linux-bananapi/.config
Copy the Code
and then build modules, like for example:
  1. cd linux-bananapi
  2. make modules
Copy the Code
This should create this mystic "Module.symvers" file, no ?

Someone could confirm this solution ?

Hi all.

After long time building modules, "Module.symvers" has been created.
After trying to build "can4linux" module, like describe in my previous post ( ... anian_distrib_.html), it fails
I could not install can4linux.ko by the command insmod:
  1. root@bananapi:~/can4linux-code/can4linux# insmod can4linux.ko
  2. Error: could not insert module can4linux.ko: Invalid module format
Copy the Code
Even if i start from scratch, nothing work, so...
I will probably use external CAN module, like AT90CAN128, as nobody should be able to use CAN bus from banana pi, with bananian distribution.

You have to log in before you can reply Login | Sign Up

Points Rules