public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: O_TARGET
  2006-07-06  3:18 O_TARGET yh
@ 2006-07-06  3:17 ` Randy.Dunlap
  2006-07-06  5:32   ` O_TARGET yh
  0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2006-07-06  3:17 UTC (permalink / raw)
  To: yh; +Cc: linux-kernel

On Thu, 6 Jul 2006 13:18:46 +1000 (EST) yh@bizmail.com.au 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: O_TARGET
@ 2006-07-06  3:18 yh
  2006-07-06  3:17 ` O_TARGET Randy.Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: yh @ 2006-07-06  3:18 UTC (permalink / raw)
  To: linux-kernel

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)

Thank you.

Jim



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: O_TARGET
       [not found] ` <fa.nsRAsUZV+GPQB1UlyIFSnCjSxYs@ifi.uio.no>
@ 2006-07-06  5:32   ` Robert Hancock
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Hancock @ 2006-07-06  5:32 UTC (permalink / raw)
  To: yh; +Cc: linux-kernel

yh@bizmail.com.au 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?

.ko is what modules are in 2.6, are you using some old version of the 
module utilities?

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: O_TARGET
  2006-07-06  3:17 ` O_TARGET Randy.Dunlap
@ 2006-07-06  5:32   ` yh
  2006-07-06  5:32     ` O_TARGET Randy.Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: yh @ 2006-07-06  5:32 UTC (permalink / raw)
  To: linux-kernel

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?

Thank you.

Jim

> On Thu, 6 Jul 2006 13:18:46 +1000 (EST) yh@bizmail.com.au 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
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: O_TARGET
  2006-07-06  5:32   ` O_TARGET yh
@ 2006-07-06  5:32     ` Randy.Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy.Dunlap @ 2006-07-06  5:32 UTC (permalink / raw)
  To: yh; +Cc: linux-kernel

On Thu, 6 Jul 2006 15:32:28 +1000 (EST) yh@bizmail.com.au 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@bizmail.com.au 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-06  5:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <fa.MfrVuze0cVJi+KUSsOCGQQfE92g@ifi.uio.no>
     [not found] ` <fa.nsRAsUZV+GPQB1UlyIFSnCjSxYs@ifi.uio.no>
2006-07-06  5:32   ` O_TARGET Robert Hancock
2006-07-06  3:18 O_TARGET yh
2006-07-06  3:17 ` O_TARGET Randy.Dunlap
2006-07-06  5:32   ` O_TARGET yh
2006-07-06  5:32     ` O_TARGET Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox