[lug] Adding kernel driver to a raspberry pi.

stimits at comcast.net stimits at comcast.net
Mon Jan 11 13:10:14 MST 2016


I don't have an RPI, but during kernel config and compile there is a parameter CONFIG_LOCALVERSION. The kernel itself has part of the version information built in, but the final full version concatenates CONFIG_LOCALVERSION. The result of "uname -r" is the base kernel version from the source, plus the CONFIG_LOCALVERSION. Modules are searched for in "/lib/modules/$(uname -r)". From what you've shown, it appears "4.1.13" is the base version, and "+-v7" or "-v7+" is the CONFIG_LOCALVERSION. CONFIG_LOCALVERSION between the two does not match, thus modules are searched for in different locations.
 
Under make menuconfig you would go into "General setup --->", and see "Local version...". Or you can edit .config directly.
 
 
----- Original Message -----From: Jonathan Eidsness <jonathan.eidsness at gmail.com>To: lug at lug.boulder.co.usSent: Mon, 11 Jan 2016 19:52:59 -0000 (UTC)Subject: [lug] Adding kernel driver to a raspberry pi.

Hi,

I'm trying to compile and install a new device driver on a raspberry pi and I'm having some issues at the end of the process.

My build process starts from a fresh install of raspbian jessie lite and from there I:
1. Install gcc-4.8 to match the kernel's compiler
2. Use rpi-source (https://github.com/notro/rpi-source) to get the source that isn't included in raspbian, 
3. Apply a patch for the driver to the source
4. Copy the config from the kernel
5. Run make modules_prepare and enable the driver as a module in the config
6. Compile and install the driver

All that seems to work out just fine, but when I try to enable the driver with modprobe I get "modprobe: FATAL: Module ad5592r not found.".

One thing I've noticed is that the .ko objects are installed into /lib/modules/4.1.13+-v7/extra which differs from what "uname -r" returns (4.1.13-v7+). Moving the objects over to the directory matching the running kernel doesn't fix the problem.

Does anyone have any ideas on getting this working?



Jonathan Eidsness303-725-0215




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20160111/74ad6e6e/attachment.html>


More information about the LUG mailing list