Commit graph

230 commits

Author SHA1 Message Date
Mike Smith 82bbbb8c73 kzip the loader, this shrinks it to about 60% of its original size.
Note that this is a stopgap with dependancies on the a.out tools.
1999-01-09 02:38:40 +00:00
Mike Smith ee5799c4ee Extend bd_print() so that it displays slices and partitions on disks. 1999-01-09 02:36:19 +00:00
Mike Smith b6e83eb8f4 Add a description for 'lsdev' so that it shows up in the '?' display 1999-01-09 02:34:48 +00:00
Mike Smith 0f2ca06478 Alpha-specific help topics (currently empty) 1999-01-05 20:44:26 +00:00
Peter Wemm e423230b0d Fix a potential sign extension bug on 8-bit chars.
Outputting a backspace isn't supposed to be destructive..  It isn't on
most terminals, nor on the standard bios output (vs. TERM_EMU mode)
1999-01-04 18:45:08 +00:00
Peter Wemm 4cd1140888 Fix variable initialization.. It was written with '==' instead of '-'.
#include <string.h> for string prototypes.
1999-01-04 18:39:24 +00:00
Peter Wemm f68d58133b Clean some unused variables lint 1999-01-04 18:38:23 +00:00
Peter Wemm 717b58274a Don't forget a trailing \n when loading a kernel that has been stripped.
(This might make ELF_VERBOSE look funny, but I'm tempted to delete that
 anyway)
1999-01-04 18:37:41 +00:00
Mike Smith 170aadf69a Restore dependancy to build loader.help here 1999-01-04 01:28:46 +00:00
Mike Smith a2d84c6405 Add dependancy to build loader.help here 1999-01-04 01:28:39 +00:00
Mike Smith 9aad9a4900 First cut at generating loader.help for the alpha 1999-01-03 20:54:05 +00:00
Mike Smith 5dfcac87f7 Reenable generation of the loader.help file 1999-01-03 20:50:35 +00:00
Jordan K. Hubbard 8963f9f139 Update for new boot block location. 1999-01-02 23:22:12 +00:00
Andrzej Bialecki 8f1e6e6e22 Add support for some FACILITY words:
key? ( -- flag)  \ check to see if there's a key to be read from input
ms   ( u -- )    \ wait that many milliseconds
seconds ( -- u ) \ get number of seconds from midnight.

'words' now outputs the list page by page - this probably should go
through libstand's pager, but will have to wait for closer integration of
built-ins with Forth...

Submitted partially by:	W Gerald Hicks <wghicks@bellsouth.net>
1998-12-31 14:03:28 +00:00
Andrzej Bialecki de37e4a6d2 Add back ability to make beeps when using new TERM_EMU.
Submitted by:	W Gerald Hicks <wghicks@bellsouth.net>
1998-12-31 13:44:04 +00:00
Andrzej Bialecki cf9443f92b Add simple terminal emulator, compatible with cons25. Currently supported
capabilities are: AF, AB, cm, ho, me, cd. The code is hidden behind
-DTERM_EMU - should it cause any problems, you can remove this define
to get back the old behaviour.

You'll find some examples how to use it in src/share/examples/bootforth.

Reviewed by:	jkh
1998-12-22 11:51:25 +00:00
Andrzej Bialecki ac19ebdfbe Add new word ".#" which acts like "." but doesn't output a space separator.
I found it impossible to output parametrized strings like "\033[%d;%dH"
without building them first in pad area.
1998-12-22 11:46:27 +00:00
Andrzej Bialecki 1c49fb07d8 * Begin integration of built-ins with Forth: leave the exit code from
a built-in command on Forth stack.
* Fix a bug which was causing a panic when loading stripped aout kernels.

Reviewed by:	jkh
1998-12-22 11:41:51 +00:00
Nick Hibma e6799271cd Removed dynamic loading of FileHandle 1998-12-16 09:09:09 +00:00
Mike Smith c2e3e002f6 Disable build/install of boot.help until we sort out how to construct it
in the makeworld environment.
1998-12-16 02:27:15 +00:00
Mike Smith 8719fada36 Reformat help to improve subtopic display appearance, other minor
cleaning.  The 'help' command in the loader should now be usable and
hopefully informative.
1998-12-15 14:32:17 +00:00
Mike Smith aa203600d5 Build the composite help file from the generic and architecture-specific
help files, sorting topics and subtopics to allow maximum flexibility.
1998-12-15 14:21:30 +00:00
Mike Smith 330ef7ac09 unlocalise build date (merge from i386) 1998-12-15 04:27:15 +00:00
Andrey A. Chernov 722135c358 unlocalize date
Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
1998-12-07 16:17:41 +00:00
Robert Nordier b956ca7ca4 Revise some comments and labels. 1998-12-05 11:58:33 +00:00
Robert Nordier 12c38b04f1 Drop EDD support detection, though retain configurable use of disk
packet interface.  Add booteasy-style F5 support.  Add no-update
option. Implement various space optimizations and consistency fixes.
1998-11-29 14:09:00 +00:00
Robert Nordier 5103ed619b Drop use of BIOS int 0x14 services in favor of direct port I/O.
Feedback and testing: Adrian Filipi-Martin <adrian@ubergeeks.com>
1998-11-22 07:59:16 +00:00
Archie Cobbs a8c0f6e542 Fix misallocation of buffer bug (too short) 1998-11-20 02:57:41 +00:00
Paul Richards 9abd5d84ac This fixes a bug in the bcache code whereby false cache hits occur
the first time block 0 is read. This fix initialises the block
numbers to -1 which isn't the most correct thing for a daddr_t but
it isn't likely to cause a problem in the boot blocks and it could
do with a more thought out fix later.

The bug is probably benign on the i386 but on the alpha it can
cause initial file opens to fail. This is the cause of the "can't
open /boot/boot.conf" errors.

It appears on the alpha because of a number of combining factors.
On the alpha the LABELSECTOR is 0 so block 0 needs to be read in
from the media. The first time this happens you get a false hit
because the bc_blkno field is zero initially. Also, the timestamp
check against this cache hit succeeds because on the alpha a hacked
getsecs() function can return 0 when it starts counting so that
the zero initial timestamp + BCACHE_TIMEOUT is greater than the
current time until getsecs() has counted passed BCACHE_TIMEOUT.

The overall effect is that the first open() that occurs gets a
false cache hit and returns garbage to the bd_strategy() function
which then fails the open() call. This false hit then stays in the
cache until BCACHE_TIMEOUT getsecs() ticks have passed; all open()
calls during this time fail.

This explains why you can generally access the media by the time
you get to interp() and start issuing commands but the earlier
attempts to run the boot scripts are failing.

It's possible that this is causing the problem switching to the
mfsroot floppy as well but I haven't confirmed that.
1998-11-19 18:12:03 +00:00
Mike Smith bcda95d923 Add documentation for $rootdev. 1998-11-13 23:53:02 +00:00
Mike Smith 8f0a6b5b8c Add a new variable $num_ide_disks which is used to offset the unit number
for SCSI disks when converting from BIOS unit numbers to da unit numbers.

Prompted by Kevin Street <street@iname.com>
1998-11-13 23:40:02 +00:00
Jordan K. Hubbard 207fe43d59 bootforth seems to be working well enough for me and others to turn
on by default.  If it causes trouble, it's very easy to switch off again.
1998-11-12 07:40:51 +00:00
Robert Nordier 21ffb6774a Revise error messages. 1998-11-11 08:56:17 +00:00
Robert Nordier 0293eac42c Prevent boot.config being parsed more than once. 1998-11-08 18:37:28 +00:00
Robert Nordier 7ac90f7d65 Drop the familiar 'text=xxxx data=xxxx bss=xxxx ...' display while
loading.  This eliminates noise when loading boot/loader; and when
loading a kernel, they generally flash by too fast to be
intelligible anyway.
1998-11-08 18:29:29 +00:00
Robert Nordier 9888bdcd29 boot1: Eliminate EDD detection and optional use of disk packet
interface.  Do some general consistency fixes and space optimizations.
Use of some freed-up space to defend against possible BIOS misfeatures.

boot2: Revise disk read interface to provide for boot1 changes.  Free
up space for this.
1998-11-08 15:36:35 +00:00
Jordan K. Hubbard 37869e957d o Add proper stack checking to all file words
o add fkey and fread
o eliminate fexists now that this can be expressed in HLL forth
  ( : fexists fopen dup -1 <> if fclose 1 else drop 0 then ; ) :-)

Once we get the ability to write files, it should be possible to do
stand-alone rescue work from the 3rd stage boot. :)
1998-11-07 17:38:40 +00:00
Jordan K. Hubbard 335edb957d Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose.
1998-11-07 06:18:06 +00:00
Jordan K. Hubbard ed82a24960 Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose.  Also look for /boot/boot.4th now and, if found,
load its contents.
1998-11-07 06:18:00 +00:00
Jordan K. Hubbard d6a0c2b58d Take init out of here - it's a layering violation. 1998-11-07 05:01:25 +00:00
Jordan K. Hubbard c412a7ae32 Don't have debugging on by default - it makes testing annoying. :) 1998-11-07 03:44:10 +00:00
Jordan K. Hubbard 65e7b066b3 OK, fload/fexec work properly when both compiling and interpreting
now.  Gack.
1998-11-07 01:56:06 +00:00
Jordan K. Hubbard ebc4b7c4fb switch words to default mode. 1998-11-06 23:50:08 +00:00
Jordan K. Hubbard e1266cedab Submit better fix to the prompt bug. 1998-11-06 23:22:26 +00:00
Jordan K. Hubbard f476d38a01 Make fexists/fload work with existing string literals instead. Doing
my own string literal handling is just too wonky.
1998-11-06 23:20:32 +00:00
Jordan K. Hubbard c6c128e122 Argh, I had this right[er] before. More commits to follow. 1998-11-06 19:17:03 +00:00
Jordan K. Hubbard 11adc0d65e Use proper literal names. 1998-11-06 04:01:32 +00:00
Mike Smith 8a34f8ba88 Ack. Create parseable command tail properly, and eat args out of the TIB. 1998-11-06 03:50:44 +00:00
Mike Smith 8190a019a5 Don't not print the prompt string; not doing this has funny side-effects.
Make the prompt an empty string instead.
1998-11-06 03:47:08 +00:00
Mike Smith 84924924e1 Don't use the poxy vmGetString interface (who uses counted strings these
days?), get the input buffer ourselves.  Add some debugging code.
1998-11-06 03:45:36 +00:00