Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
02-04-2014, 05:30 PM
|
#1
|
Member
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212
Rep:
|
'hdaps': Exec format error
Hi,
on my ThinkPad x200 with Slackware 14.1 (32bit), I installed the tp_smapi package from Slackbuilds and when I try to load the hdaps module, it throws me the error message:
Code:
# modprobe -v hdaps
insmod /lib/modules/3.10.17-smp/kernel/drivers/firmware/thinkpad_ec.ko force_io=1
modprobe: ERROR: could not insert 'hdaps': Exec format error
This is confusing me because in Slackware 14.0 it worked well and this error message I usually get only when I try to run a program that was built for an architecture different than ix86.
Here's the output I got during the build process: build_log.txt
My kernel version and architecture:
Code:
# uname -r && uname -m
3.10.17-smp
i686
Please help!
Last edited by slacksam; 02-05-2014 at 03:02 AM.
|
|
|
02-04-2014, 05:57 PM
|
#2
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
Sounds like the module got built for a different arch. Maybe i486, instead of i686.
|
|
|
02-04-2014, 06:04 PM
|
#3
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
Yeah, the SlackBuild file needs fixing.
Code:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
The line wtih "i?86" in the case statement is making your module get built for i486, but you are running i686.
EDIT: The SlackBuild itself doesn't need fixing, just edited by you for your build. Didn't mean to step on the package maintainer's toes there.
Last edited by j_v; 02-04-2014 at 06:09 PM.
|
|
|
02-04-2014, 06:07 PM
|
#4
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
Change
Code:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
to
Code:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
This will get the build to work for your i686 kernel.
|
|
|
02-04-2014, 06:17 PM
|
#5
|
Member
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212
Original Poster
Rep:
|
Hi j_v,
I followed your advice and built it for the i686 architecture:
Code:
# ARCH="i686" sh tp_smapi.SlackBuild
But that makes no difference. Still doesn't work.
Edit: The package name now is "tp_smapi-0.41_3.10.17_smp-i686-1_SBo.tgz"
Last edited by slacksam; 02-04-2014 at 06:21 PM.
|
|
|
02-04-2014, 06:22 PM
|
#6
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
NO. You have to change the build script. That case statement is just taking your 'ARCH="i686"' and replacing it with 'i?86) ARCH=i486 ;;' if you don't change the script!
EDIT: sorry, didn't mean to yell.
EDIT2: And I see I was wrong. I was ignoring the 'if [ -z "$ARCH" ]; then' test.
Last edited by j_v; 02-04-2014 at 06:37 PM.
|
|
|
02-04-2014, 06:30 PM
|
#7
|
Member
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212
Original Poster
Rep:
|
The line
Code:
if [ -z "$ARCH" ]; then
means: "if $ARCH is empty then"! That's why I added the parameter and it was built for the i686 architecture.
Now I changed the code as you adviced, but the result is the same.
The error still occurs.
Anyway, thanks for trying to help me!
Edit: That's why I wrote in my first post why it confuses me. It is built for the right architectute but this error occurs.
Last edited by slacksam; 02-04-2014 at 06:34 PM.
|
|
|
02-04-2014, 06:39 PM
|
#8
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
Yep, I saw it after my last post edit, and was to late to change it. Sorry.
Your right, it is strange.
|
|
|
02-04-2014, 06:45 PM
|
#9
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
I wonder if you tried to load without the 'force_io=1'? It isn't listed on the Tp smapi wiki for your model. Not sure. About as much help as I can be, I think.
|
|
|
02-04-2014, 06:50 PM
|
#10
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
Or perhaps you could try building via the current git for the module. There has been some changes since 0.41 was released.
EDIT: I've prepped a patch that brings 0.41 up to current git. Let me know if you want it and I can either put it on my github page or some other way to make it available.
Last edited by j_v; 02-04-2014 at 07:00 PM.
|
|
|
02-04-2014, 07:02 PM
|
#11
|
Member
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212
Original Poster
Rep:
|
I downloeded the git package, changed the slackbuild to use "VERSION=master" and to use unzip to extract the downloaded zipfile. Bilding the package was successfull, but there's still no change in the result.
When I use the "force" parameter with modprobe:
Code:
# modprobe -vf hdaps
install /sbin/modprobe -i tp_smapi ; /sbin/modprobe -i hdaps
insmod /lib/modules/3.10.17-smp/kernel/drivers/firmware/tp_smapi.ko
modprobe: ERROR: could not insert 'tp_smapi': Exec format error
insmod /lib/modules/3.10.17-smp/extra/hdaps.ko
modprobe: ERROR: could not insert 'hdaps': Exec format error
modprobe: ERROR: Error running install command for hdaps
modprobe: ERROR: could not insert 'hdaps': Operation not permitted
Edit: Now I have to go to bed, it already is 01:05 h CET here in Germany. Thank you!
Last edited by slacksam; 02-04-2014 at 07:10 PM.
|
|
|
02-04-2014, 07:12 PM
|
#12
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
Damn. Well, just one question. I doublt that this is the problem, as you seem pretty savy, but is it possible that the kernel you are running and the modules at /lib/modules/3.10.17-smp are somehow mismatched? Like if you've built a custom kernel that has the same name as the ones in /lib/modules, but maybe those modules didn't actually come from the the same kernel build as the kernel you are running. Or something along these lines. It's the only other thing that comes to mind.
|
|
|
02-04-2014, 07:58 PM
|
#13
|
Member
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212
Original Poster
Rep:
|
Before going to bed, I did:
Code:
$ for P in kernel-generic kernel-modules; do wget ftp://ftp.ntua.gr/pub/linux/slackware/slackware-14.1/slackware/a/$P-smp-3.10.17_smp-i686-3.txz; done
# su -
# installpkg kernel-generic-smp-3.10.17_smp-i686-3.txz kernel-modules-smp-3.10.17_smp-i686-3.txz
# mkinitrd -F
# lilo
# reboot
...
Code:
$ su -
# removepkg tp_smapi
# ARCH=i686 sh tp_smapi.SlackBuild
# installpkg /tmp/tp_smapi-0.41_3.10.17_smp-i686-1_SBo.tgz
# modprobe -v hdaps
install /sbin/modprobe -i tp_smapi ; /sbin/modprobe -i hdaps
insmod /lib/modules/3.10.17-smp/kernel/drivers/firmware/tp_smapi.ko
modprobe: ERROR: could not insert 'tp_smapi': Exec format error
insmod /lib/modules/3.10.17-smp/extra/hdaps.ko
modprobe: ERROR: could not insert 'hdaps': Exec format error
modprobe: ERROR: Error running install command for hdaps
modprobe: ERROR: could not insert 'hdaps': Operation not permitted
Still no luck
|
|
|
02-04-2014, 08:25 PM
|
#14
|
Member
Registered: Oct 2011
Distribution: Slackware64
Posts: 364
Rep:
|
I should have thought of this earlier, but I guess I would check for log entries in /var/log/{debug,dmesg,messages,syslog} to see if there is more information from the kernel that what insmod/modprobe is giving you.
|
|
1 members found this post helpful.
|
02-05-2014, 02:14 AM
|
#15
|
Member
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212
Original Poster
Rep:
|
Now I built another kernel module from the slackbuilds: 'vhba-module'
It throws me the same error message when I try to load it with modprobe. On another machine with the same system I have no such issue. So it looks like the problem is only on the system I installed on the ThinkPad.
In the logfiles debug, dbus and modules there is no message about it at all, but the syslog shows:
Code:
Feb 5 07:41:12 slacktop kernel: [ 3233.876471] tp_smapi: version magic '3.10.17-sam SMP preempt mod_unload PENTIUMIII ' should be '3.10.17-smp SMP mod_unload PENTIUMIII '
Feb 5 07:41:12 slacktop kernel: [ 3233.878273] hdaps: version magic '3.10.17-sam SMP preempt mod_unload PENTIUMIII ' should be '3.10.17-smp SMP mod_unload PENTIUMIII '
So you were right, j_v: the modules are built for a custom kernel!
Now my question is how to get rid of that custom kernel and manage to boot the native one?
Reinstalling the generic kernel seems not to be enough. Is it because I can't reinstall the kernel the system is booting with?
I'll try the huge one....
|
|
|
All times are GMT -5. The time now is 06:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|