openSUSE Forums > Programming/Scripting » OpenSuse 11.1 kernel module recompilation

Go Back   openSUSE Forums > Programming/Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 30-Sep-2009, 04:37
Puzzled Penguin
 
Join Date: Jun 2008
Posts: 10
harsszegi hasn't been rated much yet
Default OpenSuse 11.1 kernel module recompilation

Hi,

I have a serious problem when recompiling
the USB drivers after changing one of them.
I've added EXPORT_SYMBOL(usb_kick_khubd)
to HUB.C within drivers/usb/core.

Then I did the following.
- cd /usr/src/linux
- cp /usr/src/linux-obj/$arch/$flavour/.config .
- cp /usr/src/linux-obj/$arch/$flavour/Module.symvers .
- make prepare
- make modules_prepare
- cd drivers/usb
- make -C /lib/modules/$(uname -r)/build M=$(pwd)
- make -C /lib/modules/$(uname -r)/build M=$(pwd) modules_install

Everything went fine, drivers are compiled
and installed into the PAE/extra folder
(I'm using the 2.6.27.7-9-pae kernel).

HOWEVER after boot I did a:

modinfo usbcore (as hub.c is within usbcore)

and it displayed that the .KO is loaded
NOT from the /extra folder but from the
regular kernel/drivers/usb/core.

So I have owerwritten the .KO there with the
fresh one. After yet another reboot
I did a:

cat /proc/kallsyms | grep usb_kick_khubd

and it returned only a "t" entry with
usb_kick_khubd, but NO corresponding __ksymtab, __kstrtab entries.

Naturally I cannot load any other .KOs
using "usb_kick_khubd" as I get "unknown symbol
in module" for sure.

I have tried manually updating all the Module.symvers files:

- lib/modules/$(uname -r)/modules.symbols
- lib/modules/$(uname -r)/Module.symvers
- lib/modules/$(uname -r)/build/Module.symvers

But obviously no luck, I cannot change the
usb_kick_khubd to global.

Please help me. What am I doing wrong?
Thanks,

p.s. Also would DIE for an official, proper,
up-to-date description of how to recompile
one, single kernel module without complete kernel recompilation.
Reply With Quote
  #2 (permalink)  
Old 30-Sep-2009, 06:36
Puzzled Penguin
 
Join Date: Jun 2008
Posts: 10
harsszegi hasn't been rated much yet
Default Re: OpenSuse 11.1 kernel module recompilation

Khm. Sorry. Lame me. Forgot that
usbcore is within initrd, thus I had to
do a "mkinitrd -s 1024x768" after compilation
so that the new usbcore.ko INDEED GETS into
the initrd and not the old one sits there.
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2