Re: Nokia c110 driver

From: Sam Ravnborg
Date: Tue Mar 09 2004 - 14:37:44 EST


On Tue, Mar 09, 2004 at 08:04:09AM -0800, Randy.Dunlap wrote:
> |
> | dhw.o, dap.o, dmgr.o and dcfg.o are located in nokia_cs.a, which does
> | not include source. These are the parts that actually access the card
> | and configure frequencies etc. They don't seem to be linked, since the
> | dhw_* symbols are unknown in the module. Manually linking them with the
> | .ko prevents it from being loaded (or maybe I am linking them wrong).
> | They are defined in corresponding .h files mostly.
The above files are normal .o files, that should be linked in.
So what you do is to rename the above files to:
dhw.o_shipped
dap.o_shipped
dmgr.o_shipped
dcfg.o_shipped

And then in your makefile specify:

obj-m := cs110.o
cs110-y := dhw.o dap.o dmgr.o dcfg.o
cs110-y += <additional .o files compield from .c files>

Maybe you can specify the .a file direct replacing the four .o file -
should work but I have not tried.

> | | Well, Sam Ravnborg did post a patch in the last week or so that
> | | should help with (some) binary files... probably .o and not .bin,
> | | or maybe it doesn't matter.
That patch was crap - the _shipped functionality covers this nicely.

> | | | My makefile (dhw, dap, dmgr and dcfg are in the binary parts, present in
> | | | the current dir as dhw.o etc.; all the others are .c files that get
> | | | compiled during a make):
> | | |
> | | | ~ ifneq ($(KERNELRELEASE),)
> | | | ~ obj-m := nokia_c110.o
> | | | ~ module-objs := dllc.o dtools.o dhw.o dap.o dmgr.o dcfg.o
Should be: nokia_c110-y := dllc.o dtools.o dhw.o dap.o dmgr.o dcfg.o
See also example above.

> | | | ~ else
> | | | ~ KDIR := /lib/modules/$(shell uname -r)/build
> | | | ~ PWD := $(shell pwd)
> | | |
> | | | ~ default:
> | | | ~ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
> | | | ~ endif
> |
> | Can you tell me if the makefile is correct?
Looks OK except for the s/module/nokia_cs110/ point.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/