|
|
1.1 root 1: :noname
2: ." Type 'help' for detailed information" cr
3: \ ." boot secondary slave cdrom: " cr
4: \ ." 0 > boot hd:2,\boot\vmlinuz root=/dev/hda2" cr
5: ; DIAG-initializer
6:
7: " /" find-device
8:
9: new-device
10: " memory" device-name
11: \ 12230 encode-int " reg" property
12: external
13: : open true ;
14: : close ;
15: \ claim ( phys size align -- base )
16: \ release ( phys size -- )
17: finish-device
18:
19: new-device
20: " cpus" device-name
21: 1 " #address-cells" int-property
22: 0 " #size-cells" int-property
23:
24: external
25: : open true ;
26: : close ;
27: : decode-unit parse-hex ;
28:
29: finish-device
30:
31: : make-openable ( path )
32: find-dev if
33: begin ?dup while
34: \ install trivial open and close methods
35: dup active-package! is-open
36: parent
37: repeat
38: then
39: ;
40:
41: : preopen ( chosen-str node-path )
42: 2dup make-openable
43:
44: " /chosen" find-device
45: open-dev ?dup if
46: encode-int 2swap property
47: else
48: 2drop
49: then
50: device-end
51: ;
52:
53: :noname
54: set-defaults
55: ; SYSTEM-initializer
56:
57: \ preopen device nodes (and store the ihandles under /chosen)
58: :noname
59: " memory" " /memory" preopen
60: " mmu" " /cpus/@0" preopen
61: " stdout" " /builtin/console" preopen
62: " stdin" " /builtin/console" preopen
63:
64: ; SYSTEM-initializer
65:
66: \ use the tty interface if available
67: :noname
68: " /builtin/console" find-dev if drop
69: " /builtin/console" " input-device" $setenv
70: " /builtin/console" " output-device" $setenv
71: then
72: ; SYSTEM-initializer
73:
74: :noname
75: " keyboard" input
76: ; CONSOLE-IN-initializer
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.