summaryrefslogtreecommitdiffstats
path: root/sys/boot/forth/loader.4th
Commit message (Collapse)AuthorAgeFilesLines
* Now I see the error of my ways.dcs2000-10-091-6/+8
| | | | | | | | | | | | | | | Previous revision of this file changed the "boot" commands to take no arguments from the stack. This is only valid in the case where a kernel has not been loaded. In that case, load_kernel_and_modules will be called, which takes a list of arguments from the stack. When a kernel is presently loaded, though, the list of arguments must be passed to the boot command, which was the behaviour before the last revision. Fix things for both cases. Noticed by: S-Max and others on that chat room
* What could possibly have possessed me to forget the "0 (arguments)"dcs2000-09-251-2/+2
| | | | | | | | in two of the three boot words in the "boot" redefinition, I have no clue. Fix it. Noticed by: bp Noticed by: adrian
* Check for the correct minimum version required by the current code.dcs2000-09-181-4/+4
| | | | I hope I got this right... :-)
* Use _ instead or - where proper, according to the style I have beendcs2000-09-161-2/+20
| | | | | | using. Overload "?" so it will also show loader.4th commands.
* Solve a name clash.dcs2000-09-161-4/+4
| | | | Add something to help debugging.
* Both boot and boot-conf were using a different algorithm from the onedcs2000-09-161-2/+10
| | | | | | | | | | | | | used by start to find the kernel. Fix this. Also, boot would proceed immediately in the absence of a path as argument. Check first if a kernel has already been loaded, and, if not, fall back to load kernel&modules behavior. Some further factorizing. I deem this code to be mostly readable by now! :-) Many thanks to: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
* Factorize, reorganize, and move code around.dcs2000-09-151-97/+9
| | | | | | | | | | | | | | | | | | | | | | | The boot-conf and boot code had various bugs, and some of it was big, ugly, unwieldy, and, sometimes, plain incorrect. I'm just about completely replaced these ugly parts with something much more manageable. Minor changes were made to the well-factorized parts of it, to accomodate the new code. Of note: * make sure boot-conf has the exact same behavior wrt boot order as start. * Correct both boot and boot-conf so they'll work correctly when compiled in, as they both had some bugs, minor and major. * Remove all the crud from loader.4th back into support.4th, for the first time since boot-conf was first improved. Hurray! I'm fairly satisfied with the code at this time. Time to see about those man pages...
* First tackle at trying to handle the New Deal on kernels.dcs2000-09-091-112/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load the first of the following kernels to be found: ${kernel} if ${kernel} is an absolute path /boot/${kernel}/${kernel} /boot/${kernel}/${bootfile} ${kernel}/${kernel} ${kernel}/${bootfile} ${kernel} ${bootfile} The last instance of ${kernel} and ${bootfile} will be treated as a list of semicolon separated file names, and each will be tried in turn, from left to right. Also, for each filename loader(8) will try filename, filename.ko, filename.gz, filename.ko.gz, in that order, but that's not related to this code. This resulted in a major reorganization of the code, and much of what was accumulating on loader.4th was rightly transfered to support.4th. The semantics of boot-conf and boot also changed. Both will try to load a kernel the same as above. After a kernel was loaded, the variable module_path may get changed. Such change will happen if the kernel was found with a directory prefix. In that case, the module path will be set to ${directory};${module_path}. Next, the modules are loaded as usual. This is intended so kernel="xyzzy" in /boot/loader.conf will load /boot/xyzzy/kernel.ko, load system modules from /boot/xyzzy/, and load third party modules from /boot/modules or /modules. If that doesn't work, it's a bug. Also, fix a breakage of "boot" which was recently introduced. Boot without any arguments would fail. No longer. Also, boot will only unload/reload if the first argument is a path. If no argument exists or the first argument is a flag, boot will use whatever is already loaded. I hope this is POLA. That behavior is markedly different from that of boot-conf, which will always unload/reload. The semantics introduced here are experimental. Even if the code works, we might decide this is not the prefered behavior. If you feel so, send your feedback. (Yeah, this belongs in a HEADS UP or something, but I've been working for the past 16 hours on this stuff, so gimme a break.)
* Enhance boot-conf.dcs2000-09-081-24/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now boot-conf can also receive parameters to be passed to the kernel being booted. The syntax is the same as in the boot command, so one boots /kernel.OLD in single-user mode by typing: boot-conf /kernel.OLD -s instead of boot-conf -s /kernel.OLD The syntax still supports use of directory instead of file name, so boot-conf kernel.OLD -s may be used to boot /boot/kernel.OLD/kernel.ko in single-user mode. Notice that if one passes a flag to boot-conf, it will override the flags set in .conf files, but only for that invocation. If the user aborts the countdown and tries again without passing any flags, the flags set in .conf files will be used. Some factorization was done in the process of enhancing boot-conf, as it has been growing steadly as features are getting added, becoming too big for a Forth word. It still could do with more factorization, as a matter of fact. Override the builtin "boot" with something based on boot-conf. It will behave exactly like boot-conf, but booting directly instead of going through autoboot. Since we are now pairing kernel and module set in the same directory, this change to boot makes sense.
* Revert to 1.8dcs2000-06-141-23/+23
|
* With apologies to dcs, temporarily comment out the version check code. Itpeter2000-06-141-23/+23
| | | | | | | | | | | | | | | is failing for everybody that I have spoken with that has tried it. FreeBSD/i386 bootstrap loader, Revision 0.8 (root@outback.netplex.com.au, Tue Jun 13 23:26:49 PDT 2000) Loader version 0.3+ required Aborted! start not found Note that the 0.3+ message is from inside the arch-alpha block, not the i386 block of code. And even then, 0.8 is higher than 0.3. This prevents the rest of the loader.conf stuff working. :-/
* The word environment? returns a flag indicating whether the variabledcs2000-06-121-7/+23
| | | | | | was found or not. Fix it's usage. Alas, it caused no problem before, besides leaving garbage in the stack, because refill, used by [if] [else] [then], was broken.
* Put some version checking.dcs2000-06-071-0/+8
|
* Modify boot-conf so it can take a kernel or directory name asdcs2000-06-071-4/+122
| | | | | | | | | | a parameter and dtrt. Also, make boot-conf always unload first. There wasn't really any point in not doing this, as the kernel _has_ to be loaded before any other modules. Tested by: dwhite
* Add silly password feature. If people want to depend on a flaweddcs1999-11-241-0/+24
| | | | | | | security measures, so be it. It costs us almost nothing. Document some code in support.4th that I was unable to understand just by reading.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add "initialize" to loader.4th, so running "start" is not actually needed.dcs1999-05-141-2/+14
|
* Add loader.4th man page (worst man page I ever wrote -- reviewsdcs1999-04-241-1/+79
| | | | | are welcomed). Correct a nasty bug in loader.4th before anyone notices, add a couple of features.
* New loader.rc stuff.dcs1999-03-091-0/+114
Reviewed by: jkh
OpenPOWER on IntegriCloud