Commit Graph

226 Commits

Author SHA1 Message Date
ru
b1c3961564 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
phk
fbfe138302 Use <sys/queue.h> macro API.
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	/sbin/md5
2000-12-30 20:40:16 +00:00
ru
a20e292241 Prepare for mdoc(7)NG. 2000-12-27 16:37:32 +00:00
ru
86650549b3 mdoc(7) police: removed duplicate .Os call. 2000-12-14 12:48:07 +00:00
ru
cff3f1a066 mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
ru
f194671628 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 17:05:46 +00:00
msmith
5b5c1d2cff The default kernel filename is "kernel" again, not "kernel.ko".
Submitted by:	mckusick
2000-11-17 04:43:56 +00:00
ru
b42832df66 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
benno
29b788adca OpenFirmware/PowerPC loader, part 2.
As of this patchset, the loader builds (under NetBSD/macppc), boots, interacts
and talks to BOOTP/NFS servers.

(main.c was moved from boot/ofw/libofw to boot/ofw/common but has no revision
 history)

Reviewed by:	obrien
2000-11-10 06:39:58 +00:00
benno
893545420c Give the network device a print method.
Reviewed by:	obrien
2000-11-10 06:37:43 +00:00
dfr
f1af8ca01e Don't indirect through a null pointer if we run out of kernel filenames. 2000-10-25 23:28:19 +00:00
dcs
196cdd64e7 The default search path for kernel and modules was bogus. It makes no
sense for /boot/kernel to come last.
2000-09-16 19:59:41 +00:00
dcs
83706e2f74 Start countdown only _after_ the kernel was loaded. Not very fair otherwise. 2000-09-15 07:54:10 +00:00
dcs
2e0ae74034 Change NOFORTH comment character from # to \ followed by space,
to make things more interchangeable between it and the FORTH case.

Perhaps requiring the space is a bit too much, but...

Nothing in the tree seems to produce loader.rc files with comment
line, at this time.
2000-09-10 13:48:51 +00:00
dcs
86815c703b Update boot and boot-conf descriptions to reflect new and old changes.
Add a warning in loader(8) that boot might be changed by loader.4th.
2000-09-08 21:39:31 +00:00
dcs
74e4aec36c Make the pnp structure a global variable, so it can be used elsewhere. 2000-09-08 16:51:29 +00:00
dcs
3b5d17878d Fix autoboot. Now autoboot *always* show the correct kernel name. It
gets the name from the environment variable kernelname, which is set
when a kernel is loaded. For this reason, autoboot will _first_ try
to load a kernel, and only proceed with the wait prompt after that
succeeds. If it fails, it will abort immediately.

While I understand some may think this behavior undesirable, I think
it is, overall, the best thing to do, even if we do not consider the
aesthetic issue. Notice that anyone using the default loader.rc
already has the kernel loaded before autoboot.

On unload, unset kernelname.

Separate the code that tries to load a kernel from the list of options
to the function loadakernel(). It is used by both boot() and
autoboot().
2000-09-08 16:47:05 +00:00
obrien
b7f1477eb7 With the committed changes to the loaders modules path code, the kernel
path does not need to be hard coded.
2000-09-06 20:50:24 +00:00
obrien
ff5ea8679f Fix the kernel default load from "/boot/modules" to "/boot/kernel".
Reported by:	dcs
2000-09-05 23:10:46 +00:00
obrien
6a44e2a875 The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.
2000-09-05 22:37:46 +00:00
sheldonh
d751009355 List loader.conf and friends in the FILES section.
Requested by:	obrien
2000-08-24 08:00:29 +00:00
dcs
50f5cc32ff Add missing "is".
PR:		20524
Submitted by:	Peter Pentchev <roam@orbitel.bg>
2000-08-11 10:32:23 +00:00
ps
b6bc6cd6fe Add support to send the string 'PXEClient' as the Vendor class
identifier to the DHCP server.  Now you can check for this string
in your dhcp configuration to decide whether you will hand out a
lease to the client or not.
2000-08-11 08:36:17 +00:00
jhb
f31718196b Bring back the perform() function. However, conditionionalize it on
BOOT_FORTH as it is only used if BOOT_FORTH is not defined.
2000-08-04 05:23:41 +00:00
jhb
6f2f464ad2 Fix the more obvious warnings to deal with my earlier warning cleanups. 2000-08-03 09:49:44 +00:00
jhb
2e6bed919d Cleanup warnings. Most of these are signed/unsigned warnings, as well as
some added const's.
2000-08-03 09:14:02 +00:00
kris
65ccc10a6b Don't call printf with no format string. 2000-07-10 06:40:06 +00:00
kris
327ea7ad9f Don't call printf with no format string. This is technically a security
vulnerability and could in principle be used to upload a new kernel from the
bootloader :-)
2000-07-10 06:33:55 +00:00
mph
1274fd3808 Typo fix: tunnable.
Backslash-parsing is not the role of printf(3), but is provided
	by the C language.
2000-06-25 07:12:03 +00:00
sheldonh
98c552a7d1 Whitespace-only changes: apply accepted line breaking style as a
pre-cursor to other markup changes.

Accepted in principle by the author.
2000-06-22 08:37:22 +00:00
dcs
158842d85e Fix vocabulary juggling so that builtins voc is always searched before
forth vocabulary when initially creating the builtins. FICL 2.05 has a
better way to do this, but this works for now.

Fixes "?".
2000-06-16 05:04:05 +00:00
dcs
528ff6784b Remove the setting of sourceid from bf_vm(), as bf_vm() really has
no clue.

Set sourceid to 0 when booting, which is the correct setting for stdin.

Set sourceid to an arbitrary fd when include'ing, preserving and restoring
the previous sourceid. This is possibly broken(), as 0 is a valid fd. Maybe
we should +1 to this value.

This fixes the version problem widely reported.
2000-06-14 19:37:00 +00:00
ps
d6e2e32b6f Delay calling the device cleanup routines until the absolute last
moment.  We were cleaning up after PXE too early and the module
dependancy code would not be able to load any files if it needed
too.
2000-06-14 10:34:29 +00:00
ps
b867dc930d Make typing 'q' or 'Q' work for the show command as the pager prompt
says it should.
2000-06-14 09:05:03 +00:00
dcs
890b457137 Place original builtins in a vocabulary called "builtins". This
is intended mainly for debuging purposes, but it can be used by
other words if done carefully.
2000-06-07 21:57:23 +00:00
dcs
7d9d87e4b0 Remove residual printf.
Prodded by: msmith
2000-06-07 03:33:12 +00:00
jake
5e208b0c18 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
jake
1d685644e0 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
dcs
449e64d626 Document abial's .#. 2000-05-23 11:47:23 +00:00
dcs
e858d816e8 One of loaders' bugs disappeared somewhere along the way. 2000-05-19 11:15:12 +00:00
dcs
1e6440a513 Move man page directives to common/Makefile.inc. 2000-05-19 08:52:16 +00:00
dcs
2912591604 Make corrections to allow for Alpha. 2000-05-18 12:44:50 +00:00
dfr
185ff51a15 Only probe network settings on the first open of the network device.
The alpha firmware takes a seriously long time to open the network device
the first time.
2000-05-13 15:40:46 +00:00
obrien
7f5471a83e The loader was written so that if /kernel was missing /kernel.old would
be booted.  Due to a bug, this wasn't happening.

There is still a lesser bug in that the loader decides which file to boot
after the 10sec count down.  This means the bootfile listed in the count
down in is wrong in the case where the loader will boot /kernel.old.
2000-05-13 02:45:11 +00:00
bp
ba5ed5fdbb long != int on Alphas. 2000-05-12 05:16:37 +00:00
dcs
ba1a1d7c65 Make documentation on recently added heap? command reflect reality. 2000-05-04 22:51:21 +00:00
dcs
a976ca4a62 Add "heap?" to loader's man page. 2000-05-04 21:26:26 +00:00
dcs
853b4e64fe Further improve ordering. 2000-05-04 21:22:55 +00:00
dcs
0c804455e6 Sort entries in FreeBSD-specific FICL commands. 2000-05-04 21:18:26 +00:00
peter
81103ba0e4 Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
peter
0ec4ea8f28 GC unused variable (size) 2000-05-01 18:03:15 +00:00
peter
5a04dd96b7 Fix some warnings on the Alpha. sizeof() returns different things on
x86 and Alpha. Sigh.
2000-05-01 18:02:38 +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
ps
76b2608c7b Add a cleanup function. This is needed for PXE where you should
shutdown the UNDI and unload the stack.
2000-04-20 00:06:15 +00:00
msmith
f99c30799c Some more i386-only BIOS-friendliness:
- Add support for using the PCI BIOS functions for configuration space
   accesses, and make this the default.

 - Make PNPBIOS the default (obsoletes the PNPBIOS config option).

 - Add two new boot-time tunables to disable each of the above.
2000-04-16 20:48:33 +00:00
dcs
ac481054b0 bcache_strategy() now receives an unit number, and keep track of what
was the last unit number received. If it changes, it flushes the cache.
Add bcache_flash().

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

PR:		17098
Submitted by:	John Hood <jhood@sitaranetworks.com>
2000-03-15 01:56:12 +00:00
bp
1e197670cc Fix the loader to handle module dependencies properly. More fixes
will be provided after modmetadata appears in the kernel.

Reviewed by:	msmith
Approved by:	jkh
2000-02-25 05:10:44 +00:00
msmith
7fc3700f65 Close a file descriptor leak in the code which loads file objects.
Submitted by:	Paul Saab <paul@mu.org>
Approved by:	jkh
2000-02-17 02:19:19 +00:00
peter
4a06465a4e Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
msmith
0bbb50119f Correctly handle a user-requested abort in the middle of displaying a
help subtopic.

PR:		kern/13196
Submitted by:	MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>
1999-12-28 07:19:22 +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
msmith
8111b30ac6 Update to reflect use of : not ; as separator in paths passed to the
kernel.
1999-12-07 18:31:43 +00:00
dcs
d159fe7620 Add fairings. Do not depend on user actually supplying the arguments
he is supposed to supply.
1999-12-01 18:30:26 +00:00
dcs
47c061fc55 Make the prompt look like on OpenBoot. 1999-11-27 21:44:47 +00:00
dcs
518d0ce5d9 Changes the default prompt to "ok".
Mike says the whole idea of a current device was a bad idea in first place,
and will be doing away with currdev.

Anyway, people are not supposed to even notice this. :-)
1999-11-01 08:05:22 +00:00
dcs
92690f4ed8 Bring in ficl version 2.03. No version bump for loader. 1999-09-29 04:43:16 +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
nik
6af49de99d Fix some typos.
PR:             docs/11955
Submitted by:   Christian Weisgerber <naddy@mips.rhein-neckar.de>
1999-07-28 20:30:59 +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
n_hibma
5320938375 The boot countdown timer says it will boot in 1 seconds,
which is grammatically incorrect.

PR:		12628
Submitted-By:	R. Matthew Emerson <rme@nightfly.apk.net>
1999-07-15 20:40:52 +00:00
msmith
ea00911144 Document the hw.physmem tunable. (There should be arch-specific tunable
help sections.)
1999-07-02 20:38: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
4fcf231cb2 ABS_SET() and BSS_SET() are no longer used. The sole remaining user of
TEXT_SET() is DDB's command tables.
1999-06-26 12:27:01 +00:00
ru
07907f62ce -mdoc fix. 1999-06-23 09:06:18 +00:00
dfr
80e673aeb3 Typo: "can't boot 'boot'" should be "can't boot 'kernel'" 1999-05-30 10:45:03 +00:00
brian
93bfb8720b Always output a linefeed when we've decided whether to boot
or display a loader prompt; either we've said
"Booting [%s]..." or we've received a non-line-feed character
and need a '\n' anyway.
1999-05-28 08:01:52 +00:00
rnordier
db4f5997b9 Fix a reference to the mysterious Mike Smisth. 1999-05-22 13:18:28 +00:00
jb
f0b9ae8c02 Found the needle in the haystack!
Use colons instead of semi-colons in the default init_path to behave like
UNIX instead of DOS.

Suggested by: bde
Reminded by: des (with no hint as to *which* man page).
1999-05-11 11:20:13 +00:00
dfr
df6b2fad79 Changes to support diskless booting on the alpha:
* Make the network code in the bootstrap more chatty (helps debugging)
* Add nfs root stuff to cpu_rootconf(). I also added a check to make sure
  it really was netbooting which allows the use of the same kernel for local
  and network boots.
* Tweak the de driver so that it takes the speed setting from the console
  for the alpha (some PWSs have broken de chipsets). This is the same
  behaviour as NetBSD/alpha.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1999-05-03 09:36:29 +00:00
jkoshy
95dbecceb2 Correct typos.
PR:		docs/11445
Submitted by:	Kazuo Horikawa <horikawa@jp.freebsd.org>
1999-05-03 08:32:45 +00:00
dcs
02b27945ac Make man page reflect reality on parsing rules. Now I know Jordan
never read this man page... :-)
1999-04-25 21:41:09 +00:00
des
f3c948877e Make the location of init(8) tunable at boot time. 1999-04-20 21:15:13 +00:00
joerg
b221fe8173 Don't clobber the "prompt" variable if it has already been set (e. g.
from within loader.conf).

Reviewed by:	dcs
1999-04-20 12:07:03 +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
e0b0c16056 The man page, version 0.1. 1999-03-15 08:52:23 +00:00
msmith
a44b9fcf4f Fix syntax for boot command
Noticed by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1999-03-14 19:55:01 +00:00
dcs
f497066d82 Increase ficl's dictionary size, in preparation for the newer loader.rc. 1999-03-08 11:00:02 +00:00
dcs
650aa84def Fix a number of memory leaks and other memory-related disorders.
Also, unbreak the breakage introduced at the last revision of module.c.
This changes the semantics of mod_searchfile() (and mod_searchmodule())
to make the caller's responsibility freeing the buffer returned. This
is different from other functions in loader's code, and was done as a
fix for kern/9631. If someone wants to revert this to the original
behavior, don't forget to fix kern/9631 in another way.

This should also fix bin/10462, which was introduced as a result of the
first try at kern/9631 (module.c last revision).

PR:		bin/10462
Submitted by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp>
1999-03-08 10:32:39 +00:00
dcs
eb5846a32e Don't treat empty lines as end-of-file in include(). (I can't
believe this bug is still here... :-( )
1999-03-02 16:16:57 +00:00
dcs
695080812d Fix assorted memory leak/buffer reuse problems.
Not restricted to, but including:

PR:		kern/9631
Submitted by:	Bill Fenner <fenner@parc.xerox.com>
1999-02-22 13:12:37 +00:00
tegge
90c3773c3a Enable load of i386 ELF kernels with larger KVA range (e.g. starting at
0xe0100000u or 0xc0100000u instead of the usual 0xf0100000u).
1999-02-15 17:36:58 +00:00
dcs
1be95a3a32 Remove strange-looking quotes. This part of the code is #if'ed out,
and the variable doesn't even exist (though it is referenced elsewhere).
Just make sure it produces error messages when Mike get back to it.

PR:		kern/9934
Submitted by:	Adrian Filipi-Martin
1999-02-07 12:12:29 +00:00
dcs
84a62876fc Make use of prototypes to silence warnings.
Change include() so it will be able to load files with forth code,
instead of just builtins. Remove #@- from the include section of the
help file, since they don't work in the new version of include, unless
BOOT_FORTH is not defined.

Change bf_run() so it will return the result returned by ficlExec(). Also,
make bf_run() push "interpret" to be executed by ficlExec(), since ficlExec()
doesn't do it by itself. (Things worked previously because nothing
recursed through ficlExec() by the way of bf_run()).

Change/extend comments on builtin behavior.

Search for "interpret" at the end of bf_init(), so /boot/boot.4th can
provide it's own version.

Remove dead code.
1999-02-04 17:06:46 +00:00
dcs
c08e2f20d6 Silence a warning.
PR:		bin/9754
1999-02-04 13:16:21 +00:00
msmith
747ee6171b Mention the net.inet.tcp.tcbhashsize tunable. 1999-02-03 09:07:33 +00:00
kato
3884d3cc63 PC98 version of new boot loader. Because boot2 has not yet ported,
files in boot2 directory are copies from legacy biosboot.

Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-02-03 08:39:09 +00:00
jkh
d2bdcd02d6 Whoops! Forgot to include Mr. Sobray's more command in the last set
of commits.

Submitted by:	Daniel C. Sobral <dcs@newsguy.com>
1999-02-01 06:08:21 +00:00
msmith
13b179d2d9 Document the machdep.pccard.pcic_irq tunable, which allows the user to tune
the interrupt which will be given to the PCIC.  If the value supplied is
illegal or not available, interrupts will be turned off and polled mode
used instead.
1999-01-29 01:16:50 +00:00