Subject: Re: passing in the booted kernel name...?
To: Todd Vierling <tv@pobox.com>
From: David Brownlee <abs@anim.dreamworks.com>
List: port-sparc
Date: 01/09/1999 19:20:40
On Sat, 9 Jan 1999, Todd Vierling wrote:

> How does this help you if you TFTP in your kernel?  (Shark, for instance.
> Perhaps pmaxes too, who MOP in the kernel.)
> 
> In general, `machdep.booted_kernel' can not really be made MI, and relying
> on it in the system is Bogus.

	You fall back to /netbsd and are no worse off than now.

    Some options, assuming we want to be able to boot alternative kernels.

	1) Status Quo:
	    _Must_ have a copy of the booted kernel in /netbsd. Simplest
	    to implement, but least functional.

	2) Pass in booted name from bootloader:
	    If kernel is on accessible filesystem, easy win.
	    If kernel is not accessible, we can look at the last component
	    of the name and look for that in the root directory. If we don't
	    find it we're no worse off, but it allows people to setup their
	    kernels so they can effectively boot alternative kernels.
	    If we cannot determine the name of the kernel, default back to
	    /netbsd, and we lose in no more cases than the current situation.

	3) Boot loader loads necessary symbols, rc generates kvm.db, then kernel
	releases memory. If symbols not found, fall back to one of the above
	two options.
	    If the bootloader has support, we win (symbol wise) every time.
	    We waste some memory during early bootup. Could be a problem in
	    some memory poor machines, particlarly if booting single user.


	The current situation loses when booting alternative kernels on all
	machines. Option 2 wins with no effort on most machines, and allows
	it to work with a little effort on the rest. Option 3 automatically 
	wins in more cases, but with the memory overhead during early boot.
	




		
	

		David/absolute

                  -=-  Trust is a non-renewable resource  -=-