Page MenuHomeFreeBSD

Add build-time option to boot0sio to reset terminal
Needs ReviewPublic

Authored by lev on Sep 10 2018, 3:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 8:52 PM
Unknown Object (File)
Thu, Nov 14, 12:30 PM
Unknown Object (File)
Thu, Nov 14, 11:33 AM
Unknown Object (File)
Thu, Nov 14, 7:45 AM
Unknown Object (File)
Wed, Nov 13, 5:23 PM
Unknown Object (File)
Wed, Nov 13, 2:12 PM
Unknown Object (File)
Wed, Nov 13, 12:46 PM
Unknown Object (File)
Wed, Nov 13, 11:52 AM

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
Tests Skipped

Event Timeline

stand/i386/boot0sio/Makefile
8

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.
stand/i386/boot0sio/Makefile
8

No. Like this

.include <src.opts.mk>

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

lev marked an inline comment as done.May 9 2019, 5:06 PM

Mea culpa.

freqlabs added inline comments.
tools/build/options/WITH_BOOT0_RESET_TERM
5 โ†—(On Diff #57220)

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
3 โ†—(On Diff #57220)

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.
lev added inline comments.
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.
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.

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

"Rebase" to latest head, solve conflicts.

This revision now requires review to proceed.Sep 11 2020, 12:30 PM

I think this is good. There's many other strings we might consider for the reset, but this is good.

Regenerate against fresh git repository.