Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Netbooting mac mini g4



On Wed, Jun 20, 2018 at 17:37:08 +0000, Christos Zoulas wrote:

> In article <20180611013320.GC15651%pony.stderr.spb.ru@localhost>,
> Valery Ushakov  <uwe%stderr.spb.ru@localhost> wrote:
> 
> > I've finally got around to investigate how to netboot mac mini g4 as I
> > promised Christos (quite) a while ago.
> 
> Thanks uwe, I have this working now. I can't get autoboot to work with
> netboot, but I have not debugged it yet.

Autoboot works for me with boot-device set to enet:0

Make sure you use ofwboot.elf, as my example does, not ofwboot.xcf (as
you seem to specify explicitely).  You might be running into
port-macppc/44895 here.

Also make sure boot-command is set to

  ." hello" cr " screen" output boot

to make sure it boots ok even without monitor attached.

(Actually, if I change boot to mac-boot in the above (and with my
normal boot-device set to boot from the disk) I can even press N to
force it to netboot netbsd :)


You can also speed my previous example up with:

  # Implement dummy BSDP interaction to keep OFW happy
  class "Apple-BSDP" {
    match if substring (option vendor-class-identifier, 0, 10) = "AAPLBSDPC/";

    option vendor-class-identifier "AAPLBSDPC";
    vendor-option-space BSDP;
    parse-vendor-option;

    # Provide empty BSDP LIST if asked or in response to DHCP DISCOVER
    if (option BSDP.message-type = 1 or option dhcp-message-type = 1) {
      log(info, "BSDP LIST");
      option BSDP.message-type 1;
      option BSDP.server-identifier = config-option dhcp-server-identifier;
      option BSDP.server-priority 32768;
    }

    # Just ack SELECT if asked or in response to DHCP REQUEST
    elsif (option BSDP.message-type = 2 or option dhcp-message-type = 3) {
      log(info, "BSDP SELECT");
      option BSDP.message-type 2;
    }
  }

OFW sends BSDP LIST in DISCOVER, so if we reply to that we save a
separate INFORM[LIST] request from it.  I was hoping that if we reply
with BSDP SELECT to REQUEST (that doesn't have any BSDP opinions) we
will also save INFORM[SELECT], but OFW still sends one.  May be it
doesn't consider empty SELECT in ACK convincing enough.

Still, it save a lot of time, b/c OFW seems to send BSDP INFORMs after
a long delay - it looks almost as if it's still doing exponential
backoff, with ~5s and ~8s delay before those INFORMs.  So getting rid
of one of them shaves off about 16s - remember that we do the whole
song and dance two times, one for OFW to get ofwboot.elf, the other
for ofwboot.elf to get the kernel.

-uwe


Home | Main Index | Thread Index | Old Index