* Can't build loadable module for 2.6.kernel
@ 2005-12-12 19:52 Carlos Munoz
2005-12-12 20:50 ` Sam Ravnborg
2005-12-13 8:05 ` Arjan van de Ven
0 siblings, 2 replies; 4+ messages in thread
From: Carlos Munoz @ 2005-12-12 19:52 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 698 bytes --]
Hi all,
I hope this is the right forum for this question.
I'm trying to build a loadable module for a telephony card that includes
several files. Some of the files are source files (written by me) and
some are object files (provided by the chip vendor). I'm unable to link
the vendor object files with the target.
Make displays the following error:
make[4]: *** No rule to make target
`drivers/telephony/mrvphone/apicnt.s', needed by
`drivers/telephony/mrvphone/apicnt.o'. Stop.
The makefile has the following rule to build apicnt.o:
apicnt.o: apicnt.o.shipped
cp apicnt.o.shipped apicnt.o
I have also included the whole Makefile with this email.
Thanks in advance,
Carlos Munoz
[-- Attachment #2: Makefile --]
[-- Type: text/plain, Size: 832 bytes --]
#
# Makefile for the phone_mrvl driver loadable module
#
TARGET = phone_mrvl.o
obj-$(CONFIG_PHONE_MARVELL) = phone_mrvl.o
ifeq ($(CONFIG_PHONE_LEGERITY),y)
phone_mrvl-objs = mrvphone.o slic.o legerity.o vp_hal.o sys_service.o apicnt.o apiinit.o apiquery.o vp_api.o vp_api_common.o mvutils.o
endif
ifeq ($(CONFIG_PHONE_PROSLIC),y)
phone_mrvl-objs = mrvphone.o proslic.o
endif
CFLAGS += -D__linux__
EXTRA_CFLAGS += -Idrivers/telephony/mrvphone
EXTRA_CFLAGS += -DNDEBUG -Dlinux -D__linux__ -Dunix -DEMBED -DLINUX -DHOST_LE
ifeq ($(CONFIG_PHONE_LEGERITY),y)
EXTRA_CFLAGS += -D__LEGERITY__
endif
ifeq ($(CONFIG_PHONE_PROSLIC),y)
EXTRA_CFLAGS += -D__PROSLIC__
endif
all: $(TARGET)
$(TARGET): $(OBJS)
$(LD) -r $(OBJS) -o $(TARGET)
clean:
-rm -f $(TARGET) *.elf *.gdb *.o
apicnt.o: apicnt.o.shipped
cp apicnt.o.shipped apicnt.o
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't build loadable module for 2.6.kernel
2005-12-12 19:52 Can't build loadable module for 2.6.kernel Carlos Munoz
@ 2005-12-12 20:50 ` Sam Ravnborg
2005-12-12 23:57 ` Carlos Munoz
2005-12-13 8:05 ` Arjan van de Ven
1 sibling, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2005-12-12 20:50 UTC (permalink / raw)
To: Carlos Munoz; +Cc: linux-kernel
On Mon, Dec 12, 2005 at 11:52:24AM -0800, Carlos Munoz wrote:
> Hi all,
>
> I hope this is the right forum for this question.
Yes.
> The makefile has the following rule to build apicnt.o:
> apicnt.o: apicnt.o.shipped
> cp apicnt.o.shipped apicnt.o
This is wrong. kbuild has knowledge how to copy a file named:
apicnt.o_shippd to apicnt.o
So you renamed the supplied .o fiel to apicnt.o_shipped and delte your
own rule.
> #
> # Makefile for the phone_mrvl driver loadable module
> #
> TARGET = phone_mrvl.o
>
> obj-$(CONFIG_PHONE_MARVELL) = phone_mrvl.o
>
> ifeq ($(CONFIG_PHONE_LEGERITY),y)
> phone_mrvl-objs = mrvphone.o slic.o legerity.o vp_hal.o sys_service.o apicnt.o apiinit.o apiquery.o vp_api.o vp_api_common.o mvutils.o
> endif
Please do:
phone_mrvl-$(CONFIG_PHONE_LEGERITY) := mrvphone.o slic.o legerity.o
phone_mrvl-$(CONFIG_PHONE_LEGERITY) += vp_hal.o sys_service.o apicnt.o
phone_mrvl-$(CONFIG_PHONE_LEGERITY) += apiinit.o apiquery.o vp_api.o
phone_mrvl-$(CONFIG_PHONE_LEGERITY) += vp_api_common.o mvutils.o
>
> ifeq ($(CONFIG_PHONE_PROSLIC),y)
> phone_mrvl-objs = mrvphone.o proslic.o
> endif
phone_mrvl-$(CONFIG_PHONE_PROSLIC) += mrvphone.o proslic.o
>
> CFLAGS += -D__linux__
> EXTRA_CFLAGS += -Idrivers/telephony/mrvphone
> EXTRA_CFLAGS += -DNDEBUG -Dlinux -D__linux__ -Dunix -DEMBED -DLINUX -DHOST_LE
>
> ifeq ($(CONFIG_PHONE_LEGERITY),y)
> EXTRA_CFLAGS += -D__LEGERITY__
> endif
> ifeq ($(CONFIG_PHONE_PROSLIC),y)
> EXTRA_CFLAGS += -D__PROSLIC__
> endif
Here you could do:
extra-cflags-$(CONFIG_PHONE_LEGERITY) += -D__LEGERITY__
extra-cflags-$(CONFIG_PHONE_PROSLIC) += -D__PROSLIC__
EXTRA_CFLAGS += $(extra-cflags-y)
Please delete the rest - it is not needed.
> all: $(TARGET)
>
> $(TARGET): $(OBJS)
> $(LD) -r $(OBJS) -o $(TARGET)
>
> clean:
> -rm -f $(TARGET) *.elf *.gdb *.o
>
> apicnt.o: apicnt.o.shipped
> cp apicnt.o.shipped apicnt.o
When you build your module use:
make -C $PATH_TO_COMPILED_KERNEL M=`pwd`
See also Documentation/kbuild/modules.txt for further reference.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't build loadable module for 2.6.kernel
2005-12-12 20:50 ` Sam Ravnborg
@ 2005-12-12 23:57 ` Carlos Munoz
0 siblings, 0 replies; 4+ messages in thread
From: Carlos Munoz @ 2005-12-12 23:57 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel
Hi Sam,
Thanks to your help and the kbuild documentation you referred me to I
was able to build the module.
Thanks again,
Carlos Munoz
Sam Ravnborg wrote:
>On Mon, Dec 12, 2005 at 11:52:24AM -0800, Carlos Munoz wrote:
>
>
>>Hi all,
>>
>>I hope this is the right forum for this question.
>>
>>
>Yes.
>
>
>
>>The makefile has the following rule to build apicnt.o:
>>apicnt.o: apicnt.o.shipped
>> cp apicnt.o.shipped apicnt.o
>>
>>
>
>This is wrong. kbuild has knowledge how to copy a file named:
>apicnt.o_shippd to apicnt.o
>So you renamed the supplied .o fiel to apicnt.o_shipped and delte your
>own rule.
>
>
>
>
>>#
>># Makefile for the phone_mrvl driver loadable module
>>#
>>TARGET = phone_mrvl.o
>>
>>obj-$(CONFIG_PHONE_MARVELL) = phone_mrvl.o
>>
>>ifeq ($(CONFIG_PHONE_LEGERITY),y)
>>phone_mrvl-objs = mrvphone.o slic.o legerity.o vp_hal.o sys_service.o apicnt.o apiinit.o apiquery.o vp_api.o vp_api_common.o mvutils.o
>>endif
>>
>>
>Please do:
>phone_mrvl-$(CONFIG_PHONE_LEGERITY) := mrvphone.o slic.o legerity.o
>phone_mrvl-$(CONFIG_PHONE_LEGERITY) += vp_hal.o sys_service.o apicnt.o
>phone_mrvl-$(CONFIG_PHONE_LEGERITY) += apiinit.o apiquery.o vp_api.o
>phone_mrvl-$(CONFIG_PHONE_LEGERITY) += vp_api_common.o mvutils.o
>
>
>
>>ifeq ($(CONFIG_PHONE_PROSLIC),y)
>>phone_mrvl-objs = mrvphone.o proslic.o
>>endif
>>
>>
>phone_mrvl-$(CONFIG_PHONE_PROSLIC) += mrvphone.o proslic.o
>
>
>
>>CFLAGS += -D__linux__
>>EXTRA_CFLAGS += -Idrivers/telephony/mrvphone
>>EXTRA_CFLAGS += -DNDEBUG -Dlinux -D__linux__ -Dunix -DEMBED -DLINUX -DHOST_LE
>>
>>ifeq ($(CONFIG_PHONE_LEGERITY),y)
>>EXTRA_CFLAGS += -D__LEGERITY__
>>endif
>>ifeq ($(CONFIG_PHONE_PROSLIC),y)
>>EXTRA_CFLAGS += -D__PROSLIC__
>>endif
>>
>>
>Here you could do:
>extra-cflags-$(CONFIG_PHONE_LEGERITY) += -D__LEGERITY__
>extra-cflags-$(CONFIG_PHONE_PROSLIC) += -D__PROSLIC__
>EXTRA_CFLAGS += $(extra-cflags-y)
>
>Please delete the rest - it is not needed.
>
>
>>all: $(TARGET)
>>
>>$(TARGET): $(OBJS)
>> $(LD) -r $(OBJS) -o $(TARGET)
>>
>>clean:
>> -rm -f $(TARGET) *.elf *.gdb *.o
>>
>>apicnt.o: apicnt.o.shipped
>> cp apicnt.o.shipped apicnt.o
>>
>>
>
>When you build your module use:
>make -C $PATH_TO_COMPILED_KERNEL M=`pwd`
>
>See also Documentation/kbuild/modules.txt for further reference.
>
> Sam
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can't build loadable module for 2.6.kernel
2005-12-12 19:52 Can't build loadable module for 2.6.kernel Carlos Munoz
2005-12-12 20:50 ` Sam Ravnborg
@ 2005-12-13 8:05 ` Arjan van de Ven
1 sibling, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2005-12-13 8:05 UTC (permalink / raw)
To: Carlos Munoz; +Cc: linux-kernel
On Mon, 2005-12-12 at 11:52 -0800, Carlos Munoz wrote:
> Hi all,
>
> I hope this is the right forum for this question.
>
> I'm trying to build a loadable module for a telephony card that includes
> several files. Some of the files are source files (written by me) and
> some are object files (provided by the chip vendor). I'm unable to link
> the vendor object files with the target.
you might want to ask them for the source, lots easier that way as well.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-13 8:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-12 19:52 Can't build loadable module for 2.6.kernel Carlos Munoz
2005-12-12 20:50 ` Sam Ravnborg
2005-12-12 23:57 ` Carlos Munoz
2005-12-13 8:05 ` Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox