90f5f8ffe1
This should replace the yaboot-bin package (which should be dropped assuming this is found to be working well). This, instead of taking the binary from Debian, compiles yaboot from source. The tricky part here is e2fsprogs, or rather, libext2fs. Yaboot requires a fairly old version of it, and being a strictly ppc32 program, needs that library compiled in a minimal form for ppc32. In order to achieve that, I abuse the cross-compiler, using the musl ppc32 cross-compiler as that's universally available on all crosshosts, as well as all ppc64 (and ppc32 doesn't need it). The main reason to do this over shipping the binary is that this will actually work properly on some ppc64 machines, which require the bundled addnote executable, which can now be compiled properly for the native architecture.
74 lines
2.2 KiB
Diff
74 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
|
|
}
|