summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2012-10-08 23:02:35 +0000
committerdteske <dteske@FreeBSD.org>2012-10-08 23:02:35 +0000
commita93c5f872768c1714c66521792fef4641d02a2fa (patch)
treea0aedc621433ceda805af8fc7fff8aca4d2da64d /sys/boot
parent3435e7fe3f12f04f87b235ee1f2f65b793ffc874 (diff)
downloadFreeBSD-src-a93c5f872768c1714c66521792fef4641d02a2fa.zip
FreeBSD-src-a93c5f872768c1714c66521792fef4641d02a2fa.tar.gz
Add an echo to say we're "Booting..." when the overloaded "boot" Ficl word is
executed to better differentiate between loader-specific errors and kernel- specific errors (if ever any of either). This type of functionality hasn't been required before the introduction of the advanced menu system (r222417). Adding this functionality will help different- iate errors at the loader-level such as a BTX halt caused by heap exhaustion and errors that may be involved with executing the kernel (wrong architecture for example). A user can learn that messages before "Booting..." are related to the loader(8) environment and it's Forth-ilk, while those after are not related to loader(8) -- the point that loader(8) has ``left the building''. This patch also includes a man-page update to color.4th(8) as the color logic moves to a lower-level (from being included by beastie.4th to being included by loader.4th). After noticing a delay between execution of the overloaded "boot" FICL word and the display of text on-screen, gcooper confirmed that the introduction of a builtin memory test (disabled by adding hw.memtest.tests="0" to loader.conf(5)) was the cause of the delay. This patch adds an echo to produce "Booting..." when the overloaded "boot" word is executed (this includes from the interactive command-prompt on all arches, from the menu system on arches that run the beastie menu, and even those arches that run the menu but disable it by setting beastie_disable="YES" in loader.conf(5)). When loader_color="YES" in loader.conf(5), the same message is produced but in white text on a blue background (only the letters produced have this background -- opposed to perhaps the entire line).
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/forth/beastie.4th1
-rw-r--r--sys/boot/forth/color.4th.83
-rw-r--r--sys/boot/forth/loader.4th7
3 files changed, 8 insertions, 3 deletions
diff --git a/sys/boot/forth/beastie.4th b/sys/boot/forth/beastie.4th
index 5c1ca81..68d47f6 100644
--- a/sys/boot/forth/beastie.4th
+++ b/sys/boot/forth/beastie.4th
@@ -28,7 +28,6 @@
marker task-beastie.4th
-include /boot/color.4th
include /boot/delay.4th
variable logoX
diff --git a/sys/boot/forth/color.4th.8 b/sys/boot/forth/color.4th.8
index d0233ed..5b6baf0 100644
--- a/sys/boot/forth/color.4th.8
+++ b/sys/boot/forth/color.4th.8
@@ -50,7 +50,7 @@ through the command:
.Dl include color.4th
.Pp
This line is present in
-.Pa /boot/beastie.4th
+.Pa /boot/loader.4th
file, so it is not needed (and should not be re-issued) in a normal setup.
.Pp
The commands provided by it are:
@@ -102,7 +102,6 @@ loader_color="YES"
.Sh SEE ALSO
.Xr loader.conf 5 ,
.Xr loader 8 ,
-.Xr beastie.4th 8 ,
.Xr loader.4th 8
.Sh HISTORY
The
diff --git a/sys/boot/forth/loader.4th b/sys/boot/forth/loader.4th
index 437533a..e252cfe 100644
--- a/sys/boot/forth/loader.4th
+++ b/sys/boot/forth/loader.4th
@@ -40,6 +40,7 @@ s" arch-i386" environment? [if] [if]
2048 dictincrease ! \ 2048 additional cells each time
include /boot/support.4th
+include /boot/color.4th
only forth also support-functions also builtins definitions
@@ -64,6 +65,12 @@ only forth also support-functions also builtins definitions
: boot
0= if ( interpreted ) get_arguments then
+ loader_color? if
+ ." Booting..." cr
+ else
+ ." Booting..." cr
+ then
+
\ Unload only if a path was passed
dup if
>r over r> swap
OpenPOWER on IntegriCloud