Adding driver to android devices kernel

executioner picture executioner · Aug 9, 2012 · Viewed 15.8k times · Source

I would like to use a PCAN with my device. I have the program for it, and an otg cable, but i need to install the driver first. And i found a linux driver on the manufacturers site.

I downloaded the kernel source, arm toolchain, and read a few sites about building and compiling but i havent find anything about adding driver.

So my question is, how can i add or install this driver on android? The device is galaxy tab 10.1 P7510.

Thanks for your help.

Answer

t0mm13b picture t0mm13b · Aug 9, 2012

Right, what you need to do is this:

  • Unzip the tarball source
  • Go into the respective directory of the source - cd peak-linux-driver-7.7/ as quoted by the above PDF

cd peak-linux-driver-x.y

make clean

make su -c “make install”

When the build completes, issue this command

/sbin/modprobe pcan

However, having stated this, I do not see any reference to building with Android, so it looks like a fair bit of messing around with the source to get this to actually work on Android.

From what I can ascertain, this is more orientated towards the desktop PC only...

As is mentioned in a later comment clarifying this answer; the kernel would need to be recompiled from source as an arm v7 or v8 target. The part not mentioned was that it would also have to be statically linked to avoid requiring glibc in Android or bionic lib c in your computer.