[Midnightbsd-cvs] src [10201] trunk/sys/boot/forth: update loader and frames
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Jun 1 20:00:58 EDT 2018
Revision: 10201
http://svnweb.midnightbsd.org/src/?rev=10201
Author: laffer1
Date: 2018-06-01 20:00:58 -0400 (Fri, 01 Jun 2018)
Log Message:
-----------
update loader and frames
Modified Paths:
--------------
trunk/sys/boot/forth/frames.4th
trunk/sys/boot/forth/loader.4th
Modified: trunk/sys/boot/forth/frames.4th
===================================================================
--- trunk/sys/boot/forth/frames.4th 2018-06-01 23:58:49 UTC (rev 10200)
+++ trunk/sys/boot/forth/frames.4th 2018-06-02 00:00:58 UTC (rev 10201)
@@ -1,9 +1,38 @@
-\ Words implementing frame drawing
-\ XXX Filled boxes are left as an exercise for the reader... ;-/
-\ $MidnightBSD$
+\ Copyright (c) 2003 Scott Long <scottl at FreeBSD.org>
+\ Copyright (c) 2012-2015 Devin Teske <dteske at FreeBSD.org>
+\ All rights reserved.
+\
+\ Redistribution and use in source and binary forms, with or without
+\ modification, are permitted provided that the following conditions
+\ are met:
+\ 1. Redistributions of source code must retain the above copyright
+\ notice, this list of conditions and the following disclaimer.
+\ 2. Redistributions in binary form must reproduce the above copyright
+\ notice, this list of conditions and the following disclaimer in the
+\ documentation and/or other materials provided with the distribution.
+\
+\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+\ SUCH DAMAGE.
+\
+\ $MidnightBSD$
+\ $FreeBSD: stable/10/sys/boot/forth/frames.4th 281843 2015-04-22 01:08:40Z dteske $
marker task-frames.4th
+vocabulary frame-drawing
+only forth also frame-drawing definitions
+
+\ XXX Filled boxes are left as an exercise for the reader... ;-/
+
variable h_el
variable v_el
variable lt_el
@@ -14,6 +43,7 @@
\ ASCII frames (used when serial console is detected)
45 constant ascii_dash
+ 61 constant ascii_equal
124 constant ascii_pipe
43 constant ascii_plus
@@ -61,6 +91,8 @@
178 constant fill_bright
[then]
+only forth definitions also frame-drawing
+
: hline ( len x y -- ) \ Draw horizontal single line
at-xy \ move cursor
0 do
@@ -88,7 +120,11 @@
;
: f_double ( -- ) \ set frames to double
- boot_serial? if f_ascii exit then
+ boot_serial? if
+ f_ascii
+ ascii_equal h_el !
+ exit
+ then
dh_el h_el !
dv_el v_el !
dlt_el lt_el !
@@ -126,3 +162,5 @@
f_single
fill_none fill !
+
+only forth definitions
Modified: trunk/sys/boot/forth/loader.4th
===================================================================
--- trunk/sys/boot/forth/loader.4th 2018-06-01 23:58:49 UTC (rev 10200)
+++ trunk/sys/boot/forth/loader.4th 2018-06-02 00:00:58 UTC (rev 10201)
@@ -1,4 +1,5 @@
-\ Copyright (c) 1999 Daniel C. Sobral <dcs at freebsd.org>
+\ Copyright (c) 1999 Daniel C. Sobral <dcs at FreeBSD.org>
+\ Copyright (c) 2011-2015 Devin Teske <dteske at FreeBSD.org>
\ All rights reserved.
\
\ Redistribution and use in source and binary forms, with or without
@@ -23,8 +24,10 @@
\ SUCH DAMAGE.
\
\ $MidnightBSD$
-\ $FreeBSD: stable/9/sys/boot/forth/loader.4th 263705 2014-03-25 03:30:44Z dteske $
+\ $FreeBSD: stable/10/sys/boot/forth/loader.4th 299706 2016-05-14 00:44:23Z pfg $
+only forth definitions
+
s" arch-i386" environment? [if] [if]
s" loader_version" environment? [if]
11 < [if]
@@ -43,15 +46,16 @@
include /boot/support.4th
include /boot/color.4th
include /boot/delay.4th
+include /boot/check-password.4th
-only forth also support-functions also builtins definitions
+only forth definitions
: bootmsg ( -- )
- loader_color? if
- ." [37;44mBooting...[0m" cr
- else
- ." Booting..." cr
- then
+ loader_color? dup ( -- bool bool )
+ if 7 fg 4 bg then
+ ." Booting..."
+ if me then
+ cr
;
: try-menu-unset
@@ -78,6 +82,8 @@
then
;
+only forth also support-functions also builtins definitions
+
: boot
0= if ( interpreted ) get_arguments then
@@ -121,7 +127,7 @@
?dup 0= if 0 1 autoboot then
;
-also forth definitions also builtins
+also forth definitions previous
builtin: boot
builtin: boot-conf
@@ -128,12 +134,10 @@
only forth definitions also support-functions
-include /boot/check-password.4th
-
\ ***** start
\
\ Initializes support.4th global variables, sets loader_conf_files,
-\ processes conf files, and, if any one such file was succesfully
+\ processes conf files, and, if any one such file was successfully
\ read to the end, loads kernel and modules.
: start ( -- ) ( throws: abort & user-defined )
@@ -141,9 +145,10 @@
include_conf_files
include_nextboot_file
\ Will *NOT* try to load kernel and modules if no configuration file
- \ was succesfully loaded!
+ \ was successfully loaded!
any_conf_read? if
s" loader_delay" getenv -1 = if
+ load_xen_throw
load_kernel
load_modules
else
@@ -150,7 +155,7 @@
drop
." Loading Kernel and Modules (Ctrl-C to Abort)" cr
s" also support-functions" evaluate
- s" set delay_command='load_kernel load_modules'" evaluate
+ s" set delay_command='load_xen_throw load_kernel load_modules'" evaluate
s" set delay_showdots" evaluate
delay_execute
then
@@ -245,5 +250,4 @@
then
; immediate \ interpret immediately for access to `source' (aka tib)
-only forth also
-
+only forth definitions
More information about the Midnightbsd-cvs
mailing list