ofpath generates wrong OpenFirmware path for boot device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
yaboot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
in Ubuntu 14.10 (powerpc) ofpath generates incorrect OpenFIrmware device path. This path is used in yaboot.conf and in ofboot.b
Because of this issue, system will not boot. The problem happens during install procedure and after otherwise sucessful installation system fails to boot.
Most likely (but not directly verified) the issue is already present in Ubuntu 14.04
ifpath returns:
ofpath /dev/sdb
/ht@0,f2000000/
while OF wants:
/ht@0,f2000000/
Kernel got it right:
/proc/device-
Kernel version:
uname -a
Linux powermac 3.16.0-
lsb_release -rd
Description: Ubuntu 14.10
Release: 14.10
apt-cache policy yaboot
yaboot:
Installed: 1.3.16-4ubuntu1
Candidate: 1.3.16-4ubuntu1
Version table:
*** 1.3.16-4ubuntu1 0
500 http://
100 /var/lib/
Machine: Powermac G5 QUAD, specs at:
https:/
tags: | added: ppc yaboot |
Hi,
if I use ofpath script of yaboot 1.3.17 (from git://ozlabs. org/srv/ projects/ yaboot/ yaboot. git commit 0e48da7ef41c6fc 36f80f44e5e4a32 9000412f88)
and apply the following patch, all works fine:
diff --git a/ybin/ofpath b/ybin/ofpath
lgrep "$i" "^ADPT" "^pci900[45]" "^pciclass,01000" ; done)"
DEVICE_ PATH="$ (printhost $SCSI_HOSTNUMBER $HOST_LIST)" PATH##* device- tree}/@ $DEVICE_ ID:$PARTITION"
lgrep "$i" "^Symbios" "^pci1000" "^pciclass,01000" ; done)"
DEVICE_ PATH="$ (printhost $SCSI_HOSTNUMBER $HOST_LIST)" PATH##* device- tree}/@ $DEVICE_ ID:$PARTITION"
lgrep "$i" "mesh" ; done)"
DEVICE_ PATH="$ (printhost $SCSI_HOSTNUMBER $HOST_LIST)" PATH##* device- tree}/@ $DEVICE_ ID:$PARTITION"
ata_k2| sata_svw)
lgrep "$i" "k2-s-ata" ; done | sort)"
DEVICE_ PATH="$ (printhost $SCSI_HOSTNUMBER $HOST_LIST)"
K2_ DEVICE_ ID=0
SCSI_ HOSTNUMBER= `expr $SCSI_HOSTNUMBER - 1`
DEVICE_ PATH="$ (printhost $SCSI_HOSTNUMBER $HOST_LIST)" PATH##* device- tree}/k2- sata@$K2_ DEVICE_ ID/disk@ 0:$PARTITION"
usb-storage)
lgrep "$i" "disk" ; done)"
DEVICE_ PATH="$ (printhost $SCSI_HOSTNUMBER $HOST_LIST)" PATH##* device- tree}:$ PARTITION"
lgrep "$i" "sbp-2" ; done)"
SCS. ..
index aff5583..ad0b388 100755
--- a/ybin/ofpath
+++ b/ybin/ofpath
@@ -280,19 +280,19 @@ scsi_ofpath()
{
case "$SCSI_DRIVER" in
aic7xxx)
- HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
+ HOST_LIST="$(for i in `find /proc/device-tree/ -name compatible` ; do
echo "${DEVICE_
;;
sym53c8xx)
- HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
+ HOST_LIST="$(for i in `find /proc/device-tree/ -name compatible` ; do
echo "${DEVICE_
;;
mesh)
- HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
+ HOST_LIST="$(for i in `find /proc/device-tree/ -name compatible` ; do
echo "${DEVICE_
@@ -300,26 +300,26 @@ scsi_ofpath()
#Not all G5 device trees have a compatible "k2-sata" node
#per channel use parent
- HOST_LIST="$(for i in `find /proc/device-tree -name compatible ` ; do
+ HOST_LIST="$(for i in `find /proc/device-tree/ -name compatible ` ; do
while [ "$DEVICE_PATH" = "" ] ; do
- let "K2_DEVICE_ID += 1"
+ K2_DEVICE_ID=$(( $K2_DEVICE_ID + 1 ))
done
echo "${DEVICE_
;;
- HOST_LIST="$(for i in `find /proc/device-tree -name name | grep usb` ; do
+ HOST_LIST="$(for i in `find /proc/device-tree/ -name name | grep usb` ; do
echo "${DEVICE_
;;
sbp2|"")
# sbp-2 driver may not have a dir in /proc/scsi
- HOST_LIST="$(for i in `find /proc/device-tree -name name` ; do
+ HOST_LIST="$(for i in `find /proc/device-tree/ -name name` ; do
if [ "$SCSI_HOSTNUMBER" = "" ] ; then