The compiler also needs to know where the rest of the kernel resides.
I think that usually you'll have to define a 'KERNELDIR' variable or
something.
You won't be able to build the module outside of the kernel tree if you
haven't also extracted the kernel sources and configured them because
all modules depend on static code within the kernel itself (printk for
example).
You should download the kernel source code you're compiling against and then
'less <sources>/Documentation/kbuild/modules.txt'
That might only be for the 2.6 kernel.
This driver you're compiling should come with a makefile or something
though, doesn't it?
~/Chris
Brandon Christel wrote:
>
> Hello,
> I'm having a hard time finding documentation about how to cross compile
> the modules. I've read up on insmod and getting things running once i
> have the .o files, but I can't compile the driver.
>
> I used the Pl2303 code in the files section on the yahoo groups page, as
> well as the code for my camera found
> here:http://mxhaard.free.fr/download.html. (it's a creative webcam
> notebook model PD1170, shown supported using driver spca5xx here:
> http://mxhaard.free.fr/spca5xx.html)
> I have the source code, I just can't get the modules to compile using
> this makefile(for the 2303):
>
> # contains optimizations for 386 architecture
> # contains 02 optimazition used for IO functions
> CC=../workspace/ARM-toolchain/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-gcc
>
>
> #CC=gcc
>
> module: pl2303.c pl2303.h
> $(CC) -O0 -g -lm pl2303.o -DMODULE -D__KERNEL -06 -c pl2303.c pl2303.h
>
>
> I can get regular software to compile using that cross compiler (using
> their peekpoke.h for I2C communication and a lot of serial i/o - tested
> and working), however I dont know how to get the modules to work. Can
> anyone explain to me the basics or point me in the right direction of
> where to look? I can't find documentation that I can understand so any
> help is greatly appreciated
> Brandon Christel
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|