insmod: ERROR: could not insert module ./drivers/ipoe/driver/ipoe.ko: Invalid module format

Compilation and installation questions and stories
Post Reply
Maksel
Posts: 14
Joined: 18 Jul 2015, 16:25
Location: UA, Krivoy Rog
Contact:

insmod: ERROR: could not insert module ./drivers/ipoe/driver/ipoe.ko: Invalid module format

Post by Maksel »

Подскажите. не могу загрузить модуль ipoe.ko дает ошибку:
insmod ./drivers/ipoe/driver/ipoe.ko
Error: could not insert module ./drivers/ipoe/driver/ipoe.ko: Invalid module format

Debian 7
uname -a
Linux d91 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2 x86_64 GNU/Linux

собирал так:
apt-get install cmake make gcc libnl-dev libsnmp-dev lua5.1 lua5.1-devlibpcre3 libpcre3-dev
apt-get install build-essential fakeroot
в /usr/src/
apt-get source linux
apt-get build-dep linux

/usr/src/linux -> /usr/src/linux-3.2.73
make oldconfig && make prepare
make scripts

потом:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/accel-ppp -DBUILD_DRIVER=FALSE -DCMAKE_BUILD_TYPE=Debug -DSHAPER=TRUE -DRADIUS=TRUE -DBUILD_IPOE_DRIVER=TRUE -DNETSNMP=TRUE -DLUA=TRUE ..
Спойлер
root@d91:/opt/accel/accel-ppp-code-20160223/build# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/accel-ppp -DBUILD_DRIVER=FALSE -DCMAKE_BUILD_TYPE=Debug -DSHAPER=TRUE -DRADIUS=TRUE -DBUILD_IPOE_DRIVER=TRUE -DNETSNMP=TRUE -DLUA=TRUE ..
-- The C compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- 'x86_64'
-- Looking for timerfd_create
-- Looking for timerfd_create - found
-- Found Lua51: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.1.5")
-- Looking for linux/netfilter/ipset/ip_set.h
-- Looking for linux/netfilter/ipset/ip_set.h - found
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

BUILD_DRIVER


-- Build files have been written to: /opt/accel/accel-ppp-code-20160223/build
потом make и тут смущает последнее сообщение:

[100%] Generating driver/ipoe.ko

WARNING: Symbol version dump /usr/src/linux-3.2.73/Module.symvers
is missing; modules will have no dependencies and modversions.

[100%] Built target ipoe_drv

однако модуль есть, но не загружается
modinfo ./drivers/ipoe/driver/ipoe.ko
filename: /opt/accel/accel-ppp-code-20160223/build/./drivers/ipoe/driver/ipoe.ko
license: GPL
depends:
vermagic: 3.2.73 SMP mod_unload modversions

что сделал нет так ?
PS. тоже самое было и на debian 8, переставил debian 7 и тут такое.
Maksel
Posts: 14
Joined: 18 Jul 2015, 16:25
Location: UA, Krivoy Rog
Contact:

Re: insmod: ERROR: could not insert module ./drivers/ipoe/driver/ipoe.ko: Invalid module format

Post by Maksel »

Вопрос решен, может кому пригодиться.
заметил также в логах:
Feb 25 10:38:38 d91 kernel: [139886.379291] ipoe: no symbol version for module_layout

решение нашел на http://askubuntu.com/questions/14627/no ... -usbhid-ko
в моем случае:
cd /usr/src/linuх
cp /boot/config-3.2.0-4-amd64 .config
cp /usr/src/linux-headers-3.2.0-4-amd64/Module.symvers .
make oldconfig
make prepare
make scripts

после пересобрал accel и модуль загрузился.
root@d91:/usr/src/linux# tail -f /var/log/messages
Feb 25 10:56:23 d91 kernel: [140949.021026] IPoE session driver v1.10-rc1
Post Reply