Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253614 - ofpath of sys-boot/yaboot-1.3.14 does not work for IDE drives when CONFIG_IDE_PROC_FS is disabled in a 2.6-Kernel configuration.
Summary: ofpath of sys-boot/yaboot-1.3.14 does not work for IDE drives when CONFIG_IDE...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-03 21:06 UTC by Thomas Juerges
Modified: 2010-05-31 23:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ofpath patch for only using sysfs nodes to determine the OF Path (only_sysfs_ofpath.patch,3.35 KB, patch)
2009-01-09 23:50 UTC, Joe Jezak (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Juerges 2009-01-03 21:06:26 UTC
Yaboot is supposed to work without an ofboot=blah entry in /etc/yaboot.conf since ybin 0.18 (according to the yaboot.conf man page).

Now I configured my kernel without CONFIG_IDE_PROC_FS support since it is considered "legacy" support:

--- from the Kernel help page --- 
legacy /proc/ide/ support
CONFIG_IDE_PROC_FS:

This option enables support for the various files in
/proc/ide.  In Linux 2.6 this has been superseded by
files in sysfs but many legacy applications rely on this.
--- ---

When I execute ofpath /dev/hda2

--- ---
thomas@mac ~ 10 ofpath /dev/hda2
ofpath: /dev/hda: Device not configured
--- ---

it is not able to find the proper ATA drive information because it does not continue looking in the sysfs path.  ofpath checks for /proc/ide directory

--- from /usr/sbin/ofpath ---
if [ ! -L "/proc/ide/$DEVNODE" ] ; then
	echo 1>&2 "$PRG: /dev/$DEVNODE: Device not configured"
	return 1
fi
--- ---

which is obviously not available and then just stops the execution.  I guess it could gather the necessary information from sysfs, too.
Comment 1 Joe Jezak (RETIRED) gentoo-dev 2009-01-09 23:48:14 UTC
Yes, that's true.  As the kernel suggests, you should default to leaving this on.  However, I've attached a patch which fixes the issue (at least for me).  I'm not sure how appropriate it is for pushing it to the yaboot folks, but if you'd give it a try, I'd appreciate it.

Thanks
Comment 2 Joe Jezak (RETIRED) gentoo-dev 2009-01-09 23:50:54 UTC
Created attachment 177929 [details, diff]
ofpath patch for only using sysfs nodes to determine the OF Path

This patch fixes ofpath to use only sysfs nodes if /proc isn't available to determine the IDE drive OF paths.
Comment 3 Thomas Juerges 2009-02-22 21:46:49 UTC
(In reply to comment #2)
> Created an attachment (id=177929) [edit]
> ofpath patch for only using sysfs nodes to determine the OF Path
> 
> This patch fixes ofpath to use only sysfs nodes if /proc isn't available to
> determine the IDE drive OF paths.
> 

mac tmp # ./ofpath /dev/hda2
/pci@f4000000/ata-6@d/disk@0:2

Seems to be okay now.  Thanks!
Comment 4 Joe Jezak (RETIRED) gentoo-dev 2009-02-28 01:59:19 UTC
I submitted the patch upstream, hopefully it'll make it into the next version.
Comment 5 matt 2010-05-24 19:11:25 UTC
tried to use the new sda but got stuck with yaboot failing.  tried adding CONFIG_IDE_PROC_FS to the kernel and that did not work.  can i enable that option and use the new sda or does that only work with the old ide ?  then i tried the patch and with my external disk plugged in i get a firewire path for both disks, internal and external, and without it plugged in i get /disk@0.  i do not know much about the ofpath, is this the correct path for an ibook g4 :

/pci/@f4000000/ata-6@d/disk@0 ?
Comment 6 Joe Jezak (RETIRED) gentoo-dev 2010-05-31 23:54:22 UTC
There hasn't been any word from upstream on a new yaboot release, so I added this patch to CVS. Please reopen this bug if there are issues.