Date: Fri, 10 Oct 2008 09:38:02 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: rizzo@iet.unipi.it Cc: current@FreeBSD.org Subject: Re: setting bootverbose (or boothowto) from the kernel config file ? Message-ID: <20081010.093802.1338308573.imp@bsdimp.com> In-Reply-To: <20081010151456.GA27576@onelab2.iet.unipi.it> References: <20081010151456.GA27576@onelab2.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20081010151456.GA27576@onelab2.iet.unipi.it> Luigi Rizzo <rizzo@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081010.093802.1338308573.imp>