Package: yaboot
Version: 1.3.13-3
Severity: wishlist
Tags: patch

Very recent versions of Open Firmware on Pegasos support yaboot, at
least for netbooting. It would be useful to be able to use ofpath to
find out the Open Firmware paths to disks on such systems. There are two
obstacles, at least on the development system I have which AFAIK is a
fairly standard configuration:

  * ofpath doesn't recognise the Pegasos subarchitecture, and doesn't
    know which style of device name -> Open Firmware mangling to use on
    it. As far as I can tell, it's straightforward enough at least for
    IDE disks (I can't test SCSI, unfortunately) that the same handling
    as NewWorld can be used.

  * The IDE disk shipped with my development system advertises its
    device_type as "spi" (SCSI-3 Parallel Interface, I think,
    http://www.openbios.info/docs/rec.scsi3pi.10.pdf - no idea why). The
    Open Firmware path appears to be
    /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED],TARGET.

Here's a patch for both these issues. If Ethan wants to merge this using
arch, then:

  tla register-archive http://riva.ucam.org/~cjwatson/archives/[EMAIL PROTECTED]
  tla star-merge [EMAIL PROTECTED]/yaboot--pegasos--1.3

* finding or making yaboot--pegasos--1.3--base-0
* finding or making yaboot--pegasos--1.3--patch-2
* computing changeset
A  {arch}/yaboot/yaboot--pegasos/yaboot--pegasos--1.3/[EMAIL 
PROTECTED]/patch-log/patch-1
A  {arch}/yaboot/yaboot--pegasos/yaboot--pegasos--1.3/[EMAIL 
PROTECTED]/patch-log/patch-2
M  ybin/ofpath
* changeset report
* added files

    {arch}/yaboot/yaboot--pegasos/yaboot--pegasos--1.3/[EMAIL 
PROTECTED]/patch-log/patch-1
--- /dev/null
+++ mod/{arch}/yaboot/yaboot--pegasos/yaboot--pegasos--1.3/[EMAIL 
PROTECTED]/patch-log/patch-1
@@ -0,0 +1,10 @@
+Revision: yaboot--pegasos--1.3--patch-1
+Archive: [EMAIL PROTECTED]
+Creator: Colin Watson <[EMAIL PROTECTED]>
+Date: Tue Mar 15 20:11:08 GMT 2005
+Standard-date: 2005-03-15 20:11:08 GMT
+Modified-files: ybin/ofpath
+New-patches: [EMAIL PROTECTED]/yaboot--pegasos--1.3--patch-1
+Summary: Add support for IDE devices that advertise as "spi"
+Keywords: 
+
--- /dev/null
+++ mod/{arch}/yaboot/yaboot--pegasos/yaboot--pegasos--1.3/[EMAIL 
PROTECTED]/patch-log/patch-2
@@ -0,0 +1,10 @@
+Revision: yaboot--pegasos--1.3--patch-2
+Archive: [EMAIL PROTECTED]
+Creator: Colin Watson <[EMAIL PROTECTED]>
+Date: Tue Mar 15 20:14:15 GMT 2005
+Standard-date: 2005-03-15 20:14:15 GMT
+Modified-files: ybin/ofpath
+New-patches: [EMAIL PROTECTED]/yaboot--pegasos--1.3--patch-2
+Summary: Add (trivial) support for Pegasos to ofpath
+Keywords: 
+
    {arch}/yaboot/yaboot--pegasos/yaboot--pegasos--1.3/[EMAIL 
PROTECTED]/patch-log/patch-2
--- /dev/null
+++ mod/{arch}/yaboot/yaboot--pegasos/yaboot--pegasos--1.3/[EMAIL 
PROTECTED]/patch-log/patch-1
@@ -0,0 +1,10 @@
+Revision: yaboot--pegasos--1.3--patch-1
+Archive: [EMAIL PROTECTED]
+Creator: Colin Watson <[EMAIL PROTECTED]>
+Date: Tue Mar 15 20:11:08 GMT 2005
+Standard-date: 2005-03-15 20:11:08 GMT
+Modified-files: ybin/ofpath
+New-patches: [EMAIL PROTECTED]/yaboot--pegasos--1.3--patch-1
+Summary: Add support for IDE devices that advertise as "spi"
+Keywords: 
+
--- /dev/null
+++ mod/{arch}/yaboot/yaboot--pegasos/yaboot--pegasos--1.3/[EMAIL 
PROTECTED]/patch-log/patch-2
@@ -0,0 +1,10 @@
+Revision: yaboot--pegasos--1.3--patch-2
+Archive: [EMAIL PROTECTED]
+Creator: Colin Watson <[EMAIL PROTECTED]>
+Date: Tue Mar 15 20:14:15 GMT 2005
+Standard-date: 2005-03-15 20:14:15 GMT
+Modified-files: ybin/ofpath
+New-patches: [EMAIL PROTECTED]/yaboot--pegasos--1.3--patch-2
+Summary: Add (trivial) support for Pegasos to ofpath
+Keywords: 
+

* modified files

--- orig/ybin/ofpath
+++ mod/ybin/ofpath
@@ -396,6 +396,10 @@
                local MASTER="/@$(($(cat /proc/ide/${IDEBUS}/channel) * 2 + 0))"
                local SLAVE="/@$(($(cat /proc/ide/${IDEBUS}/channel) * 2 + 1))"
                ;;
+           spi)
+               local MASTER="/[EMAIL PROTECTED](cat 
/proc/ide/${IDEBUS}/channel),0"
+               local SLAVE="/[EMAIL PROTECTED](cat 
/proc/ide/${IDEBUS}/channel),1"
+               ;;
            *)
                echo 1>&2 "$PRG: Unsupported IDE device type: \"$(cat 
/proc/device-tree${DEVSPEC}/device_type 2> /dev/null)\""
                return 1
@@ -914,6 +918,8 @@
     SUBARCH=OldWorld
 elif (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; 
then
     SUBARCH=CHRP
+elif (cat /proc/cpuinfo 2>/dev/null | grep ^machine | grep -q 'CHRP Pegasos') 
; then
+    SUBARCH=Pegasos
 else
     echo 1>&2 "$PRG: This machine is not yet supported"
     exit 1
@@ -936,7 +942,8 @@
 
 ## use appropriate search for right sub arch.
 case "$SUBARCH" in
-    NewWorld)
+    # Pegasos OF seems to be NewWorld-ish enough to cope with this.
+    NewWorld|Pegasos)
        newworld || exit 1
        ;;
     OldWorld)

Thanks,

-- 
Colin Watson                                       [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to