Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/stand/bootblk Added two new options to the ...
details: https://anonhg.NetBSD.org/src/rev/3affcdb08493
branches: trunk
changeset: 494458:3affcdb08493
user: eeh <eeh%NetBSD.org@localhost>
date: Thu Jul 06 17:15:07 2000 +0000
description:
Added two new options to the bootblock: -V turns on verbose mode and -D
makes it load but not execute. If fcode-debug? is enabled in the firmware
an arbitrary file can then be loaded with:
ok " <path>" do-boot
diffstat:
sys/arch/sparc64/stand/bootblk/bootblk.fth | 32 +++++++++++++++++++++++++++--
1 files changed, 29 insertions(+), 3 deletions(-)
diffs (60 lines):
diff -r 63abacf05081 -r 3affcdb08493 sys/arch/sparc64/stand/bootblk/bootblk.fth
--- a/sys/arch/sparc64/stand/bootblk/bootblk.fth Thu Jul 06 17:00:04 2000 +0000
+++ b/sys/arch/sparc64/stand/bootblk/bootblk.fth Thu Jul 06 17:15:07 2000 +0000
@@ -1,4 +1,4 @@
-\ $NetBSD: bootblk.fth,v 1.4 1999/02/15 04:54:35 hubertf Exp $
+\ $NetBSD: bootblk.fth,v 1.5 2000/07/06 17:15:07 eeh Exp $
\
\ IEEE 1275 Open Firmware Boot Block
\
@@ -98,6 +98,18 @@
rot drop ( s2 len )
;
+: strchr ( s1 l1 c -- s2 l2 )
+ begin
+ dup 2over 0= if ( s1 l1 c c s1 )
+ 2drop drop exit then
+ c@ = if ( s1 l1 c )
+ drop exit then
+ -rot /c - swap ca1+ ( c l2 s2 )
+ swap rot
+ again
+;
+
+
: cstr ( ptr -- str len )
dup
begin dup c@ 0<> while + repeat
@@ -452,6 +464,15 @@
then
;
+: boot-args ( -- boot-args )
+ " bootargs" chosen-phandle get-package-property if
+ ." Could not find bootargs in /chosen" cr
+ abort
+ else
+ decode-string 2swap 2drop
+ then
+;
+
2000 buffer: boot-path-str
2000 buffer: boot-path-tmp
@@ -570,8 +591,13 @@
dup 0<> if " to load-base init-program" evaluate then
;
-\ true to boot-debug?
-" /ofwboot" do-boot
+boot-args ascii V strchr 0<> swap drop if
+ true to boot-debug?
+then
+
+boot-args ascii D strchr 0= swap drop if
+ " /ofwboot" do-boot
+then exit
Home |
Main Index |
Thread Index |
Old Index