cannot load *any* modules with 2.4 kernel
Hi,
I boot two kernels, a 2.6.9 kernel and just recently built a 2.4.32 kernel
In the 2.4.32 kernel I have =y for:CONFIG_MODULESCONFIG_MODVERSIONSCONFIG_KMOD
I then build my kernel, with some modules, install the modules, and boot my 2.4.32 kernel successfully
when i do lsmod, it is completely empty, no modules are loaded. This only happens for my 2.4.32 kernel though, modules load fine in 2.6.9
If i try to manually insert with insmod or modprobe, i get unresolved external symbols for things that I am sure should be resolved... for example, i get unresolved external symbol for printk
I'll give some other common unresolved smybols and maybe someone can point me in the right direction of what else i need to specify to you guys so that you can help me out further.
prinktadd_timerdev_mc_add
CardServices
kfreecpu_raise_softirqfree_irq
kmalloc
Thanks!
George
Hi,
Quoted 9 lines · George Nychis
Hi,
I boot two kernels, a 2.6.9 kernel and just recently built a 2.4.32 kernel
In the 2.4.32 kernel I have =y for:
CONFIG_MODULESCONFIG_MODVERSIONSCONFIG_KMOD
Quoted 5 lines
I then build my kernel, with some modules, install the modules, and boot my 2.4.32 kernel successfully
when i do lsmod, it is completely empty, no modules are loaded. This only happens for my 2.4.32 kernel though, modules load fine in 2.6.9
What's your modutils version ? -> lsmod -V
You must use modutils and not modules-utils under 2.4, and I suspect that if you jumped back from 2.6 to 2.4, you might not have the right package. Note that modules-utils contains a wrapper to call the right modutils when you are running 2.4, so you should really do lsmod -V when running 2.4.
Quoted 17 lines
If i try to manually insert with insmod or modprobe, i get unresolved external symbols for things that I am sure should be resolved... for example, i get unresolved external symbol for printk
I'll give some other common unresolved smybols and maybe someone can point me in the right direction of what else i need to specify to you guys so that you can help me out further.
prinkt
add_timerdev_mc_add
CardServices
kfreecpu_raise_softirqfree_irq
kmalloc
Quoted 2 lines
Thanks!
George
Regards,
Willy
Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to /usr/local/modutils
Then in my 2.4.32 kernel's Makefile, I changed the DEPMOD variable to point to /usr/local/modutils/sbin/depmod
Then I build the kernel with:
make dep && make bzImage modules modules_install && make install
So then my initrd gets generated, I reboot to the 2.4.32 kernel, and thats where i'm at now.
So then for instance I goto /lib/modules/2.4.32/net and do:/usr/local/modutils/sbin/insmod 8390.o
and I see all those unresolved symbols
So maybe now that you have more info, we can figure something out.
Thanks!
George
Quoted 49 lines · Willy Tarreau
Hi,
Quoted 9 lines · George Nychis
Hi,
I boot two kernels, a 2.6.9 kernel and just recently built a 2.4.32 kernel
In the 2.4.32 kernel I have =y for:
CONFIG_MODULESCONFIG_MODVERSIONSCONFIG_KMODQuoted 5 lines
I then build my kernel, with some modules, install the modules, and boot my 2.4.32 kernel successfully
when i do lsmod, it is completely empty, no modules are loaded. This only happens for my 2.4.32 kernel though, modules load fine in 2.6.9
What's your modutils version ? -> lsmod -V
You must use modutils and not modules-utils under 2.4, and I suspect that if you jumped back from 2.6 to 2.4, you might not have the right package. Note that modules-utils contains a wrapper to call the right modutils when you are running 2.4, so you should really do lsmod -V when running 2.4.Quoted 17 lines
If i try to manually insert with insmod or modprobe, i get unresolved external symbols for things that I am sure should be resolved... for example, i get unresolved external symbol for printk
I'll give some other common unresolved smybols and maybe someone can point me in the right direction of what else i need to specify to you guys so that you can help me out further.
prinkt
add_timerdev_mc_add
CardServices
kfreecpu_raise_softirqfree_irq
kmallocQuoted 2 lines
Thanks!
GeorgeRegards,
Willy
Quoted 9 lines · George Nychis
Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to
/usr/local/modutilsThen in my 2.4.32 kernel's
Makefile, I changed the DEPMOD variable to point to/usr/local/modutils/sbin/depmodThen I build the kernel with:
make dep && make bzImage modulesmodules_install&& make install
Quoted 7 lines
So then my initrd gets generated, I reboot to the 2.4.32 kernel, and thats where i'm at now.
So then for instance I goto
/lib/modules/2.4.32/netand do:/usr/local/modutils/sbin/insmod8390.oand I see all those unresolved symbols
Hmmm 8390.o needs crc32.o (or maybe you built it into your kernel). Could you please :
- grep 8390.o /lib/modules/2.4.32/modules.dep
- post the exact list of unresolved symbols that insmod outputs
- grep 2 or 3 of them in /proc/ksyms (eg: printk)
- post your .config so that we can find a way to reproduce your problem.
Quoted 1 line
So maybe now that you have more info, we can figure something out.
By the time you do this, it would also be interesting to retry without CONFIG_MODVERSIONS. Oh, and please report your gcc and binutils versions so that we can be as close as possible to your conditions when trying to reproduce.
Quoted 2 lines
Thanks!
George
Regards,
willy
Thanks for all the help Willy,
Nothing from the grep:
[root@emu-5 net]# grep 8390.o /lib/modules/2.4.32/modules.dep [root@emu-5 net]#
Exact list:enable_irqeth_type_trans__kfree_skballoc_skbether_setupcrc32_le
kmalloccpu_raise_softirqalloc_netdev__out_of_line_bugdisable_irq_nosyncnetif_rxskb_over_panic
bitreverse
jiffiessoftnet_data
prink__const_udelay
Grepping 2 or 3:
[root@emu-5 net]# grep enable_irq /proc/ksyms c010a5e0 enable_irq_R__ver_enable_irqc0343610 matroxfb_enable_irq_R__ver_matroxfb_enable_irq [root@emu-5 net]# grep printk /proc/ksyms c011aee0 printk_R__ver_printk
[root@emu-5 net]# grep kmalloc /proc/ksyms c0132c60 kmalloc_R__ver_kmallocc03c07e0 sock_kmalloc_R__ver_sock_kmalloc
binutils version: 2.15.92.0.2 20040927
gcc: 3.4.2 20041017
My .config can be found here:
http://www.andrew.cmu.edu/user/gnychis/.config
And I will try taking out CONFIG_MODVERSIONS support and let you know how it goes!
By the way, i'm not keen on inserting 8390.o into the kernel, it was simply the first thing i saw in my /lib/modules/2.4.32 directory, my goal is to get any module at all to insert, because it seems none will insert.
Thanks again!
George
Quoted 39 lines · Willy Tarreau
Quoted 9 lines · George Nychis
Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to
/usr/local/modutilsThen in my 2.4.32 kernel's
Makefile, I changed the DEPMOD variable to point to/usr/local/modutils/sbin/depmodThen I build the kernel with:
make dep && make bzImage modulesmodules_install&& make installQuoted 7 lines
So then my initrd gets generated, I reboot to the 2.4.32 kernel, and thats where i'm at now.
So then for instance I goto
/lib/modules/2.4.32/netand do:/usr/local/modutils/sbin/insmod8390.oand I see all those unresolved symbols
Hmmm 8390.o needs crc32.o (or maybe you built it into your kernel). Could you please :
- grep 8390.o/lib/modules/2.4.32/modules.dep
- post the exact list of unresolved symbols that insmod outputs
- grep 2 or 3 of them in/proc/ksyms(eg: printk)
- post your .config so that we can find a way to reproduce your problem.Quoted 1 line
So maybe now that you have more info, we can figure something out.
By the time you do this, it would also be interesting to retry without
CONFIG_MODVERSIONS. Oh, and please report your gcc and binutils versions so that we can be as close as possible to your conditions when trying to reproduce.Quoted 2 lines
Thanks!
GeorgeRegards,
willy
Quoted 16 lines · George Nychis
Thanks for all the help Willy,
Nothing from the grep:
[root@emu-5 net]# grep 8390.o/lib/modules/2.4.32/modules.dep[root@emu-5 net]#Exact list:
enable_irqeth_type_trans__kfree_skballoc_skbether_setupcrc32_le
kmalloccpu_raise_softirqalloc_netdev
Quoted 8 lines
__out_of_line_bugdisable_irq_nosyncnetif_rxskb_over_panic
bitreverse
jiffiessoftnet_data
prink
^^^^^^^
You copied the list by hand, didn't you ?
Are you sure there were not revision after the symbol names, such as "printk_R1b7d4074" ?
Quoted 11 lines
__const_udelayGrepping 2 or 3:
[root@emu-5 net]# grepenable_irq/proc/ksymsc010a5e0enable_irq_R__ver_enable_irqc0343610matroxfb_enable_irq_R__ver_matroxfb_enable_irq[root@emu-5 net]# grep printk/proc/ksymsc011aee0printk_R__ver_printk
[root@emu-5 net]# grep kmalloc/proc/ksymsc0132c60kmalloc_R__ver_kmallocc03c07e0sock_kmalloc_R__ver_sock_kmalloc
^^^^^^^^^^^^^^^^^^^
There should be and 'R' followed by 8 hex digits here. I remember I already came across this once, but unfortunately I don't remember how nor how I fixed it.
When I build from your .config, I have "printk_R1b7d4074" for example. It is defined in include/linux/modules/printk.ver which is dynamically generated during make dep :
#define __ver_printk 1b7d4074
#define printk _set_ver(printk)
#define __ver_acquire_console_sem f174ed48
#define acquire_console_sem _set_ver(acquire_console_sem)
#define __ver_console_print b714a981
#define console_print _set_ver(console_print)
#define __ver_console_unblank b857dfed
#define console_unblank _set_ver(console_unblank)
#define __ver_register_console 80c5241f
#define register_console _set_ver(register_console)
#define __ver_unregister_console d83dc0dd
#define unregister_console _set_ver(unregister_console)
So I suspect that this file was not included at all during build. Stupid question : are you really sure that the bzImage you boot from has been rebuilt and that you're not running an old one ? Have you performed a "make distclean" before you have built the kernel for the first time (save your .config before doing this).
Hmmm while I'm thinking about it, please also ensure that you have 'genksyms' somewhere in your path.
Quoted 2 lines
binutils version: 2.15.92.0.2 20040927
gcc: 3.4.2 20041017
Should be OK.
Quoted 5 lines
My .config can be found here:
http://www.andrew.cmu.edu/user/gnychis/.configAnd I will try taking out
CONFIG_MODVERSIONSsupport and let you know how it goes!
I'm sure it will work.
Quoted 4 lines
By the way, i'm not keen on inserting 8390.o into the kernel, it was simply the first thing i saw in my
/lib/modules/2.4.32directory, my goal is to get any module at all to insert, because it seems none will insert.
I understand, what I meant is that 8390 relies on crc32.o which might or might not be included in the kernel. I wanted to identify the possibility that some modules might have been missing.
Quoted 2 lines
Thanks again!
George
Regards,
Willy
Quoted 10 lines · Willy Tarreau (on Sun, 21 May 2006 10:40:55 +0200) wrote:
Quoted 9 lines · George Nychis
Grepping 2 or 3:
[root@emu-5 net]# grepenable_irq/proc/ksymsc010a5e0enable_irq_R__ver_enable_irqc0343610matroxfb_enable_irq_R__ver_matroxfb_enable_irq[root@emu-5 net]# grep printk/proc/ksymsc011aee0printk_R__ver_printk
[root@emu-5 net]# grep kmalloc/proc/ksymsc0132c60kmalloc_R__ver_kmallocc03c07e0sock_kmalloc_R__ver_sock_kmalloc
Quoted 5 lines
^^^^^^^^^^^^^^^^^^^There should be and 'R' followed by 8 hex digits here. I remember I already came across this once, but unfortunately I don't remember how nor how I fixed it.
Broken kernel build system in 2.4. It does not always build the module version data correctly. Save your 2.4 .config, make mrproper (critical), restore your .config then
make oldconfig
make dep
make bzImage modules
make modules_install
install
Okay, i *finally* got it booting and inserting modules!
the culprit was the modversions.
Thanks for everyones help!
- George
Quoted 6 lines · George Nychis
Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to
/usr/local/modutilsThen in my 2.4.32 kernel's
Makefile, I changed the DEPMOD variable to point to/usr/local/modutils/sbin/depmod
Well thats a half-arsed way to do it. The kernel makefile could be using the new /usr/local/sbin/depmod and the system the old /sbin/depmod /sbin/insmod /sbin/modprobe etc.
Just install the new modutils to /usr/local/ and then add /usr/local/sbin to your $PATH _before_ /sbin etc. so it is read first.
Nick
Before I build i do:
PATH=/usr/local/modutils/sbin:$PATH
Therefore it must be reading it first, sorry I should have mentioned this... just have done so much to try and get it to work I can't remember it all :)
In response to Willy's post, yeah it was by hand, i can't get that comp on the network yet :(
I will answer all your detailed questions and rebuild the kernel, but it didn't have any revisions after names, I'll rebuild with that exact .config i posted after a make clean mrproper to ensure its installing the new kernel. Then I'll also try disabling modversion.
Thanks!
George
Quoted 18 lines · Nick Warne
Quoted 6 lines · George Nychis
Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to
/usr/local/modutilsThen in my 2.4.32 kernel's
Makefile, I changed the DEPMOD variable to point to/usr/local/modutils/sbin/depmodWell thats a half-arsed way to do it. The kernel makefile could be using the new
/usr/local/sbin/depmodand the system the old/sbin/depmod/sbin/insmod/sbin/modprobeetc.Just install the new modutils to
/usr/local/and then add/usr/local/sbinto your $PATH _before_ /sbin etc. so it is read first.Nick
Quoted 6 lines · George Nychis
Before I build i do:
PATH=/usr/local/modutils/sbin:$PATHTherefore it must be reading it first, sorry I should have mentioned this... just have done so much to try and get it to work I can't remember it all :)
Well, yes, but as soon as you reboot and login that $PATH will be lost - you need to add that in your .bashrc, or profile.d/ or whatever to make it permanent.
I don't know what the issue is with the modules, but building against one version of modutils and then running system with another version will surely cause problems?
Nick
Signature · 2 lines
"Person who say it cannot be done should not interrupt person doing it." -Chinese Proverb