Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee5a6d7538 | ||
|
|
d9256fdd62 |
5 changed files with 131 additions and 1 deletions
17
yaboot-1.3.14-dhcp_truncate.patch
Normal file
17
yaboot-1.3.14-dhcp_truncate.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
diff -ru yaboot-1.3.16.orig/second/file.c yaboot-1.3.16/second/file.c
|
||||
--- yaboot-1.3.16.orig/second/file.c 2011-08-11 10:32:58.654006637 +1000
|
||||
+++ yaboot-1.3.16/second/file.c 2011-08-11 10:34:04.877846737 +1000
|
||||
@@ -223,7 +223,12 @@
|
||||
continue;
|
||||
|
||||
len = options[i++];
|
||||
- memcpy(&value, &options[i], len);
|
||||
+ /* Clamp the maxium length of the memcpy() to the right size for
|
||||
+ * value. */
|
||||
+ if (len > sizeof(value))
|
||||
+ memcpy(&value, &options[i], sizeof(value));
|
||||
+ else
|
||||
+ memcpy(&value, &options[i], len);
|
||||
|
||||
#if DEBUG
|
||||
{
|
||||
32
yaboot-1.3.16-args-cas.patch
Normal file
32
yaboot-1.3.16-args-cas.patch
Normal file
|
|
@ -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, ¶ms->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;
|
||||
11
yaboot-1.3.16-no-strict-aliasing.patch
Normal file
11
yaboot-1.3.16-no-strict-aliasing.patch
Normal file
|
|
@ -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
|
||||
40
yaboot-1.3.16-powervm.patch
Normal file
40
yaboot-1.3.16-powervm.patch
Normal file
|
|
@ -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
|
||||
32
yaboot.spec
32
yaboot.spec
|
|
@ -1,7 +1,7 @@
|
|||
Summary: Linux bootloader for Power Macintosh "New World" computers.
|
||||
Name: yaboot
|
||||
Version: 1.3.16
|
||||
Release: 3%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
Source: http://yaboot.ozlabs.org/releases/yaboot-%{version}.tar.gz
|
||||
|
|
@ -53,6 +53,15 @@ Patch44: yaboot-1.3.14-256-RMA.patch
|
|||
# Create dummy instance of posix_memalign for e3fsprogs
|
||||
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
|
||||
|
||||
# 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
|
||||
|
|
@ -63,6 +72,7 @@ ExclusiveArch: ppc
|
|||
%if 0%{?fedora} || 0%{?rhel} < 6
|
||||
Requires: hfsutils
|
||||
%endif
|
||||
BuildRequires: e2fsprogs-devel
|
||||
BuildRequires: e2fsprogs-static
|
||||
|
||||
# yaboot is bootloader. It contains ELF object, but it is not Linux or MacOS
|
||||
|
|
@ -104,6 +114,10 @@ yaboot can also bootload IBM pSeries machines.
|
|||
%patch43 -p1 -b .prom_getchars
|
||||
%patch44 -p1 -b .256-RMA
|
||||
%patch45 -p1 -b .posix
|
||||
%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
|
||||
|
|
@ -144,6 +158,22 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%ghost %config(noreplace) %{_sysconfdir}/yaboot.conf
|
||||
|
||||
%changelog
|
||||
* Wed Apr 17 2012 Tony Breeds <tony@bakeyournoodle.com> - 1.3.16-8
|
||||
- Add e2fsprogs-devel to the buildRequires.
|
||||
|
||||
* Mon Oct 17 2011 Jiri Skala <jskala@redhat.com> - 1.3.16-7
|
||||
- fixes #746408 - yaboot discards parameters after CAS reboot
|
||||
|
||||
* Mon Sep 26 2011 Tony Breeds <tony@bakeyournoodle.com> - 1.3.16-6
|
||||
- Add no-strict-aliasing to YBCFLAGS
|
||||
- Add detection for PowerVM Firmware.
|
||||
|
||||
* Wed Aug 31 2011 Tony Breeds <tony@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.
|
||||
|
||||
* Thu Aug 11 2011 Tony Breeds <tony@bakeyournoodle.com> - 1.3.16-4
|
||||
- truncate memcpy() extract_vendor_options() to avoid clobbering the stack. (closes 729684)
|
||||
|
||||
* Tue Apr 12 2011 Tony Breeds <tony@bakeyournoodle.com> - 1.3.16-3
|
||||
- Add fix for failing to link against posix_memalign() (closes 689415)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue