summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/interp.c
Commit message (Collapse)AuthorAgeFilesLines
* Use __FBSDID().obrien2003-08-251-2/+4
| | | | Also some minor style cleanups.
* Upper case the FreeBSD loader prompt.obrien2001-11-191-1/+1
| | | | | | 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.
* Change NOFORTH comment character from # to \ followed by space,dcs2000-09-101-1/+1
| | | | | | | | | 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.
* Bring back the perform() function. However, conditionionalize it onjhb2000-08-041-0/+36
| | | | BOOT_FORTH as it is only used if BOOT_FORTH is not defined.
* Cleanup warnings. Most of these are signed/unsigned warnings, as well asjhb2000-08-031-34/+2
| | | | some added const's.
* Don't call printf with no format string.kris2000-07-101-1/+1
|
* Remove the setting of sourceid from bf_vm(), as bf_vm() really hasdcs2000-06-141-1/+7
| | | | | | | | | | | | 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.
* Make the prompt look like on OpenBoot.dcs1999-11-271-1/+1
|
* Changes the default prompt to "ok".dcs1999-11-011-1/+3
| | | | | | | 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. :-)
* Bring in ficl version 2.03. No version bump for loader.dcs1999-09-291-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Don't clobber the "prompt" variable if it has already been set (e. g.joerg1999-04-201-2/+3
| | | | | | from within loader.conf). Reviewed by: dcs
* Fix a number of memory leaks and other memory-related disorders.dcs1999-03-081-3/+4
| | | | | | | | | | | | | | | 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>
* Don't treat empty lines as end-of-file in include(). (I can'tdcs1999-03-021-2/+2
| | | | believe this bug is still here... :-( )
* Fix assorted memory leak/buffer reuse problems.dcs1999-02-221-3/+16
| | | | | | | Not restricted to, but including: PR: kern/9631 Submitted by: Bill Fenner <fenner@parc.xerox.com>
* Make use of prototypes to silence warnings.dcs1999-02-041-1/+27
| | | | | | | | | | | | | | | | | | | 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.
* bootstrap.hmsmith1999-01-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | help.common interp.c Rename the 'source' command to 'include' in order to avoid conflict with the ANS Forth command of the same name. (kern/9473) interp_forth.c: Changes from kern/9412 (EXCEPTION word), kern/9442 (TIB buffer sizing) and an improved version of kern/9460 (set version numbers). load_aout.c: Trim some obsolete #if 0'ed cruft. pnp.c: Tidy the pnpscan output, turn off the module scanning until we sort out how to do it right. PR: kern/9412 kern/9442 kern/9460 kern/9473 Submitted by: PRs from Daniel Sobral <dcs@newsguy.com>
* Fall back to /boot/boot.conf, if /boot/loader.rc was not fount. This isabial1999-01-151-10/+18
| | | | | | to cover the transition period. Suggested by: msmith
* Change /boot/boot.conf to /boot/loader.rc - this name reflects what itabial1999-01-131-2/+2
| | | | | | really is. Agreed upon by: jkh, msmith and many others
* Clean some unused variables lintpeter1999-01-041-2/+4
|
* * Begin integration of built-ins with Forth: leave the exit code fromabial1998-12-221-3/+12
| | | | | | | a built-in command on Forth stack. * Fix a bug which was causing a panic when loading stripped aout kernels. Reviewed by: jkh
* Add BootForth hooks; if BOOT_FORTH is defined, pass every line readmsmith1998-11-041-2/+10
| | | | | | | to the Forth interpreter. Instantiate all of our inbuilt commands as Forth words, and handle them being called from there. Add my copyright to the bcache module (oops).
* Make ISA PnP work. This successfully enumerates as many ISA devices as Imsmith1998-10-211-5/+5
| | | | | | | | | | | | can fit into my test machine. - Move to using STAILQs rather than ad-hoc singly-linked lists. - Use a mostly procedural interface to the PnP information. This improves data-hiding. Implement a new linker-set technique (currently on i386 only but should work on Alpha as well). This is a good candidate for replacing the current gensetdefs cruft completely.
* Sync the MODINFO constants with <sys/linker.h>msmith1998-10-091-4/+4
| | | | | | Remove debugging in command_read(). Correctly strip leading controls on script commands. Make 'ls' more DWIM in regard to pathnames. We can still do better.
* - VERBOSE_LS is obsolete, as the heap is much better behaved now.msmith1998-10-071-31/+100
| | | | | | | | | | | | | | | - 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.
* Resynch with working sources before BTX integration.msmith1998-09-141-3/+1
| | | | | | | | | | | - 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.
* Bootstrap updates.msmith1998-09-031-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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()
* New commandline/script parser, supports backslash quoting and environmentmsmith1998-09-011-40/+15
| | | | | | variable substitution. Submitted by: Jordan Hubbard <jkh@freebsd.org>
* This is the new unified bootstrap, sometimes known previously as themsmith1998-08-211-0/+207
'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.
OpenPOWER on IntegriCloud