Move the pause to before the kernel is loaded, and allow the user to press
a key to provide extra options or to load a different kernel (much like biosboot on i386). This saves having to edit the fastboot file just to boot single-user.
This commit is contained in:
parent
44b7622806
commit
8f720e45aa
@ -1,5 +1,5 @@
|
||||
REM > BtNetBSD
|
||||
REM $NetBSD: BtNetBSD,v 1.2 2002/09/03 22:02:02 chris Exp $
|
||||
REM $NetBSD: BtNetBSD,v 1.3 2002/11/03 12:45:29 bjh21 Exp $
|
||||
REM
|
||||
REM Copyright (c) 2000, 2001, 2002 Reinoud Zandijk
|
||||
REM Copyright (c) 1998, 1999, 2000 Ben Harris
|
||||
@ -60,7 +60,7 @@ VDU 4, 28, (scwidth%-width%)/2, (scheigth%+heigth%)/2, (scwidth%+width%)/2, (sch
|
||||
COLOUR 128:CLS
|
||||
|
||||
PRINT''
|
||||
PROCcenter("BtNetBSD 0.99a")
|
||||
PROCcenter("BtNetBSD 0.99b")
|
||||
PROCcenter("booting NetBSD/acorn32 on a RiscPC/A7000/NC")
|
||||
PRINT''
|
||||
|
||||
@ -77,7 +77,23 @@ WHILE LEFT$(args$, 1)=" ": args$=MID$(args$,2):ENDWHILE
|
||||
|
||||
REM get kernel name
|
||||
file$ = LEFT$(args$, INSTR(args$, " ")-1)
|
||||
PRINT"Booting ";file$;" ";args$''
|
||||
|
||||
PRINT "Press return to boot now, any other key for boot prompt"
|
||||
PRINT "Booting ";file$;" ";args$
|
||||
PRINT "Starting in ";
|
||||
c% = FNawaitkey(5)
|
||||
IF c% <> 13 AND c% <> 0 THEN
|
||||
INPUT "Boot: " cmd$
|
||||
IF LEFT$(cmd$, 1) = "-" THEN
|
||||
REM just add an option
|
||||
args$ += " " + cmd$
|
||||
ELSE
|
||||
args$ = cmd$
|
||||
file$ = LEFT$(args$, INSTR(args$, " ") - 1)
|
||||
ENDIF
|
||||
PRINT "Booting ";file$;" ";args$
|
||||
ENDIF
|
||||
PRINT''
|
||||
|
||||
|
||||
IF FNtolower(LEFT$(file$,9))="unixfs:$." THEN
|
||||
@ -147,13 +163,6 @@ IF debug% THEN
|
||||
REM OSCLI("Memoryi "+STR$~(FNblock_vaddr(start_kernelpage%)+(entry% MOD nbpp%)))
|
||||
REM PRINT"Go for it (key)":qq=GET
|
||||
ENDIF
|
||||
PRINT ''"Press ESC to abort loader"
|
||||
PRINT "Kernel will be started in ";
|
||||
FOR secs%=startdelay% TO 1 STEP -1
|
||||
PRINT ;secs%;"...";
|
||||
tt=TIME: WHILE TIME-tt<=100: ENDWHILE : REM wait one second
|
||||
NEXT
|
||||
PRINT "start!"
|
||||
|
||||
REM get ECID for each podule
|
||||
FOR pod% =-1 TO 8
|
||||
@ -1279,3 +1288,19 @@ DEF FNtolower(name$)
|
||||
name$ = MID$(name$, 2)
|
||||
NEXT
|
||||
= A$
|
||||
|
||||
DEF FNawaitkey(timeout%)
|
||||
LOCAL i%, i$, c%
|
||||
REM Flush keyboard buffer first
|
||||
REPEAT UNTIL INKEY(0) = -1
|
||||
FOR i% = timeout% TO 1 STEP -1
|
||||
i$ = STR$(i%)
|
||||
PRINT ; i% STRING$(LEN(i$), CHR$(8));
|
||||
c% = INKEY(100)
|
||||
IF c% <> -1 THEN
|
||||
PRINT
|
||||
= c%
|
||||
ENDIF
|
||||
NEXT
|
||||
PRINT "0"
|
||||
= 0
|
||||
|
Loading…
Reference in New Issue
Block a user