From ad8f878934b10bf3baba4eb82073244932c2c4a2 Mon Sep 17 00:00:00 2001 From: Ethan Benson Date: Mon, 4 Jul 2005 03:34:00 +0000 Subject: [PATCH] Merge Dustin's RAID patch * ybin/ybin: Allow for multiple bootstrap partitions. Patch by Dustin Kirkland. May not fully work on PMAC hardware. git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-81 --- 0arch-timestamps0 | 100 +++++++++++++++++++++++----------------------- ChangeLog | 14 +++++++ ybin/ybin | 40 ++++++++++++++++++- 3 files changed, 103 insertions(+), 51 deletions(-) diff --git a/0arch-timestamps0 b/0arch-timestamps0 index 3cb519f..e9277c8 100644 --- a/0arch-timestamps0 +++ b/0arch-timestamps0 @@ -1,7 +1,7 @@ -./0arch-timestamps0 1116476796 1116558595 +./0arch-timestamps0 1116558602 1120448033 ./BUGS 1109049412 1000991730 ./COPYING 1109049412 1000991730 -./ChangeLog 1116558534 1116558571 +./ChangeLog 1120447960 1120448030 ./Config 1109049412 1002101497 ./INSTALL 1109049412 1000991730 ./Makefile 1109049412 1089576723 @@ -22,18 +22,18 @@ ./doc/examples/simpleboot.chrp 1109049412 1068017750 ./doc/examples/yaboot.conf.multi-boot 1109049412 1006348765 ./doc/examples/yaboot.conf.rs6000 1109049412 1006348765 -./doc/examples 1116558575 1068017750 +./doc/examples 1120447952 1068017750 ./doc/yaboot-howto.de.sgml 1109049413 1096186109 ./doc/yaboot-howto.sgml 1109049413 1096186082 -./doc 1116558575 1096186109 +./doc 1120447952 1096186109 ./etc/yaboot.conf 1109049413 1006348765 -./etc 1116558575 1007269243 -./first/ofboot 1109049413 1065311880 -./first 1116558575 1071492158 +./etc 1120447952 1007269243 +./first/ofboot 1118285749 1065311880 +./first 1120447952 1071492158 ./include/asm/elf.h 1109049413 1000991730 ./include/asm/ppc_asm.tmpl 1109049413 1000991730 ./include/asm/processor.h 1109049413 1000991730 -./include/asm 1116558575 1007269243 +./include/asm 1120447952 1007269243 ./include/bootinfo.h 1109049413 1007200690 ./include/byteorder.h 1109049413 1000991730 ./include/cfg.h 1109049413 1007200690 @@ -42,12 +42,12 @@ ./include/debug.h 1109049413 1007200690 ./include/errors.h 1109049413 1007200690 ./include/et/com_err.h 1109049413 1000991731 -./include/et 1116558575 1007269243 +./include/et 1120447952 1007269243 ./include/ext2fs/bitops.h 1109049413 1003927524 ./include/ext2fs/ext2_err.h 1109049413 1003927524 ./include/ext2fs/ext2_io.h 1109049413 1003927524 ./include/ext2fs/ext2fs.h 1109049413 1003927524 -./include/ext2fs 1116558575 1007269243 +./include/ext2fs 1120447952 1007269243 ./include/fdisk-part.h 1109049413 1007200690 ./include/file.h 1109049413 1007200690 ./include/fs.h 1109049413 1007200690 @@ -56,13 +56,13 @@ ./include/linux/iso_fs.h 1109049413 1000991731 ./include/linux/stat.h 1109049413 1000991731 ./include/linux/types.h 1109049413 1000991731 -./include/linux 1116558575 1007269243 +./include/linux 1120447952 1007269243 ./include/mac-part.h 1109049413 1007200690 ./include/md5.h 1109049413 1000991730 ./include/partition.h 1109049413 1007200690 ./include/prom.h 1109049413 1007200690 ./include/reiserfs/reiserfs.h 1109049413 1025684115 -./include/reiserfs 1116558575 1025684115 +./include/reiserfs 1120447952 1025684115 ./include/setjm2.h 1109049413 1000991730 ./include/setjmp.h 1109049413 1000991730 ./include/stdlib.h 1109049413 1000991730 @@ -70,10 +70,10 @@ ./include/swab.h 1109049413 1000991730 ./include/types.h 1109049413 1000991730 ./include/xfs/xfs.h 1109049413 1002101334 -./include/xfs 1116558575 1007269244 +./include/xfs 1120447952 1007269244 ./include/yaboot.h 1109049413 1007200690 ./include/amiga-part.h 1116558586 1116558522 -./include 1116558575 1116558522 +./include 1120447952 1116558522 ./lib/ctype.c 1109049413 1000991731 ./lib/libext2fs.a 1109049413 1003927524 ./lib/malloc.c 1109049413 1007200690 @@ -81,41 +81,41 @@ ./lib/string.S 1109049413 1007200690 ./lib/strtol.c 1109049413 1000991731 ./lib/vsprintf.c 1109049413 1000991731 -./lib/strstr.c 1116476796 1116476589 -./lib 1116558575 1116476589 -./man/bootstrap.8 1109049413 1000991731 -./man/mkofboot.8 1109049413 1006348765 -./man/ofpath.8 1109049413 1000991731 -./man/yaboot.conf.5 1109049413 1004256691 -./man/yabootconfig.8 1109049413 1027929577 -./man/ybin.8 1109049413 1006348765 -./man/yaboot.8 1116476644 1090699543 -./man 1116558575 1116476667 -./man.patch 1109049413 1006348761 -./second/cache.S 1109049413 1007200690 -./second/cfg.c 1109049413 1007200690 -./second/cmdline.c 1109049413 1032059589 -./second/crt0.S 1109049413 1000991731 -./second/file.c 1109049413 1044868693 -./second/fs.c 1109049413 1032059574 -./second/fs_ext2.c 1109049413 1032059564 -./second/fs_iso.c 1109049413 1007200690 -./second/fs_of.c 1109049413 1089575693 -./second/fs_reiserfs.c 1109049413 1007200690 -./second/fs_xfs.c 1109049413 1032059541 -./second/iso_util.c 1109049413 1003656415 -./second/md5.c 1109049413 1032059532 -./second/prom.c 1109049413 1067937197 -./second/setjmp.S 1109049413 1000991732 -./second/yaboot.c 1113696387 1032059504 -./second/partition.c 1116558522 1116558522 -./second 1116558575 1116558522 +./lib/strstr.c 1119929028 1116476589 +./lib 1120447952 1116476589 +./man/bootstrap.8 1116558691 1000991731 +./man/mkofboot.8 1116558691 1006348765 +./man/ofpath.8 1116558691 1000991731 +./man/yaboot.conf.5 1116558691 1004256691 +./man/yabootconfig.8 1116558691 1027929577 +./man/ybin.8 1116558691 1006348765 +./man/yaboot.8 1116558691 1090699543 +./man 1120447953 1116476667 +./man.patch 1116558699 1006348761 +./second/cache.S 1120447850 1007200690 +./second/cfg.c 1120447850 1007200690 +./second/cmdline.c 1120447850 1032059589 +./second/crt0.S 1120447850 1000991731 +./second/file.c 1120447850 1044868693 +./second/fs.c 1120447850 1032059574 +./second/fs_ext2.c 1120447850 1032059564 +./second/fs_iso.c 1120447850 1007200690 +./second/fs_of.c 1120447850 1089575693 +./second/fs_reiserfs.c 1120447850 1007200690 +./second/fs_xfs.c 1120447850 1032059541 +./second/iso_util.c 1120447850 1003656415 +./second/md5.c 1120447850 1032059532 +./second/prom.c 1120447850 1067937197 +./second/setjmp.S 1120447850 1000991732 +./second/partition.c 1120447850 1116558522 +./second/yaboot.c 1120447850 1032059504 +./second 1120447850 1119139565 ./util/elfextract.c 1109049413 1007303237 ./util/addnote.c 1109049413 1107321884 -./util 1116558575 1107321884 -./ybin/mkofboot 1116558575 1073219938 -./ybin/ofpath 1109049414 1089576762 -./ybin/ybin 1109049414 1089576732 -./ybin/yabootconfig 1109049414 1089576743 -./ybin 1116558575 1089576762 -. 1116558575 1116558571 +./util 1120447953 1107321884 +./ybin/mkofboot 1120447944 1073219938 +./ybin/ofpath 1117166139 1089576762 +./ybin/yabootconfig 1117166139 1089576743 +./ybin/ybin 1120447928 1120447943 +./ybin 1120447944 1120447943 +. 1120448032 1120448030 diff --git a/ChangeLog b/ChangeLog index aab1955..40cfc3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,20 @@ # arch-tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3 # +2005-07-04 03:34:00 GMT Ethan Benson patch-81 + + Summary: + Merge Dustin's RAID patch + Revision: + yaboot--devel--1.3--patch-81 + + * ybin/ybin: Allow for multiple bootstrap partitions. Patch by Dustin + Kirkland. May not fully work on PMAC hardware. + + modified files: + 0arch-timestamps0 ChangeLog ybin/ybin + + 2005-05-20 03:10:03 GMT Ethan Benson patch-80 Summary: diff --git a/ybin/ybin b/ybin/ybin index fbd8be8..a3d94d1 100755 --- a/ybin/ybin +++ b/ybin/ybin @@ -27,6 +27,7 @@ if [ -n "$PATH_PREFIX" ] ; then PATH="${PATH}:${PATH_PREFIX}/sbin:${PATH_PREFIX}/bin:${PATH_PREFIX}/usr/sbin:${PATH_PREFIX}/usr/bin:${PATH_PREFIX}/usr/local/sbin:${PATH_PREFIX}/usr/local/bin" fi PRG="${0##*/}" +ABSPRG="$0" SIGINT="$PRG: Interrupt caught ... exiting" VERSION=1.3.13 DEBUG=0 @@ -1336,19 +1337,26 @@ if [ $# != 0 ] ; then ;; --debug) DEBUG=1 + ARGS="$ARGS $1" shift ;; -v|--verbose) VERBOSE=1 + ARGS="$ARGS $1" shift ;; -f|--force) FORCE=yes + ARGS="$ARGS $1" shift ;; -b|--boot) if [ -n "$2" ] ; then - boot="$2" + if [ "$boot" = "unconfigured" ]; then + boot="$2" + else + boot="$boot $2" + fi ARGBT=1 shift 2 else @@ -1361,6 +1369,7 @@ if [ $# != 0 ] ; then if [ -n "$2" ] ; then ofboot="$2" ARGOB=1 + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1372,6 +1381,7 @@ if [ $# != 0 ] ; then if [ -n "$2" ] ; then install="$2" ARGBF=1 + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1384,6 +1394,7 @@ if [ $# != 0 ] ; then CONF="$2" bootconf="$2" ERR=" Error in $CONF:" + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1395,6 +1406,7 @@ if [ $# != 0 ] ; then if [ -n "$2" ] ; then magicboot="$2" ARGWP=1 + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1406,6 +1418,7 @@ if [ $# != 0 ] ; then if [ -n "$2" ] ; then fstype="$2" ARGFS=1 + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1416,26 +1429,31 @@ if [ $# != 0 ] ; then --nobless) bless=no ARGBS=1 + ARGS="$ARGS $1" shift ;; -M|--mount) usemount=yes ARGMT=1 + ARGS="$ARGS $1" shift ;; --protect) protect=yes ARGPT=1 + ARGS="$ARGS $1" shift ;; --hide) hide=yes ARGHD=1 + ARGS="$ARGS $1" shift ;; --nonvram) nonvram=1 ARGNV=1 + ARGS="$ARGS $1" shift ;; --device) @@ -1443,6 +1461,7 @@ if [ $# != 0 ] ; then device="$2" bootconf=auto echo 1>&2 "$PRG: WARNING: Deprecated option --device" + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1455,6 +1474,7 @@ if [ $# != 0 ] ; then timeout="$2" bootconf=auto echo 1>&2 "$PRG: WARNING: Deprecated option --device" + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1467,6 +1487,7 @@ if [ $# != 0 ] ; then image="$2" bootconf=auto echo 1>&2 "$PRG: WARNING: Deprecated option --device" + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1479,6 +1500,7 @@ if [ $# != 0 ] ; then label="$2" bootconf=auto echo 1>&2 "$PRG: WARNING: Deprecated option --device" + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1491,6 +1513,7 @@ if [ $# != 0 ] ; then partition="$2" bootconf=auto echo 1>&2 "$PRG: WARNING: Deprecated option --device" + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1503,6 +1526,7 @@ if [ $# != 0 ] ; then root="$2" bootconf=auto echo 1>&2 "$PRG: WARNING: Deprecated option --device" + ARGS="$ARGS $1 $2" shift 2 else echo 1>&2 "$PRG: option requires an argument $1" @@ -1582,6 +1606,20 @@ fi [ $(parseconf flag enableofboot) = 0 ] && of=yes [ $(parseconf flag brokenosx) = 0 ] && brokenosx=yes +bootparts=0 +for i in $boot; do + bootparts=$(($bootparts + 1)) +done +if [ "$bootparts" -gt 1 ]; then + [ "$VERBOSE" = 1 ] && echo "$PRG: Iterating through list of boot partitions..." + rc=0 + for i in $boot; do + [ "$VERBOSE" = 1 ] && echo "$ABSPRG $ARGS -b $i" + $ABSPRG $ARGS -b $i || rc=$? + done + exit $rc +fi + ## ffs!! rtfm! foad! if [ "$boot" = unconfigured ] ; then echo 1>&2 "$PRG: You must specify the device for the bootstrap partition. (ie: boot=/dev/hdaX)" -- 2.39.2