LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   missing proper headers package (http://www.linuxquestions.org/questions/slackware-14/missing-proper-headers-package-825128/)

bamdad 08-09-2010 01:25 PM

missing proper headers package
 
hi everybody,

i never thought i'll be forced to ask about a problem trivial as this, but hey, it might be that i'm just stupid.

so my story is this: Slackware works currently the best on my old Thinkpad T42, so i've installed it. i like to use the tp_smapi and hdaps modules in combination with the hdapsd daemon to protect my hard drive.

i installed the huge.s kernel, thinking that i'll compile my own later, but it should be better on a single processor machine than the hugesmp.s one.

as Slackware doesn't have fancy things such as dkms or akmods, i downloaded the tp_smapi and hdapsd slackbuilds and compiled them. however, after installing the package and trying to load my modules, i got this error message:
Code:

# modprobe tp_smapi
FATAL: Error inserting tp_smapi (/lib/modules/2.6.33.4/kernel/drivers/firmware/tp_smapi.ko): Invalid module format

i checked dmesg to see what's wrong, and it says on the bottom line:
Code:

thinkpad_ec: version magic '2.6.33.4-smp SMP mod_unload 686 ' should be '2.6.33.4 mod_unload 486 '
(thinkpad_ec is a dependency of tp_smapi)

the problem seems to be obvious: i have the wrong kernel headers and thus the module compiles for the SMP kernel.
Code:

# slackpkg search headers
[ installed ] - kernel-headers-2.6.33.4_smp-x86-1

so my question is: should i switch to the SMP kernel, or is there another way around this? i don't see a headers package for other kernel versions neither on the DVD, nor online.

thanks for any help,
bamdad

GrapefruiTgirl 08-09-2010 01:45 PM

Far as I know, there's no incredibly good reason that you wouldn't want to use the SMP kernel, even with only one CPU. It should work fine - someone will correct me if there's a good reason not to use it.

Here's one suggestion (and there are other ideas probably coming from other folks - this is just one of them):

If you've got the kernel source installed, then grab your kernel config from /proc/config.gz (use `zcat` to ungzip it to a new file), then place it into your kernel source directory and name it ".config", then run `make clean` and then `make` and then `make headers_install` to install headers that match your kernel.

It seems you already have the correct modules installed for your kernel (don't you?), so no need to run `make modules_install`.

And a tip: if you wanted to make a proper Slackware package of your freshly compiled headers, use src2pkg to make the package; then install it (of course, remove the existing headers package first).

T3slider 08-09-2010 01:46 PM

From CHANGES_AND_HINTS.TXT on the install media:
Code:

Use one of the provided generic kernels for daily use.  Do not report
  bugs until/unless you have reproduced them using one of the stock
  generic kernels.  You will need to create an initrd in order to boot
  the generic kernels - see /boot/README.initrd for instructions.
  The huge kernels are primarily intended as "installer" and "emergency"
  kernels in case you forget to make an initrd.  For most systems, you
  should use the generic SMP kernel if it will run, even if your system is
  not SMP-capable.  Some newer hardware needs the local APIC enabled in the
  SMP kernel, and theoretically there should not be a performance penalty
  with using the SMP-capable kernel on a uniprocessor machine, as the SMP
  kernel tests for this and makes necessary adjustments.  Furthermore, the
  kernel sources shipped with Slackware are configured for SMP usage, so you
  won't have to modify those to build external modules (such as NVidia or
  ATI proprietary drivers) if you use the SMP kernel.

  If you decide to use one of the non-SMP kernels, you will need to follow the
  instructions in /extra/linux-2.6.33.4-nosmp-sdk/README.TXT to modify your
  kernel sources for non-SMP usage.  Note that this only applies if you are
  using the Slackware-provided non-SMP kernel - if you build a custom kernel,
  the symlinks at /lib/modules/$(uname -r)/{build,source} will point to the
  correct kernel source so long as you don't (re)move it.

You should probably just use the generic-smp kernel (or huge-smp if you absolutely insist, though I really would suggest using a generic kernel since there are other module conflicts that can happen when using the huge kernels), but if you insist on using a non-smp kernel you will have to prepare the kernel sources as described above.

bamdad 08-09-2010 03:16 PM

wow. thanks guys, i really didn't notice the CHANGES_AND_HINTS.TXT. also, thanks for the tip about src2pkg. i'll look into it. my ultimate goal is to compile my own kernel, so i only have to fix this temporarily.

marking the thread as solved.


All times are GMT -5. The time now is 01:00 AM.