All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Small <smallm@panix.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PPC] quick test please? device tree path translation
Date: Sun, 23 Oct 2005 20:19:26 -0400	[thread overview]
Message-ID: <20051024001926.GD16993@panix.com> (raw)
In-Reply-To: <6c133058b121311fc4d5992867264a45@penguinppc.org>

On Sun, Oct 23, 2005 at 05:53:44PM -0500, Hollis Blanchard wrote:
> Hi, could PPC people give the attached shell script a try? For example,
> $ ./ofpathname /dev/hda
> /pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@0
> 
> I'd like to make sure that the resulting Open Firmware device tree path 
> is accurate. I think we should use this script for GRUB installation, 
> which means that when the user says "grub-install /dev/hda2" this 
> script will tell us the proper setting of the OF "boot-device" 
> variable.
> 
> It seems to be working fine for disk, CD, and Zip drive on my Blue & 
> White G3, which has a slightly unusual ATA setup. I expect it to work 
> just fine on simple systems like laptops, but I'm particularly 
> interested in more unsual systems like Pegasos, or systems with lots of 
> IO and disks.
> 
> You can validate by comparing the output with 
> /proc/device-tree/aliases/hd, for example, or just try it out.
> 
> -Hollis

Seems to work for me.  It gives the same answers as ofpath (packaged
with yaboot 1.0.8), except for a usb floppy drive, which your script
can handle but ofpath cannot.  The machine is a 466Mhz G4 Powermac
(Digital Audio) with an IDE harddrive and cdrom drive, and a usb
floppy drive...


$ ./ofpathname /dev/hda
/pci@f2000000/mac-io@17/ata-4@1f000/disk@0
$ ./ofpathname /dev/hdc
/pci@f2000000/mac-io@17/ata-3@20000/disk@0
$ ./ofpathname /dev/sda
/pci@f2000000/usb@19/scsi@0/sd@0,0

(for comparison)
# ofpath /dev/hda
/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
# ofpath /dev/hdc
/pci@f2000000/mac-io@17/ata-3@20000/disk@0:
# ofpath /dev/sdc
ofpath: /proc/device-tree is broken.  Do not use BootX to boot, use yaboot.
ofpath: The yaboot HOWTO can be found here: http://www.alaska.net/~erbenson/doc

So your script seems better.

-- 
Mike Small
smallm@panix.com



  reply	other threads:[~2005-10-24  0:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-23 22:53 [PPC] quick test please? device tree path translation Hollis Blanchard
2005-10-24  0:19 ` Mike Small [this message]
2005-10-24  0:42   ` Hollis Blanchard
2005-10-24  0:46     ` Dennis Clarke
2005-10-24  2:04       ` Hollis Blanchard
2005-10-24  0:43   ` Dennis Clarke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051024001926.GD16993@panix.com \
    --to=smallm@panix.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.