Lines Matching +full:u +full:- +full:boot
2 \ Copyright (c) 2011-2015 Devin Teske <dteske@FreeBSD.org>
29 \ provide u> if needed
30 s" u>" sfind [if] drop [else]
32 : u>
33 2dup u< if 2drop 0 exit then
34 swap u< if -1 exit then
43 dup 0x80 u< if emit exit then
45 begin 2dup u> while
48 begin dup 0x80 u< 0= while emit repeat drop
52 s" arch-i386" environment? [if] [if]
67 include /boot/support.4th
68 include /boot/color.4th
69 include /boot/delay.4th
70 include /boot/check-password.4th
74 : maybe-resetcons ( -- )
80 : bootmsg ( -- )
81 loader_color? dup ( -- bool bool )
88 : try-menu-unset
89 \ menu-unset may not be present
91 dup -1 <> if
92 s" YES" compare-insensitive 0= if
98 s" menu-unset"
104 s" menusets-unset"
112 only forth also support-functions also builtins definitions
114 : boot
120 c@ [char] - <> if
124 try-menu-unset
125 bootmsg 1 boot exit
129 try-menu-unset
130 bootmsg 0 1 boot exit
134 try-menu-unset
135 bootmsg 1 boot exit
139 try-menu-unset
140 bootmsg 0 1 boot exit
143 ?dup 0= if bootmsg 0 1 boot then
146 \ ***** boot-conf
148 \ Prepares to boot as specified by loaded configuration files.
150 : boot-conf
159 builtin: boot
160 builtin: boot-conf
162 only forth definitions also support-functions
170 : start ( -- ) ( throws: abort & user-defined )
171 s" /boot/defaults/loader.conf" initialize
174 \ If the user defined a post-initialize hook, call it now
175 s" post-initialize" sfind if execute else drop then
179 s" loader_delay" getenv -1 = if
185 ." Loading Kernel and Modules (Ctrl-C to Abort)" cr
186 s" also support-functions" evaluate
200 : initialize ( -- flag )
201 s" /boot/defaults/loader.conf" initialize
204 \ If the user defined a post-initialize hook, call it now
205 s" post-initialize" sfind if execute else drop then
209 \ ***** read-conf
214 : (read-conf) ( addr len -- )
219 : read-conf ( <filename> | addr len -- ) ( throws: abort & user-defined )
222 postpone (read-conf)
225 bl parse (read-conf)
232 : set-module-flag ( module_addr val -- ) \ set and print flag
238 : enable-module find-module ?dup if true set-module-flag then ;
240 : disable-module find-module ?dup if false set-module-flag then ;
242 : toggle-module find-module ?dup if dup module.flag @ 0= set-module-flag then ;
244 \ ***** show-module
248 : show-module ( <module> -- ) find-module ?dup if show-one-module then ;
258 over - >r
274 s" boot-conf" s" load kernel and modules, then autoboot" .?
275 s" read-conf" s" read a configuration file" .?
276 s" enable-module" s" enable loading of a module" .?
277 s" disable-module" s" disable loading of a module" .?
278 s" toggle-module" s" toggle loading of a module" .?
279 s" show-module" s" show module load data" .?
280 s" try-include" s" try to load/interpret files" .?
283 : try-include ( -- ) \ see loader.4th(8)
284 ['] include ( -- xt ) \ get the execution token of `include'
285 catch ( xt -- exception# | 0 ) if \ failed
286 LF parse ( c -- s-addr/u ) 2drop \ advance >in to EOL (drop data)