[PATCH] Fix netboot on POWER5
Anton Blanchard
anton at samba.org
Wed Oct 19 08:52:41 EST 2011
We weren't specifying any network parameters on POWER5 so firmware
would BOOTP for everything when we asked it to load a file. This fails
on a network without a local BOOTP server.
This patch fixes the issue by adding the parameters that the POWER5
tftp package understands. Thanks to Tony for the idea.
Signed-off-by: Anton Blanchard <anton at samba.org>
---
Index: yaboot/second/fs_of.c
===================================================================
--- yaboot.orig/second/fs_of.c 2011-10-19 08:46:20.711411958 +1100
+++ yaboot/second/fs_of.c 2011-10-19 08:46:26.503512279 +1100
@@ -168,18 +168,19 @@ of_net_open(struct boot_file_t* file,
new_tftp = (prom_finddevice("/packages/cas") != PROM_INVALID_HANDLE);
DEBUG_F("Using %s tftp style\n", (new_tftp? "new": "old"));
- if (new_tftp) {
- strcat(buffer, fspec->siaddr);
- strcat(buffer, ",");
+ strcat(buffer, fspec->siaddr);
+ strcat(buffer, ",");
- if (fspec->is_ipv6 && (strstr(filename, "filename=") == NULL))
- strcat(buffer, "filename=");
+ if (fspec->is_ipv6 && (strstr(filename, "filename=") == NULL))
+ strcat(buffer, "filename=");
- strcat(buffer, filename);
- strcat(buffer, ",");
- strcat(buffer, fspec->ciaddr);
- strcat(buffer, ",");
- strcat(buffer, fspec->giaddr);
+ strcat(buffer, filename);
+ strcat(buffer, ",");
+ strcat(buffer, fspec->ciaddr);
+ strcat(buffer, ",");
+ strcat(buffer, fspec->giaddr);
+
+ if (new_tftp) {
strcat(buffer, ",");
strcat(buffer, fspec->bootp_retries);
strcat(buffer, ",");
@@ -188,9 +189,6 @@ of_net_open(struct boot_file_t* file,
strcat(buffer, fspec->subnetmask);
strcat(buffer, ",");
strcat(buffer, fspec->addl_params);
- } else {
- strcat(buffer, ",");
- strcat(buffer, filename);
}
DEBUG_F("Opening: \"%s\"\n", buffer);
More information about the Yaboot-devel
mailing list