Commit Graph

114 Commits

Author SHA1 Message Date
peter
a46f7a757e Install the bootforth config files for the Alpha too. loader.conf should
be functional now.
2000-05-12 23:22:09 +00:00
peter
45dbbb5f11 Reactivate the FICL hooks to make it be compiled in, but also initialize
FICL.  bootforth is now live on the Alpha!

**BEWARE** - you *MUST* build and install a current libstand or you will
most likely get zfree() panics at loader startup.

We should now be able to set up the loader.conf stuff on the Alpha too.
2000-05-12 22:45:16 +00:00
peter
61b8303d8e Fix the Alpha loader the rest of the way. If FICL is present in
/boot/loader (even though it is 100% dormant in the Alpha version),
then the loader panics with a zfree error:Loading /boot/loader.test
  *** keyboard not plugged in...
  Console: SRM firmware console
  panic: zfree(0x2003cb58,4096): wild pointer
versus the exact same code but without FICL linked in:
  Loading /boot/loader
  Console: SRM firmware console
  VMS PAL rev: 0x1000600010114
  OSF PAL rev: 0x1000600020116
  Switch to OSF PAL code succeeded.

  FreeBSD/alpha SRM disk boot, Revision 0.1

This is almost certainly an alpha infrastructure bug, not a FICL
problem.  It's probably the same thing that made FICL fail for no
apparent reason on the Alpha.
2000-05-12 07:47:47 +00:00
msmith
2f8fca31c2 Teach the alpha loader install process to make backup copies of the
boot programs when installing new versions.
2000-05-06 18:31:26 +00:00
peter
81103ba0e4 Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
bp
93440aad9b Update loader logic to distinguish modules vs. files.
Add support for module metadata. The old way of dependancy
handling will be supported for a while.

Reviewed by:	peter
2000-05-01 17:41:25 +00:00
jlemon
0bc1a09423 Teach the loader about the ext2fs filesystem, extended partitions, and
the new readdir function.
2000-04-29 20:49:33 +00:00
dcs
ae1fd9c262 Pass unit number to bcache_strategy(), so that the cache can be
flushed if the unit changes. Compute the absolute offset before
bcache_strategy() instead of after.

The actual fix is sligthly different for the one in the PR.

PR:		17098
Submitted by:	John Hood <jhood@sitaranetworks.com>
2000-03-15 01:53:34 +00:00
peter
5ba368763d Connect up the bootforth glue and compile it, but don't initialize it
at runtime as it has a nasty habit of crashing on the Alpha :-(.
This is being done this way so we have a common starting point for
debugging.
1999-12-27 09:20:33 +00:00
marcel
8f2f26ff55 Don't build gensetdefs when we can use /usr/bin/gensetdefs. The latter
also creates setdef{0|1}.c so there's no need to have those in the
repository. Using /usr/bin/gensetdefs has no consequences for the
output.
1999-12-16 17:25:01 +00:00
marcel
b17eb5ce7c Add -L${DESTDIR}${LIBDIR} to ld's command line so that the right
libstand is used.
1999-12-15 18:16:56 +00:00
phk
cb4ec6e79f Remove BAD144 support, it has already been disabled for some time. 1999-12-08 09:33:00 +00:00
dfr
d16d0cbc09 Add back netboot since it compiles just fine. Note that you need a full
source tree to build netboot since it depends on headers from libstand.
1999-11-03 20:19:30 +00:00
dfr
fd6512f0f3 * Don't wait forever for the boot2 filename if the PCC wraps.
* If the user presses return, load boot2 immediately.
1999-11-03 20:18:12 +00:00
dfr
f2070d171b Allow this driver to open disks with no labels (CDROMS don't). 1999-10-12 20:04:46 +00:00
dfr
d2308f5b2f Fix build break.
Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu>
1999-10-09 12:30:18 +00:00
dfr
d0b3e151f4 Add net device to netboot. 1999-10-09 12:29:42 +00:00
mjacob
f5811d12ad netboot removed until somebody fixes it so it compiles 1999-09-09 01:28:26 +00:00
msmith
b1b1b015f6 Add more missing files from the reorganisation.
Submitted by:	dfr
1999-09-07 09:08:09 +00:00
dfr
5ef89c9209 Change NetBSD/Alpha to FreeBSD/alpha. 1999-09-06 18:32:40 +00:00
msmith
2564d1573e Common Alpha loader Makefile, omitted accidentally from the previous set
of commits.
1999-09-06 08:38:10 +00:00
peter
225758a297 $Id$ -> $FreeBSD$ 1999-09-05 15:21:05 +00:00
msmith
1457023606 Slight reorganisation of the Alpha/SRM loader build:
- Make as much of the makefile for each of the three flavours
   (disk, CDROM, net) common.
 - Special-case the libalpha startup module on its use in boot1, not
   the other way around.
 - Build the loader out of a "loader" directory

Reviewed by:	mjacob, dfr
1999-09-03 19:42:18 +00:00
dfr
1f0c51c0e4 Change $Id$ to $FreeBSD$ 1999-09-01 09:38:21 +00:00
dfr
70e65e7344 * Fix a stack of warnings.
* Make it possible to type a filename to boot1 so that it is possible to
  recover from fatally broken versions of /boot/loader.
* Make a start at a CD boot program (not yet functional).
1999-09-01 09:11:14 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
jdp
12d95a9af7 Append the flags from the "boot" command to those which came from
the SRM environment.  This makes the traditional "boot [/kernel] -s"
and similar things work on the Alpha.  Since the flags are appended,
they augment and/or override those from the SRM environment.
1999-08-14 17:06:11 +00:00
msmith
a5862823bf Walk around the end of all the silly guessing of device types and unit
numbers that we have been doing in the past, and read /etc/fstab off the
proposed root filesystem to determine the actual device name and vfs
type for the root filesystem.  These are then exported to the kernel
via the environment variable vfs.root.mountfrom.
1999-07-21 00:08:54 +00:00
peter
51e973cbfb Fix typo (wrong path) 1999-06-29 21:40:05 +00:00
peter
811ab8f8e7 Reconcile all the loader newvers.sh's into one common one. 1999-06-29 21:23:26 +00:00
peter
c857e3b02c Don't use head/tail - they don't exist in a 'make world' environment.
(Why do we have three copies of this script anyway?)
1999-06-29 21:06:16 +00:00
dcs
152fc09cc5 Minor nit. It is probably still incorrect, but at least don't
claim to use i386-specific files on alpha...
1999-04-24 18:05:45 +00:00
peter
dc1b9002a0 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
dcs
b2e52f1a24 Revert bootinfo to 1.4 and use a different solution to NULL m_args
instead (don't copy).
1999-03-20 14:13:09 +00:00
dfr
f25890bcd7 Don't choke in MOD_ARGS() if mp->m_args is NULL. 1999-03-18 11:00:48 +00:00
dcs
f97128dce1 Add MODINFO_ARGS, parameters passed to a module at load time.
VS: ----------------------------------------------------------------------
1999-03-08 11:05:52 +00:00
msmith
843f30ead3 Transition from using Perl to using awk for our text-manipulation
needs.  This removes the dependancy on Perl for the generation of the
loader, allowing the world to be built on a perl-free system.

Submitted by:	Joe Abley <jabley@clear.co.nz>
1999-01-18 19:05:27 +00:00
msmith
4ef3c7f8c9 Alpha-specific help topics (currently empty) 1999-01-05 20:44:26 +00:00
msmith
87a6ba93eb Add dependancy to build loader.help here 1999-01-04 01:28:39 +00:00
msmith
903057bda7 First cut at generating loader.help for the alpha 1999-01-03 20:54:05 +00:00
jkh
cfed369515 Update for new boot block location. 1999-01-02 23:22:12 +00:00
msmith
d0ca1a94ef unlocalise build date (merge from i386) 1998-12-15 04:27:15 +00:00
msmith
c2a6784bfe Include "bootstrap.h" to get a definition for bcache_devdata.
Submitted by:	jkh
1998-11-03 23:44:49 +00:00
msmith
c327eb0fef Implement a simple LRU block cache. By default this is initialised to 16k,
and will bypass transfers for more than 8k.  Blocks are invalidated after
2 seconds, so removable media should not confuse the cache.

The 8k threshold is a compromise; all UFS transfers performed by
libstand are 8k or less, so large file reads thrash the cache.
However many filesystem metadata operations are also performed using
8k blocks, so using a lower threshold gives poor performance.

Those of you with an eye for cache algorithms are welcome to tell me
how badly this one sucks; you can start with the 'bcachestats' command
which will print the contents of the cache and access statistics.
1998-11-02 23:28:11 +00:00
dfr
41877e8077 * Extend the memory available for the heap from 256k to 512k.
* Embed the stack into the bss section for loader and netboot.  This
  is required for netboot since otherwise the stack would be inside our
  heap.
* Install loader and netboot in /boot by default.
* Fix getbootfile so that it searches for a ',' instead of a ';'
  when terminating the filename.
1998-10-31 17:12:32 +00:00
msmith
91b60ace68 Reserve some space for the stack in the region we recover from the initial
bootloader.
Submitted by:	dfr
1998-10-24 00:31:21 +00:00
msmith
6f08be8db4 Hex constants should only have one '0x' prefix. 1998-10-20 02:43:28 +00:00
dfr
03f6d9b1cb Reclaim the 48k used by the first bootstrap stage by adding it to the malloc
pool.
1998-10-19 09:12:41 +00:00
dfr
f503adff97 Rename boot2 to loader. 1998-10-18 19:05:07 +00:00
msmith
22f4a3969b Turn of disk debugging by default (suppress annoying "partition marked as
unused" diagnostic on floppies).
1998-10-16 19:26:11 +00:00
dfr
33e5d299f4 Fix the bootinfo so that the right values actual make it into the kernel. 1998-10-15 21:55:58 +00:00
peter
f097fdfe42 Get the last used address via a more conservative method, don't depend
on the module chain being in increasing address order.
1998-10-15 17:06:36 +00:00
peter
0dc355d0f8 Link fdboot to boot1 as well. 1998-10-14 13:19:52 +00:00
peter
302851db1d Initial attempt to update the Alpha loader and kernel to use the machine
independent elf loader and have access to kld modules.  Jordan and I were
not sure how to create boot floppies, and the things we tried just made
SRM laugh in our faces - but it was upset at boot1 which was not touched
by these changes.  Essentially this has been untested. :-(

What this does is to steal the last three slots from the nine spare longs
in the bootinfo_v1 struct to pass the module base pointer through.

The startup code now to set up and fills in the module and environment
structures, hopefully close enough to the i386 layout to be able to use
the same kernel code.  We now pass though the updated end of the kernel
space used, rather than _end. (like the i386).

If this does not work, it needs to be beaten into shape pronto.  Otherwise
it should be backed out before 3.0.

Pre-approved in principle by: dfr
1998-10-14 09:53:25 +00:00
dima
25c3d9a59e add <sys/linker.h> 1998-10-11 03:53:35 +00:00
msmith
97fbf82882 VERBOSE_LS is obsolete 1998-10-07 02:33:01 +00:00
dfr
ab1335b0cf * Add old UFS compatibility code to alpha/boot1.
* Fix a raft of warnings, printf and otherwise.
* Allocate the correct amount in mod_searchmodule to prevent an overflow.
* Fix the makefiles so they work outside my home directory (oops).
1998-09-26 10:51:38 +00:00
dfr
4d45744ed8 Make the alpha bootstrap build again, fix some warning and change sdboot to daboot. 1998-09-20 21:46:19 +00:00
msmith
dbbd5b9f25 Initial integration of the i386 bootloader and BTX.
- Discard large amounts of BIOS-related code in favour of the more compact
   BTX vm86 interface.
 - Build the loader module as ELF, although the resulting object is a.out,
   make gensetdefs 32/64-bit sensitive and use a single copy of it.
 - Throw away installboot, as it's no longer required.
 - Use direct bcopy operations in the i386_copy module, as BTX
   maps the first 16M of memory.  Check operations against the
   detected size of actual memory.
1998-09-17 23:52:16 +00:00
msmith
ad514315b7 Resynch with working sources before BTX integration.
- Use format-independant module allocator.
 - Conditionalise ISA PnP support.
 - Simplify PnP enumerator interface.
 - Improve module/object searching.
 - Add missing depend/install targets in BTX makefiles.
 - Pass the kernel environment and module data in extended bootinfo fields.
 - Add a pointer to the end of the kernel + modules in bootinfo.
 - Fix parsing of old-style kernel arguments.
1998-09-14 18:27:06 +00:00
msmith
28e8cd8565 Bootstrap updates.
- Move some startup code from MD to MI sections
 - Add a 'copyout' and some copyout-related functions.  These will be
   obsoleted when BTX is available for the 386 and the kernel load
   area becomes directly addressable.
 - Add the ability load an arbitrary file as a module, associating
   and arbitrary type string with it.  This can be used eg. for loading
   splash-screen images etc.
 - Add KLD module dependancy infrastructure.  We know how to look for
   dependancies inside KLD modules, how to resolve these dependancies
   and what to do if things go wrong.  Only works for a.out at the
   moment, due to lack of an MI ELF loader.  Attach KLD module information
   to loaded modules as metadata, but don't pass it to the kernel (it
   can find it itself).
 - Load a.out KLD modules on a page boundary.  Only pad the a.out BSS
   for the kernel, as it may want to throw symbols away.  (We might want
   to do this for KLD modules too.)
 - Allow commands to be hidden from the '?' display, to avoid cluttering
   it with things like 'echo'.  Add 'echo'.
 - Bring the 'prompt' command into line with the parser syntax.
 - Fix the verbose 'ls'; it was using an uninitialised stack variable.
 - Add a '-v' flag to 'lsmod' to have it display module metadata as well
   (not terribly useful for the average user)
 - Support a 'module searchpath' for required modules.
 - The bootstrap file on i386 is now called 'loader' to permit the
   /boot directory to use that name.
 - Discard the old i386 pread() function, as it's replaced by
   arch_readin()
1998-09-03 02:10:09 +00:00
msmith
fe8e90f3d4 Bootloader update.
- Implement a new copyin/readin interface for loading modules.
   This allows the module loaders to become MI, reducing code duplication.
 - Simplify the search for an image activator for the loaded kernel.
 - Use the common module management code for all module metadata.
 - Add an 'unload' command that throws everything away.
 - Move the a.out module loader to MI code, add support for a.out
   kld modules.

Submitted by:	Alpha changes fixed by Doug Rabson <dfr@freebsd.org>
1998-08-31 21:10:43 +00:00
dfr
e1467bf887 Minor tweaks to track a couple of i386 changes and to make it compile. 1998-08-22 10:31:01 +00:00
msmith
8adeb775c4 This is the new unified bootstrap, sometimes known previously as the
'three-stage' bootstrap.
There are a number of caveats with the code in its current state:
 - The i386 bootstrap only supports booting from a floppy.
 - The kernel and kld do not yet know how to deal with the extended
   information and module summary passed in.
 - PnP-based autodetection and demand loading of modules is not implemented.
 - i386 ELF kernel loading is not ready yet.
 - The i386 bootstrap is loaded via an ugly blockmap.

On the alpha, both net- and disk-booting (SRM console machines only) is
supported.  No blockmaps are used by this code.

Obtained from:	Parts from the NetBSD/i386 standalone bootstrap.
1998-08-21 03:17:42 +00:00