Current-Users archive

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

Proposal: Hardwiring boot verbosity



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 BOOTHOTTO_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 silently 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




Home | Main Index | Thread Index | Old Index