From: <a.o...@bl...> - 2004-04-08 23:59:22
|
On Fri, Apr 09, 2004 at 01:24:46AM +0200, JockyW wrote: > I'm currently developing a kernelmodule to access the dvd. I have a .c and a > .S file. The .S contains a few cache invalidate and flush routines and the > .c has all the init, read and ioctl code. My problem is that I have no idea > how my Makefile should look, such that both files are compiled and linked > into a working module.o Driver code written in assembly language is generally a Bad Idea (tm). > When I build a module out of just the .c it compiles fine and with insmod I > can make it run. But to make it work 100% my module needs both files. > > Can anyone help me out? > > Thx and Happy Easter! That aside, hooking your code into kbuild would look something like: --- a/drivers/cdrom/Kconfig 2004-03-25 22:08:47.000000000 +0100 +++ b/drivers/cdrom/Kconfig 2003-10-18 20:31:17.000000000 +0200 @@ -256,4 +256,13 @@ To compile this driver as a module, choose M here: the module will be called sonycd535. +config GCDVD + tristate "Nintendo GameCube DVD-ROM support" + depends on CD_NO_IDESCSI && GAMECUBE + ---help--- + Support for the Nintendo GameCube DVD-ROM. + + To compile this driver as a module, choose M here: the + module will be called gcdvd. + endmenu --- a/drivers/cdrom/Makefile 2004-03-26 00:10:19.000000000 +0100 +++ b/drivers/cdrom/Makefile 2004-03-15 11:26:08.000000000 +0100 @@ -20,3 +20,4 @@ obj-$(CONFIG_SBPCD) += sbpcd.o cdrom.o obj-$(CONFIG_SJCD) += sjcd.o obj-$(CONFIG_CDU535) += sonycd535.o +obj-$(CONFIG_GCDVD) += gcdvd.o cdrom.o |