Commit Graph

524 Commits

Author SHA1 Message Date
John Baldwin
64786948cc Ignore a sub-topic match if it is inside the command description.
Otherwise, merge-help can get confused by a command description that
includes a word that starts with a capital S.

MFC after:	1 week
2006-09-28 19:06:20 +00:00
Ruslan Ermilov
23471380b5 Make the default "init_path" value breakable, so it fits on the
screen's width, thus eliminating a groff(1) warning.

Suggested by:	marck
2006-08-20 09:31:17 +00:00
Dmitry Morozovsky
6bf0d59557 kern.ipc.nmbclusters is sysctl, not compile-time option. Change Dv to Va.
Touch .Dd.

Pointed out by:	ru
MFC after:	1 week
2006-08-18 10:15:01 +00:00
Dmitry Morozovsky
86ddfd1205 Remove references to NMBCLUSTERS which is obsoleted.
PR:		100427
Approved by:	maxim
MFC after:	1 week
2006-08-18 08:03:06 +00:00
John Baldwin
be5d6589e0 Remove more Alpha bits from the boot code including fixing several
stale comments.
2006-05-12 04:09:53 +00:00
Marius Strobl
e4846391da In moduledir_readhints() cast the value returned by sizeof() to ssize_t
when checking whether it's greater than a struct stat st_size in order
to also catch the case when st_size is -1. Previously this check didn't
trigger on sparc64 when st_size is -1 (as it's the case for a file on
a bzipfs, TFTP server etc.), causing the content of the linker hints
file to be copied to memory referenced by a null-pointer.

PR:		91231
MFC after:	1 week
2006-01-12 13:18:49 +00:00
Marcel Moolenaar
757686b115 Make our ELF64 type definitions match standards. In particular this
means:
o  Remove Elf64_Quarter,
o  Redefine Elf64_Half to be 16-bit,
o  Redefine Elf64_Word to be 32-bit,
o  Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o  Use Elf_Size in MI code to abstract the difference between
   Elf32_Word and Elf64_Word.
o  Add Elf_Ssize as the signed counterpart of Elf_Size.

MFC after: 2 weeks
2005-12-18 04:52:37 +00:00
Ruslan Ermilov
4750e08f7b Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:
"boot_dfltroot", "boot_mute", and "boot_pause" respectively.
2005-09-22 15:06:58 +00:00
Ian Dowse
4832a19173 Add a "comconsole_speed" loader variable that can be used to change
the serial console speed (i386 and amd64 only). If the previous
stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE)
then the default speed is determined from the current serial port
speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED
at compile time.

This makes it possible to set the serial port speed once in
/boot.config and the setting will propagate to boot2, loader and
the kernel serial console.
2005-08-18 01:39:43 +00:00
Brian Somers
1b3b403e9b Fix a comparison that broke ``set console=vidconsole'' and even the
loader.conf line ``console="vidconsole"''.

Sponsored by:	ActiveState/Sophos
MFC after:	1 week
2005-07-29 12:47:42 +00:00
John-Mark Gurney
2fd290094e remove a pointless comment with a more helpful one...
Submitted by:	Tobias Roth
MFC after:	5 days
2005-07-25 17:18:25 +00:00
Ruslan Ermilov
6c059e67a9 Improved markup, fixes some spelling and grammar.
Approved by:	re (blanket)
2005-06-14 08:49:14 +00:00
Ruslan Ermilov
2e79aad4c7 Markup nits. 2005-05-30 12:33:04 +00:00
John Baldwin
8b7c03a7a4 - Add support to the loader for multiple consoles.
- Teach the i386 and pc98 loaders to honor multiple console requests from
  their respective boot2 binaries so that the same console(s) are used in
  both boot2 and the loader.
- Since the kernel doesn't support multiple consoles, whichever console is
  listed first is treated as the "primary" console and is passed to the
  kernel in the boot_howto flags.

PR:		kern/66425
Submitted by:	Gavin Atkinson gavin at ury dot york dot ac dot uk
MFC after:	1 week
2005-05-27 19:31:00 +00:00
Maxim Sobolev
4d87b291ad Extend `autoboot_delay' handling - is this variable is set to -1 don't allow
user to interrupt autoboot process at all. Currently, even when
`autoboot_delay' is set to 0, loader(8) still allows autoboot process to be
interrupted by pressing any key on the console when the loader reads kernel
and modules from the disk. In some cases (i.e. untrusted environment) such
behaviour is highly indesirable and user should not be allowed to interfere
with the autoboot process at all.

Sponsored by:	PBXpress Inc.
MFC after:	3 days
2005-05-19 23:03:02 +00:00
Maxim Sobolev
faf0d4eb71 Whitespace only: kill trailing spaces. 2005-05-19 05:15:08 +00:00
Dag-Erling Smørgrav
b32a1f4405 Document the new default init_path.
Reminded by:	ru
MFC after:	2 weeks
2005-02-17 11:14:45 +00:00
Robert Watson
98d13cb3ff Insert an explicit McAfee license, as we use a stock two-clause BSD
license rather than the slightly custom licence in ufsread.c.
2005-01-30 14:58:00 +00:00
Scott Long
05d0bf79ed Remove the last vestiges of the userconfig option. None of this actually
did anything, so this commit should be considered a NO-OP.
2004-12-01 04:59:33 +00:00
Ruslan Ermilov
fccc3fcfc2 There's no reason for "read" and "echo" commands to not
appear in the online command list.
2004-11-13 17:04:55 +00:00
Ruslan Ermilov
e631c74b1d Pass the "?" command output through the pager.
(This doesn't quite work as this command is overridden by Forth,
and some Forth commands are appended to the output.)
2004-11-12 13:27:49 +00:00
Ruslan Ermilov
39ebd90532 Collapse several adjacent .if's into .if/.elif. 2004-10-24 12:32:41 +00:00
Yoshihiro Takahashi
222be03974 ELF64 support is not needed on pc98. 2004-10-24 12:18:11 +00:00
Warner Losh
99e085d9a8 document host_start_mem.
# feel free to wordsmith.

Suggested by: ru@
2004-10-15 06:59:07 +00:00
Ruslan Ermilov
7a49c8b37d Polish the last change. 2004-10-15 06:44:13 +00:00
Warner Losh
71a77eda7d Document hw.{pci,acpi}.host_start_mem
Requested by: ru@
2004-10-15 00:15:07 +00:00
Pawel Jakub Dawidek
8d02a378aa Back out changes which were introduced to delay mounting root file system.
Those changes were made on gmirror needs, but now gmirror handles this
by itself.
2004-10-05 11:26:43 +00:00
Stefan Farfeleder
08c7cd06b9 Use the correct printf specifier.
PR:	47187
2004-10-03 16:34:01 +00:00
Ruslan Ermilov
c09be59eb6 The "autoboot" command also has a third (optional) parameter. 2004-10-01 00:15:13 +00:00
Ruslan Ermilov
3075c18308 Don't give instructions on how to disable ACPI in the MI section.
For novice users, beastie.4th can just do it.  Expert users can
read ACPI instructions by typing "help ACPI".
2004-09-30 21:57:16 +00:00
Ruslan Ermilov
bc19e3ee42 Retire now useless userconfig_script_*. 2004-09-30 18:23:35 +00:00
Ruslan Ermilov
9fd3ae4889 The value of $interpret is "OK", in uppercase. 2004-09-30 17:12:05 +00:00
Ruslan Ermilov
25d34c013f Fixed the default value of the $prompt variable, document what
happens if $prompt is unset.
2004-09-30 17:11:26 +00:00
Ruslan Ermilov
ced68b5b2c Setting dump device from loader(8) has not been supported since 2002. 2004-09-30 15:27:37 +00:00
Ruslan Ermilov
818d0cba7f The default value of "bootfile" has been "kernel" since 2000. 2004-09-30 14:06:03 +00:00
Ruslan Ermilov
a9ad4b2bc7 Mention "help index" in the online help, and provide a help for
the `?' command.
2004-09-30 13:47:30 +00:00
Ruslan Ermilov
69a02bda38 Document boot_cdrom, boot_multicons, and boot_serial.
Reduce diffs between help.common and loader(8).
Mention that boot_userconfig is currently a no-op.
2004-09-30 13:09:00 +00:00
Ruslan Ermilov
af9cb375e8 `?' is not the same as "help index". 2004-09-30 12:16:23 +00:00
Ruslan Ermilov
4d0cb59f0f Fixed exiting from pager using the `q' key while paging
"help index" or "help <topic>" with list of subtopics.
2004-09-29 13:43:55 +00:00
Pawel Jakub Dawidek
12f5309d62 Document vfs.root.mountdelay value.
Reminded by:	ru
2004-09-24 09:33:48 +00:00
Ian Dowse
941fdb393b Add the loader side of support for preloading ELF relocatable object
format modules, which are currently only used on the amd64 platform.
This initial implementation just parses enough of the module to
allow it to extract dependencies and load all the bits into the
right place in memory, so the kernel must still do the full relocation
and linking. The details of the loaded sections are passed to the
kernel by supplying a copy of the ELF section header table as module
metadata with the MODINFOMD_SHDR tag.
2004-08-29 00:48:42 +00:00
Ian Dowse
45b8d7c46e Separate out the ELF relocation code from the ELF loader, and add
better relocation support for the amd64 and i386 platforms. This
should not result in any change in functionality, but moves a step
towards supporting the relocatable object file modules on amd64.

The same hack/trick as load_elf*.c uses is used here to simultaneously
support both elf32 and elf64 on amd64 and i386.
2004-08-28 23:03:05 +00:00
Ian Dowse
c0b43624d5 Add a few helper functions for zeroing kernel space and reading
from specified file offsets. Make use of these in load_elf.c.
2004-08-28 14:57:34 +00:00
Maxim Konovalov
d4c8cbf109 Trim EOL white spaces. 2004-08-22 08:57:05 +00:00
Maxim Konovalov
022c9a28ee Check a return code from read(2) correctly.
PR:		kern/70815
Submitted by:	info [at] haakh.de
2004-08-22 08:56:01 +00:00
Maxim Konovalov
4233992afa Bump the manpage date.
Noticed by:	ru
2004-08-18 09:39:24 +00:00
Maxim Konovalov
ac92ad1b5d Retire hw.pci.allow_unsupported_io_range.
PR:		bin/70533
Submitted by:	Gavin Atkinson
2004-08-18 09:25:55 +00:00
John-Mark Gurney
bd8fc733cb remove /boot/kernel from the default path.. There is already code that
will prepend the current kernel booting...  This prevents a problem of
loading /boot/kernel's modules when a different kernel has no modules,
but you left your module_load="YES" in loader.conf...

Reviewed by:	dcs (minus the help part)
2004-08-06 15:06:06 +00:00
Ceri Davies
4529da5f33 Correct a documentation bug.
Approved by:	jhb
2004-07-29 20:09:25 +00:00
Brian Somers
0ac4013324 Change the following environment variables to kernel options:
bootp -> BOOTP
    bootp.nfsroot -> BOOTP_NFSROOT
    bootp.nfsv3 -> BOOTP_NFSV3
    bootp.compat -> BOOTP_COMPAT
    bootp.wired_to -> BOOTP_WIRED_TO

- i.e. back out the previous commit.  It's already possible to
pxeboot(8) with a GENERIC kernel.

Pointed out by: dwmalone
2004-07-08 22:35:36 +00:00
Brian Somers
59e1ebc9b5 Change the following kernel options to environment variables:
BOOTP -> bootp
    BOOTP_NFSROOT -> bootp.nfsroot
    BOOTP_NFSV3 -> bootp.nfsv3
    BOOTP_COMPAT -> bootp.compat
    BOOTP_WIRED_TO -> bootp.wired_to

This lets you PXE boot with a GENERIC kernel by putting this sort of thing
in loader.conf:

    bootp="YES"
    bootp.nfsroot="YES"
    bootp.nfsv3="YES"
    bootp.wired_to="bge1"

or even setting the variables manually from the OK prompt.
2004-07-08 13:40:33 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Stefan Farfeleder
5908d366fb Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.
2004-07-04 16:11:03 +00:00
Ruslan Ermilov
69cc5b91a0 Fixed what appeared to be a hard sentence break. 2004-07-02 21:49:22 +00:00
Paul Saab
b7c29ad503 When building a kernel or the loader, let the hostname be overridden 2004-07-01 06:40:12 +00:00
Ruslan Ermilov
f8aa392b11 Markup fixes. 2004-05-16 22:51:36 +00:00
Warner Losh
f36cfd49ad Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
2004-04-07 20:46:16 +00:00
Lukas Ertl
84ff42d8ff mdoc fix: put the end-of-list macro after the last list element.
Approved by:   grog (mentor)
2004-04-03 12:14:30 +00:00
Bruce Evans
754df37025 Fixed a misspelling of 0 as NULL. 2004-03-11 10:09:01 +00:00
Ruslan Ermilov
079cbb98ac Style: use the defined() expression explicitly. 2004-02-07 11:05:10 +00:00
Dag-Erling Smørgrav
84344f9fbf Rename the kern.vm.kmem.size tunable to the more logical vm.kmem_size. To
assure backward compatibility (conditional on !BURN_BRIDGES), look it up
by its old name first, and log a warning (but accept the setting) if it
was found.  If both the old and new name are defined, the new name takes
precedence.

Also export vm.kmem_size as a read-only sysctl variable; I find it hard to
tune a parameter when I don't know its default value, especially when that
default value is computed at boot time.
2004-01-27 15:59:38 +00:00
Ian Dowse
a69c45087c Override the root server address if an IP address is specified in
the root path. This is reported to make non-PXE netbooting, such as
is used on sparc64 systems, work correctly when the TFTP server is
not the same as the root server.

PR:		kern/57328
Submitted by:	Per Kristian Hove <Per.Hove@math.ntnu.no>
2003-11-03 19:45:05 +00:00
David E. O'Brien
1809be3cd4 Use __FBSDID().
Also some minor style cleanups.
2003-08-25 23:30:41 +00:00
Christian Brueffer
3db879acd2 Capitalize an occurrence of 'ficl' for consistency.
Submitted by:	Andre Guibert de Bruet <andy@siliconlandmark.com>
MFC after:	3 days
2003-06-29 20:57:55 +00:00
Peter Wemm
062b3e0c77 Build on amd64. Yes, I know this isn't particularly nice. 2003-06-26 03:51:57 +00:00
Ruslan Ermilov
2f0e162dc0 Fixed the markup and wording of the kern.ipc.nsfbufs tunable.
(It does not modify NSFBUFS, but just overrides it if set.)

Approved by:	re (blanket)
2003-05-17 22:17:23 +00:00
Peter Wemm
ab6859fd2f Fix lookup of module metadata on amd64 systems. While this is in
common code, the non-trivial part is #ifdef'ed and only executes when
loading amd64 kernels. The rest is trivial but needed for the the amd64
case. (Two variables changed from char ** to Elf_Addr).

Approved by:	re (amd64 "low-risk" stuff)
2003-05-12 05:48:09 +00:00
David E. O'Brien
1536224009 Since we insist on loading the POS ACPI by default, give the poor user
instructions on the main help screen for disabling it.
2003-05-05 07:33:12 +00:00
Murray Stokely
dab0c25bf9 Fix a bunch of typos and grammatical errors.
PR:		docs/40234
Submitted by:	Chris Pepper <pepper@rockefeller.edu>  (mostly)
MFC After:	3 days
2003-05-04 08:23:24 +00:00
Peter Wemm
48a0b96a50 Enable the i386 loader to load and run an amd64 kernel. If this puts
things over floppy size limits, I can exclude it for release builds or
something like that.  Most of the changes are to get the load_elf.c file
into a seperate elf32_ or elf64_ namespace so that you can have two
ELF loaders present at once.  Note that for 64 bit kernels, it actually
starts up the kernel already in 64 bit mode with paging enabled.  This
is really easy because we have a known minimum feature set.

Of note is that for amd64, we have to pass in the bios int 15 0xe821
memory map because once in long mode, you absolutely cannot make VM86
calls.  amd64 does not use 'struct bootinfo' at all.  It is a pure loader
metadata startup, just like sparc64 and powerpc.  Much of the
infrastructure to support this was adapted from sparc64.
2003-05-01 03:56:30 +00:00
Peter Wemm
30f445e056 Zap some a.out leftovers 2003-04-06 06:28:08 +00:00
Poul-Henning Kamp
197e5e73ef Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>

Move i386/pc98 specific bits from <sys/reboot.h> to
<i386/include/bootinfo.h> as well.

Adjust includes in sys/boot accordingly.
2003-04-04 16:35:16 +00:00
Tom Rhodes
ff470880ba Fix a few spelling errors.
Submitted by:	Stefan Farfeleder <stefan@fafoe.dyndns.org> via -doc.
2003-03-07 03:24:38 +00:00
Sean Chittenden
6087c960b5 Document the tunable kern.ipc.nsfbufs in help.common and loader.8. Small
nearby grammar fixup that saves a line of display while in the loader
(help set tunables), but reuses the line for kern.ipc.nsfbufs.

Approved by:	 roam
2003-03-04 23:46:29 +00:00
Ruslan Ermilov
6de61153e8 FreeBSD 5.0 has stopped shipping /modules 2.5 years ago. Catch
up with this further by excluding /modules from the (default)
kern.module_path.
2003-03-03 22:53:35 +00:00
David E. O'Brien
957a6263b6 Only apply rev 1.10 (which hacks around the i386 boot2 being too big for
both ufs1 and ufs2 support) on i386.
2003-02-25 00:10:20 +00:00
Kirk McKusick
c555826bd7 Revert to old (broken for over 1.5Tb filesystems) version of cgbase
so that boot loader once again will fit.

Sponsored by:   DARPA & NAI Labs.
2003-02-24 04:57:01 +00:00
Tom Rhodes
cbe0d0f670 s/hw.pci_allow_unsupported_io_range/hw.pci.allow_unsupported_io_range/
The former was incorrect and gave an `unknown oid' error.
2003-02-08 19:39:01 +00:00
Jake Burkholder
a438ad0718 Fix module dependency (pre)loading on sparc64 by relocating the variables
read from the raw kld files.

Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
PR:		46870
Tested on:	alpha (obrien), i386, sparc64
2003-01-21 05:46:46 +00:00
Matthew N. Dodd
bf1446b754 Minimally document hw.syscons.sc_no_suspend_vtswitch.
Requested by:	 Nate Lawson <nate@root.org>
2003-01-15 05:26:10 +00:00
Poul-Henning Kamp
3429fab68d Restructure so we can compile UFS1_ONLY, UFS2_ONLY or UFS1_AND_UFS2
versions from the same basic function.
2002-12-14 19:39:44 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Kirk McKusick
ada981b228 Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.

Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.

Suggested by:	BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by:   DARPA & NAI Labs.
2002-11-27 02:18:58 +00:00
Yaroslav Tykhiy
df86a3fec1 Eliminate references to defunct kernel tunables.
Approved by:	re
PR:		bin/43343
2002-11-26 13:55:50 +00:00
Matthew N. Dodd
6b501f246a Document loader tunables hw.pci.enable_io_modes and
hw.pci.allow_unsupported_io_range.

Submitted by:	 Hiten Pandya <hiten@angelica.unixdaemons.com>
Approved by:	 re (murray)
2002-11-13 09:43:53 +00:00
Matthew N. Dodd
d7545b110c Loader tunable 'machdep.disable_mtrrs'.
Sysctl of same name to reflect status.

Submitted by:	 jhb
Approved by:	 re (murray)
MFC after:	 1 day
2002-11-13 09:37:43 +00:00
Poul-Henning Kamp
7cf5744b6b It seems that the only problem with UFS2 booting on i386 is the 64bit
divide/remainder calls.  For reasons not resolved, compiling the
relevant routines from libkern into boot2 results in stack corruption.

Do the simple thing: Don't use 64bit divide/remainder operations.

Sponsored by:	DARPA & NAI Labs
2002-10-08 15:46:45 +00:00
Poul-Henning Kamp
5765b4ef72 Move the definition of UFS1_ONLY into the Makefiles where it belongs.
Sponsored by:	DARPA & NAI Labs.
2002-10-07 08:09:20 +00:00
Mitsuru IWASAKI
6c40705212 s/hint.acpi.0.disable/hint.acpi.0.disabled/
Fix device hints entry for disabling acpi(4).
This also should fix the arbitration with apm(4) when both drivers
are enabled.

Note that your /boot/device.hints needs to be updated if you want to
stop auto-loading acpi.ko or disable acpi(4).
2002-08-30 11:11:07 +00:00
Peter Wemm
ba568b7e46 Actually remove the stale a.out kld support. This is the stuff that was
never updated for the metadata infrastructure.
2002-08-29 23:02:37 +00:00
Peter Wemm
e581f644a4 Initiate deorbit burn of i386 a.out kld "support" in loader. Note that
this was quite broken, it never was updated for metadata support.
The a.out kld file support was never really used, as it wasn't necessary.
You could always load elf kld's, even in an a.out kernel.
2002-08-29 02:02:28 +00:00
Ruslan Ermilov
be0056cdab mdoc(7) police: revert unapproved changes in rev. 1.43, added missing markup bits in rev. 1.45. 2002-08-13 15:06:48 +00:00
David E. O'Brien
ac03993585 Restore autoloading of ACPI module.
Document the approved ways of disabling it.
Submitted by:	Daniel O'Connor <doconnor@gsoft.com.au>
2002-08-09 06:07:33 +00:00
Jake Burkholder
f739b33f57 Stash various networking paramters in the environment for the kernel
to pick up, ala pxe.
2002-07-31 20:17:06 +00:00
Giorgos Keramidas
955f24e6b7 Use present tense in all the verbs, when describing loader's startup.
Most of them are not in a future tense already.
2002-07-15 03:39:34 +00:00
Philippe Charnier
74026cdab0 The .Nm 2002-07-14 15:19:46 +00:00
Mark Peek
b0677c345c Change help documentation for bootfile and module_path to reflect
the actual code. Both use a ";" (not a ",") to delimit entries.

PR:		39679
Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
MFC after:	3 days
2002-07-07 20:40:31 +00:00
Jake Burkholder
dd200e5643 Enable UFS1_AND_UFS2 support for sparc64 by default. Booting from ufs1 or
ufs2 filesystems seems to work fine.
2002-06-21 22:33:56 +00:00
Kirk McKusick
1c85e6a35d This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by:	Poul-Henning Kamp <phk@freebsd.org>
2002-06-21 06:18:05 +00:00
Poul-Henning Kamp
3795d538a8 Make sparc64 share ufsread.c with i386.
Sponsored by: DARPA & NAI Labs.
2002-06-05 12:00:53 +00:00
Poul-Henning Kamp
6b8fc95f49 Indent this file more like style(9).
Sponsored by: DARPA & NAI Labs.
2002-06-05 11:20:37 +00:00
Poul-Henning Kamp
833468e219 Preparation for UFS2 commit:
Factor the ufs reading code out of the i386/boot2 loader so it can
be reused by for instance sparc64.

Sponsored by: DARPA and NAI Labs.
2002-06-05 11:10:38 +00:00
Jens Schweikhardt
ece450c42f Fix a handful of typos and grammar bogons. No content changes.
Translators can ignore this commit.

MFC after:	2 weeks
2002-05-29 22:57:18 +00:00
David E. O'Brien
54fd053e6c We don't need bootinfo any more, and sparc64 doesn't have it anyways. 2002-05-10 01:20:37 +00:00
Peter Wemm
31c41f1b1e Bandaid for a buffer overrun in the module searching code. When breaking
up the module_path string, we would walk one past the end of the buffer.
This hurting ia64 originally, but it was probably also happening on i386
occasionally as well.  The effects were usually harmless, it would add
bogus "binary" search directories to the places it actually looked for
files.
2002-04-11 10:00:44 +00:00
Daniel C. Sobral
231b8f199f Upgrade FICL to 3.02. Forgot this one, sorry.
PR:		36308
Submitted by:	dcs
2002-04-09 20:59:34 +00:00
Jake Burkholder
bb75d97e13 Fix another unsigned long used to index the symbol table which should be
Elf_Hashelt.
2002-04-09 00:05:46 +00:00
Peter Wemm
93b4f334b6 Use the correct elf hash table entry type. This matches a similar fix
in the kernel side of things some time ago.  The hash table entries are
always 32 bits wide, even on 64 bit machines.
2002-04-06 04:09:42 +00:00
David E. O'Brien
ef313bf935 Not all platforms have and want a.out format support. 2002-03-28 01:28:21 +00:00
Alfred Perlstein
03d1b8bc94 Remove __P. 2002-03-20 08:00:54 +00:00
Ruslan Ermilov
3a3c44ac20 mdoc(7) police: fix a typo and markup. 2002-03-15 15:12:10 +00:00
Maxim Sobolev
5616599331 CG superfluous prototype. 2002-03-10 22:33:04 +00:00
Bruce Evans
0c6ec4aca0 Declare time(not3) instead of depending on namespace pollution 3 layers
deep in <stand.h> to eventually include <time.h> to declare the user
version.

This is not quite the right place to declare it, but <stand.h> would
be worse because time() is very MD so it isn't in libstand.

Many places in the boot sources still get the user version using only
1 layer of pollution (#include <sys/time.h>.  Some pollute themselves
directly (#include <time.h>).  But the boot Makefiles are too broken
to enable warnings for redeclarations.
2002-02-25 04:31:25 +00:00
Bruce Evans
fa883367ab Removed mounds of unused variables. 2002-02-25 03:45:09 +00:00
Chad David
8c09f6fb1f Document the hw.physmem kernel environment variable.
Reviewed by:	alfred
2002-02-21 05:15:52 +00:00
Maxim Sobolev
21367f05ab CG hard sentence breaks.
Submitted by:	ru
2002-01-23 09:35:55 +00:00
Maxim Sobolev
dcd7d9b7b7 Allow dump device be configured as early as possible using loader(8) tunable.
This allows obtaining crash dumps from the panics occured during late stages
of kernel initialisation before system enters into single-user mode.

MFC after:	2 weeks
2002-01-21 01:16:11 +00:00
Ruslan Ermilov
34a5940b8c mdoc(7) police: remove hard sentence break which I didn't
submit to Jonathan Mini.
2001-12-14 09:06:11 +00:00
John Baldwin
0889b9be41 - Add 'fwrite' and 'fseek' words for writing to and seeking on files.
- Change the 'fopen' keyword to accept a mode parameter.  Note that this
  will break existing 4th scripts that use fopen.  Thus, the loader
  version has been bumped and loader.4th has been changed to check for a
  sufficient version on i386 and alpha.  Be sure that you either do a full
  world build or install or full build and install of sys/boot after this
  since loader.old won't work with the new 4th files and vice versa.

PR:		kern/32389
Submitted by:	Jonathan Mini <mini@haikugeek.com>
Sponsored by:	ClickArray, Inc.
2001-12-11 00:49:34 +00:00
John Baldwin
4543c86ece Add support for writing blocks to the loader's disk cache.
PR:		kern/32389
Submitted by:	Jonathan Mini <mini@haikugeek.com>
Sponsored by:	ClickArray, Inc.
2001-12-11 00:10:00 +00:00
David E. O'Brien
6e551fb628 Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
2001-12-10 08:09:49 +00:00
Robert Watson
63ea1e904c o Expand list of tunables documented in loader.8 to include kern.maxusers,
since other related tunables were also documented here.  Add a cross
  reference to tuning(7) for information on setting this value
  appropriately.
2001-12-07 18:05:24 +00:00
Dag-Erling Smørgrav
cb36afb649 The entry for the 'set' command no longer has a list of variables.
PR:		32454
Submitted by:	Gary W. Swearingen <swear@blarg.net>
MFC after:	3 days
2001-12-04 12:01:00 +00:00
Murray Stokely
3bbde73c29 Fix typo.
PR:		32455
Submitted by:	"Gary W. Swearingen" <swear@blarg.net>
2001-12-03 06:00:24 +00:00
Daniel C. Sobral
605f755d8a Waits for a keypress before rebooting on panic.
PR:		kern/32351
Submitted by:	Jonathan Mini <mini@haikugeek.com>
MFC after:	1 week
2001-11-28 14:00:36 +00:00
David E. O'Brien
03820e7a36 Upper case the FreeBSD loader prompt.
On OFW based machines, it is just too confusing having the firmware and
OS loader giving the same prompt.  This is a nice compromise that 99% of the
users on non-OFW platforms will probably not even notice.
2001-11-19 17:30:26 +00:00
Ian Dowse
7b9716bad2 Fix a number of misspellings of "dependency" and "dependencies" in
comments and function names.

PR:		kern/8589
Submitted by:	Rajesh Vaidheeswarran <rv@fore.com>
2001-11-16 21:08:40 +00:00
Bill Fenner
ce20386909 Initialize first to -1; this will create a (nearly) empty file on failure,
instead of looping until the disk is full.  This kind of failure can
especially happen when a version of awk that doesn't support POSIX
character classes is used.

Submitted by:	David Wolfskill <david@catwhisker.org>
2001-11-07 17:53:25 +00:00
John Baldwin
9248a89d0b Add a DEVT_CD type for CD drivers. 2001-11-05 18:51:47 +00:00
John Baldwin
f0699bb775 Print out 'foo devices:' as the line before displaying a group of
devices in 'lsdev' output rather than printing out a pointer to the
print function since the user really could care less about the pointer
value.  Perhaps this was intended to be a debugging printf?
2001-11-04 02:58:39 +00:00
David E. O'Brien
5daeec1454 Revert rev 1.3 which moved us away from POSIX character classes.
The community feels our base AWK must handle them.
2001-11-03 01:35:07 +00:00
David E. O'Brien
3a167df8c3 Bell-Labs AWK does not support POSIX "bracket expressions" (POSIXese for
"character classes", basically).  So change them to their character
representation.

Submitted by:	David Wolfskill <david@catwhisker.org>
2001-11-01 07:16:35 +00:00
Mike Silbersack
0742c2bb67 grammar fix: to -> too 2001-10-01 23:41:13 +00:00
Peter Wemm
505222d35f Implement the long-awaited module->file cache database. A userland
tool (kldxref(8)) keeps a cache of what modules and versions are inside
what .ko files.  I have tested this on both Alpha and i386.

Submitted by:	bp
2001-09-11 01:09:24 +00:00
Ruslan Ermilov
3faf1df3a7 mdoc(7) police: markup nits. 2001-08-20 08:55:07 +00:00
Matthew Dillon
2f9e4e8025 Limit the amount of KVM reserved for the buffer cache and for swap-meta
information.  The default limits only effect machines with > 1GB of ram
and can be overriden with two new kernel conf variables VM_SWZONE_SIZE_MAX
and VM_BCACHE_SIZE_MAX, or with loader variables kern.maxswzone and
kern.maxbcache.  This has the effect of leaving more KVM available for
sizing NMBCLUSTERS and 'maxusers' and should avoid tripups where a sysad
adds memory to a machine and then sees the kernel panic on boot due to
running out of KVM.

Also change the default swap-meta auto-sizing calculation to allocate half
of what it was previously allocating.  The prior defaults were way too high.
Note that we cannot afford to run out of swap-meta structures so we still
stay somewhat conservative here.
2001-08-20 00:41:12 +00:00
Ruslan Ermilov
94ba280c59 mdoc(7) police: join split punctuation to macro calls. 2001-08-10 17:35:21 +00:00
Dima Dorfman
02c4d9cff7 Remove whitespace at EOL. 2001-07-15 08:21:37 +00:00
David Malone
5e209ca776 Get rid of some constness warnings. 2001-06-24 12:08:47 +00:00
Peter Wemm
5c9321595d Convert the elf loader to the new linker set layout for elf files.
This should make dependencies at load time work like before.  Oops.

Noticed by:	markm
2001-06-19 07:41:07 +00:00
Peter Wemm
357f511a58 Fix some of the worst formatting bug (seperate commit) 2001-06-19 06:48:58 +00:00
Peter Wemm
44fa54f5f6 Nuke old gensetdefs based linker sets with extreme prejudice 2001-06-14 01:23:57 +00:00
Jesper Skriver
48e312be90 Fix a minor style bug in the last commit.
Submitted by:	Adrian Steinmann <ast@marabu.ch>
MFC after:	2 days
2001-06-10 11:15:37 +00:00
Jesper Skriver
961c53b8e4 In sys/boot/common/module.c, near line 105 a request for a raw
file is processed by passing its name in argv[1]:
        return(mod_loadobj(typestr, argv[1]));
however, it is not tested to see if argv[1] actually is defined.

At best, mod_loadobj() near line 244 returns an error like
"can't find 'garbage'" but if the "filename" entered is sufficiently
long, some buffer gets overrun. Of course, "load -t filename" is
actually a typo because we meant to type "load -t mfs_root filename";
nevertheless, a hung machine seems like too harsh a punishment for
such a small typo...

PR:			i386/27693
Submitted by:	Adrian Steinmann <ast@marabu.ch>
MFC after:	1 week
2001-05-27 23:26:11 +00:00
Ruslan Ermilov
aa7664372f MAN[1-9] -> MAN. 2001-03-27 11:59:22 +00:00
Ruslan Ermilov
afcf05e46a setlocale(3) has been fixed to match POSIX standard:
LC_ALL takes precedence over other LC_* envariables.
2001-03-02 16:52:14 +00:00
Ruslan Ermilov
c2d03ea879 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
Daniel C. Sobral
32e1d1c252 Whenever the user might be offered a chance to quit through
pager_output(), respect that choice.

PR: 15747
2001-02-22 11:22:14 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Poul-Henning Kamp
0d7b8d16dc Use <sys/queue.h> macro API.
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	/sbin/md5
2000-12-30 20:40:16 +00:00
Ruslan Ermilov
f53fadafee Prepare for mdoc(7)NG. 2000-12-27 16:37:32 +00:00
Ruslan Ermilov
c5f49c2585 mdoc(7) police: removed duplicate .Os call. 2000-12-14 12:48:07 +00:00
Ruslan Ermilov
f4d874a1db mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
Ruslan Ermilov
d5874785b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 17:05:46 +00:00
Mike Smith
1d6dc22916 The default kernel filename is "kernel" again, not "kernel.ko".
Submitted by:	mckusick
2000-11-17 04:43:56 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Benno Rice
4cc1860f9b 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 Rice
f1fb6c2132 Give the network device a print method.
Reviewed by:	obrien
2000-11-10 06:37:43 +00:00
Doug Rabson
bcdb85b6b8 Don't indirect through a null pointer if we run out of kernel filenames. 2000-10-25 23:28:19 +00:00
Daniel C. Sobral
c888e59b84 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
Daniel C. Sobral
9f0c5de5f7 Start countdown only _after_ the kernel was loaded. Not very fair otherwise. 2000-09-15 07:54:10 +00:00
Daniel C. Sobral
2ae7c98e29 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
Daniel C. Sobral
869e9b2096 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
Daniel C. Sobral
3053524c85 Make the pnp structure a global variable, so it can be used elsewhere. 2000-09-08 16:51:29 +00:00
Daniel C. Sobral
59549c5031 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
David E. O'Brien
db266683d3 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
David E. O'Brien
6f54390e53 Fix the kernel default load from "/boot/modules" to "/boot/kernel".
Reported by:	dcs
2000-09-05 23:10:46 +00:00
David E. O'Brien
3bdfa9e589 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
Sheldon Hearn
243782a80a List loader.conf and friends in the FILES section.
Requested by:	obrien
2000-08-24 08:00:29 +00:00
Daniel C. Sobral
e7b7c050c7 Add missing "is".
PR:		20524
Submitted by:	Peter Pentchev <roam@orbitel.bg>
2000-08-11 10:32:23 +00:00
Paul Saab
646cf5017b 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
John Baldwin
00dc3782f7 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
John Baldwin
eb37712079 Fix the more obvious warnings to deal with my earlier warning cleanups. 2000-08-03 09:49:44 +00:00
John Baldwin
4ae4202e70 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 Kennaway
8c8970cf16 Don't call printf with no format string. 2000-07-10 06:40:06 +00:00
Kris Kennaway
487730cc8b 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
Matthew Hunt
5d98029c7e 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
Sheldon Hearn
0c74e83819 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
Daniel C. Sobral
f102f87438 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
Daniel C. Sobral
18ee60a576 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
Paul Saab
cc3d937224 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
Paul Saab
f98558ff74 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
Daniel C. Sobral
7632c12363 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
Daniel C. Sobral
7302acac1c Remove residual printf.
Prodded by: msmith
2000-06-07 03:33:12 +00:00
Jake Burkholder
e39756439c 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 Burkholder
740a1973a6 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
Daniel C. Sobral
716f301734 Document abial's .#. 2000-05-23 11:47:23 +00:00
Daniel C. Sobral
aad477d890 One of loaders' bugs disappeared somewhere along the way. 2000-05-19 11:15:12 +00:00
Daniel C. Sobral
9ece4dbfe9 Move man page directives to common/Makefile.inc. 2000-05-19 08:52:16 +00:00
Daniel C. Sobral
d9f7c44adf Make corrections to allow for Alpha. 2000-05-18 12:44:50 +00:00
Doug Rabson
8bbd2c1e46 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
David E. O'Brien
7f562b6673 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
Boris Popov
cf448cb2c9 long != int on Alphas. 2000-05-12 05:16:37 +00:00
Daniel C. Sobral
4eb5b7979d Make documentation on recently added heap? command reflect reality. 2000-05-04 22:51:21 +00:00
Daniel C. Sobral
a1d54dfc62 Add "heap?" to loader's man page. 2000-05-04 21:26:26 +00:00
Daniel C. Sobral
19c80876dc Further improve ordering. 2000-05-04 21:22:55 +00:00
Daniel C. Sobral
c45393b59c Sort entries in FreeBSD-specific FICL commands. 2000-05-04 21:18:26 +00:00
Peter Wemm
365c5db0a7 Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
Peter Wemm
62470170de GC unused variable (size) 2000-05-01 18:03:15 +00:00
Peter Wemm
cd2d859cee Fix some warnings on the Alpha. sizeof() returns different things on
x86 and Alpha. Sigh.
2000-05-01 18:02:38 +00:00
Boris Popov
801e789e01 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
Jonathan Lemon
8e30378f89 Teach the loader about the ext2fs filesystem, extended partitions, and
the new readdir function.
2000-04-29 20:49:33 +00:00
Paul Saab
6450dd3cb4 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
Mike Smith
300451c472 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
Daniel C. Sobral
a5686d2f66 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
Boris Popov
ce0d1c79c3 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
Mike Smith
51b5739aaf 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 Wemm
c447342094 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
Mike Smith
495865e47d 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 Moolenaar
a031bda24e 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
Mike Smith
390cab70e1 Update to reflect use of : not ; as separator in paths passed to the
kernel.
1999-12-07 18:31:43 +00:00
Daniel C. Sobral
35d9646783 Add fairings. Do not depend on user actually supplying the arguments
he is supposed to supply.
1999-12-01 18:30:26 +00:00
Daniel C. Sobral
69c9583604 Make the prompt look like on OpenBoot. 1999-11-27 21:44:47 +00:00
Daniel C. Sobral
3206c41a3c 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
Daniel C. Sobral
de271252c9 Bring in ficl version 2.03. No version bump for loader. 1999-09-29 04:43:16 +00:00
Doug Rabson
74b128bad6 * 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 Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Nik Clayton
51e09cd72a Fix some typos.
PR:             docs/11955
Submitted by:   Christian Weisgerber <naddy@mips.rhein-neckar.de>
1999-07-28 20:30:59 +00:00
Mike Smith
73332890ea 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
Nick Hibma
1854719067 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
Mike Smith
396641ab13 Document the hw.physmem tunable. (There should be arch-specific tunable
help sections.)
1999-07-02 20:38:05 +00:00
Peter Wemm
5110b634b0 Reconcile all the loader newvers.sh's into one common one. 1999-06-29 21:23:26 +00:00
Peter Wemm
240ee5d0e0 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
Ruslan Ermilov
d41ebb5068 -mdoc fix. 1999-06-23 09:06:18 +00:00
Doug Rabson
75aeebed71 Typo: "can't boot 'boot'" should be "can't boot 'kernel'" 1999-05-30 10:45:03 +00:00
Brian Somers
8a768b4324 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
Robert Nordier
32ea10b4fc Fix a reference to the mysterious Mike Smisth. 1999-05-22 13:18:28 +00:00
John Birrell
957055c6a9 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
Doug Rabson
84b399de51 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
Joseph Koshy
e539c67bbb Correct typos.
PR:		docs/11445
Submitted by:	Kazuo Horikawa <horikawa@jp.freebsd.org>
1999-05-03 08:32:45 +00:00
Daniel C. Sobral
4093b9aa2e 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
Dag-Erling Smørgrav
5f967b24fc Make the location of init(8) tunable at boot time. 1999-04-20 21:15:13 +00:00
Joerg Wunsch
346f1ca8fc 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 Wemm
6182fdbda8 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
Daniel C. Sobral
306a07af57 The man page, version 0.1. 1999-03-15 08:52:23 +00:00
Mike Smith
8a252a3737 Fix syntax for boot command
Noticed by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1999-03-14 19:55:01 +00:00
Daniel C. Sobral
1d2a3d5731 Increase ficl's dictionary size, in preparation for the newer loader.rc. 1999-03-08 11:00:02 +00:00
Daniel C. Sobral
08c9325cb2 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
Daniel C. Sobral
c7bf325ce2 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
Daniel C. Sobral
85f0ea7590 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
Tor Egge
3d8befc22d 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
Daniel C. Sobral
0538bafc65 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
Daniel C. Sobral
47749087ac 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
Daniel C. Sobral
b7efae4386 Silence a warning.
PR:		bin/9754
1999-02-04 13:16:21 +00:00
Mike Smith
617aa5cdf8 Mention the net.inet.tcp.tcbhashsize tunable. 1999-02-03 09:07:33 +00:00
KATO Takenori
dccbc08d92 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
Jordan K. Hubbard
ae84df99c4 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
Mike Smith
07dd15c173 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
Jordan K. Hubbard
652375d1e5 Make builtin's state-aware in loader.
Submitted by:	Daniel C. Sobral
PR:		9663
1999-01-28 06:33:03 +00:00
Robert Nordier
5ca1fa1ed0 Correctly record the end of the a.out symbol table. In practice, a
bootinfo structure where bi_esymtab < bi_symtab was being passed
to the kernel.  In the case of older 2.x kernels, this was causing
garbage to be printed to the video console, followed by an exception.

This should resolve a problem reported on -current by Peter Jeremy
<peter.jeremy@auss2.alcatel.com.au>.
1999-01-25 10:34:35 +00:00