public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* Is this a kbuild system's BUG?
@ 2009-01-20 10:15 Cheng Renquan
  2009-01-20 13:47 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Cheng Renquan @ 2009-01-20 10:15 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kbuild

Hello,

as the prepare target said,

  prepare         - Set up for building external modules

it should setup a environment for external modules building, right?

I unpacked linux-2.6.28.tar.bz2 to /usr/src/linux-2.6.28/, copied a
good .config,
"make prepare" under it,

but if I use it to build an external module under $PWD/kernel, it complains,

$ env -i make -C /usr/src/linux-2.6.28/ M=$PWD/kernel
make: Entering directory `/usr/src/linux-2.6.28'

  WARNING: Symbol version dump /usr/src/linux-2.6.28/Module.symvers
           is missing; modules will have no dependencies and modversions.

  Building modules, stage 2.
  MODPOST 1 modules
/bin/sh: scripts/mod/modpost: No such file or directory
make[1]: *** [__modpost] Error 127
make: *** [modules] Error 2
make: Leaving directory `/usr/src/linux-2.6.28'

it seems OK if I do a "make scritps/" in advance, so should we add scripts
depend to prepare?

-- 
Cheng Renquan, Shenzhen, China
Katharine Hepburn  - "Death will be a great relief. No more interviews."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is this a kbuild system's BUG?
  2009-01-20 10:15 Is this a kbuild system's BUG? Cheng Renquan
@ 2009-01-20 13:47 ` Sam Ravnborg
  2009-02-15 10:16   ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2009-01-20 13:47 UTC (permalink / raw)
  To: Cheng Renquan; +Cc: linux-kbuild

On Tue, Jan 20, 2009 at 06:15:29PM +0800, Cheng Renquan wrote:
> Hello,
> 
> as the prepare target said,
> 
>   prepare         - Set up for building external modules
> 
> it should setup a environment for external modules building, right?
> 
> I unpacked linux-2.6.28.tar.bz2 to /usr/src/linux-2.6.28/, copied a
> good .config,
> "make prepare" under it,
> 
> but if I use it to build an external module under $PWD/kernel, it complains,
> 
> $ env -i make -C /usr/src/linux-2.6.28/ M=$PWD/kernel
> make: Entering directory `/usr/src/linux-2.6.28'
> 
>   WARNING: Symbol version dump /usr/src/linux-2.6.28/Module.symvers
>            is missing; modules will have no dependencies and modversions.
> 
>   Building modules, stage 2.
>   MODPOST 1 modules
> /bin/sh: scripts/mod/modpost: No such file or directory
> make[1]: *** [__modpost] Error 127
> make: *** [modules] Error 2
> make: Leaving directory `/usr/src/linux-2.6.28'
> 
> it seems OK if I do a "make scritps/" in advance, so should we add scripts
> depend to prepare?
Yes.
I wonder why this is not done today??

Can I ask you to try it out and see if anythings breaks.

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is this a kbuild system's BUG?
  2009-01-20 13:47 ` Sam Ravnborg
@ 2009-02-15 10:16   ` Sam Ravnborg
  0 siblings, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2009-02-15 10:16 UTC (permalink / raw)
  To: Cheng Renquan; +Cc: linux-kbuild

On Tue, Jan 20, 2009 at 02:47:19PM +0100, Sam Ravnborg wrote:
> On Tue, Jan 20, 2009 at 06:15:29PM +0800, Cheng Renquan wrote:
> > Hello,
> > 
> > as the prepare target said,
> > 
> >   prepare         - Set up for building external modules
> > 
> > it should setup a environment for external modules building, right?
> > 
> > I unpacked linux-2.6.28.tar.bz2 to /usr/src/linux-2.6.28/, copied a
> > good .config,
> > "make prepare" under it,
> > 
> > but if I use it to build an external module under $PWD/kernel, it complains,
> > 
> > $ env -i make -C /usr/src/linux-2.6.28/ M=$PWD/kernel
> > make: Entering directory `/usr/src/linux-2.6.28'
> > 
> >   WARNING: Symbol version dump /usr/src/linux-2.6.28/Module.symvers
> >            is missing; modules will have no dependencies and modversions.
> > 
> >   Building modules, stage 2.
> >   MODPOST 1 modules
> > /bin/sh: scripts/mod/modpost: No such file or directory
> > make[1]: *** [__modpost] Error 127
> > make: *** [modules] Error 2
> > make: Leaving directory `/usr/src/linux-2.6.28'
> > 
> > it seems OK if I do a "make scritps/" in advance, so should we add scripts
> > depend to prepare?
> Yes.
> I wonder why this is not done today??
> 
> Can I ask you to try it out and see if anythings breaks.

I took a second look at this - and this time I actually read the documentation
we have. From Documentation/kbuild/modules.txt:

--- 2.4 Preparing the kernel tree for module build

        To make sure the kernel contains the information required to
        build external modules the target 'modules_prepare' must be used.
        'modules_prepare' exists solely as a simple way to prepare
        a kernel source tree for building external modules.
        Note: modules_prepare will not build Module.symvers even if
        CONFIG_MODVERSIONS is set. Therefore a full kernel build
        needs to be executed to make module versioning work.



This does not answer why we do not run the scripts target as part
of the prepare target. But it is at least documented what to do.

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-15 10:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 10:15 Is this a kbuild system's BUG? Cheng Renquan
2009-01-20 13:47 ` Sam Ravnborg
2009-02-15 10:16   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox