[yaboot] Add support for PowerVM and add no-strict-aliasing to YBCFLAGS
Tony Breeds
tbreeds at fedoraproject.org
Mon Sep 26 05:19:08 UTC 2011
commit 56d90079a4107d8a25c9d441e193ebe582791c4b
Author: Tony Breeds <tony at bakeyournoodle.com>
Date: Mon Sep 26 15:16:04 2011 +1000
Add support for PowerVM and add no-strict-aliasing to YBCFLAGS
Signed-off-by: Tony Breeds <tony at bakeyournoodle.com>
yaboot-1.3.16-no-strict-aliasing.patch | 11 ++++++++
yaboot-1.3.16-powervm.patch | 40 ++++++++++++++++++++++++++++++++
yaboot.spec | 10 +++++++-
3 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/yaboot-1.3.16-no-strict-aliasing.patch b/yaboot-1.3.16-no-strict-aliasing.patch
new file mode 100644
index 0000000..7895bd6
--- /dev/null
+++ b/yaboot-1.3.16-no-strict-aliasing.patch
@@ -0,0 +1,11 @@
+diff -uNr yaboot-1.3.16.orig/Makefile yaboot-1.3.16/Makefile
+--- yaboot-1.3.16.orig/Makefile 2011-08-31 15:24:40.920001343 +1000
++++ yaboot-1.3.16/Makefile 2011-08-31 15:38:22.050001354 +1000
+@@ -42,6 +42,7 @@
+ YBCFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE)
+ YBCFLAGS += -DKERNELADDR=$(KERNELADDR)
+ YBCFLAGS += -I ./include
++YBCFLAGS += -fno-strict-aliasing
+
+ ifeq ($(CONFIG_COLOR_TEXT),y)
+ YBCFLAGS += -DCONFIG_COLOR_TEXT
diff --git a/yaboot-1.3.16-powervm.patch b/yaboot-1.3.16-powervm.patch
new file mode 100644
index 0000000..ebdd970
--- /dev/null
+++ b/yaboot-1.3.16-powervm.patch
@@ -0,0 +1,40 @@
+diff -uNr yaboot-1.3.16.orig/second/yaboot.c yaboot-1.3.16/second/yaboot.c
+--- yaboot-1.3.16.orig/second/yaboot.c 2011-08-31 15:24:40.940001350 +1000
++++ yaboot-1.3.16/second/yaboot.c 2011-08-31 15:30:43.890002019 +1000
+@@ -233,6 +233,9 @@
+ else if (prom_getprop(root, "device_type", model, 256 ) > 0 &&
+ !strncmp("chrp", model, 4))
+ _machine = _MACH_chrp;
++ else if (prom_getprop(root, "compatible", model, 256 ) > 0 &&
++ strstr(model, "ibm,powernv"))
++ _machine = _MACH_chrp;
+ else {
+ if (prom_getprop(root, "model", model, 256 ) > 0 &&
+ !strncmp(model, "IBM", 3))
+diff -uNr yaboot-1.3.16.orig/ybin/ybin yaboot-1.3.16/ybin/ybin
+--- yaboot-1.3.16.orig/ybin/ybin 2011-08-31 15:24:40.910001339 +1000
++++ yaboot-1.3.16/ybin/ybin 2011-08-31 15:34:58.630001563 +1000
+@@ -73,7 +73,9 @@
+
+ ## defaults
+ usemount=no
+-if (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
++if (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'pSeries') ; then
++ 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 ^machine | grep -q 'Pegasos') ; then
+ fstype=ext2
+@@ -508,7 +510,11 @@
+ echo 1>&2
+ [ "$nonvram" = 0 ] && echo 1>&2 "$PRG: OldWorld PowerMac, nvram will not be updated"
+ nonvram=1
+- elif (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
++ elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'pSeries') ; then
++ ## IBM hardware does not need nvram update AFAICT
++ nonvram=1
++ ADDNOTE=yes
++ elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'PowerNV') ; then
+ ## IBM hardware does not need nvram update AFAICT
+ nonvram=1
+ ADDNOTE=yes
diff --git a/yaboot.spec b/yaboot.spec
index 13dec83..d2b6ee5 100644
--- a/yaboot.spec
+++ b/yaboot.spec
@@ -1,7 +1,7 @@
Summary: Linux bootloader for Power Macintosh "New World" computers.
Name: yaboot
Version: 1.3.16
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: http://yaboot.ozlabs.org/releases/yaboot-%{version}.tar.gz
@@ -56,6 +56,8 @@ Patch45: yaboot-1.3.16-memalign.patch
# Truncate memcpy() in extract_vendor_options()
# https://bugzilla.redhat.com/show_bug.cgi?id=729684
Patch46: yaboot-1.3.14-dhcp_truncate.patch
+Patch47: yaboot-1.3.16-no-strict-aliasing.patch
+Patch48: yaboot-1.3.16-powervm.patch
URL: http://yaboot.ozlabs.org/
BuildRoot: %{_tmppath}/%{name}-root
@@ -109,6 +111,8 @@ yaboot can also bootload IBM pSeries machines.
%patch44 -p1 -b .256-RMA
%patch45 -p1 -b .posix
%patch46 -p1 -b .dhcppad
+%patch47 -p1 -b .aliasing
+%patch48 -p1 -b .powervm
%build
make VERSIONEXTRA='\ (Red Hat %version-%release)' DEBUG=1
@@ -149,6 +153,10 @@ rm -rf $RPM_BUILD_ROOT
%ghost %config(noreplace) %{_sysconfdir}/yaboot.conf
%changelog
+* Mon Sep 26 2011 Tony Breeds <tony at bakeyournoodle.com> - 1.3.16-6
+- Add no-strict-aliasing to YBCFLAGS
+- Add detection for PowerVM Firmware.
+
* Wed Aug 31 2011 Tony Breeds <tony at bakeyournoodle.com> - 1.3.16-5
- yaboot-ppc64.patch incorrectly removed the -melfppc32linux from LDFLAGS. DOn't know why this hasn't been a problem 'til now.
More information about the scm-commits
mailing list