Re: Re: dvd kernelmodule

[email protected] (Arthur Othieno)
Newsgroups gmane.linux.ports.game-cube.devel
Message-ID <20040410170241.GA29363@mars>
On Sat, Apr 10, 2004 at 04:59:51PM +0200, JockyW wrote:
>
> Thanks for your reply, but fttb it doesn't really help me.
> 
> I have tried with this Makefile:
>     obj-m := gcdvd.o
>     module-objs := gcdvd.o cache.o
>
> But unfortunately cache.o isn't linked. After insmod gcdvd.o I get a unknown
> symbol, tho it is defined in cache.o

s/module-objs/gcdvd-objs/

> A bit strange is that insmod gcdvd.ko doesn't work at all because of a bad
> format or so. Only insmod gcdvd.o is accepted.

You'll need module-init-tools for that. Grab them from
http://kernel.org/pub/linux/utils/kernel/module-init-tools/

See also http://lwn.net/Articles/22197/

> As alternative to above Makefile I can take:
> TARGET  := gcdvd
> WARN    := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
> INCLUDE := -I/usr/src/linux/include
> CFLAGS  := -c -O2 -DMODULE -D__KERNEL__ -DKBUILD_MODNAME="${TARGET}" ${WARN}
> ${INCLUDE}
> CC      := gcc-3.0
> 
> ${TARGET}.o: ${TARGET}.c
> cache.o: cache.S
> 
> .PHONY: clean
> 
> clean:
>  rm -rf ${TARGET}.ko
>  rm -rf ${TARGET}.o
> 
> But there is again the problem that I don't know how to extend it such that
> it also links cache.o
>
> Any help is appreciated!

See http://lwn.net/Articles/21823/ for how to properly compile external
modules.

	Arthur


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.