Re: setting bootverbose (or boothowto) from the kernel config file ?

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Fri, 10 Oct 2008 09:38:02 -0600 (MDT)
In message: <20081010151456.GA27576_at_onelab2.iet.unipi.it>
            Luigi Rizzo <rizzo_at_iet.unipi.it> writes:
: In a diskless setting which does not use /boot/loader, i need to
: control the value of 'bootverbose' to print extra debugging messages.
: 
: I just learned that using this line in the kernel config file
: 
: 	env	"my_kenv_settings"
: 
: and providing a list of var.name=value in the file my_kenv_settings,
: these values get dumped to compile/MYKERNEL/env.c and become accessible
: from the kernel through getenv() (e.g. i used this for machdep.bios.pnp).
: 
: However i haven't found a way to set 'bootverbose', which is a sysctl
: variable (debug.bootverbose) so it seems to be in a different namespace.
: 
: Any ideas ?
: 
: Also, what is exactly the relation between the two variables
: 'boothowto' (apparently set through the loader and containing
: various flags) and 'bootverbose' (which is a sysctl) ?
: Different parts of the kernel use one or the other to control
: verbose output, and i am not sure if, e.g. setting RB_VERBOSE
: in 'boothowto' also sets bootverbose...

bootverbose is set based on boothowto.  The sysctl thing is just an
afterthought:

static void
set_boot_verbose(void *data __unused)
{

	if (boothowto & RB_VERBOSE)
		bootverbose++;
}
SYSINIT(boot_verbose, SI_SUB_TUNABLES, SI_ORDER_ANY, set_boot_verbose, NULL);

We likely at this stage could convert it to a tunable as well...

Warner
Received on Fri Oct 10 2008 - 13:40:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:36 UTC