[PATCH 1/2] support netbooting on JS21 GA3 and older firmwares

Scott Moser ssmoser at us.ibm.com
Mon Oct 8 23:54:18 EST 2007


On Fri, 5 Oct 2007, Doug Maxey wrote:

> 
> On Fri, 05 Oct 2007 11:07:10 EDT, Scott Moser wrote:
> > The patch below was originally submitted by Andrew Wray under subject
> > "Patch to allow netbooting with IBM JS21 GA3 firmware" [1].
> >
> > I'm re-submitting it with the following description.
> >
> >   modify of_net_open to add support for recent power openfirmware
> >   implementations.  This includes JS21 ("GA3" level), JS22, and power6
> >   hardware.  Newer firmware differs on how the following "load" command is
> >   handled
> >      <device>:,<file>
> >    Previous versions would do a bootp request to get the TCP/IP information
> >   and then tftp the my_file from the returned siaddr.
> 
> This has never been true for IBM boxen, nothing new here.  Have you tested
> any of this with the older apples that support yaboot?

I have not tested with older apples.  I don't have access to any.
However, the second part of this patch that I posted keeps the old
behavior for older systems.

I guess I probably should have phrased that differently.  On older
systems:
   <device>:,file
resulted in 'file' being loaded from the bootp server (or, 'next-server'
if applicable).  This is the behavior that yaboot 1.3.14 relies on. In
newer systems:
   <device>:,file
results in a bootp request being done, and loading of whatever file is
present in the bootp response (not 'file').  The result, for most cases
in yaboot boot, is that when yaboot tries to load its config file, it
receives a yaboot binary.

> >     These changes break yaboot's of_net_open on networks where the bootp
> >   server is not the same system as the tftp server.  This is implemented
> >   by dhcpd's 'next-server' keyword.
> 
> This is a limitation of IBM OFW.

IBM's OFW does support 'next-server'.  The setup I have here has a dhcpd
server that accepts all bootp requests and, for known ppc machines, has
a 'next-server' entry pointing to another system.  Old and new systems
can load the 'filename' that is returned in the bootp response from the
'next server'.  The following dhcpd configuration will work fine on
older hardware.  

group ppc {
  next-server tftp-server-host.somedomain.tld;
  host ppc-client {
    hardware ethernet 00:11:25:C0:25:E9;
    filename "yaboot";
  }
}

   Above, the host 'tftp-server-host' needs only to run a tftp server.
   ppc-client needs only to be configured via SMS menu for bootp
booting.
   With newer firmwares (GA3 on JS21), this configuration stops working,
as yaboot's attempt to get the config file with:
'<device>:,config-filename' returns the 'yaboot' file again.

> > This is because the older firmwares were
> >   really not capable of doing a tftp load.  Ie, the 'boot' command line:
> >     <device>:<siaddr>,<file>,<ciaddr>
> >     requires that <siaddr> to be running a bootp server, not simply a tftp
> >   server.  The above syntax works correctly with new firmwares.
> 
> That is incorrect.  You have always had the ability to specify the
> tftp server from the OFW command line.

I'm confused as to what you're saying here.  The following definitely
does not work for me on older firmware, but do work on GA3 firmware.
The following is form a JS20:

0 > boot
/pci at 8000000f8000000/pci at 0/ethernet at 1,1:192.168.79.239,yaboot,192.168.76.251,192.168.79.254
BOOTP: chosen-network-type = ethernet,auto,none,auto
BOOTP: server   IP =        192.168.79.239
BOOTP: requested filename = yaboot
BOOTP: client   IP =        192.168.76.251
BOOTP: client   HW addr =   0 d 60 1e e0 9b
BOOTP: gateway  IP =        192.168.79.254
BOOTP: device    /pci at 8000000f8000000/pci at 0/ethernet at 1,1
BOOTP: loc-code  U8842.4TX.23GLF8K-P1-T7

icmp 3 : port unreachable
ERROR: icmp 3
BOOTP: BOOTP request fail: 0
<snip>
BOOTP ERROR: BOOTP request failed, QUIT

However, if I run a dhcpd server on 192.168.69.239, with the following
stanza, things start working:

group ppc {
   filename "/ppc/yaboot";
   allow bootp;
   host ibm-js20-05 {
      hardware ethernet 00:0d:60:1e:e0:9b;
      fixed-address ibm-js20-05.domain.com;
   }
}

That is what brought me to the conclusion that older firmwares do not
support pure tftp load, but require a bootp server running.  Similar
boot commands work without the tftp server on GA3 firmware for JS21.

> >   At the moment we do not expect firmware to change in the future.
> 
> I strongly disagree with that statement.  Not only will it change, but
> we (being linux) may have little or no say in how or when.  The best
> we can hope for is that some documentation will be provided on a
> timely basis.  The effort is still proceeding at a glacial pace to get
> the documentation out on the new IBM OFW network stack that supports
> iSCSI booting.  Thats going on 18 months now.

I also disagree with my statement above as you read it (and as I wrote
it).  What I intended to say was :
   at the moment we do not expect firmware to return to the behavior of
   older firmware's where a request like '<device>:,filename' would load
   filename.

Ie, we don't expect firmware to change in a way that would make yaboot
1.3.14 work again.  Thus, we need some changes to yaboot so it continues
to function as a network bootloader on these newer firmwares.

> More comments inline.

The changes you suggested are reasonable and I can certainly make them
and resubmit.

Sorry I wasn't as clear as I could have been with my original post.




More information about the Yaboot-devel mailing list