rpms/yaboot/devel yaboot-1.3.14-ipv6.patch, NONE, 1.1 yaboot.spec, 1.64, 1.65
Roman Rakus
rrakus at fedoraproject.org
Fri Aug 14 13:55:37 UTC 2009
Author: rrakus
Update of /cvs/extras/rpms/yaboot/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15298
Modified Files:
yaboot.spec
Added Files:
yaboot-1.3.14-ipv6.patch
Log Message:
ipv6 support, don't do debuginfo rpm
yaboot-1.3.14-ipv6.patch:
include/file.h | 5 +++++
include/prom.h | 1 +
second/file.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
second/fs_of.c | 8 ++++++--
4 files changed, 64 insertions(+), 3 deletions(-)
--- NEW FILE yaboot-1.3.14-ipv6.patch ---
diff -up yaboot-1.3.14/include/file.h.ipv6_4 yaboot-1.3.14/include/file.h
--- yaboot-1.3.14/include/file.h.ipv6_4 2009-08-14 13:48:47.000000000 +0200
+++ yaboot-1.3.14/include/file.h 2009-08-14 13:48:47.000000000 +0200
@@ -46,6 +46,11 @@ struct boot_fspec_t {
char* bootp_retries; /* Bootp retries */
char* tftp_retries; /* TFTP retries */
char* addl_params; /* copy all additional parameters */
+
+ /* Following fields are used only in ipv6 format */
+ int is_ipv6; /* is ipv6 specified ? */
+ char* dhcpv6; /* dhcpv6 string */
+ char* blksize; /* blksize string */
};
struct boot_file_t {
diff -up yaboot-1.3.14/include/prom.h.ipv6_4 yaboot-1.3.14/include/prom.h
--- yaboot-1.3.14/include/prom.h.ipv6_4 2008-04-15 15:34:48.000000000 +0200
+++ yaboot-1.3.14/include/prom.h 2009-08-14 14:37:25.000000000 +0200
@@ -37,6 +37,7 @@ typedef void *phandle;
#define PROM_INVALID_HANDLE ((prom_handle)-1UL)
#define BOOTDEVSZ (2048) /* iscsi args can be in excess of 1040 bytes */
#define TOK_ISCSI "iscsi"
+#define TOK_IPV6 "ipv6"
#define PROM_CLAIM_MAX_ADDR 0x8000000
#define BOOTLASTSZ 1024
#define FW_NBR_REBOOTSZ 4
diff -up yaboot-1.3.14/second/file.c.ipv6_4 yaboot-1.3.14/second/file.c
--- yaboot-1.3.14/second/file.c.ipv6_4 2009-08-14 13:48:47.000000000 +0200
+++ yaboot-1.3.14/second/file.c 2009-08-14 14:44:37.000000000 +0200
@@ -193,6 +193,50 @@ extract_netinfo_args(struct boot_fspec_t
}
/*
+ * Extract all the ipv6 arguments from the bootpath provided and fill result
+ * Syntax: ipv6,[dhcpv6[=diaddr,]]ciaddr=c_iaddr,giaddr=g_iaddr,siaddr=s_iaddr,
+ * filename=file_name,tftp-retries=tftp_retries,blksize=block_size
+ * Returns 1 on success, 0 on failure.
+ */
+static int
+extract_ipv6_args(char *imagepath, struct boot_fspec_t *result)
+{
+ char *str, *tmp;
+ int total_len;
+
+ result->is_ipv6 = 1;
+
+ /* Just allocate the max required size */
+ total_len = strlen(imagepath) + 1;
+ str = malloc(total_len);
+ if (!str)
+ return 0;
+
+ if ((tmp = strstr(imagepath, "dhcpv6=")) != NULL)
+ result->dhcpv6 = scopy(&str, &tmp);
+
+ if ((tmp = strstr(imagepath, "ciaddr=")) != NULL)
+ result->ciaddr = scopy(&str, &tmp);
+
+ if ((tmp = strstr(imagepath, "giaddr=")) != NULL)
+ result->giaddr = scopy(&str, &tmp);
+
+ if ((tmp = strstr(imagepath, "siaddr=")) != NULL)
+ result->siaddr = scopy(&str, &tmp);
+
+ if ((tmp = strstr(imagepath, "filename=")) != NULL)
+ result->file = scopy(&str, &tmp);
+
+ if ((tmp = strstr(imagepath, "tftp-retries=")) != NULL)
+ result->tftp_retries = scopy(&str, &tmp);
+
+ if ((tmp = strstr(imagepath, "blksize=")) != NULL)
+ result->blksize = scopy(&str, &tmp);
+
+ return 1;
+}
+
+/*
* Extract all the arguments provided in the imagepath and fill it in result.
* Returns 1 on success, 0 on failure.
*/
@@ -206,9 +250,14 @@ extract_netboot_args(char *imagepath, st
if (!imagepath)
return 1;
- ret = extract_ipv4_args(imagepath, result);
+ if (strstr(imagepath, TOK_IPV6))
+ ret = extract_ipv6_args(imagepath, result);
+ else
+ ret = extract_ipv4_args(imagepath, result);
+
ret |= extract_netinfo_args(result);
+ DEBUG_F("ipv6 = <%d>\n", result->is_ipv6);
DEBUG_F("siaddr = <%s>\n", result->siaddr);
DEBUG_F("file = <%s>\n", result->file);
DEBUG_F("ciaddr = <%s>\n", result->ciaddr);
@@ -216,6 +265,8 @@ extract_netboot_args(char *imagepath, st
DEBUG_F("bootp_retries = <%s>\n", result->bootp_retries);
DEBUG_F("tftp_retries = <%s>\n", result->tftp_retries);
DEBUG_F("addl_params = <%s>\n", result->addl_params);
+ DEBUG_F("dhcpv6 = <%s>\n", result->dhcpv6);
+ DEBUG_F("blksize = <%s>\n", result->blksize);
return ret;
}
diff -up yaboot-1.3.14/second/fs_of.c.ipv6_4 yaboot-1.3.14/second/fs_of.c
--- yaboot-1.3.14/second/fs_of.c.ipv6_4 2009-08-14 13:48:47.000000000 +0200
+++ yaboot-1.3.14/second/fs_of.c 2009-08-14 14:47:18.000000000 +0200
@@ -148,14 +148,18 @@ of_net_open(struct boot_file_t* file,
*p = '\\';
}
- DEBUG_F("siaddr <%s>; filename <%s>; ciaddr <%s>; giaddr <%s>;\n",
- fspec->siaddr, filename, fspec->ciaddr, fspec->giaddr);
+ DEBUG_F("siaddr <%s>; filename <%s>; ciaddr <%s>; giaddr <%s>; ipv6 <%d>\n",
+ fspec->siaddr, filename, fspec->ciaddr, fspec->giaddr, fspec->is_ipv6);
strncpy(buffer, fspec->dev, 768);
+ if (fspec->is_ipv6)
+ strcat(buffer, TOK_IPV6 ",");
/* If we didn't get a ':' include one */
if (fspec->dev[strlen(fspec->dev)-1] != ':')
strcat(buffer, ":");
strcat(buffer, fspec->siaddr);
strcat(buffer, ",");
+ if (fspec->is_ipv6 && (strstr(filename, "filename=") == NULL))
+ strcat(buffer, "filename=");
strcat(buffer, filename);
strcat(buffer, ",");
strcat(buffer, fspec->ciaddr);
Index: yaboot.spec
===================================================================
RCS file: /cvs/extras/rpms/yaboot/devel/yaboot.spec,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -p -r1.64 -r1.65
--- yaboot.spec 7 Aug 2009 20:27:51 -0000 1.64
+++ yaboot.spec 14 Aug 2009 13:55:37 -0000 1.65
@@ -1,7 +1,7 @@
Summary: Linux bootloader for Power Macintosh "New World" computers.
Name: yaboot
Version: 1.3.14
-Release: 16%{?dist}
+Release: 17%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: http://yaboot.ozlabs.org/releases/yaboot-%{version}.tar.gz
@@ -31,6 +31,9 @@ Patch34: yaboot-1.3.14-no-birecs.patch
# mkofboot in verbose mode returns bad value
Patch35: yaboot-1.3.14-returns.patch
+# ipv6 support
+Patch36: yaboot-1.3.14-ipv6.patch
+
URL: http://yaboot.ozlabs.org/
BuildRoot: %{_tmppath}/%{name}-root
Obsoletes: ybin
@@ -38,6 +41,11 @@ ExclusiveArch: ppc
Requires: hfsutils
BuildRequires: e2fsprogs-devel
+# yaboot is bootloader. It contains ELF object, but it is not Linux or MacOS
+# executable file. Yaboot is meant to be executed only by OpenFirmware.
+# So debuginfo rpm is nonsense
+%global debug_package %{nil}
+
%description
yaboot is a bootloader for PowerPC machines which works on New World ROM
machines (Rev. A iMac and newer) and runs directly from Open Firmware,
@@ -68,6 +76,7 @@ yaboot can also bootload IBM pSeries mac
%patch33 -p1 -b .netboot
%patch34 -p1 -b .birecs
%patch35 -p1 -b .returns
+%patch36 -p1 -b .ipv6
%build
make VERSIONEXTRA='\ (Red Hat %version-%release)'
@@ -103,6 +112,10 @@ rm -rf $RPM_BUILD_ROOT
%ghost %config(noreplace) %{_sysconfdir}/yaboot.conf
%changelog
+* Fri Aug 14 2009 Roman Rakus <rrakus at redhat.com> - 1.3.14-17
+- ipv6 support
+- don't build debuginfo package
+
* Fri Aug 07 2009 Bill Nottingham <notting at redhat.com> - 1.3.14-16
- fix patch file for (#515555)
More information about the fedora-extras-commits
mailing list