All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Munoz <carlos@kenati.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Can't build loadable module for 2.6.kernel
Date: Mon, 12 Dec 2005 15:57:20 -0800	[thread overview]
Message-ID: <439E0E60.10008@kenati.com> (raw)
In-Reply-To: <20051212205019.GB7656@mars.ravnborg.org>

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
>  
>


  reply	other threads:[~2005-12-12 23:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2005-12-13  8:05 ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=439E0E60.10008@kenati.com \
    --to=carlos@kenati.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.