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
F102599198: D17102.id57220.diff
Thu, Nov 14, 2:54 PM
Unknown Object (File)
Wed, Oct 30, 4:55 PM
Unknown Object (File)
Thu, Oct 17, 12:30 AM
Unknown Object (File)
Tue, Oct 15, 10:38 PM
Unknown Object (File)
Sep 30 2024, 6:42 PM
Unknown Object (File)
Sep 28 2024, 3:34 PM
Unknown Object (File)
Sep 25 2024, 7:40 PM
Unknown Object (File)
Sep 25 2024, 7:40 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
Tests Skipped

Event Timeline

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

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
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.
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.