|
From: JockyW <joc...@ho...> - 2004-04-10 15:00:00
|
>
> Driver code written in assembly language is generally a Bad Idea (tm).
>
>
> That aside, hooking your code into kbuild would look something like:
>
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
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.
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!
|