Compile driver, get error!?!
Alan Dayley
plug-devel@lists.PLUG.phoenix.az.us
Thu Oct 23 20:28:02 2003
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 23 October 2003 10:19 am, Alan Dayley wrote:
> I have compiled drivers before but this one is giving me a pain.
>
> - I recompiled the st.o (SCSI tape) driver by doing "make
> drivers/scsi/st.o" from the /usr/src/linux-2.4.18-3 directory.
> - I then did "make modules_install" to let make copy the driver to where =
it
> expects it.
> - I then "rmmod st" and attempted "modprobe st" This gave me the error
> "couldn't find the kernel version the module was compiled for"
>
> Here is where I think the problem lies: I have two kernels available on
> this box. They are named: " 2.4.18-3" and "2.4.18-3MultiLU" the later
> having been compiled for support of SCSI devices with multiple logical
> units.
>
> Note:
> - I am running the 2.4.18-3MultiLU kernel.
> - The EXTRAVERSION parameter of the Makefile is set to "=3D -3MultiLU"
> - The Makefile I am discussing is in the /usr/src/linux-2.4.18-3 director=
y.
> - My new st.o file was copied to the
> /lib/modules/2.4.18-3MultiLU/kernel/drivers/scsi/ directory.
> - There is no /usr/src/linux-2.4.18-3MultiLU directory.
>
> So, if the driver "couldn't find the kernel version" it was compiled for,
> how do I determine which version it was compiled for? How do I make it
> compiled for the version I am runing, "-3MultiLU"?
>
> Alan
All right, I am learning a bit here. These links seem to indicate a possib=
le=20
explanation:
My kernel is probably configured to bind the st driver to the base kernel, =
not=20
as a loadable module:
http://www.faqs.org/docs/Linux-HOWTO/Module-HOWTO.html#AEN204
This describes the objdump program that can display part of the st.o file. =
A=20
way to see what kernel it was compiled for, among other things:
http://www.faqs.org/docs/Linux-HOWTO/Module-HOWTO.html#MODINFO
So, does that mean I can just put my st.o file in the correct place and=20
reboot? I wish I was still at work so I could try it out.
Alan
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/mJVlUIl18h7/dy4RArNaAJ9z1XVnYW6kQgqHP9/0bW68NL5IHgCgqPYV
Sq73o1y1rPUH830uNWmD30E=3D
=3DYqHZ
=2D----END PGP SIGNATURE-----