Re: O_TARGET
From: Randy.Dunlap
Date: Thu Jul 06 2006 - 01:28:31 EST
On Thu, 6 Jul 2006 15:32:28 +1000 (EST) yh@xxxxxxxxxxxxxx wrote:
> Thanks Randy, that works. But now it generated a NewSerial.ko instead of
> NewSerial.o in kernel 2.6, this caused a problem when I called the insmod,
> the insmod added another .o as follows:
>
> insmod NewSerial.ko
> insmod: NewSerial.ko.o: no module by that name found
>
> Is it possible for me to get a NewSerial.o, not a NewSerail.ko?
Nope, loadable modules in 2.6.x are *.ko files.
That's what insmod and modprobe expect.
Are using module-init-tools instead of modutils?
You should be.
> Thank you.
>
> Jim
>
> > On Thu, 6 Jul 2006 13:18:46 +1000 (EST) yh@xxxxxxxxxxxxxx wrote:
> >
> >> Hi,
> >>
> >> The O_TARGET is no longer valid in kernel 2.4, what is the replacement
> >> of
> >> following module object in kernel 2.6?
> >>
> >> O_TARGET := NewSerial.o
> >>
> >> obj-y := new_s_driver.o queue.o
> >> obj-m := $(O_TARGET)
> >
> > You just want a trivial Makefile ?
> >
> > See Documentation/kbuild/makefiles.txt for more info.
> >
> > Here is a working trivial example:
> >
> > #################### begin ###################3
> > # usage:
> > # make -C /path/to/kernel/source M=/path/to/source/TARGET/ [modules]
> >
> > obj-m := TARGET.o
> >
> > clean-files := *.o *.ko *.mod.c
> > ############# end #######################
> >
> > M= implies modules, so modules is optional.
> > I usually use M=$PWD (after cd to TARGET dir).
---
~Randy
-
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/