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