Page MenuHomeFreeBSD

Add build-time option to boot0sio to reset terminal
AcceptedPublic

Authored by lev on Sep 10 2018, 3:32 PM.

Details

Summary

Some hardware/firmware leaves serial console in bogus state before calling user boot code. After that output of boot0sio could not be seen by user, which is inconvenient.
This diff adds compile-time option BOOT_BOOT0_RESET_TERM, which force boot0sio to send default VT-100 reset command <ESC>c before all output.
This option is not compatible with PXE and VOLUME_SERIAL options, due to space constrains. Only two of these three options could be selected together.
This option is turned off by default.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

lev created this revision.Sep 10 2018, 3:32 PM
lev edited the summary of this revision. (Show Details)Sep 10 2018, 3:36 PM
lev updated this revision to Diff 57098.May 6 2019, 7:16 PM
imp added inline comments.May 6 2019, 8:10 PM
stand/i386/boot0sio/Makefile
10

We're trying to migrate to -DWITH_BOOT0_RESET_TERM style, so please use that here if you can by adding that variable in src.conf, etc.

lev marked an inline comment as done.May 7 2019, 12:04 PM
lev updated this revision to Diff 57127.
imp added inline comments.May 8 2019, 3:37 PM
stand/i386/boot0sio/Makefile
10

No. Like this

.include <src.opts.mk>

.if ${MK_BOOT0_RESET_TERM} != "no"
...
.endif

lev updated this revision to Diff 57220.May 9 2019, 5:05 PM
lev marked an inline comment as done.May 9 2019, 5:06 PM

Mea culpa.

ryan_freqlabs.com added inline comments.
tools/build/options/WITH_BOOT0_RESET_TERM
6

constraints.

rpokala added inline comments.
stand/i386/boot0/Makefile
17

send terminal reset command when, under what conditions?

I see the addition which feeds into src.conf.5, but does this need to be mentioned elsewhere, such as boot.8 or boot0cfg.8?

tools/build/options/WITH_BOOT0_RESET_TERM
4

before all output can be read two different ways:

  1. before the first output
  2. before each individual output

Please clarify.

lev marked 3 inline comments as done.Jul 17 2019, 6:57 PM
lev added inline comments.
lev updated this revision to Diff 59847.
stand/i386/boot0/Makefile
17

Other boot0[sio] options are not described in boot.8 or boot0cfg.8, so I haven't add new option there.

This revision is now accepted and ready to land.Jul 17 2019, 7:31 PM
stand/i386/boot0/boot0.S
597

s/teminal/terminal/

lev marked an inline comment as done.Jul 17 2019, 7:43 PM
lev updated this revision to Diff 59858.
This revision now requires review to proceed.Jul 17 2019, 7:43 PM
lev marked an inline comment as done.Jul 17 2019, 7:43 PM
rpokala added a subscriber: kevans.Jul 18 2019, 2:47 AM
rpokala accepted this revision.

LGTM, but I defer to @imp. Oh, and @kevans did a lot of stuff related to loader output as part of LuaLoader, so you might want to get his feedback as well.

This revision is now accepted and ready to land.Jul 18 2019, 2:47 AM