linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Song Sam <samlinuxppc@yahoo.com.cn>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Module Compiling Problem
Date: Mon, 24 May 2004 23:17:34 +0800 (CST)	[thread overview]
Message-ID: <20040524151734.77584.qmail@web15204.mail.bjs.yahoo.com> (raw)
In-Reply-To: <20040524050640.GA2245@mars.ravnborg.org>


Sam Ravnborg <sam@ravnborg.org>  you wrote:

> When compiling modules you better use the kbuild infrastructure,
> and then also a kbuild makefile. The way to use the kbuild
> infrastructure is to build your modules with the above command,
> where $KERNELSRC is the directory where you have the kernelsrc.So
> you should use something like: make -C /home/sam/src/kernel/v2.4.18/
> SUBDIRS=$PWD modules assuming the src of the kernel is located in
> /home/sam/src/kernel/v2.4.18/

Thanks for your detailed explaination.I should be
blamed to take $KERNELSRC as a command parameter.:-)

> Try with a Makefile like this:
> [Makefile]
> obj-m := myic.o
>
> That should do it.

Yeah,it did work right.When using it with "make -C
/workspace/keep/dmt201/kernel/ SUBDIRS=$PWD modules"
command,it found myic.c real problem as following:

myic.c:65:1: warning: "MODVERSIONS" redefined
<command line>:1:1: warning: this is the location of
the previous definition
make[1]: Leaving directory
`/workspace/myfilesystem/target/workdir/ic'
make: Leaving directory
`/workspace/keep/dmt201/kernel'

After removing "#define MODVERSIONS" in myic.c,module
compiling work well without any warning.

> [Later you can add the clean stuff]

OK,I added the clean staff in my Makefile like
clean :
        rm myic.o
But I got the mess message as well.

[root@sam ic]# make clean
make: /scripts/pathdown.sh: Command not found
/usr/share/locale/en_US.iso885915/LC_MESSAGES/make.morm
myic.o

It did remove myic.o.Could there any better way to
clean myic.o?

I appreciated your instruction very much.The making
module method is better than my former one.:-)

Sam

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

      parent reply	other threads:[~2004-05-24 15:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-22  0:57 Framebuffer problems Christopher E Cordahi
2004-05-22  7:25 ` Module Compiling Problem Song Sam
2004-05-23  2:00   ` Song Sam
2004-05-23 18:34     ` Sam Ravnborg
2004-05-24  1:49       ` Song Sam
2004-05-24  5:06         ` Sam Ravnborg
2004-05-24  7:22           ` Query about KERNELLOAD Venkatesh Savithri Mahesh
2004-05-24 12:09             ` Mark Chambers
2004-05-24 15:17           ` Song Sam [this message]

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=20040524151734.77584.qmail@web15204.mail.bjs.yahoo.com \
    --to=samlinuxppc@yahoo.com.cn \
    --cc=linuxppc-embedded@lists.linuxppc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).