On Mon, Dec 12, 2005 at 11:52:24AM -0800, Carlos Munoz wrote:
Hi all,Yes.
I hope this is the right forum for this question.
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.
#Please do:
# 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
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-$(CONFIG_PHONE_PROSLIC) += mrvphone.o proslic.o
phone_mrvl-objs = mrvphone.o proslic.o
endif
CFLAGS += -D__linux__Here you could do:
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
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