75 lines
2.2 KiB
Diff
75 lines
2.2 KiB
Diff
Description: Support for YDL PowerStation
|
|
Bug-Debian: http://bugs.debian.org/603894
|
|
Author: Milan Kupcevic <milan@physics.harvard.edu>
|
|
Forwarded: http://patchwork.ozlabs.org/patch/111893/
|
|
--- a/ybin/ofpath
|
|
+++ b/ybin/ofpath
|
|
@@ -30,7 +30,7 @@
|
|
|
|
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
|
|
PRG="${0##*/}"
|
|
-VERSION=1.0.7+debian2
|
|
+VERSION=1.0.7+debian3
|
|
DEBUG=0
|
|
export LC_COLLATE=C
|
|
|
|
@@ -899,6 +899,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 ^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 @@
|
|
OldWorld)
|
|
oldworld || exit 1
|
|
;;
|
|
- CHRP)
|
|
+ CHRP|Maple)
|
|
chrp || exit 1
|
|
;;
|
|
esac
|
|
--- a/ybin/ybin
|
|
+++ b/ybin/ybin
|
|
@@ -77,6 +77,8 @@
|
|
fstype=raw
|
|
elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'PowerNV') ; then
|
|
fstype=raw
|
|
+elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'Maple') ; then
|
|
+ fstype=raw
|
|
else
|
|
fstype=hfs
|
|
fi
|
|
@@ -514,6 +516,8 @@
|
|
## 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"
|
|
@@ -1157,6 +1161,20 @@
|
|
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
|
|
}
|