* Getting out-of-kernel modules compiled
@ 2009-01-21 15:57 linux-os (Dick Johnson)
2009-01-21 17:22 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: linux-os (Dick Johnson) @ 2009-01-21 15:57 UTC (permalink / raw)
To: Linux kernel
Back in 2004, we make the following to compile
out-of-kernel modules. It worked.
Now, the kernel build doesn't "know" how to handle "asm.S"
files and always thinks a "name.o" file is the result of
a "name.c" file, so I can't buld them no matter how hard
I try!
What do I need to do????
#
# Project Makefile for kernel versions over 6
# Created 05-OCT-2004 Richard B. Johnson
#
VER := $(shell uname -r)
PWD := $(shell pwd)
all: driver
driver:
make V=1 -C /usr/src/linux-$(VER) SUBDIRS=$(PWD) modules
rtc_hwr.o: rtc_hwr.S
as -o $@ $<
obj-m = rtc.o
obj-m += rtc_hwr.o
clean:
rm -rf *.o *.ko *.mod.c \.*.cmd
make[2]: *** No rule to make target `/root/BCS/rtc/rtc_hwr.c', needed by `/root/BCS/rtc/rtc_hwr.o'. Stop.
make[1]: *** [_module_/root/BCS/rtc] Error 2
make: *** [driver] Error 2
Cheers,
Dick Johnson
Penguin : Linux version 2.6.25.17 on an i686 machine (4784.32 BogoMips).
My book : http://www.AbominableFirebug.com/
.
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Getting out-of-kernel modules compiled
2009-01-21 15:57 Getting out-of-kernel modules compiled linux-os (Dick Johnson)
@ 2009-01-21 17:22 ` Sam Ravnborg
2009-01-21 17:56 ` linux-os (Dick Johnson)
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2009-01-21 17:22 UTC (permalink / raw)
To: linux-os (Dick Johnson); +Cc: Linux kernel
On Wed, Jan 21, 2009 at 10:57:25AM -0500, linux-os (Dick Johnson) wrote:
>
> Back in 2004, we make the following to compile
> out-of-kernel modules. It worked.
>
> Now, the kernel build doesn't "know" how to handle "asm.S"
> files and always thinks a "name.o" file is the result of
> a "name.c" file, so I can't buld them no matter how hard
> I try!
>
> What do I need to do????
>
> #
> # Project Makefile for kernel versions over 6
> # Created 05-OCT-2004 Richard B. Johnson
> #
>
> VER := $(shell uname -r)
> PWD := $(shell pwd)
>
> all: driver
>
> driver:
> make V=1 -C /usr/src/linux-$(VER) SUBDIRS=$(PWD) modules
>
> rtc_hwr.o: rtc_hwr.S
> as -o $@ $<
>
> obj-m = rtc.o
> obj-m += rtc_hwr.o
kbuild has never (at least for a very long time) not
supported to implement a module only in assembler.
So you will have no luck trying to build the
module rtc_hrw.ko
What you can do is to define a module like htis:
obj-m := dick.o
dick-y := rtc.o rtc_hwr.o
This will properly build rtc_hwr.S => rtc_hwr.o
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Getting out-of-kernel modules compiled
2009-01-21 17:22 ` Sam Ravnborg
@ 2009-01-21 17:56 ` linux-os (Dick Johnson)
0 siblings, 0 replies; 3+ messages in thread
From: linux-os (Dick Johnson) @ 2009-01-21 17:56 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Linux kernel
On Wed, 21 Jan 2009, Sam Ravnborg wrote:
[SNIPPED...]
> dick-y := rtc.o rtc_hwr.o
>
> This will properly build rtc_hwr.S => rtc_hwr.o
>
> Sam
>
Yes, thanks. It works!
Cheers,
Dick Johnson
Penguin : Linux version 2.6.25.17 on an i686 machine (4784.32 BogoMips).
My book : http://www.AbominableFirebug.com/
.
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-21 17:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 15:57 Getting out-of-kernel modules compiled linux-os (Dick Johnson)
2009-01-21 17:22 ` Sam Ravnborg
2009-01-21 17:56 ` linux-os (Dick Johnson)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox