[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiling select modules with kernel 2.6.x



Greg,

In case you are interested I have figured out how to build a specific
module.  As an example I will use the cciss module.

1.  make mrproper
2.  make menuconfig
3.  make scripts (This compiles the modpost script in ./scripts)
4.  make SUBDIRS=drivers/block (this will generate the cciss.o file)
5.  ./scripts/modpost drivers/block/cciss.o (this generates cciss.mod.c)
6.  make modules --dry-run | grep "cciss"  (This will give me my compile
lines.  You grab the lines that compile the mod.c file and the line that
links the mod.o file with the module.o file to generate the module.ko file.

If you do this you can compile a single module.  This can also be automated
in a script if you need it.

PS.  usually in the make modules --dry-run the line before the mod.o file
compile is the execution of the modpost script on the subdirectory, so you
can grab and use that as well if you want.

Thanks,
Chase
----- Original Message ----- 
From: "Greg KH" <greg@xxxxxxxxx>
To: <chase.maupin@xxxxxxxxxxxxx>
Cc: "kernelnewbies" <kernelnewbies@xxxxxxxxxxxx>
Sent: Saturday, April 10, 2004 11:50 AM
Subject: Re: compiling select modules with kernel 2.6.x


> On Sat, Apr 10, 2004 at 11:03:26AM -0500, chase.maupin@xxxxxxxxxxxxx
wrote:
> > Greg,
> >
> > Thank you for getting back to me.  Yes I have tried this and
unfortunately I
> > get the error that there is "No rule to make target
drivers/block/cciss.ko".
> > I looked at the drivers/block/Makefile and the targe is listed as
> > "obj-$(CONFIG_BLK_CPQ_CISS_DA) += cciss.o.
>
> Are you sure your .config file is set up properly so that you can build
> the driver normally?
>
> What about just doing 'make SUBDIRS=drivers/block' ?
> If the driver builds that way, the way I specified should also work.
>
> Good luck,
>
> greg k-h


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/