Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F81911916
D17102.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D17102.diff
View Options
Index: share/mk/src.opts.mk
===================================================================
--- share/mk/src.opts.mk
+++ share/mk/src.opts.mk
@@ -202,6 +202,7 @@
__DEFAULT_NO_OPTIONS = \
BEARSSL \
BHYVE_SNAPSHOT \
+ BOOT0_RESET_TERM \
CLANG_EXTRAS \
CLANG_FORMAT \
DTRACE_TESTS \
Index: stand/i386/boot0/Makefile
===================================================================
--- stand/i386/boot0/Makefile
+++ stand/i386/boot0/Makefile
@@ -14,6 +14,7 @@
# -DCHECK_DRIVE enable checking drive number
# -DONLY_F_KEYS accept only Fx keys in console
# -DTEST print drive number on entry
+# -DRESET_TERM send terminal reset command before first output
#
OPTS ?= -DVOLUME_SERIAL -DPXE
CFLAGS += ${OPTS}
Index: stand/i386/boot0/boot0.S
===================================================================
--- stand/i386/boot0/boot0.S
+++ stand/i386/boot0/boot0.S
@@ -216,6 +216,14 @@
callw bioscom
#endif
+#if defined(SIO) && defined(RESET_TERM)
+ /*
+ * ANSI / VT100 command to reset all terminal attributes
+ */
+ movw $resetterm,%si # Reset
+ callw putstr # terminal
+#endif
+
/*
* If the 'setdrv' flag is set in the boot sector, use the drive
* number from the boot sector at 'setdrv_num'.
@@ -584,6 +592,14 @@
popw %si # Restore
retw # To caller
+#if defined(SIO) && defined(RESET_TERM)
+ /*
+ * Reset terminal ANSI/VT100 sequence
+ */
+resetterm:
+ .byte 0x1b; .byte 'c'|0x80
+#endif
+
/*
* Various menu strings. 'item' goes after 'prompt' to save space.
* Also use shorter versions to make room for the PXE/INT18 code.
Index: stand/i386/boot0sio/Makefile
===================================================================
--- stand/i386/boot0sio/Makefile
+++ stand/i386/boot0sio/Makefile
@@ -2,7 +2,13 @@
.PATH: ${.CURDIR}/../boot0
+.include <src.opts.mk>
+
PROGNAME= boot0sio
CFLAGS+= -DSIO
+.if ${MK_BOOT0_RESET_TERM} != "no"
+OPTS ?= -DRESET_TERM -DSAVE_MEMORY -DPXE
+.endif
+
.include "${.CURDIR}/../boot0/Makefile"
Index: tools/build/options/WITH_BOOT0_RESET_TERM
===================================================================
--- /dev/null
+++ tools/build/options/WITH_BOOT0_RESET_TERM
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to build boot0sio to send default VT-100 reset command <ESC>c before first
+output.
+This option is not compatible with PXE and VOLUME_SERIAL options, due to space
+constraints.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 8:53 AM (20 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9064151
Default Alt Text
D17102.diff (2 KB)
Attached To
Mode
D17102: Add build-time option to boot0sio to reset terminal
Attached
Detach File
Event Timeline
Log In to Comment