Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Proposal: Hardwiring boot verbosity




To: current-users%netbsd.org@localhost

Subject: Proposal: Hardwiring boot verbosity

From: Stephen Borrill <netbsd%precedence.co.uk@localhost>

Date: Wed, 2 Jan 2008 11:07:20 +0000 (GMT)


I want to be able to able to hardwire the autoconf verbosity level in a  kernel config file, but also allow this to be overridden (if allowed) from  the boot prompt. What I've done is:
1) Add a kernel option of BOOT_VERBOSITY

2) Add AB_FORCENORMAL 0x00100000 to sys/reboot.h

3) Add boot option n which sets AB_FORCENORMAL in sys/boot_flag.h

4) Add BOO
THOTTO_SET_VERBOSITY macro in sys/systm.h which alters boothowto  accordingly. If AB_FORCENORMAL is set, it clears  AB_SILENT|AB_VERBOSE|AB_DEBUG|AB_QUIET.

5) Add 
BOOTHOWTO_SET_VERBOSITY() call early in main() (the earliest MI  place I could find).

With this a kernel configuration containing:
options BOOT_VERBOSITY=AB_SILENT

will boot si
lently as though boot -z had been specified, yet if boot -n is  used, it will boot normally.

Furthermore, if you use:
options BOOT_VERBOSITY="AB_SILENT|AB_FORCENORMAL"

this 
will ignore any options passed in at the boot loader (i.e. the user  will not be able to get verbose output even if they want to).

To do before committing:
- Add commented out lines in all GENERICs.
- Update man pages.

There is some prior art (e.g. in evbarm and BOOT_ARGS), but this is not  widespread.

Are there any comments about this approach before I develop it further?

--
Stephen






Prev by Date: Re: help with bluetooth

Next by Date: build is broken - systrace fallout?

Previous by Thread: daily CVS update output

Next by Thread: build is broken - systrace fallout?

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index