Port-sparc64 archive

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

re: ofwboot versions and upgrading

On Tue, 4 Mar 2008, matthew green wrote:

>    ofwboot    kernel  status
>    3  3       works (my machine to be upgraded is fine)
>    4       4       works (another of my machines)
>    3       4       fails, kernel complains about bootinfo
>    4       3       ???
>    What I would like to know is:
>      If I put the netbsd-4 ofwboot in place on my netbsd-3 system, can I
>      still boot the netbsd-3 kernel (netbsd.ok) if I need to?

In theory it should work.  The original pmap startup code was designed
not to depend on any particutlar bootloader so you could load the kernel
using Solaris ufsboot for instance.  To do so it would check to see if
it was properly aligned at 4MB physical page boundaries so it could
map itself with 4MB locked TLB entries.  If it wasn't, it would try to
relocate itself, and on certain versions of OBP that operation might
sometimes fail.  In the new scheme, that's all been moved into ofwboot,
so the kernel can no longer be loaded from ufsboot.

> this should work.  you can put ofwboot in as a different name as
> boot that instead of the default.  something like this:
> ok> boot ofwboot.new netbsd.new
> works iirc.

Hm.  The bootblock is coded to always load a file called "/ofwboot".
In this case, ofwboot is probably loading ofwboot.new which is loading
netbsd.new.  Specifying either the "-d" or "-D" option (I forget
which) will cause the bootblock to be evaluated without loading and
executing the second stage bootloader.  You can then complete the 
bootload process with any path you want to specify by calling 
do-boot directly, including "netbsd", although only -3 or earlier 
kernels have any chance of working that way.

The reason we used ofwboot originally was to provide a user friendly
way to specify alternate kernels and because I never trusted the
bootblock's path traversal code.


Home | Main Index | Thread Index | Old Index