On Sat, 29 Sep 2001, Jan-Benedict Glaw wrote:
> On Sat, 2001-09-29 06:10:52 -0700, Jim Treadway <email@example.com>
> wrote in message <Pine.LNX.firstname.lastname@example.org>:
> > So then you can no longer 'make modules && make modules_install', or you
> > have to cp or chown /usr/src/linux on a fresh install to compile your
> > kernel? Doesn't sound pleasant to me.
> You may do it this way:
> make dep clean bzImage modules && su -c "make modules_install"
> This is so far the minimal version for building as non-root user.
a) It doesn't work (yeah, I'm sure there are many, many, many other
work-arounds, but I can't believe I'm the only one compiling as root):
$ cd /usr/src/linux
$ make dep clean bzImage modules && su -c "make modules_install"
make: Entering directory `/usr/src/linux/arch/i386/boot'
make: Nothing to be done for `dep'.
make: Leaving directory `/usr/src/linux/arch/i386/boot'
scripts/mkdep init/*.c > .depend
/bin/sh: .depend: Permission denied
make: *** [dep-files] Error 1
b) You are still evaluting most, if not all, of the lines in the Makefiles
that do "gcc -o /dev/null", as root.
> > I think the "trick" is to redirect stdout and stderr to /dev/null as well,
> > so that /dev/null doesn't get removed from the file system since it is
> > held open by the shell.
> > Something like:
> > gcc -o /dev/null -xc /dev/null /dev/null 2>&1
> No-go. It's perfectly okay to remove an opened file. Test it yourself.
> You may even replace a running (!) executable...
Which is exactly why I suggested keeping it open via I/O redirection
(except see below).
> > Perhaps someone just forgot the I/O redirection in one of the tests?
> No. It would be of no effect:-)
You are right here though...the I/O redirection doesn't have anything to
do with it, assuming you pass the -S flag to gcc, which I neglected, and
insert the missing '>' in my example above (oops).
But... this seems to be moot since in my case however /dev/null stays
around even when compiling as root. ;)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:01:11 EST