On Nov 5, 2007 1:32 PM, Iman Darabi <[EMAIL PROTECTED]> wrote:

>
>
> On Nov 5, 2007 9:48 AM, Mohammad M Molla <[EMAIL PROTECTED]> wrote:
>
> > I believe if you have source code for 2.6.22 and custom compile the
> > kernel and boot inside that  you  can compile the module against 2.6.22and 
> > load too.
>
>
> when try to build scull with 2.6.22 get this error :
>
> [EMAIL PROTECTED] ~/programming/ldd3/examples/scull $ make
> make -C /lib/modules/2.6.22.9/build
> M=/home/iman/programming/ldd3/examples/scull
> LDDINC=/home/iman/programming/ldd3/examples/scull/../include modules
> make[1]: Entering directory `/home/iman/linux- 2.6.22.9'
>   CC [M]  /home/iman/programming/ldd3/examples/scull/main.o
> /home/iman/programming/ldd3/examples/scull/main.c:17:26:* error:
> linux/config.h: No such file or directory*
> make[2]: *** [/home/iman/programming/ldd3/examples/scull/main.o] Error 1
> make[1]: *** [_module_/home/iman/programming/ldd3/examples/scull] Error 2
> make[1]: Leaving directory `/home/iman/linux- 2.6.22.9'
> make: *** [modules] Error 2
>
> and this is common , because there is no config.h header file in 2.6.22 (
> but there is one in 2.6.10 ) .
> after removing config.h from scull's source , you get lots of new errors
> ... .
>
> so , compiled scull with 2.6.10 headrs like this :
>
> >( modified Makefile's scull ) :
> >KERNELDIR ?= /lib/modules/2.6.10/build
>
> got no error but , at the runtime insertion (insmod) get this error :
> <3>scull: version magic '2.6.10 SMP preempt 686 gcc-4.1' should be '
> 2.6.22.9 SMP preempt mod_unload CORE2 '
>
> and this error is reasonable too . api and interfaces has been changed
> since 2.6.10 ( am i right? )
>
> anyway , as i'm new to drivers ... , so first compiled gcc-3.4.3 and
> binutils-2.15 and now i can compile 2.6.10  to run scull . maybe try to
> port scull to new kernel versions (as a case study ) next time ...
>
>
> --
>


> Nothing but perfection
> http://iman.darabi.googlepages.com/
>

Reply via email to