<html><body>
<p>Between the GA2 and GA3 firmware on IBM JS21 blades, a change was made that prevents yaboot from loading its configuration file over the network with the newer firmware.  The following patches fix the problem (with the exception of the scenario for booting across a router).  This has been tested on JS21 with GA3 firwmare, but not on JS21 with GA2 firmware or any other systems yet.<br>
<br>
--- prom.h        2007-08-05 09:14:27.000000000 -0400<br>
+++ prom.h~        2007-08-05 09:22:22.000000000 -0400<br>
@@ -154,8 +154,5 @@<br>
 struct bootp_packet * prom_get_netinfo (void);<br>
 char * prom_get_mac (struct bootp_packet * packet);<br>
 char * prom_get_ip (struct bootp_packet * packet);<br>
-char * prom_get_yiaddr (struct bootp_packet * packet);<br>
-char * prom_get_siaddr (struct bootp_packet * packet);<br>
-char * prom_get_giaddr (struct bootp_packet * packet);<br>
 <br>
 #endif<br>
<br>
--- prom.c        2007-08-05 09:24:17.000000000 -0400<br>
+++ prom.c~        2007-08-05 09:23:32.000000000 -0400<br>
@@ -752,6 +752,78 @@<br>
 }<br>
 <br>
 /*<br>
+ * prom_get_yiaddr()<br>
+ * returns the ip addr of the client in dotted decimal format<br>
+ */<br>
+char * prom_get_yiaddr (struct bootp_packet * packet)<br>
+{<br>
+     char * conf_path;<br>
+<br>
+     if (!packet)<br>
+        return NULL;<br>
+<br>
+     /* 15 chars in yiaddr + \0 */<br>
+     conf_path = malloc(16);<br>
+     if (!conf_path)<br>
+         return NULL;<br>
+     sprintf(conf_path, &quot;%d.%d.%d.%d&quot;,<br>
+         packet-&gt;yiaddr &gt;&gt; 24,<br>
+         (packet-&gt;yiaddr &lt;&lt; 8) &gt;&gt; 24,<br>
+         (packet-&gt;yiaddr &lt;&lt; 16) &gt;&gt; 24,<br>
+         (packet-&gt;yiaddr &lt;&lt; 24) &gt;&gt; 24);<br>
+<br>
+     return conf_path;<br>
+}<br>
+<br>
+/*<br>
+ * prom_get_siaddr()<br>
+ * returns the ip addr of the server in dotted decimal format<br>
+ */<br>
+char * prom_get_siaddr (struct bootp_packet * packet)<br>
+{<br>
+     char * conf_path;<br>
+<br>
+     if (!packet)<br>
+        return NULL;<br>
+<br>
+     /* 15 chars in siaddr + \0 */<br>
+     conf_path = malloc(16);<br>
+     if (!conf_path)<br>
+         return NULL;<br>
+     sprintf(conf_path, &quot;%d.%d.%d.%d&quot;,<br>
+         packet-&gt;siaddr &gt;&gt; 24,<br>
+         (packet-&gt;siaddr &lt;&lt; 8) &gt;&gt; 24,<br>
+         (packet-&gt;siaddr &lt;&lt; 16) &gt;&gt; 24,<br>
+         (packet-&gt;siaddr &lt;&lt; 24) &gt;&gt; 24);<br>
+<br>
+     return conf_path;<br>
+}<br>
+<br>
+/*<br>
+ * prom_get_giaddr()<br>
+ * returns the ip addr of the gateway in dotted decimal format<br>
+ */<br>
+char * prom_get_giaddr (struct bootp_packet * packet)<br>
+{<br>
+     char * conf_path;<br>
+<br>
+     if (!packet)<br>
+        return NULL;<br>
+<br>
+     /* 15 chars in giaddr + \0 */<br>
+     conf_path = malloc(16);<br>
+     if (!conf_path)<br>
+         return NULL;<br>
+     sprintf(conf_path, &quot;%d.%d.%d.%d&quot;,<br>
+         packet-&gt;giaddr &gt;&gt; 24,<br>
+         (packet-&gt;giaddr &lt;&lt; 8) &gt;&gt; 24,<br>
+         (packet-&gt;giaddr &lt;&lt; 16) &gt;&gt; 24,<br>
+         (packet-&gt;giaddr &lt;&lt; 24) &gt;&gt; 24);<br>
+<br>
+     return conf_path;<br>
+}<br>
+<br>
+/*<br>
  * Local variables:<br>
  * c-file-style: &quot;k&amp;r&quot;<br>
  * c-basic-offset: 5<br>
<br>
--- fs_of.c        2007-08-05 09:28:36.000000000 -0400<br>
+++ fs_of.c~        2007-08-05 09:27:35.000000000 -0400<br>
@@ -138,29 +138,18 @@<br>
      static char        buffer[1024];<br>
      char               *filename;<br>
      char               *p;<br>
-     struct bootp_packet *packet;<br>
 <br>
      DEBUG_ENTER;<br>
      DEBUG_OPEN;<br>
 <br>
-     packet = prom_get_netinfo();<br>
-<br>
      strncpy(buffer, dev_name, 768);<br>
      if (file_name &amp;&amp; strlen(file_name)) {<br>
-          strcat(buffer, prom_get_siaddr(packet));<br>
           strcat(buffer, &quot;,&quot;);<br>
           filename = strdup(file_name);<br>
           for (p = filename; *p; p++)<br>
                if (*p == '/')<br>
                     *p = '\\';<br>
           strcat(buffer, filename);<br>
-          strcat(buffer, &quot;,&quot;);<br>
-          strcat(buffer, prom_get_yiaddr(packet));<br>
-          strcat(buffer, &quot;,&quot;);<br>
-          /* Hack required since giaddr not returned on some systems<br>
-             and required to boot on those systems.  This should work<br>
-             for the client and server on the same subnet. */<br>
-          strcat(buffer, prom_get_siaddr(packet));<br>
           free(filename);<br>
      }<br>
 <br>
<br>
<br>
<i>(See attached file: prom.c.diff)</i><i>(See attached file: prom.h.diff)</i><i>(See attached file: fs_of.c.diff)</i><br>
<br>
<br>
Thanks,<br>
<br>
Andy Wray<br>
</body></html>