Re: Fwd: kernel 2.6.x driver compiler options

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

 



On Tue, 2005-05-10 at 04:16 -0700, rajat swarup wrote:
> ---------- Forwarded message ----------
> From: rajat swarup <rajats@xxxxxxxxx>
> Date: May 10, 2005 4:16 AM
> Subject: Re: kernel 2.6.x driver compiler options
> To: KC <kcc1967@xxxxxxxxx>
> 
> 
> On 5/10/05, KC <kcc1967@xxxxxxxxx> wrote:
> > Instead of using Linux kconfig build system, can someone tell me
> > what's the compiler options used to build a device driver (.ko file) ?
> >
> > Or, how can I integrate kconfig with GNU tool chain (automake, autoconf ...)
> >
> In case you are compiling it as a module then following things need to be done.
> First, create a Makefile (in the same directory as containing the
> source) and put some thing like
> "obj-m += test.o"
> where test.c is your source code and obj-m compiles it as a module.
> Now you need to type the make command as
> make -C <your_linux_source_code_directory> SUBDIRS=$PWD modules
just a *small* correction....
in the new build system use M=$PWD instead of SUBDIRS=$PWD...
(both the options do the wrk though)

-mandeep
> 
> eg:
> I put my linux kernel source code in /linux-2.6.11.7 so the command was:
> make -C  /linux-2.6.11.7 SUBDIRS=$PWD modules
> 
> Hope it helps,
> Rajat.
> http://rajatswarup.blogspot.com/
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 

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


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux