summaryrefslogtreecommitdiff
path: root/sys/boot/common/boot.c
Commit message (Collapse)AuthorAgeFilesLines
* Implement the long-awaited module->file cache database. A userlandPeter Wemm2001-09-111-3/+2
| | | | | | | | | | 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 Notes: svn path=/head/; revision=83321
* The default kernel filename is "kernel" again, not "kernel.ko".Mike Smith2000-11-171-1/+1
| | | | | | | Submitted by: mckusick Notes: svn path=/head/; revision=68851
* Don't indirect through a null pointer if we run out of kernel filenames.Doug Rabson2000-10-251-1/+1
| | | | Notes: svn path=/head/; revision=67591
* Start countdown only _after_ the kernel was loaded. Not very fair otherwise.Daniel C. Sobral2000-09-151-4/+4
| | | | Notes: svn path=/head/; revision=65881
* Fix autoboot. Now autoboot *always* show the correct kernel name. ItDaniel C. Sobral2000-09-081-17/+36
| | | | | | | | | | | | | | | | | | | | | 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(). Notes: svn path=/head/; revision=65613
* With the committed changes to the loaders modules path code, the kernelDavid E. O'Brien2000-09-061-1/+1
| | | | | | | path does not need to be hard coded. Notes: svn path=/head/; revision=65549
* Fix the kernel default load from "/boot/modules" to "/boot/kernel".David E. O'Brien2000-09-051-1/+1
| | | | | | | Reported by: dcs Notes: svn path=/head/; revision=65502
* The kernel is now known as `kernel.ko' and it and its matching modulesDavid E. O'Brien2000-09-051-1/+1
| | | | | | | live in ``/boot/kernel/''. Notes: svn path=/head/; revision=65501
* Cleanup warnings. Most of these are signed/unsigned warnings, as well asJohn Baldwin2000-08-031-10/+9
| | | | | | | some added const's. Notes: svn path=/head/; revision=64187
* Delay calling the device cleanup routines until the absolute lastPaul Saab2000-06-141-5/+0
| | | | | | | | | 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. Notes: svn path=/head/; revision=61659
* The loader was written so that if /kernel was missing /kernel.old wouldDavid E. O'Brien2000-05-131-0/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=60490
* Update loader logic to distinguish modules vs. files.Boris Popov2000-05-011-8/+8
| | | | | | | | | | Add support for module metadata. The old way of dependancy handling will be supported for a while. Reviewed by: peter Notes: svn path=/head/; revision=59854
* Add a cleanup function. This is needed for PXE where you shouldPaul Saab2000-04-201-0/+6
| | | | | | | shutdown the UNDI and unload the stack. Notes: svn path=/head/; revision=59408
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Walk around the end of all the silly guessing of device types and unitMike Smith1999-07-211-1/+69
| | | | | | | | | | 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. Notes: svn path=/head/; revision=48952
* The boot countdown timer says it will boot in 1 seconds,Nick Hibma1999-07-151-2/+4
| | | | | | | | | | which is grammatically incorrect. PR: 12628 Submitted-By: R. Matthew Emerson <rme@nightfly.apk.net> Notes: svn path=/head/; revision=48829
* Typo: "can't boot 'boot'" should be "can't boot 'kernel'"Doug Rabson1999-05-301-2/+2
| | | | Notes: svn path=/head/; revision=47609
* Always output a linefeed when we've decided whether to bootBrian Somers1999-05-281-6/+3
| | | | | | | | | 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. Notes: svn path=/head/; revision=47576
* Standardise on ';' as a component separator; it seems to be a little moreMike Smith1998-11-021-4/+4
| | | | | | | common than ','. Notes: svn path=/head/; revision=40832
* * Extend the memory available for the heap from 256k to 512k.Doug Rabson1998-10-311-2/+2
| | | | | | | | | | | | * 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. Notes: svn path=/head/; revision=40793
* - Add a new command 'lsdev' to list devices which might be likely to hostMike Smith1998-10-311-3/+5
| | | | | | | | | | | | | filesystems. - New 'help' command and data in the help.* files (not yet installed), provides topic and subtopic help, indexes, etc. - Don't crash if the user tries to set an invalid console. Be helpful instead. - Expand tabs (badly) on the i386 video console. - Some minor cosmetic changes. Notes: svn path=/head/; revision=40775
* Tweak the output one more time again. The kernel or module pathnamePeter Wemm1998-10-141-3/+3
| | | | | | | is useful, and usually fits all on one line with the load sizes. Notes: svn path=/head/; revision=40327
* Cosmetic: After the autoboot timeout, print a \n.Peter Wemm1998-10-111-2/+6
| | | | Notes: svn path=/head/; revision=40213
* - VERBOSE_LS is obsolete, as the heap is much better behaved now.Mike Smith1998-10-071-8/+30
| | | | | | | | | | | | | | | | | | - Don't whine about nodes we can't stat(); these are usually symlinks that lead out of the filesystem. - Autoboot is now controlled by $autoboot_delay, which is a value in seconds or NO to disable autoboot. - Don't autoboot at the end of boot.conf if we have already tried. - Add a 'read' command to complement 'echo'. Both are still hidden. - Improve the 'source' command/function so that it is possible to source scripts off removable media. The entire script is read and saved before beginning execution. Script lines beginning with '@' will not be echoed when being executed. Script execution will normally terminate at the first error, however if the script line begins with '-' this behaviour is overriden for that command. Notes: svn path=/head/; revision=40015
* boot.cMike Smith1998-10-021-3/+9
| | | | | | | | | | | | | | Increase the robustness of the "is it time to boot yet" test; if the time skipped the "when" time, we would miss it. Don't spin in an endless loop if we don't find the first possible kernel suggested. When we run out, don't try to load an empty kernel name. load_aout.c printf format warnings Notes: svn path=/head/; revision=39894
* Use the variable with the path in it for the error message.Peter Wemm1998-09-281-2/+2
| | | | Notes: svn path=/head/; revision=39732
* Bootloader update.Mike Smith1998-08-311-2/+4
| | | | | | | | | | | | | | | - 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> Notes: svn path=/head/; revision=38712
* This is the new unified bootstrap, sometimes known previously as theMike Smith1998-08-211-0/+229
'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. Notes: svn path=/cvs2svn/branches/MSMITH/; revision=38465