[maemo-developers] N900 kernel module recompile

From: Nils Faerber nils.faerber at kernelconcepts.de
Date: Fri Feb 19 00:39:15 EET 2010
Following exactly the steps from

http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Kernel_and_Debugging_Guide/Maemo_Kernel_Guide

did the trick and the module loads fine now!
Very cool!
Though the process seem too complicated to me so after I did my hacking
I will look into simplyfying that.

Anyway, many thanks to all for pointing me in the right direction!

Cheers
  nils


Jeff Moe schrieb:
> On Thursday 18 February 2010 10:18:48 Nils Faerber wrote:
>> Hi all!
>> After all that RPM vs DEB debate I thought I could bring up something
>> more productive ;)
>>
>> I would like to hack on some drivers on the N900, so I need to be able
>> to recompile kernel modules. Ideally I would like only to replace
>> modules, not the whole kernel+modules package.
>>
>> So what I did was I installed the Maemo5 SDK first in order to get the
>> proper toolchain.
>> Then I took a vanilla 2.6.28 Linux kernel archive and applied the kernel
>> patch from
>> 	http://repository.maemo.org/pool/fremantle/free/k/kernel/
>> 	kernel_2.6.28-20094803.3+0m5.diff.gz
>>
>> Then I setup my comile environment:
>>
>> export PATH=/scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/:$PATH
>> export CROSS_COMPILE=arm-none-linux-gnueabi-
>> export ARCH=arm
>>
>> Then kernel config:
>> cp arch/arm/configs/rx51_defconfig ./.config
>> make oldconfig
>>
>> A "make modules" does cleanly compile the modules. Fine so far (except
>> for that te modules are *huge* and a "arm-none-linux-gnueabi-strip -R
>> .not -R .comment --strip-unneeded" seems reasonable).
>>
>> But when I try to load one of the new modules I get:
>> 	-1 Invalid module format
>> And dmesg shows:
>> 	"no symbol version for struct_module"
>>
>> This usually means that CONFIG_MODVERSIONS is not set but I double
>> checked that and I do have "CONFIG_MODVERSIONS=y" in ".config".
>>
>> I also changed the extra version name in the kernel toplevel Makefile,
>> which should be correct (to my knowledge):
>>
>> #NAME = Erotic Pickled Herring
>> NAME = maemo
>>
>> There is an older page about recompiling kernel for Diablo in the Wiki:
>> 	http://wiki.maemo.org/Compiling_the_kenrel
>> Would that still apply (of course replacing Diablo with Freemantle and
>> N810 with N900 or RX51 respectively)?
>>
>> Again, I just want to hack on one single module. So I would like to
>> avoid having to flash a completely home-grown kernel+modules set
>> (frankly that scares me a little ;)
>>
>>
>> Any hint would be really appreciated ;)
>> Some N900 kernel hackers around here?
>>
>> Ideally I would like to make my changes available again so that others
>> can also play with them by just replacing a single .ko-module...
> 
> This isn't exactly what you want, but should provide some hints:
> 
> http://wiki.maemo.org/User:Jebba/Kernel
> 
> This dir has my live scratchbox with some scriptlets which may help you see the procedure:
> http://www.freemoe.org/users/jebba/scratchbox/kernel/
> 
> Have fun,
> 
> -Jeff Moe
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
> 


-- 
kernel concepts GbR      Tel: +49-271-771091-12
Sieghuetter Hauptweg 48  Fax: +49-271-771091-19
D-57072 Siegen           Mob: +49-176-21024535
http://www.kernelconcepts.de
More information about the maemo-developers mailing list