public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Eric Miao <eric.y.miao@gmail.com>
Subject: Re: [kbuild regression, post-rc1] Remote installation over read-only NFS broken
Date: Mon, 7 Jun 2010 23:16:30 +0200	[thread overview]
Message-ID: <20100607211630.GA3902@sepie.suse.cz> (raw)
In-Reply-To: <alpine.LFD.2.00.1006070732170.3515@i5.linux-foundation.org>

On Mon, Jun 07, 2010 at 07:41:42AM -0700, Linus Torvalds wrote:
> 
> 
> On Mon, 7 Jun 2010, Rafael J. Wysocki wrote:
> > 
> > Namely, I build kernels on a central machine and export the build directory
> > along with the kernel sources over read-only NFS to test boxes.  Then, on the
> > test boxes I run "make modules_install", copy the kernel to /boot, run mkinitrd
> > and so on.  Now, after your commit above the "make modules_install" command on
> > the test boxes doesn't work any more, because it tries to write to the build
> > directory, which is mounted read-only.
> > 
> > Please fix or revert.
> 
> Ahh. It's broken for another reason too. Even if it's a writable 
> filesystem, it means that there's a lot of files that get written by root 
> (since you have to be root to do the install). Which is very 
> uncomfortable, and we've tried very hard to avoid that.

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

Generating the file in make modules_install was broken as well, because
it didn't work in a readonly filesystem and otherwise it generated a
root-owned file which is not wanted.

Reported-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Michal Marek <mmarek@suse.cz>

diff --git a/Makefile b/Makefile
index efdc3d0..2735465 100644
--- a/Makefile
+++ b/Makefile
@@ -1095,7 +1095,7 @@ all: modules
 #	using awk while concatenating to the final file.
 
 PHONY += modules
-modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
+modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
 	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
 	@$(kecho) '  Building modules, stage 2.';
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1117,7 +1117,7 @@ PHONY += modules_install
 modules_install: _modinst_ _modinst_post
 
 PHONY += _modinst_
-_modinst_: modules.builtin
+_modinst_:
 	@if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
 		echo "Warning: you may need to install module-init-tools"; \
 		echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\

  reply	other threads:[~2010-06-07 21:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07  9:10 [kbuild regression, post-rc1] Remote installation over read-only NFS broken Rafael J. Wysocki
2010-06-07 11:28 ` Michal Marek
2010-06-07 14:41 ` Linus Torvalds
2010-06-07 21:16   ` Michal Marek [this message]
2010-06-07 22:06     ` Rafael J. Wysocki
2010-06-10  1:11     ` Stephen Rothwell
2010-06-10 10:25       ` Michal Marek

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=20100607211630.GA3902@sepie.suse.cz \
    --to=mmarek@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=eric.y.miao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.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