Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410217 - sys-boot/yaboot-1.3.16 + sys-kernel/gentoo-sources-3.3.0 - ybin: Unable to find OpenFirmware path for boot=/dev/sda2
Summary: sys-boot/yaboot-1.3.16 + sys-kernel/gentoo-sources-3.3.0 - ybin: Unable to fi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-30 08:41 UTC by hiyuh
Modified: 2012-05-15 15:23 UTC (History)
2 users (show)

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


Attachments
Patch for the error you (ofpath.patch,926 bytes, text/plain)
2012-05-09 16:36 UTC, Joe Jezak (RETIRED)
Details
my kernel config (config,59.68 KB, text/plain)
2012-05-14 09:36 UTC, hiyuh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hiyuh 2012-03-30 08:41:52 UTC
due to bug #406081, I couldn't try w/ sys-boot/yaboot-1.3.17 though,
using sys-boot/yaboot-1.3.16 on sys-kernel/gentoo-sources-3.3.0 (or, sys-fs/udev-182-r2?),
I got,

# /usr/sbin/ybin -v
ybin: Finding OpenFirmware device path to `/dev/sda2'...
cat: /sys/devices/pci0002:20/0002:20:0d.0/ata1/host0/target0:0:0/0:0:0:0/../../../devspec: No such file or directory
ybin: Unable to find OpenFirmware path for boot=/dev/sda2
ybin: Please add ofboot=<path> where <path> is the OpenFirmware path to /dev/sda2 to /etc/yaboot.conf
ybin: Finding OpenFirmware device path to `/dev/sda4'...
cat: /sys/devices/pci0002:20/0002:20:0d.0/ata1/host0/target0:0:0/0:0:0:0/../../../devspec: No such file or directory
ybin: Unable to determine OpenFirmware path for macosx=/dev/sda4
ybin: Try specifying the real OpenFirmware path for macosx=/dev/sda4 in /etc/yaboot.conf

above error message shows ybin does "cat" devspec under "/sys/..." but fails.
the "cat" was called from /usr/sbin/ofpath,

$ grep -n devspec /usr/sbin/ofpath
79:### Find the devspec for the controller
89:     sd*|sg*|sr*) CONTROLLER_PATH=$(cat ${DEVPATH}/../../../devspec) ;;
90:     hd*) CONTROLLER_PATH=$(cat ${DEVPATH}/../../devspec) ;;

and random "find" shot to "/sys/...", I realized devspec move to upper hierarchy (but I dunno why),

$ find '/sys/devices/pci0002:20/0002:20:0d.0/ata1/host0/target0:0:0/0:0:0:0/../../..' -name 'devspec'
[no output]

$ find '/sys/devices/pci0002:20/0002:20:0d.0/ata1/host0/target0:0:0/0:0:0:0/../../../..' -name 'devspec'
/sys/devices/pci0002:20/0002:20:0d.0/ata1/host0/target0:0:0/0:0:0:0/../../../../devspec

so updating /usr/sbin/ofpath:89 solves this problem like this,

89:     sd*|sg*|sr*) CONTROLLER_PATH=$(cat ${DEVPATH}/../../../../devspec) ;; # added one more ".." before "devspec"

and reboot works fine to me.

Reproducible: Always

Steps to Reproduce:
1. # /usr/sbin/ybin -v

Actual Results:  
ybin doesn't work.


Expected Results:  
ybin should work.



Portage 2.1.10.52 (default/linux/powerpc/ppc32/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.3.0-gentoo ppc)
=================================================================
System uname: Linux-3.3.0-gentoo-ppc-7447A,_altivec_supported-with-gentoo-2.1
Timestamp of tree: Fri, 30 Mar 2012 00:15:01 +0000
ccache version 3.1.7 [enabled]
app-shells/bash:          4.2_p24
dev-lang/python:          2.7.2-r3, 3.2.2-r1
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo x-crossdev hiyuh
ACCEPT_KEYWORDS="ppc ~ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -Wall"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -Wall"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet=n --quiet-build=n"
FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="        http://gentoo.channelx.biz/     http://gentoo.gg3.net/  ftp://gg3.net/pub/linux/gentoo/         ftp://ftp.iij.ad.jp/pub/linux/gentoo/   http://ftp.iij.ad.jp/pub/linux/gentoo/  rsync://ftp.iij.ad.jp/pub/linux/gentoo/         http://ftp.jaist.ac.jp/pub/Linux/Gentoo/     rsync://ftp.jaist.ac.jp/pub/Linux/Gentoo/       ftp://ftp.jaist.ac.jp/pub/Linux/Gentoo/ "
LANG="ja_JP.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ja"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlay/crossdev /usr/local/overlay/hiyuh"
SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"
USE="X acl altivec bash-completion berkdb bzip2 caps cjk cli cracklib crypt cxx dri fontconfig fortran gdbm gif gpm gtk3 iconv icu jbig jpeg jpeg2k lzma modules mudflap ncurses nls nptl nptlonly opengl openmp png ppc readline session ssl svg sysfs t1lib tcpd threads tiff truetype unicode vim-syntax xcb xft xorg zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LINGUAS="en ja" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev radeon r200"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ted Tanberry 2012-04-09 09:25:06 UTC
I can confirm this problem too and also confirm that the additional "../" seems to fix it.
Comment 2 hiyuh 2012-05-09 04:18:31 UTC
FYI, sys-boot/yaboot-1.3.17-r1 + sys-kernel/gentoo-sources-3.3.4 still have same issue.
Comment 3 Joe Jezak (RETIRED) gentoo-dev 2012-05-09 16:20:17 UTC
I can't seem to reproduce this on my machine. Can you please add your kernel config to this bug?

Thanks!
Comment 4 Joe Jezak (RETIRED) gentoo-dev 2012-05-09 16:36:23 UTC
Created attachment 311255 [details]
Patch for the error you
Comment 5 Joe Jezak (RETIRED) gentoo-dev 2012-05-09 16:37:54 UTC
Comment on attachment 311255 [details]
Patch for the error you

Whoops, I pressed enter before I finished typing. Sorry about that!

Here's a patch which should fix your problem. Please give it a try and if it works for you, I'll add it to the latest yaboot package.

Thanks!
Comment 6 hiyuh 2012-05-14 09:36:32 UTC
Created attachment 311717 [details]
my kernel config
Comment 7 hiyuh 2012-05-14 09:41:59 UTC
(In reply to comment #5)
> Comment on attachment 311255 [details]
> Patch for the error you
> 
> Whoops, I pressed enter before I finished typing. Sorry about that!
> 
> Here's a patch which should fix your problem. Please give it a try and if it
> works for you, I'll add it to the latest yaboot package.
> 
> Thanks!

i tried and IT JUST WORKS (TM) :)
Comment 8 Joe Jezak (RETIRED) gentoo-dev 2012-05-15 15:23:35 UTC
Great, I'll stable this change (in -r2 for yaboot / -r1 for yaboot-static) when we mark 3.3.x stable! Thanks for bringing this to my attention.