Your message dated Sun, 12 Dec 2010 02:32:16 +0000
with message-id <[email protected]>
and subject line Bug#289201: fixed in yaboot 1.3.16-2
has caused the Debian Bug report #289201,
regarding yaboot: ofpath doesn't recognize several scsi controllers that don't
provice /proc/scsi infos
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
289201: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=289201
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: yaboot
Version: 1.3.13-3
Severity: wishlist
Some SCSI controllers (like ipr, emulex, etc.) don't provide required
informations in /proc/scsi/<modname>/*. In this case ofpath fails to
retrieve the OF path and Debian installations fail while installing the
bootloader.
The attached patch adds the possibility to look for the required
attributes in /sys - if this is available and the former methods failed
with the "Unkown driver" message.
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.28
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
diff -Naur yaboot-1.3.13-debian/ybin/ofpath yaboot-1.3.13.sysfs/ybin/ofpath
--- yaboot-1.3.13-debian/ybin/ofpath 2004-07-11 20:12:42.000000000 +0000
+++ yaboot-1.3.13.sysfs/ybin/ofpath 2005-01-07 18:44:17.113905264 +0000
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
###############################################################################
##
@@ -7,7 +7,7 @@
##
## Portions based on show_of_path.sh:
##
-## Copyright (C) 2000 Olaf Hering <[email protected]>
+## Copyright (C) 2000,2004 Olaf Hering <[email protected]>
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
@@ -304,8 +304,12 @@
echo
"${DEVICE_PATH##*device-tree}/k2-s...@$device_id/d...@0:$PARTITION"
;;
*)
- echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"
- return 1
+ if grep -q '[[:space:]]sysfs' /proc/filesystems; then
+ try_sysfs_ofpath
+ else
+ echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"
+ return 1
+ fi
;;
esac
return 0
@@ -834,6 +838,315 @@
fi
}
+## try sysfs based method here
+try_sysfs_ofpath()
+{
+ file=$device
+
+ # check if we run on a NewWorld PowerMacintosh
+ if [ -f /proc/device-tree/openprom/model ] ; then
+ while read openfirmware ofversion; do
+ case "$openfirmware" in
+ iMac,1|OpenFirmware) MACHINE="pmac_new" ;;
+ Open) MACHINE="pmac_old" ;;
+ esac
+ done < <(cat /proc/device-tree/openprom/model;echo)
+ fi
+
+ if [ "$MACHINE" = "pmac_old" ]; then
+ echo 1>&2 "ERROR: This machine is an Oldworld, no need for firmware
pathnames"
+ exit 1
+ fi
+
+ if [ -b $file ] ; then
+ read i i i i file_major file_minor i < <(ls -l "$file")
+ file_major="${file_major%%,*}"
+ file_minor="${file_minor##*,}"
+ file=/
+ else
+ mystat="`type -p stat`"
+ if [ -z "$mystat" -o ! -x "$mystat" ] ; then
+ echo 1>&2 "ERROR: GNU stat required"
+ exit 1
+ fi
+
+ file_majorminor=$($mystat --format="%d" "$file")
+ file_major="$[file_majorminor >> 8]"
+ file_minor="$[file_majorminor & 255]"
+
+ file_mountp=$file
+ while [ "$file_mountp" -a $($mystat --format="%d"
"/${file_mountp%/*}") == $file_majorminor ]; do
+ file_mountp="${file_mountp%/*}"
+ done
+ fi
+ file_majorminor=$file_major:$file_minor
+
+ file_sysfs_path=
+ # assert that /sys is mounted, else try to mount, on fail complain
+ if test -d /sys/block || mount -t sysfs sysfs /sys; then
+ for i in $(find /sys/block -name dev); do
+ : looking at $i
+ if [ "$(< $i)" = "$file_majorminor" ] ; then file_sysfs_path=$i ; break
; fi
+ done
+ else
+ echo 1>&2 "ERROR: sysfs not mounted on /sys and attempt to mount
failed"
+ echo 1>&2 may be no kernel 2.6.x?
+ exit 1
+ fi
+
+ if [ -z "$file_sysfs_path" ] ; then
+ [ "$quietmode" ] || echo 1>&2 "ERROR: can not find major:minor
$file_majorminor for $file"
+ exit 1
+ fi
+
+
+ file_sysfs_dir="${file_sysfs_path%/dev}"
+ if [ ! -L "$file_sysfs_dir/device" ] ; then
+ # maybe a partition
+ file_partition="${file_sysfs_dir##*[a-z]}"
+ file_sysfs_dir="${file_sysfs_dir%/*}"
+ if [ ! -L "$file_sysfs_dir/device" ] ; then
+ [ "$quietmode" ] || echo 1>&2 "ERROR: driver for sysfs path
$file_sysfs_dir has no full sysfs support"
+ exit 1
+ fi
+ fi
+
+ cd "$file_sysfs_dir/device"
+ file_full_sysfs_path="`/bin/pwd`"
+ file_storage_type=
+ cd "$file_full_sysfs_path"
+ case "$file_full_sysfs_path" in
+ */ide[0-9]*/[0-9]*)
+ file_storage_type=ide
+ of_disk_ide_channel="${file_full_sysfs_path##*.}"
+ cd ../..
+ if [[ "$of_disk_ide_channel" == */* ]]; then
+ of_disk_ide_channel="${of_disk_ide_channel%%/*}"
+ cd ../..
+ fi
+ ;;
+ */host[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*)
+ # file_storage_type=scsi !! or vscsi, will be determined later
+ spec="${file_full_sysfs_path##*/host[0-9]*/}"
+ read of_disk_scsi_host of_disk_scsi_chan of_disk_scsi_id
of_disk_scsi_lun <<< ${spec//:/ }
+ cd ../..
+ ;;
+ esac
+
+ if [ -f ../devspec ]; then
+ devspec=../devspec
+ else
+ devspec=devspec
+ fi
+
+ if [ -f $devspec ] ; then
+ read file_of_hw_devtype < $devspec
+ file_of_hw_devtype=/proc/device-tree${file_of_hw_devtype}
+ if ! [ -f ${file_of_hw_devtype}/device_type ]; then
+ # check for s...@$of_disk_scsi_chan/device_type else bail out ..
+ file_of_hw_devtype="${file_of_hw_devtype}/s...@${of_disk_scsi_chan}"
+ fi
+ if [ -f ${file_of_hw_devtype}/device_type ] ; then
+ case "$(< ${file_of_hw_devtype}/device_type)" in
+ k2-sata-root)
+ : found k2-sata-root, guessing channel
+ counter=0
+ for i in host[0-9]*; do
+ : working on virtual scsi host $i
+ case "$file_full_sysfs_path" in
+ */$i/*)
+ : found $i $counter
+ break
+ ;;
+ *) ;;
+ esac
+ (( counter++ ))
+ done
+ of_device_path=`grep -l block
${file_of_hw_devtype}/*...@$counter/*/device_type`
+ of_device_path=${of_device_path%/device_type}
+ of_device_path=${of_device_path##/proc/device-tree}
+ file_storage_type=sata
+ ;;
+ scsi*)
+ file_storage_type=scsi
+ ;;
+ ide|ata)
+ # TODO
+ # check for right file-storage_type == ide ??
+ ;;
+ pci-ide|pci-ata)
+ of_device_path=`grep -l block
${file_of_hw_devtype}/*...@*/*/device_type`
+ of_device_path=${of_device_path%/device_type}
+ of_device_path=${of_device_path##/proc/device-tree}
+ file_storage_type=pci-ide
+ # TODO
+ # check for right file-storage_type == ide ??
+ ;;
+ vscsi)
+ file_storage_type=vscsi
+ ;;
+ *)
+ echo 1>&2 "ERROR: Unknown device type $(<
${file_of_hw_devtype}/device_type)"
+ exit 1
+ esac
+ else
+ echo 1>&2 "ERROR: no device_type found in ${file_of_hw_devtype}"
+ exit 1
+ fi
+
+ case "$file_storage_type" in
+ ide)
+
file_of_hw_path="${file_of_hw_devtype##/proc/device-tree}/d...@$of_disk_ide_channel"
+ ;;
+ scsi)
+ file_of_hw_path=$(printf "%s/s...@%x,%x"
"${file_of_hw_devtype##/proc/device-tree}" $of_disk_scsi_id $of_disk_scsi_lun)
+ ;;
+ sata|pci-ide)
+ file_of_hw_path=$of_device_path
+ ;;
+ vscsi)
+ (( of_disk_vscsi_nr = ( (2 << 14) | (of_disk_scsi_chan<<5) |
(of_disk_scsi_id<<8) | of_disk_scsi_lun ) <<48 ));
+ if [ -d ${file_of_hw_devtype}/disk ]; then
+ of_disk_vscsi_dir=disk
+ elif [ -d ${file_of_hw_devtype}/sd ]; then
+ of_disk_vscsi_dir=sd
+ else
+ echo >&2 "ERROR: Could not find a known hard disk directory
under '${file_of_hw_devtype}'"
+ exit 1
+ fi
+ file_of_hw_path=$(printf "%s/%...@%lx"
"${file_of_hw_devtype##/proc/device-tree}" $of_disk_vscsi_dir $of_disk_vscsi_nr)
+ ;;
+ esac
+ else # no 'devspec' found
+ echo >&2 "WARNING: No devspec file found for $file_full_sysfs_path"
+
+ # find the path via the device-tree
+ dev_vendor="$(< vendor)"
+ dev_device="$(< device)"
+ dev_subsystem_vendor="$(< subsystem_vendor)"
+ dev_subsystem_device="$(< subsystem_device)"
+ for i in `find /proc/device-tree -name vendor-id`
+ do
+ : looking at $i
+ dev_of_pci_id=
+ while read a vendor_id
+ do
+ dev_of_pci_id="0x$vendor_id"
+ break
+ done < <(od --read-bytes=8 --width=8 -t x4 $i)
+ : vendor-id $dev_of_pci_id
+ dev_of_pci_id=$(($dev_of_pci_id))
+ dev_vendor=$(($dev_vendor))
+ if [ "$dev_of_pci_id" != "$dev_vendor" ] ; then continue ; fi
+ if [ ! -f "${i%/*}/device-id" ] ; then continue ; fi
+ while read a device_id
+ do
+ dev_of_pci_id="0x$device_id"
+ break
+ done < <(od --read-bytes=8 --width=8 -t x4 "${i%/*}/device-id")
+ : device-id $dev_of_pci_id
+ dev_of_pci_id=$(($dev_of_pci_id))
+ dev_device=$(($dev_device))
+ if [ "$dev_of_pci_id" != "$dev_device" ] ; then continue ; fi
+ if [ -f "${i%/*}/subsystem-vendor-id" ] ; then
+ while read a sub_vendor_id
+ do
+ dev_of_pci_id="0x$sub_vendor_id"
+ break
+ done < <(od --read-bytes=8 --width=8 -t x4
"${i%/*}/subsystem-vendor-id")
+ : sub-vendor-id $dev_of_pci_id
+ dev_of_pci_id=$(($dev_of_pci_id))
+ dev_subsystem_vendor=$(($dev_subsystem_vendor))
+ if [ "$dev_of_pci_id" != "$dev_subsystem_vendor" ] ;
then continue ; fi
+ while read a sub_device_id
+ do
+ dev_of_pci_id="0x$sub_device_id"
+ break
+ done < <(od --read-bytes=8 --width=8 -t x4
"${i%/*}/subsystem-id")
+ : sub-device-id $dev_of_pci_id
+ dev_of_pci_id=$(($dev_of_pci_id))
+ dev_subsystem_device=$(($dev_subsystem_device))
+ if [ "$dev_of_pci_id" != "$dev_subsystem_device" ] ;
then continue ; fi
+ fi
+ : found $i
+ if [ -z "$of_device_list" ] ; then
+ of_device_list="${i%/*}"
+ else
+ of_device_list="$of_device_list ${i%/*}"
+ fi
+ done
+ case "$of_device_list" in
+ *\ *)
+ : more than one controler found, fun
+ for i in $of_device_list
+ do
+ : working on $i
+ while read a addr
+ do
+ addr="0x$addr"
+ break
+ done < <(od -t x8 -j4 -N8 < $i/assigned-addresses)
+ : addr $addr , pure guess ...
+ grep -q ^$addr resource || continue
+ : found $i
+ of_device_list=$i
+ break
+ done
+ ;;
+ *)
+ ;;
+ esac
+
+ case "$(< $of_device_list/device_type)" in
+ k2-sata-root)
+ : found k2-sata-root, guessing channel
+ counter=0
+ for i in host[0-9]*; do
+ : working on virtual scsi host $i
+ case "$file_full_sysfs_path" in
+ */$i/*)
+ : found $i $counter
+ break
+ ;;
+ *) ;;
+ esac
+ let counter++
+ done
+ file_storage_type=sata
+ of_device_path=`grep -l block
$of_device_list/*...@$counter/*/device_type`
+ ;;
+ *)
+ of_device_path=`grep -l block $of_device_list/*/device_type`
+ ;;
+ esac
+
+ of_device_path=${of_device_path%/device_type}
+ case "$file_storage_type" in
+ ide)
+
file_of_hw_path="${of_device_path##/proc/device-tr...@$of_disk_ide_channel"
+ ;;
+ scsi)
+ file_of_hw_path=$(printf "%s/s...@%x,%x"
"${of_device_path##/proc/device-tree}" $of_disk_scsi_id $of_disk_scsi_lun)
+ ;;
+ sata)
+ file_of_hw_path="${of_device_path##/proc/device-tree}"
+ ;;
+ esac
+ # no "devspec" available
+ fi
+
+ #
+ # done
+ #
+
+ # print the resulting open firmware path
+ if [ "$file" != "/" ] ; then
+ echo
${file_of_hw_path}${file_partition:+:$file_partition},${file#$file_mountp}
+ else
+ echo ${file_of_hw_path}${file_partition:+:$file_partition}
+ fi
+}
+
## parse command line switches.
if [ $# != 0 ] ; then
while true ; do
--- End Message ---
--- Begin Message ---
Source: yaboot
Source-Version: 1.3.16-2
We believe that the bug you reported is fixed in the latest version of
yaboot, which is due to be installed in the Debian FTP archive:
yaboot_1.3.16-2.diff.gz
to main/y/yaboot/yaboot_1.3.16-2.diff.gz
yaboot_1.3.16-2.dsc
to main/y/yaboot/yaboot_1.3.16-2.dsc
yaboot_1.3.16-2_powerpc.deb
to main/y/yaboot/yaboot_1.3.16-2_powerpc.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Aurélien GÉRÔME <[email protected]> (supplier of updated yaboot package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 12 Dec 2010 00:00:00 +0100
Source: yaboot
Binary: yaboot
Architecture: source powerpc
Version: 1.3.16-2
Distribution: unstable
Urgency: low
Maintainer: Debootloaders Yaboot Maintainers Team
<[email protected]>
Changed-By: Aurélien GÉRÔME <[email protected]>
Description:
yaboot - Yet Another Bootloader
Closes: 289201 342833 377097 473725 572869 580455
Changes:
yaboot (1.3.16-2) unstable; urgency=low
.
* New upstream release closes: #473725.
* Add some Ubuntu changes as Debian quilt patches.
+ Build with -fno-stack-protector.
+ Distro branding in first-stage bootstrap.
* Add Milan Kupcevic's patches from 1.3.13a-1squeeze1.
+ Support sysfs in ofpath
(Closes: #572869, #377097, #342833, #289201).
+ Support persistent device naming symlinks, UUID, and LABEL tags
(Closes: #580455).
+ Update debian/copyright with copyright notice from ofpath.
* Refresh all Debian quilt patches.
Checksums-Sha1:
6d0c3455464e7b5607ff4b46f6f936bf1fec649d 1152 yaboot_1.3.16-2.dsc
6c87bb041e8dc569b624d99ec5a5d53c8911319f 220360 yaboot_1.3.16.orig.tar.gz
b5978669db9867c230198e6184f846b1edc2d9d3 15499 yaboot_1.3.16-2.diff.gz
bc900d9ba806bf80bb7efe7d096a9c94c06c4860 195280 yaboot_1.3.16-2_powerpc.deb
Checksums-Sha256:
53af29257be565e11270efaabaef363712958c0d0c2909192be1b2765b7086f7 1152
yaboot_1.3.16-2.dsc
16635d5ed0298d46e26e1da8f7a793e185ddb796e3e567554869676650a44650 220360
yaboot_1.3.16.orig.tar.gz
238a95810b2d0913ee0589f25cce4f1ad7b475d9e400402c30760d05723fe76f 15499
yaboot_1.3.16-2.diff.gz
4049768eb6beed416f4d1203db311968e8016f2bf6575e59092515a1bf9849dc 195280
yaboot_1.3.16-2_powerpc.deb
Files:
2d909f791310f66c481011042c780b90 1152 admin important yaboot_1.3.16-2.dsc
dd8f436cf23d562c8a9f6ff513e1f435 220360 admin important
yaboot_1.3.16.orig.tar.gz
f6fd6981db5c66169f3ec6bd5284858d 15499 admin important yaboot_1.3.16-2.diff.gz
765b7f0b7352d69ade61cdf35ae936e4 195280 admin important
yaboot_1.3.16-2_powerpc.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAk0EMRoACgkQI2xgxmW0sWK/5ACcDspJemSncIncRg79oR53TwTP
2sMAn0EGmvJybOKS/X6Sg1VSzp5WLGeX
=JB/a
-----END PGP SIGNATURE-----
--- End Message ---