ofpath bugfix powerpc g5 dual sata
peter cros
pxwpxw8 at gmail.com
Sun Sep 28 00:57:04 EST 2008
Hi,
I am submitting this small patch to fix a residual bug in ofpath, for Apple
powerpc64 g5 with dual sata drives, ubuntu and possibly other installations
which use dash as their default shell.
When ybin runs ofpath in the target root system with the default shell (#!
/bin/sh ), in ubuntu this is /bin/sh -> dash.
The "let" statement used to increment the ID for multiple k2-sata drives, is
not found by the dash shell as used by ubuntu, in my g5 for example.
Failure to increment K2_DEVICE_ID returns the same k2-sata path for each of
multiple sata drives, ybin fails to find correct boot drive.
This patch just avoids using "let".
Tested on powerpc g5 Openfirmware V4, dual sata drives, ubuntu 804.
-----------------------------------
~/src/gits$ diff -pu yaboot/ybin/ofpath test/ybin/ofpath
--------------------------------------------------------
--- yaboot/ybin/ofpath 2008-09-26 21:36:38.000000000 +1000
+++ test/ybin/ofpath 2008-09-26 16:41:00.000000000 +1000
@@ -306,7 +306,8 @@ scsi_ofpath()
K2_DEVICE_ID=0
while [ "$DEVICE_PATH" = "" ] ; do
SCSI_HOSTNUMBER=`expr $SCSI_HOSTNUMBER - 1`
- let "K2_DEVICE_ID += 1"
+# let not found in dash # let "K2_DEVICE_ID += 1"
+ K2_DEVICE_ID=$((K2_DEVICE_ID+1))
DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
done
echo "${DEVICE_PATH##*device-tree}/k2-sata@$K2_DEVICE_ID/disk at 0
:$PARTITION"
-----------------------------
peter cros
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/yaboot-devel/attachments/20080928/241fc62b/attachment.htm>
More information about the Yaboot-devel
mailing list