From: Ethan Benson Date: Sun, 28 Mar 2004 05:02:03 +0000 (+0000) Subject: Fix ofpath SATA support and sysfs detection X-Git-Tag: yaboot-1.3.13~8 X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=commitdiff_plain;h=eb8b0d5d9f4823a7033ef2baa1cababd4b5574e1 Fix ofpath SATA support and sysfs detection * ybin/ofpath: Support newwer kernels which call the driver sata_svw, instead of ata-k2. * ybin/ofpath: Detect sysfs mount correctly. git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-67 --- diff --git a/0arch-timestamps0 b/0arch-timestamps0 index 3eb5a0e..291281c 100644 --- a/0arch-timestamps0 +++ b/0arch-timestamps0 @@ -1,15 +1,15 @@ -./0arch-timestamps0 1079920783 1079921100 +./0arch-timestamps0 1079921107 1080450116 ./BUGS 1077455728 1000991730 ./COPYING 1077455728 1000991730 -./ChangeLog 1079920723 1079920773 +./ChangeLog 1080449960 1080450111 ./Config 1077455728 1002101497 ./INSTALL 1077455728 1000991730 -./Makefile 1079920783 1079920671 +./Makefile 1079921107 1079920671 ./README 1077455728 1044766458 ./README.man.patch 1077455728 1000991730 ./THANKS 1079879289 1006350263 ./TODO 1077455728 1044766566 -./changelog 1077455728 1069321587 +./changelog 1079921702 1069321587 ./doc/Makefile 1077455730 1019310768 ./doc/README.ofboot 1077455728 1000991730 ./doc/README.ofpath 1077455728 1000991730 @@ -22,18 +22,18 @@ ./doc/examples/simpleboot.chrp 1077455728 1068017750 ./doc/examples/yaboot.conf.multi-boot 1077455728 1006348765 ./doc/examples/yaboot.conf.rs6000 1077455728 1006348765 -./doc/examples 1079921100 1068017750 +./doc/examples 1080450116 1068017750 ./doc/yaboot-howto.de.sgml 1077455730 1077455488 ./doc/yaboot-howto.sgml 1078398547 1077455511 -./doc 1079921100 1077455511 +./doc 1080450116 1077455511 ./etc/yaboot.conf 1077455728 1006348765 -./etc 1079921100 1007269243 +./etc 1080450116 1007269243 ./first/ofboot 1078705056 1065311880 -./first 1079921100 1071492158 +./first 1080450116 1071492158 ./include/asm/elf.h 1077455728 1000991730 ./include/asm/ppc_asm.tmpl 1077455728 1000991730 ./include/asm/processor.h 1077455728 1000991730 -./include/asm 1079921100 1007269243 +./include/asm 1080450116 1007269243 ./include/bootinfo.h 1077455728 1007200690 ./include/byteorder.h 1077455728 1000991730 ./include/cfg.h 1077455728 1007200690 @@ -42,12 +42,12 @@ ./include/debug.h 1077455730 1007200690 ./include/errors.h 1077455728 1007200690 ./include/et/com_err.h 1077455729 1000991731 -./include/et 1079921100 1007269243 +./include/et 1080450116 1007269243 ./include/ext2fs/bitops.h 1077455729 1003927524 ./include/ext2fs/ext2_err.h 1077455729 1003927524 ./include/ext2fs/ext2_io.h 1077455729 1003927524 ./include/ext2fs/ext2fs.h 1077455729 1003927524 -./include/ext2fs 1079921100 1007269243 +./include/ext2fs 1080450116 1007269243 ./include/fdisk-part.h 1077455729 1007200690 ./include/file.h 1077455729 1007200690 ./include/fs.h 1077455729 1007200690 @@ -56,13 +56,13 @@ ./include/linux/iso_fs.h 1077455729 1000991731 ./include/linux/stat.h 1077455729 1000991731 ./include/linux/types.h 1077455729 1000991731 -./include/linux 1079921100 1007269243 +./include/linux 1080450116 1007269243 ./include/mac-part.h 1077455729 1007200690 ./include/md5.h 1077455729 1000991730 ./include/partition.h 1077455729 1007200690 ./include/prom.h 1077455729 1007200690 ./include/reiserfs/reiserfs.h 1077455729 1025684115 -./include/reiserfs 1079921100 1025684115 +./include/reiserfs 1080450116 1025684115 ./include/setjm2.h 1077455729 1000991730 ./include/setjmp.h 1077455729 1000991730 ./include/stdlib.h 1077455729 1000991730 @@ -70,9 +70,9 @@ ./include/swab.h 1077455729 1000991730 ./include/types.h 1077455729 1000991730 ./include/xfs/xfs.h 1077455728 1002101334 -./include/xfs 1079921100 1007269244 +./include/xfs 1080450116 1007269244 ./include/yaboot.h 1077455729 1007200690 -./include 1079921100 1007269244 +./include 1080450116 1007269244 ./lib/ctype.c 1077455729 1000991731 ./lib/libext2fs.a 1077455729 1003927524 ./lib/malloc.c 1077455729 1007200690 @@ -81,7 +81,7 @@ ./lib/strstr.c 1077455729 1000991731 ./lib/strtol.c 1077455729 1000991731 ./lib/vsprintf.c 1077455729 1000991731 -./lib 1079921100 1069320301 +./lib 1080450116 1069320301 ./man/bootstrap.8 1077455729 1000991731 ./man/mkofboot.8 1077455729 1006348765 ./man/ofpath.8 1077455729 1000991731 @@ -89,7 +89,7 @@ ./man/yaboot.conf.5 1077455729 1004256691 ./man/yabootconfig.8 1077455729 1027929577 ./man/ybin.8 1077455729 1006348765 -./man 1079921100 1027929577 +./man 1080450116 1027929577 ./man.patch 1077455729 1006348761 ./second/cache.S 1077455729 1007200690 ./second/cfg.c 1077455729 1007200690 @@ -108,13 +108,13 @@ ./second/prom.c 1077455730 1067937197 ./second/setjmp.S 1077455730 1000991732 ./second/yaboot.c 1077455730 1032059504 -./second 1079921100 1069320301 +./second 1080450116 1069320301 ./util/addnote.c 1077455730 1007200691 ./util/elfextract.c 1077455730 1007303237 -./util 1079921100 1069320301 -./ybin/mkofboot 1079921100 1073219938 -./ybin/ofpath 1079920929 1079920942 +./util 1080450116 1069320301 +./ybin/mkofboot 1080450116 1073219938 +./ybin/ofpath 1080449916 1080449901 ./ybin/yabootconfig 1077455730 1044766426 -./ybin/ybin 1079920783 1079920690 -./ybin 1079921100 1079920942 -. 1079921100 1079920783 +./ybin/ybin 1079921107 1079920690 +./ybin 1080450116 1080449901 +. 1080450116 1080450111 diff --git a/ChangeLog b/ChangeLog index ecb956e..ecf315c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,21 @@ # arch-tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3 # +2004-03-28 05:02:03 GMT Ethan Benson patch-67 + + Summary: + Fix ofpath SATA support and sysfs detection + Revision: + yaboot--devel--1.3--patch-67 + + * ybin/ofpath: Support newwer kernels which call the driver sata_svw, + instead of ata-k2. + * ybin/ofpath: Detect sysfs mount correctly. + + modified files: + 0arch-timestamps0 ChangeLog ybin/ofpath + + 2004-03-22 02:05:07 GMT Ethan Benson patch-66 Summary: diff --git a/ybin/ofpath b/ybin/ofpath index 0625c38..4c4ceaa 100755 --- a/ybin/ofpath +++ b/ybin/ofpath @@ -27,7 +27,7 @@ PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" PRG="${0##*/}" -VERSION=1.0.6-pre1 +VERSION=1.0.6-pre2 DEBUG=0 export LC_COLLATE=C @@ -297,7 +297,7 @@ scsi_ofpath() DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)" echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION" ;; - ata_k2) + ata_k2|sata_svw) HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do lgrep "$i" "k2-s-ata" ; done)" DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)" @@ -325,16 +325,16 @@ ide_ofpath() fi case "$(uname -r)" in - 2.5.*|2.6.0*|2.6.1|2.6.1-*|2.6.2|2.6.2-*|2.6.3|2.6.3-*) + 2.5.*|2.6.0*|2.6.1|2.6.1-*|2.6.2|2.6.2-*) echo "$PRG: Linux kernel `uname -r` is not supported" return 1 ;; 2.6.*|2.7.*) - if ! (grep -q ^sysfs /proc/mounts 2> /dev/null) ; then + if ! (grep -q '.* .* sysfs ' /proc/mounts 2> /dev/null) ; then echo 1>&2 "$PRG: sysfs must be mounted for ofpath to support this system" return 1 fi - local SYS="$(m=`grep ^sysfs /proc/mounts | head -n 1` ; echo `d=${m#* };echo ${d%% *}`)" + local SYS="$(m=`grep '.* .* sysfs ' /proc/mounts | head -n 1` ; echo `d=${m#* };echo ${d%% *}`)" if [ -z "$SYS" -o ! -d "$SYS" ] ; then echo 2>&1 "$PRG: Unable to determine sysfs mountpoint" return 1