$NetBSD: FBInstall,v 1.1 2006/07/23 13:33:53 bjh21 Exp $

Note of FastBoot/AutoBoot Installation for !BtNetBSD V0.90
based on !BtRiscBSD

Updated by Reinoud Zandijk 18 Feb 2001
Author: Mark Brinicombe 12th May 1995
Updated: 20th June 1997

Installation
------------

Two patches are required to the standard boot files

The following lines should be added to the start of
!Boot.Choices.Boot.PreDesktop

----------------------- Cut here -----------------------

|Start NetBSD !Boot FastBoot
Run <Obey$Dir>.^.^.^.BtNetBSD.!BtNetBSD.!Boot
Run <BtNetBSD$Dir>.TestBoot
If "<NetBSD$FastBoot>" = "1" THEN Echo NetBSD FastBoot mode engaged
If "<NetBSD$FastBoot>" = "2" THEN Echo NetBSD ConfBoot mode engaged
If "<NetBSD$FastBoot>" = "3" THEN Echo NetBSD AutoBoot mode engaged
If "<NetBSD$FastBoot>" = "4" THEN Echo NetBSD FastConf mode engaged
|End

----------------------- Cut here -----------------------

These commands should be the first one run in the PreDesktop
file. They boot the boot loader application (primarily to set
BtNetBSD$Dir). The file <BtNetBSD$Dir>.TestBoot is then run
to test for the ALT or CTRL keys are being held down. In addition
it checks several CMOS RAM bits for boot configuration options.

The following lines should be added to the start of
!Boot.Choices.Boot.Desktop

----------------------- Cut here -----------------------

|Start NetBSD !Boot FastBoot
Iconsprites <BtNetBSD$Dir>.!Sprites22
If <NetBSD$FastBoot> = 4 THEN Run <BtNetBSD$Dir>.!Edit
If <NetBSD$FastBoot> > 0 AND <NetBSD$FastBoot> < 4 THEN Obey <BtNetBSD$Dir>.fastboot
|End

----------------------- Cut here -----------------------

This command should be the first one run in the Desktop file.
It runs the NetBSD Bootloader with the configured parameters.


There is a specific reason for not putting all the fastboot code in
one file. The PreDesktop patch is run very early in the boot up so
that the ALT and CTRL keys can be detected quickly. However, currently
the actually bootloader cannot be run at this point unless a lot of
memory is available in the module area (~1Meg) as currently the
module area is used for temporary storage of the kernel being
booted. 
This means that the actual boot is prosponed until the start of
the Desktop file. At this point the desktop has been started and
the task manager is running so it will be possible to allocate
a large amount of module space.


Activation
----------

Once installed, to engage the fastboot hold ALT down immediately
after a reset. As soon as the "fastboot engaged" message is printed
the ALT key can be released.
To engage the fastconf mode  hold CTRL down immediately
after a reset. As soon as the "fastconf engaged" message is printed
the CTRL key can be released.


Configuration
-------------

Configuration is done via the !BtNetBSD application.
When ever NetBSD is booted the commandline used to boot it is saved
by the bootloader to the file <BtNetBSD$Dir>.FastBoot
Rerunning this file will then boot NetBSD with the last parameters
used. It is this file that the fastboot uses so the fast boot will
boot NetBSD with the same parameters as were used for the last boot.


ConfBoot mode
-------------

This mode is identified by NetBSD$FastBoot being set to 2. This indicates
that the bootloader has been configured to always boot NetBSD. This is
down by setting a bit in the CMOS RAM (via !BtNetBSD).
If NetBSD boots are configured the action of the ALT is reversed so that
holding down ALT will allow a RISC OS boot instead.


AutoBoot mode
-------------

This mode is identified by NetBSD$FastBoot being set to 3. This indicates
that an automatic boot was requested by NetBSD before it rebooted. This
will happen when /sbin/reboot is used instead of /sbin/halt.


FastBoot mode
-------------

This is the behaviour when ALT is held down at boot time and ConfBoot mode
has not been configured. It just bypasses most of the normal startup and
boots NetBSD.


FastConf mode
-------------

This is the behaviour when CTRL is held down at boot time. This is similar to
FastBoot mode except that the !BtNetBSD is provided to allow boot parameters
to be changed.


Bugs
----

Well hopefully there are no bugs :-)
