[yaboot] fixes #746408 - yaboot discards parameters after CAS reboot

Jiri Skala jskala at fedoraproject.org
Mon Oct 17 20:41:28 UTC 2011


commit 75645bf8d22bd921a293464ece7a236c6bc766a8
Author: Jiri Skala <jskala at redhat.com>
Date:   Mon Oct 17 22:41:24 2011 +0200

    fixes #746408 - yaboot discards parameters after CAS reboot

 yaboot-1.3.16-args-cas.patch |   32 ++++++++++++++++++++++++++++++++
 yaboot.spec                  |    9 ++++++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/yaboot-1.3.16-args-cas.patch b/yaboot-1.3.16-args-cas.patch
new file mode 100644
index 0000000..28ff872
--- /dev/null
+++ b/yaboot-1.3.16-args-cas.patch
@@ -0,0 +1,32 @@
+diff -up yaboot-1.3.16/second/yaboot.c.args-cas yaboot-1.3.16/second/yaboot.c
+--- yaboot-1.3.16/second/yaboot.c.args-cas	2011-10-17 21:56:53.728000031 +0200
++++ yaboot-1.3.16/second/yaboot.c	2011-10-17 21:56:53.731000031 +0200
+@@ -751,9 +751,10 @@ int get_params(struct boot_param_t* para
+ 	  if (!imagename) {
+ 	       if (bootoncelabel[0] != 0)
+ 		    imagename = bootoncelabel;
+-	       else if (bootlastlabel[0] != 0)
+-                         imagename = bootlastlabel;
+-               else
++	       else if (bootlastlabel[0] != 0) {
++		    imagename = bootlastlabel;
++		    word_split(&imagename, &params->args);
++	       } else
+ 		    imagename = cfg_get_default();
+ 	  }
+ 	  if (imagename)
+@@ -815,7 +816,13 @@ int get_params(struct boot_param_t* para
+ 	  imagename = cfg_get_default();
+ 
+      /* write the imagename out so it can be reused on reboot if necessary */
+-     prom_set_options("boot-last-label", imagename, strlen(imagename));
++     strcpy(bootlastlabel, imagename);
++     if (params->args && params->args[0]) {
++	  strcat(bootlastlabel, " ");
++	  strcat(bootlastlabel, params->args);
++     }
++     prom_set_options("boot-last-label", bootlastlabel,
++		      strlen(bootlastlabel) + 1);
+ 
+      label = 0;
+      defdevice = boot.dev;
diff --git a/yaboot.spec b/yaboot.spec
index d2b6ee5..d9315c2 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: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source: http://yaboot.ozlabs.org/releases/yaboot-%{version}.tar.gz
@@ -59,6 +59,9 @@ Patch46: yaboot-1.3.14-dhcp_truncate.patch
 Patch47: yaboot-1.3.16-no-strict-aliasing.patch
 Patch48: yaboot-1.3.16-powervm.patch
 
+# Yaboot discards parameters after CAS reboot
+Patch49: yaboot-1.3.16-args-cas.patch
+
 URL: http://yaboot.ozlabs.org/
 BuildRoot: %{_tmppath}/%{name}-root
 Obsoletes: ybin
@@ -113,6 +116,7 @@ yaboot can also bootload IBM pSeries machines.
 %patch46 -p1 -b .dhcppad
 %patch47 -p1 -b .aliasing
 %patch48 -p1 -b .powervm
+%patch49 -p1 -b .args-cas
 
 %build
 make VERSIONEXTRA='\ (Red Hat %version-%release)' DEBUG=1
@@ -153,6 +157,9 @@ rm -rf $RPM_BUILD_ROOT
 %ghost %config(noreplace) %{_sysconfdir}/yaboot.conf
 
 %changelog
+* Mon Oct 17 2011 Jiri Skala <jskala at redhat.com> - 1.3.16-7
+- fixes #746408 - yaboot discards parameters after CAS reboot
+
 * 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.


More information about the scm-commits mailing list