lkml.org 
[lkml]   [2010]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [kbuild regression, post-rc1] Remote installation over read-only NFS broken
Date
On Monday 07 June 2010, Michal Marek wrote:
> 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>

The patch works for me, thanks.

> 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";\
> --

Rafael


\
 
 \ /
  Last update: 2010-06-08 00:09    [W:0.066 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site