Re: kernel 2.6.x driver compiler options

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

 



On Tue, May 10, 2005 at 04:08:30PM +0800, KC 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) ?

That depends on the architecture (i386, x86_64, arm, ppc, etc.),
compiler version (gcc 3.3, 3.4, 4.0, etc.), and kernel configuration
(single CPU, SMP, preempt, regparms, etc.). Kbuild knows about all
those things.

> Or, how can I integrate kconfig with GNU tool chain (automake, autoconf ...)

Create a file Makefile.kbuild with the usual stuff kbuild needs (see
http://lwn.net/Articles/21823/ ). Then make an automake Makefile.am
file like this:

all:
	$(MAKE) -f ${srcdir}/Makefile.kbuild -C ${KERNEL_DIR} \
		M=${srcdir} O=${builddir} modules

Have configure.in AC_SUBST(KERNEL_DIR), and you should be set.
I haven't tested this, but I think it should work.


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux