Subject: Re: "make install" for kernel build?
To: Frederick Bruckman <fb@enteract.com>
From: Jim Bernard <jbernard@ox.mines.edu>
List: current-users
Date: 02/27/2000 11:29:34
On Sun, Feb 27, 2000 at 11:11:22AM -0600, Frederick Bruckman wrote:
> On Sun, 27 Feb 2000, Greywolf wrote:
> 
> > Would I be considered a blasphemer/heretic were I to suggest an "install"
> > target for the kernel Makefile?  To wit:
> 
> > .if defined(COMPRESS_KERNEL)
> > KERNEL=netbsd.gz
> > .else
> > KERNEL=netbsd
> > .endif
> > 
> > install: netbsd
> > 	@if [ -f /${KERNEL} ]; then { \
> > 	    mv /${KERNEL} /o${KERNEL}; \
> > 	 } fi;
> > 	@if [ "${COMPRESS}" ]; then { \
> > 	     gzip netbsd; \
> > 	 } fi;
> > 	install -c -m 0540 -o root -g kmem ${KERNEL} /${KERNEL};
> 
> If you must do this, I'd rather see the old kernel moved to
> ${KERNEL}.old. That way, if I lose power on my headless i386 right in
> the middle of the install, it might still boot. The search path, is, I
> think, "netbsd, netbsd.old, netbsd.gz, netbsd.old.gz". I'd prefer to
> reserve "onetbsd" for hand-picked, known, stable kernels.

  To be precise, it's:

      "netbsd", "netbsd.gz",
      "netbsd.old", "netbsd.old.gz",
      "onetbsd", "onetbsd.gz",

(from .../sys/arch/i386/stand/biosboot/main.c, e.g.).