X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=first%2Fofboot;h=65dbc2d710b81cfbbf65a803532fdffef16ddac3;hp=fc6b08aac08b16fc43e7aa4083e19265936408a9;hb=0298b541149eca4c30749085694526a0040d0982;hpb=f4ebbd9f7ea23e3f0fcbe098754580c220894628 diff --git a/first/ofboot b/first/ofboot index fc6b08a..65dbc2d 100644 --- a/first/ofboot +++ b/first/ofboot @@ -5,7 +5,7 @@ ############################################################################### ## ## ofboot first stage autoconfiguring bootloader for yaboot and ybin -## Copyright (C) 2000, 2001 Ethan Benson +## Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson ## ## Forth code written by Chris Emerson ## @@ -110,7 +110,9 @@ while [ "$COUNT" -le "$OSNUM" ] ; do 2) [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file2: $5\n" [ "$COUNT" = "$OSNUM" ] && c="." - [ "$4" = "quit" ] && BOOT=quit || BOOT="load-base release-load-area \" ${4}${5}\" \$boot" + [ "$4" = "quit" ] && BOOT=quit + [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot" + [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot" BT2=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;" MENU2="\" $3 for $2${c-,}\"(0d 0a)\" .printf" GET2=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof" @@ -120,7 +122,9 @@ while [ "$COUNT" -le "$OSNUM" ] ; do 3) [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file3: $5\n" [ "$COUNT" = "$OSNUM" ] && c="." - [ "$4" = "quit" ] && BOOT=quit || BOOT="load-base release-load-area \" ${4}${5}\" \$boot" + [ "$4" = "quit" ] && BOOT=quit + [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot" + [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot" BT3=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;" MENU3="\" $3 for $2${c-,}\"(0d 0a)\" .printf" GET3=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof" @@ -130,7 +134,9 @@ while [ "$COUNT" -le "$OSNUM" ] ; do 4) [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file4: $5\n" [ "$COUNT" = "$OSNUM" ] && c="." - [ "$4" = "quit" ] && BOOT=quit || BOOT="load-base release-load-area \" ${4}${5}\" \$boot" + [ "$4" = "quit" ] && BOOT=quit + [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot" + [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot" BT4=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;" MENU4="\" $3 for $2${c-,}\"(0d 0a)\" .printf" GET4=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof" @@ -140,7 +146,9 @@ while [ "$COUNT" -le "$OSNUM" ] ; do 5) [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file5: $5\n" [ "$COUNT" = "$OSNUM" ] && c="." - [ "$4" = "quit" ] && BOOT=quit || BOOT="load-base release-load-area \" ${4}${5}\" \$boot" + [ "$4" = "quit" ] && BOOT=quit + [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot" + [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot" BT5=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;" MENU5="\" $3 for $2${c-,}\"(0d 0a)\" .printf" GET5=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof" @@ -150,7 +158,9 @@ while [ "$COUNT" -le "$OSNUM" ] ; do 6) [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file6: $5\n" [ "$COUNT" = "$OSNUM" ] && c="." - [ "$4" = "quit" ] && BOOT=quit || BOOT="load-base release-load-area \" ${4}${5}\" \$boot" + [ "$4" = "quit" ] && BOOT=quit + [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot" + [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot" BT6=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;" MENU6="\" $3 for $2${c-,}\"(0d 0a)\" .printf" GET6=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof" @@ -160,7 +170,9 @@ while [ "$COUNT" -le "$OSNUM" ] ; do 7) [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file7: $5\n" [ "$COUNT" = "$OSNUM" ] && c="." - [ "$4" = "quit" ] && BOOT=quit || BOOT="load-base release-load-area \" ${4}${5}\" \$boot" + [ "$4" = "quit" ] && BOOT=quit + [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot" + [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot" BT7=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;" MENU7="\" $3 for $2${c-,}\"(0d 0a)\" .printf" GET7=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof" @@ -170,7 +182,9 @@ while [ "$COUNT" -le "$OSNUM" ] ; do 8) [ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file8: $5\n" [ "$COUNT" = "$OSNUM" ] && c="." - [ "$4" = "quit" ] && BOOT=quit || BOOT="load-base release-load-area \" ${4}${5}\" \$boot" + [ "$4" = "quit" ] && BOOT=quit + [ "$1" = "ybsd" ] && BOOT="load-base release-load-area \" ${4}${5%/*} ${5##*/},/bsd\" \$boot" + [ "$1" != ybsd -a "$4" != quit ] && BOOT="load-base release-load-area \" ${4}${5}\" \$boot" BT8=": boot$1 \" Booting $2...\" .printf 100 ms $BOOT ;" MENU8="\" $3 for $2${c-,}\"(0d 0a)\" .printf" GET8=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof" @@ -298,7 +312,7 @@ TMPBOOT=`mktemp -q "$TMP/ofboot.XXXXXX"` $PRINTF \ " -MacRISC +MacRISC MacRISC3 MacRISC4 PowerPC GNU/Linux First Stage Bootstrap @@ -326,7 +340,7 @@ $BGCOLOR to background-color \" \"(0d 0a)\" .printf $MENUOPTS \" \"(0d 0a)\" .printf -\" Boot: \" .printf +\" Stage 1 Boot: \" .printf get-msecs d# $TIMEOUT 3E8 * + begin key? if