equal
deleted
inserted
replaced
18 \ |
18 \ |
19 \ CDDL HEADER END |
19 \ CDDL HEADER END |
20 \ |
20 \ |
21 \ |
21 \ |
22 \ ident "%Z%%M% %I% %E% SMI" |
22 \ ident "%Z%%M% %I% %E% SMI" |
23 \ Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
23 \ Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
24 \ Use is subject to license terms. |
24 \ Use is subject to license terms. |
25 \ |
25 \ |
26 |
26 |
27 id: %Z%%M% %I% %E% SMI |
27 id: %Z%%M% %I% %E% SMI |
28 purpose: boot block for OBP systems |
28 purpose: boot block for OBP systems |
118 ; |
118 ; |
119 |
119 |
120 : mount-root ( -- ) |
120 : mount-root ( -- ) |
121 boot-dev$ fs-pkg$ $open-package to fs-ih |
121 boot-dev$ fs-pkg$ $open-package to fs-ih |
122 fs-ih 0= if |
122 fs-ih 0= if |
123 ." Can't mount root" abort |
123 " Can't mount root" die |
124 then |
124 then |
125 ; |
125 ; |
126 |
126 |
127 \ |
127 \ |
128 \ cheap entertainment for those watching |
128 \ cheap entertainment for those watching |
362 then ( file$ fd ) |
362 then ( file$ fd ) |
363 -rot 2drop ( fd ) |
363 -rot 2drop ( fd ) |
364 ; |
364 ; |
365 |
365 |
366 |
366 |
|
367 false value lflag? |
|
368 |
367 \ ZFS support |
369 \ ZFS support |
368 \ -Z fsname opens specified filesystem in disk pool |
370 \ -Z fsname opens specified filesystem in disk pool |
369 |
371 |
370 false value zflag? |
372 false value zflag? |
371 /buf-len buffer: fs-name |
373 /buf-len buffer: fs-name |
381 ; |
383 ; |
382 |
384 |
383 [else] |
385 [else] |
384 |
386 |
385 : open-zfs-fs ( fs$ -- ) |
387 : open-zfs-fs ( fs$ -- ) |
386 ." -Z not supported on non-zfs root" abort |
388 \ ignore on -L |
|
389 lflag? invert if |
|
390 " -Z not supported on non-zfs root" die |
|
391 then |
387 ; |
392 ; |
388 |
393 |
389 [then] |
394 [then] |
390 |
395 |
391 |
396 |
469 else drop then ( arg$ ) |
474 else drop then ( arg$ ) |
470 endof |
475 endof |
471 ascii H of |
476 ascii H of |
472 true to halt? |
477 true to halt? |
473 endof |
478 endof |
|
479 ascii L of |
|
480 " /" fs-name swap move |
|
481 true to zflag? |
|
482 " bootlst" boot-file swap move |
|
483 true to fflag? |
|
484 true to lflag? |
|
485 endof |
474 ascii Z of |
486 ascii Z of |
475 skip-blanks next-str ( arg$ fs-name$ ) |
487 skip-blanks next-str ( arg$ fs-name$ ) |
476 ?dup if |
488 ?dup if |
477 fs-name swap move ( arg$ ) |
489 fs-name swap move ( arg$ ) |
478 true to zflag? |
490 true to zflag? |
594 |
606 |
595 : load-file ( -- virt ) |
607 : load-file ( -- virt ) |
596 get-arch |
608 get-arch |
597 get-targ open-path ( fd ) |
609 get-targ open-path ( fd ) |
598 loader-base over get-file if ( fd alloc-sz virt size ) |
610 loader-base over get-file if ( fd alloc-sz virt size ) |
599 ." Boot load failed" abort |
611 " Boot load failed" die |
600 then |
612 then |
601 to file-sz ( fd alloc-sz virt ) |
613 to file-sz ( fd alloc-sz virt ) |
602 swap to rd-alloc-sz ( fd virt ) |
614 swap to rd-alloc-sz ( fd virt ) |
603 swap fs-close ( virt ) |
615 swap fs-close ( virt ) |
604 ; |
616 ; |