Building the Kernel driver

274 views
Skip to first unread message

David

unread,
Aug 8, 2014, 4:33:32 AM8/8/14
to easycap-so...@googlegroups.com
I had a look at: https://code.google.com/p/easycap-somagic-linux/wiki/BuildingKernelModule with a view to building a module for the current version of Tiny Core Linux (5.3).  At the moment I have parked this but I thought I'd document a few things for others.

The current version of the kernel used by Tiny Core is 3.8.13.  You download the patched kernel as a tar ball and then use the usual "tar xvf ..." to get your source tree.

The somagic instructions above start by using git to download the kernel. Some of the subsequent stuff will not run if you didn't use git in the first place to get your kernel.

I downloaded smi2021v3.patch . Two things to start with here:
 - Tiny Core uses busybox to provide the core commands. The embedded wget version does not recognise https and so I used the browser approach.
 - You have to download the patch version, not the mod version as the kernel was not downloaded from a git repository.

You then apply the patch: patch -p1 <smi2021v3.patch

This will fail when it comes to patch the Makefile.  This is because it expects the last line to be obj-$(CONFIG_VIDEO_USBTV) += usbtv/ . This is not there in 3.8.13.  It's trivial to manually add the required line of obj-$(CONFIG_VIDEO_SMI2021) += smi2021/ for the somagic drivers

Next I downloaded the six patch files using a browser.  Once again pick the patch versions, not the mod ones.

The first three patches go on without any problems, it bombs out on the fourth one (and the subsequent ones).  Looking at the first patch I see it is looking for a line which includes:
 == GM7113C
Looking at the source code I see that in this version of the saa7115.c file that item is:
 == V4L2_IDENT_GM7113C

With such a fundamental difference like this I haven't yet looked further to see what's involved in applying the required patches to the older drivers.

As a matter of interest has anyone tried building the kernel driver for a 3.8 kernel or similar?

Regards

David




Reply all
Reply to author
Forward
0 new messages