[PATCH] Support for YDL PowerStation.
Milan Kupcevic
milan at physics.harvard.edu
Sun Aug 28 14:43:57 EST 2011
Support for YDL PowerStation. Apply on top of
http://patchwork.ozlabs.org/patch/108566/
Signed-off-by: Milan Kupcevic <milan at physics.harvard.edu>
---
ybin/ofpath | 4 +++-
ybin/ybin | 18 ++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/ybin/ofpath b/ybin/ofpath
index 7557484..fc841c5 100755
--- a/ybin/ofpath
+++ b/ybin/ofpath
@@ -899,6 +899,8 @@ elif (cat /proc/cpuinfo 2>/dev/null | grep ^motherboard | grep -q AAPL) ; then
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 ^platform | grep -q 'Maple') ; then
+ SUBARCH=Maple
elif (cat /proc/cpuinfo 2>/dev/null | grep ^machine | grep -q 'CHRP Pegasos') ; then
SUBARCH=Pegasos
else
@@ -930,7 +932,7 @@ case "$SUBARCH" in
OldWorld)
oldworld || exit 1
;;
- CHRP)
+ CHRP|Maple)
chrp || exit 1
;;
esac
diff --git a/ybin/ybin b/ybin/ybin
index cbc14f4..16bfc6b 100755
--- a/ybin/ybin
+++ b/ybin/ybin
@@ -75,6 +75,8 @@ fi
usemount=no
if (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
fstype=raw
+elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'Maple') ; then
+ fstype=raw
else
fstype=hfs
fi
@@ -508,6 +510,8 @@ checkconf()
## IBM hardware does not need nvram update AFAICT
nonvram=1
ADDNOTE=yes
+ elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'Maple') ; then
+ true
else
#echo 1>&2 "$PRG: Warning: Unknown archetecture, $boot may not be bootable on this machine"
[ "$nonvram" = 0 ] && echo 1>&2 "$PRG: Warning: Unknown architecture, nvram will not be updated"
@@ -1151,6 +1155,20 @@ raw_install()
return 1
fi
sync ; sync
+
+ ## update the boot-device variable in OF nvram.
+ if [ "$nonvram" = 0 ] ; then
+ chrp_ofboot=${ofboot%%:*}
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Updating OpenFirmware boot-device variable in nvram..."
+ [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: boot-device=${chrp_ofboot}"
+ nvsetenv boot-device "${chrp_ofboot}"
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: An error occured while updating nvram, we'll ignore it"
+ fi
+ else
+ echo 1>&2 "$PRG: Warning: You must manually configure OpenFirmware to boot."
+ fi
+
[ "$VERBOSE" = 1 ] && echo "$PRG: Installation successful"
return 0
}
--
1.7.2.5
More information about the Yaboot-devel
mailing list