Subject: Re: Why is ofwboot.elf necessary?
To: Chris Tribo <email@example.com>
From: Michael Wolfson <firstname.lastname@example.org>
Date: 10/18/2000 14:25:48
At 1:28 PM -0400 10/18/00, Chris Tribo wrote:
:) OK, agreed. Um how? First we need an ofwboot.xcf that is compiled
:)at the right address. Can someone explain as to why it ofwboot.xcf is
:)compiled at 0x6c0000 when it should be 0x600000.
Well, I just went through a nice discussion with Bill Studenmund about this
very topic. From what he says, and from my own experiments, it seems that
ofwboot.xcf uses relative addressing. Meaning that as long as the default
value of load-base isn't used, ofwboot.xcf should work at almost any valid
load-base. Since System Disk defaults to load-base of 0x600000, and that's
the recommended installation tool this shouldn't be much of a problem.
Only people using OF 1 and 2, who don't use System Disk, who load
ofwboot.xcf explicitly from OF should have to manually set this.
:)There are also some larger hurdles to overcome, like mesh not
:)working right, not being able to load large kernels on older machines,
:)loads of OFW version/machine specific info, and making NetBSD happy with
:)HFS && HFS+
Again, from my own experiences, these problems are not related to the
load-base or even ofwboot.xcf. MESH seems to be a kernel problem (see
Monroe Williams' post today about how older kernels work fine). Large
kernels problems (>3 MB) are sidestepped by setting the real-base to a
non-default value (0xF00000 works fine). As to HFS and HFS+, neither
ofwboot.xcf or ofwboot.elf currently handles those filesystems, so we don't
lose out there by only using ofwboot.xcf.
The "loads of OFW version/machine specific info" is a big hassle. I've
been trying to make www.netbsd.org/Ports/macppc/models.html as thorough as
possible, but that depends on good info from users (I only have two models
at my disposal). I'm intending to include all that info in the INSTALL.*
docs sometime in the next week. Until we get BootX working on macppc, then
we'll have to deal with this issue on a machine-by-machine basis since we
need OF to load NetBSD.
:)> We can certainly have an ELF loader, but if all *current* OFW's support the
:)> XCOFF loader, focusing on XCOFF makes the booting instructions a bit
That was my thought when I posted the initial query. Open Firmware booting
is complex enough that I'd like to remove any complexity when possible
(such as distinguishing between ofwboot.xcf and ofwboot.elf).
:) What we also need is something like vax or i386 with a five second
Nah, you can always boot ofwboot.xcf with -a and it'll ask you for a
kernel. I'd rather the programmers work on things like getting ofwboot.*
to load a kernel from an HFS partition, install tools that can deal with
Apple-created partition maps, and automatic generation of a bootable CD
image for snapshots.
:)and the smarts to let boot disks span across multiple floppies.
Is that necessary for macppc? Only OF 1 and OF 2 machines have floppy
drives, and those machines don't ship with USB ports and can't boot from
USB hard drives anyways. The floppy kernel can be stripped of USB drivers,
shrinking its size substantially.
:)I think the ELF loader actually reads the load-base properly unlike the
:)XCOFF loader in early versions of OFW. Can OFW tftp boot ELF with v 3+?
Actually, OF 3 seems to load ofwboot.xcf without changing anything. The
default OF variables load ofwboot.xcf just fine. OF 3 can indeed tftpboot
ELF binaries. I haven't personally tried OF 3 tftp'ing ofwboot.xcf but I'd
be surprised if it didn't work.