Deleted Added
full compact
loader.4th (222417) loader.4th (228985)
1\ Copyright (c) 1999 Daniel C. Sobral <dcs@freebsd.org>
2\ All rights reserved.
3\
4\ Redistribution and use in source and binary forms, with or without
5\ modification, are permitted provided that the following conditions
6\ are met:
7\ 1. Redistributions of source code must retain the above copyright
8\ notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23\ SUCH DAMAGE.
24\
1\ Copyright (c) 1999 Daniel C. Sobral <dcs@freebsd.org>
2\ All rights reserved.
3\
4\ Redistribution and use in source and binary forms, with or without
5\ modification, are permitted provided that the following conditions
6\ are met:
7\ 1. Redistributions of source code must retain the above copyright
8\ notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23\ SUCH DAMAGE.
24\
25\ $FreeBSD: head/sys/boot/forth/loader.4th 222417 2011-05-28 08:50:38Z julian $
25\ $FreeBSD: head/sys/boot/forth/loader.4th 228985 2011-12-30 06:24:59Z pluknet $
26
27s" arch-i386" environment? [if] [if]
28 s" loader_version" environment? [if]
29 11 < [if]
30 .( Loader version 1.1+ required) cr
31 abort
32 [then]
33 [else]
34 .( Could not get loader version!) cr
35 abort
36 [then]
37[then] [then]
38
39256 dictthreshold ! \ 256 cells minimum free space
402048 dictincrease ! \ 2048 additional cells each time
41
42include /boot/support.4th
43
26
27s" arch-i386" environment? [if] [if]
28 s" loader_version" environment? [if]
29 11 < [if]
30 .( Loader version 1.1+ required) cr
31 abort
32 [then]
33 [else]
34 .( Could not get loader version!) cr
35 abort
36 [then]
37[then] [then]
38
39256 dictthreshold ! \ 256 cells minimum free space
402048 dictincrease ! \ 2048 additional cells each time
41
42include /boot/support.4th
43
44\ ***** boot-conf
45\
46\ Prepares to boot as specified by loaded configuration files.
47
48only forth also support-functions also builtins definitions
49
44only forth also support-functions also builtins definitions
45
46: try-menu-unset
47 s" menu-unset"
48 ['] evaluate catch if
49 2drop
50 then
51;
52
50: boot
51 0= if ( interpreted ) get_arguments then
52
53 \ Unload only if a path was passed
54 dup if
55 >r over r> swap
56 c@ [char] - <> if
57 0 1 unload drop
58 else
59 s" kernelname" getenv? if ( a kernel has been loaded )
53: boot
54 0= if ( interpreted ) get_arguments then
55
56 \ Unload only if a path was passed
57 dup if
58 >r over r> swap
59 c@ [char] - <> if
60 0 1 unload drop
61 else
62 s" kernelname" getenv? if ( a kernel has been loaded )
63 try-menu-unset
60 1 boot exit
61 then
62 load_kernel_and_modules
63 ?dup if exit then
64 1 boot exit
65 then
66 load_kernel_and_modules
67 ?dup if exit then
68 try-menu-unset
64 0 1 boot exit
65 then
66 else
67 s" kernelname" getenv? if ( a kernel has been loaded )
69 0 1 boot exit
70 then
71 else
72 s" kernelname" getenv? if ( a kernel has been loaded )
73 try-menu-unset
68 1 boot exit
69 then
70 load_kernel_and_modules
71 ?dup if exit then
74 1 boot exit
75 then
76 load_kernel_and_modules
77 ?dup if exit then
78 try-menu-unset
72 0 1 boot exit
73 then
74 load_kernel_and_modules
75 ?dup 0= if 0 1 boot then
76;
77
79 0 1 boot exit
80 then
81 load_kernel_and_modules
82 ?dup 0= if 0 1 boot then
83;
84
85\ ***** boot-conf
86\
87\ Prepares to boot as specified by loaded configuration files.
88
78: boot-conf
79 0= if ( interpreted ) get_arguments then
80 0 1 unload drop
81 load_kernel_and_modules
82 ?dup 0= if 0 1 autoboot then
83;
84
85also forth definitions also builtins

--- 107 unchanged lines hidden ---
89: boot-conf
90 0= if ( interpreted ) get_arguments then
91 0 1 unload drop
92 load_kernel_and_modules
93 ?dup 0= if 0 1 autoboot then
94;
95
96also forth definitions also builtins

--- 107 unchanged lines hidden ---