mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* building a specific in-tree module is currently a bit broken
@ 2007-09-05  9:16 Robert P. J. Day
  2007-09-05  9:37 ` Michal Piotrowski
  0 siblings, 1 reply; 8+ messages in thread
From: Robert P. J. Day @ 2007-09-05  9:16 UTC (permalink / raw)
  To: Linux Kernel Mailing List


  i know sam ravnborg has been Cc'ed on a janitors list posting
mentioning this but, just in case this note can get a fix snuck in
there quickly before 2.6.23 (this is on i386, but i'm guessing applies
to all arches):

$ make distclean
$ make defconfig
$ make menuconfig      (select visor.ko to be built a module)
$ make drivers/usb/serial/visor.ko
scripts/kconfig/conf -s arch/i386/Kconfig
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-i386
  CC      arch/i386/kernel/asm-offsets.s
  GEN     include/asm-i386/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/bin2c
  CC [M]  drivers/usb/serial/visor.o
/bin/sh: .tmp_versions/visor.mod: No such file or directory
  MODPOST 0 modules
$

  whoops.  manually creating the directory .tmp_versions first fixes
this, but i'm not conversant enough with the Makefile to want to take
a shot at repairing this.

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

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

* Re: building a specific in-tree module is currently a bit broken
  2007-09-05  9:16 building a specific in-tree module is currently a bit broken Robert P. J. Day
@ 2007-09-05  9:37 ` Michal Piotrowski
  2007-09-05  9:43   ` Jan Engelhardt
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Piotrowski @ 2007-09-05  9:37 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, Sam Ravnborg, Roman Zippel

Hi,

[Adding K{build,config} wizards to CC]

On 05/09/07, Robert P. J. Day <rpjday@mindspring.com> wrote:
>
>   i know sam ravnborg has been Cc'ed on a janitors list posting
> mentioning this but, just in case this note can get a fix snuck in
> there quickly before 2.6.23 (this is on i386, but i'm guessing applies
> to all arches):
>
> $ make distclean
> $ make defconfig
> $ make menuconfig      (select visor.ko to be built a module)
> $ make drivers/usb/serial/visor.ko
> scripts/kconfig/conf -s arch/i386/Kconfig
>   CHK     include/linux/version.h
>   UPD     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   UPD     include/linux/utsrelease.h
>   SYMLINK include/asm -> include/asm-i386
>   CC      arch/i386/kernel/asm-offsets.s
>   GEN     include/asm-i386/asm-offsets.h
>   CALL    scripts/checksyscalls.sh
>   CC      scripts/mod/empty.o
>   HOSTCC  scripts/mod/mk_elfconfig
>   MKELF   scripts/mod/elfconfig.h
>   HOSTCC  scripts/mod/file2alias.o
>   HOSTCC  scripts/mod/modpost.o
>   HOSTCC  scripts/mod/sumversion.o
>   HOSTLD  scripts/mod/modpost
>   HOSTCC  scripts/kallsyms
>   HOSTCC  scripts/conmakehash
>   HOSTCC  scripts/bin2c
>   CC [M]  drivers/usb/serial/visor.o
> /bin/sh: .tmp_versions/visor.mod: No such file or directory
>   MODPOST 0 modules
> $
>
>   whoops.  manually creating the directory .tmp_versions first fixes
> this, but i'm not conversant enough with the Makefile to want to take
> a shot at repairing this.
>
> rday
>
> --
> ========================================================================
> Robert P. J. Day
> Linux Consulting, Training and Annoying Kernel Pedantry
> Waterloo, Ontario, CANADA
>
> http://crashcourse.ca

Regards,
Michal

-- 
LOG
http://www.stardust.webpages.pl/log/

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

* Re: building a specific in-tree module is currently a bit broken
  2007-09-05  9:43   ` Jan Engelhardt
@ 2007-09-05  9:42     ` Robert P. J. Day
  2007-09-05 10:02       ` Jan Engelhardt
  2007-09-05 20:11     ` Sam Ravnborg
  2007-09-05 20:12     ` Sam Ravnborg
  2 siblings, 1 reply; 8+ messages in thread
From: Robert P. J. Day @ 2007-09-05  9:42 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Michal Piotrowski, Linux Kernel Mailing List, Sam Ravnborg, Roman Zippel

On Wed, 5 Sep 2007, Jan Engelhardt wrote:

>
> On Sep 5 2007 11:37, Michal Piotrowski wrote:
> >
> >Hi,
> >
> >[Adding K{build,config} wizards to CC]
> >
> >On 05/09/07, Robert P. J. Day <rpjday@mindspring.com> wrote:
> >>
> >> $ make distclean
> >> $ make defconfig
> >> $ make menuconfig      (select visor.ko to be built a module)
> >> $ make drivers/usb/serial/visor.ko
>
> Beep. Need 'make scripts prepare' between menuconfig and visor.

that doesn't solve the problem.  i should have mentioned that i
already (unnecessarily, i suggest) ran "make modules_prepare", but the
problem persists.

the issue seems to be that running that last make command to build the
module visor.ko doesn't somehow signal the Makefile that this is a
*module* build, and therefore no module-related initialization is
done, such as creating that directory or setting the Makefile variable
MODVERDIR, etc, etc.

once you've build at least one module successfully, then the directory
.tmp_versions exists so future module builds will work fine.  it's
only when you do a clean, *immediately* followed by trying to do an
in-tree module build, that this is going to bite you.

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

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

* Re: building a specific in-tree module is currently a bit broken
  2007-09-05  9:37 ` Michal Piotrowski
@ 2007-09-05  9:43   ` Jan Engelhardt
  2007-09-05  9:42     ` Robert P. J. Day
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jan Engelhardt @ 2007-09-05  9:43 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Robert P. J. Day, Linux Kernel Mailing List, Sam Ravnborg, Roman Zippel


On Sep 5 2007 11:37, Michal Piotrowski wrote:
>
>Hi,
>
>[Adding K{build,config} wizards to CC]
>
>On 05/09/07, Robert P. J. Day <rpjday@mindspring.com> wrote:
>>
>> $ make distclean
>> $ make defconfig
>> $ make menuconfig      (select visor.ko to be built a module)
>> $ make drivers/usb/serial/visor.ko

Beep. Need 'make scripts prepare' between menuconfig and visor.

Also note that visor will not have any symvers until you have
a Module.symvers (which, ironically, is created at the end of "make vmlinux")



	Jan
-- 

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

* Re: building a specific in-tree module is currently a bit broken
  2007-09-05  9:42     ` Robert P. J. Day
@ 2007-09-05 10:02       ` Jan Engelhardt
  2007-09-05 10:23         ` Robert P. J. Day
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Engelhardt @ 2007-09-05 10:02 UTC (permalink / raw)
  To: Robert P. J. Day
  Cc: Michal Piotrowski, Linux Kernel Mailing List, Sam Ravnborg, Roman Zippel


On Sep 5 2007 05:42, Robert P. J. Day wrote:
>that doesn't solve the problem.  i should have mentioned that i
>already (unnecessarily, i suggest) ran "make modules_prepare", but the
>problem persists.
>
>the issue seems to be that running that last make command to build the
>module visor.ko doesn't somehow signal the Makefile that this is a
>*module* build, and therefore no module-related initialization is
>done, such as creating that directory or setting the Makefile variable
>MODVERDIR, etc, etc.

ah... make M=drivers/foo/bar/
it builds the whole directory, but at least it builds it.


>
>once you've build at least one module successfully, then the directory
>.tmp_versions exists so future module builds will work fine.  it's
>only when you do a clean, *immediately* followed by trying to do an
>in-tree module build, that this is going to bite you.

	Jan
-- 

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

* Re: building a specific in-tree module is currently a bit broken
  2007-09-05 10:02       ` Jan Engelhardt
@ 2007-09-05 10:23         ` Robert P. J. Day
  0 siblings, 0 replies; 8+ messages in thread
From: Robert P. J. Day @ 2007-09-05 10:23 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Michal Piotrowski, Linux Kernel Mailing List, Sam Ravnborg, Roman Zippel

On Wed, 5 Sep 2007, Jan Engelhardt wrote:

>
> On Sep 5 2007 05:42, Robert P. J. Day wrote:
> >that doesn't solve the problem.  i should have mentioned that i
> >already (unnecessarily, i suggest) ran "make modules_prepare", but
> >the problem persists.
> >
> >the issue seems to be that running that last make command to build
> >the module visor.ko doesn't somehow signal the Makefile that this
> >is a *module* build, and therefore no module-related initialization
> >is done, such as creating that directory or setting the Makefile
> >variable MODVERDIR, etc, etc.
>
> ah... make M=drivers/foo/bar/
> it builds the whole directory, but at least it builds it.

oh, i know *that* works but, as you can see, that make command has
enough info (the "M=" variable) to kick the Makefile into
module-building mode, so things work properly.

the original problem, of course, is still there.  but i think i've
flogged this sufficiently.  i'll leave someone else to do the fixing.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

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

* Re: building a specific in-tree module is currently a bit broken
  2007-09-05  9:43   ` Jan Engelhardt
  2007-09-05  9:42     ` Robert P. J. Day
@ 2007-09-05 20:11     ` Sam Ravnborg
  2007-09-05 20:12     ` Sam Ravnborg
  2 siblings, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2007-09-05 20:11 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Michal Piotrowski, Robert P. J. Day, Linux Kernel Mailing List,
	Roman Zippel

On Wed, Sep 05, 2007 at 11:43:15AM +0200, Jan Engelhardt wrote:
> 
> On Sep 5 2007 11:37, Michal Piotrowski wrote:
> >
> >Hi,
> >
> >[Adding K{build,config} wizards to CC]
> >
> >On 05/09/07, Robert P. J. Day <rpjday@mindspring.com> wrote:
> >>
> >> $ make distclean
> >> $ make defconfig
> >> $ make menuconfig      (select visor.ko to be built a module)
> >> $ make drivers/usb/serial/visor.ko
> 
> Beep. Need 'make scripts prepare' between menuconfig and visor.
Nope - kbuild does this for you.
See following lines from top-level Makefile:

%.ko: prepare scripts FORCE
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
        $(build)=$(build-dir) $(@:.ko=.o)
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost

But as pointed out it fails to create MODVERDIR.
I had one take on it some time ago and do not recall why I failed
to fix it. Should be trivial.

But this is a small issue that has been there for a long time
and is not -rc material. I will try to have it fixed for
next merge window.

	Sam

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

* Re: building a specific in-tree module is currently a bit broken
  2007-09-05  9:43   ` Jan Engelhardt
  2007-09-05  9:42     ` Robert P. J. Day
  2007-09-05 20:11     ` Sam Ravnborg
@ 2007-09-05 20:12     ` Sam Ravnborg
  2 siblings, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2007-09-05 20:12 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Michal Piotrowski, Robert P. J. Day, Linux Kernel Mailing List,
	Roman Zippel

On Wed, Sep 05, 2007 at 11:43:15AM +0200, Jan Engelhardt wrote:
> 
> Also note that visor will not have any symvers until you have
> a Module.symvers (which, ironically, is created at the end of "make vmlinux")

Yeaa - it is hard to create it before we have vmlinux.

	Sam

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

end of thread, other threads:[~2007-09-05 20:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-05  9:16 building a specific in-tree module is currently a bit broken Robert P. J. Day
2007-09-05  9:37 ` Michal Piotrowski
2007-09-05  9:43   ` Jan Engelhardt
2007-09-05  9:42     ` Robert P. J. Day
2007-09-05 10:02       ` Jan Engelhardt
2007-09-05 10:23         ` Robert P. J. Day
2007-09-05 20:11     ` Sam Ravnborg
2007-09-05 20:12     ` Sam Ravnborg

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

Powered by JetHome