Re: [kbuild regression, post-rc1] Remote installation overread-only NFS broken

From: Michal Marek
Date: Thu Jun 10 2010 - 06:25:24 EST


On Thu, Jun 10, 2010 at 11:11:35AM +1000, Stephen Rothwell wrote:
> Hi Michal,
>
> On Mon, 7 Jun 2010 23:16:30 +0200 Michal Marek <mmarek@xxxxxxx> wrote:
> >
> > I can fix both issues by the below patch, but then it reintroduces the
> > issue Eric reported to me with the original approach:
> >
> > | And indeed it's strange - while scripts/Makefile.build doesn't fail
> > | since
> > | there seems to be a script that generates some Makefiles in between
> > | the build process, I'll get this figured out to see what is the root
> > | cause.
> >
> > (the whole thread is at http://lkml.org/lkml/2010/1/6/16). Eric, does
> > the above still hold, i.e. if you apply the below patch, does
> > scripts/Makefile.modbuiltin fail again? If so, is it possible to fix the
> > driver build process instead?
> >
> > Here is the patch:
> >
> > Subject: [PATCH] kbuild: Generate modules.builtin in make modules
>
> This patch breaks (at least) a powerpc ppc64_defconfig build with
> separate object directory (that starts completely empty).
>
> /bin/sh: line 1: init/modules.builtin: No such file or directory

Oops, this uncovered a bug in scripts/Makefile.modbuiltin. Following
patch should fix that, I'll run a few randconfigs before pushing it
though.

Michal

Subject: [PATCH] kbuild: Create output directory in Makefile.modbuiltin

Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Signed-off-by: Michal Marek <mmarek@xxxxxxx>

diff --git a/scripts/Makefile.modbuiltin b/scripts/Makefile.modbuiltin
index 102a276..1adb974 100644
--- a/scripts/Makefile.modbuiltin
+++ b/scripts/Makefile.modbuiltin
@@ -14,6 +14,11 @@ __modbuiltin:

include scripts/Kbuild.include

+ifneq ($(KBUILD_SRC),)
+# Create output directory if not already present
+_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
+endif
+
# The filename Kbuild has precedence over Makefile
kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/