Commit Graph

99 Commits

Author SHA1 Message Date
Robert Nordier
10806461a7 Override for ELF. Override .s.o suffix rule. 1998-10-11 11:27:48 +00:00
Peter Wemm
7532a55a62 Fix a warning that's been bugging me for ages. 1998-10-11 10:29:49 +00:00
Peter Wemm
68e3a08de1 Fix a warning 1998-10-11 10:28:51 +00:00
Peter Wemm
6e9108b6ac Probe all consoles, not just the first. It doesn't make a lot of
difference, but might later on when we implement some sort of multi-head
console mode.  Select a console after probing them all.
Don't strdup a potentially NULL return from getenv().
If we don't select an active console, choose the first regardless.
Call the console init function, at startup time and on a manual change.
The env_setenv() function needs EV_VOLATILE because it's pointing to
data that isn't malloc'ed and will cause a fault if it's freed later.
1998-10-11 10:19:11 +00:00
Peter Wemm
450caa170f Cosmetic: After the autoboot timeout, print a \n. 1998-10-11 10:10:41 +00:00
Peter Wemm
7d9cbdec8f Only call vidc_init() once (unless forced).
Cosmetic change to the init-time character eater (like, make it increment
the index counter - if there's a problem, it would sit there in an infinite
loop instead of only running 10 times).
1998-10-11 10:07:52 +00:00
Peter Wemm
a1c1935fa8 Fix comconsole mode. The int 0x14 read and status commands were reversed.
Also, make sure we set %dx each time around otherwise the commands
suddenly start trying to work on things like com92 instead of com1.
Make sure comc_init() is only run once.
Cosmetic change to init-time character eater.
1998-10-11 10:05:13 +00:00
Peter Wemm
1206a4f594 Warn that one of the DEBUG statements has a v86 recursion bug. 1998-10-11 10:01:55 +00:00
Peter Wemm
00fe329527 Fix comment to match code 1998-10-11 09:53:30 +00:00
Dima Ruban
18d099b0c4 add <sys/linker.h> 1998-10-11 03:53:35 +00:00
Robert Nordier
0def18d819 Fix a typo.
Output another newline before invoking bootstrap.
1998-10-10 14:03:03 +00:00
Robert Nordier
91284f875f Turn off the new /sys/boot stuff (except boot0) unless OBJFORMAT
is elf.  (The BTX client must be ELF, though it is packaged as a.out
for compatibility.)
1998-10-09 23:30:16 +00:00
Peter Wemm
7deb2dabef Attempt to at least align MODINFO_* blocks. IMHO, decoding this stuff
should be MD code since one day we'll have to recover pages from deleted
preload data.  MI code can't be expected to know how to deal with pmap
internals, assuming it gets done via pmap that is. :-)
1998-10-09 23:24:55 +00:00
Peter Wemm
1d59e49683 Turn symbol table info passing back on, although it's probably not
particularly useful in this form.  KLD can deal with it much better.
setenv kernelname moved earlier.
1998-10-09 23:22:30 +00:00
Peter Wemm
f62f10b275 Remove kernelname setenv, the common code does it.
Use the metadata for symtab pointers, mainly to keep it common with
elf_freebsd.c.
1998-10-09 23:20:47 +00:00
Peter Wemm
376f525c56 Implement preloading for elf modules
- get dependency info from PT_DYNAMIC's DT_NEEDED tags.
 - store MODINFOMD_DYNAMIC for the kernel's later use
setenv kernelname when we have it
Fix firstaddr/lastaddr calculation (duh! :-)
Explicitly skip string table with section names in it.
1998-10-09 23:18:43 +00:00
Peter Wemm
6323a7f93f Preload support for a.out KLD not implemented yet. (almost)
KLD modules are *not* PIC.  (Shared libs are pic to avoid relocations
causing copy-on-write, that's irrelevant here).
setenv kernelname when we load it.
Use MODINFO_SSYM/ESYM for each symbol section when (if) there are
more than one being loaded.
1998-10-09 23:15:39 +00:00
Peter Wemm
c582ad070a Use a consistant module search path (same as kernel will be).
Use new dependency mechanism.
1998-10-09 23:12:34 +00:00
Peter Wemm
12218096e1 loader <-> kernel preload module interface constants moved to common file.
Remove Mike's explicit data structures for dependency info.  This is
done via DT_NEEDED etc in the dynamic section for now.  This may need
to be revisited later on.
1998-10-09 23:11:05 +00:00
Robert Nordier
4025ae9d2a Get this building as a.out or ELF.
With thanks to: jdp
1998-10-09 17:19:51 +00:00
Mike Smith
cab57be9ae Remove some debugging code.
Do a much better job of DWIM with partial device specifications.
Fix the module metadata build process, which was completely broken.
Use a larger read buffer when copying large objects in; this
improves performance marginally and will avoid flushning any small caches
we might choose to implement.
1998-10-09 07:11:19 +00:00
Mike Smith
6ba0dd2cfc Sync the MODINFO constants with <sys/linker.h>
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.
1998-10-09 07:09:22 +00:00
Peter Wemm
e3de88f4ff Fix that pesky boot aguments parsing bug. (I think :-) 1998-10-07 10:55:46 +00:00
Mike Smith
ee4f7b62a0 Request the flags back when checking for keyboard status.
Submitted by:	rnordier
1998-10-07 07:34:31 +00:00
Mike Smith
0bab8c3243 Enable the DOS filesystem. NOTE: you will have to rebuild libstand in
order to be able to build again.
1998-10-07 02:39:32 +00:00
Mike Smith
0f7d15efd8 - Drain the keyboard buffer when initialising.
- Be pedantic about the return from int 16 fn 01.
1998-10-07 02:39:06 +00:00
Mike Smith
b820c8e626 - VERBOSE_LS is obsolete, as the heap is much better behaved now.
- 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.
1998-10-07 02:38:26 +00:00
Mike Smith
82bb1fb746 VERBOSE_LS is obsolete 1998-10-07 02:33:01 +00:00
Mike Smith
afcd516b82 bootinfo.c
Strip any device name information from the kernel name
	before passing it in.

biosdisk.c
	Be more strict about matching device names to slice entries.
	Only allow unsliced syntax on unsliced disks.
1998-10-06 07:27:05 +00:00
Robert Nordier
b7b32c2745 Fix for "get base memory" bug found and mostly fixed by Mike. 1998-10-06 07:15:35 +00:00
Mike Smith
024e2ede72 The BIOS memory size is only a word. Some BIOSsen have garbage in the other
16 bits we were reading here, causing loss of arguments.
1998-10-06 06:13:36 +00:00
Mike Smith
58d4e8e80f Build boot0 as well. 1998-10-06 06:12:55 +00:00
Robert Nordier
09c7ea1cc8 Install in /boot. 1998-10-05 19:20:36 +00:00
Robert Nordier
264ba5c0fe boot0 is a booteasy (boot manager) workalike with EDD support. 1998-10-05 10:08:37 +00:00
Mike Smith
4d7b7e52de Insert whitespace between unargv'd arguments.
Submitted by:	"Louis A. Mamakos" <louie@TransSys.COM>
1998-10-05 05:40:58 +00:00
Robert Nordier
731a4a01db Adjust setting of argument pointer for BTX 0.87. 1998-10-04 21:15:45 +00:00
Robert Nordier
18577050a0 Allocate space for storing of arguments at the end of conventional
memory.
1998-10-04 21:14:33 +00:00
Mike Smith
5f8edb2c4d Don't include ELF symbol information yet - it causes the ELF DDB to
explode.
1998-10-04 20:58:46 +00:00
Mike Smith
7546830370 Improve the handling of the initial bootdev value from the previous loader.
Remove some unused code.
1998-10-04 09:12:54 +00:00
Mike Smith
58b7e8766e biosdisk.c
Allocate space for, and copy, NDOSPART slice entries from the
	MBR, not just one.  Add some extra debugging while we're at it.

elf_freebsd.c
	Initialise the symbol table start/end pointers in case we don't
	have them.
1998-10-04 09:12:15 +00:00
Robert Nordier
a2a87ebc0b Missing newline in heap command display.
Noticed by: jkh
1998-10-03 18:27:50 +00:00
Robert Nordier
3948b979ba For system calls, reboot without prompting; for exceptions, display
message and await reset.
1998-10-03 18:05:12 +00:00
Robert Nordier
9cd66506dd Map all BTX system pages readable at ring 3.
This resolves the firmware problem first raised in connection
with PR 8105, although unrelated.
1998-10-03 14:33:06 +00:00
Robert Nordier
0860fb8f8c bootinfo bi_vesa no longer exists. 1998-10-03 14:13:30 +00:00
Mike Smith
bf72f68088 Consolidate the bootinfo-loading code, greatly simplifying the _exec
functions.
1998-10-02 20:53:17 +00:00
Mike Smith
9d38269bae Fix an egregious precedence bug. 1998-10-02 20:52:26 +00:00
Mike Smith
41e43bf627 Set $currdev according to our best guess at the BIOS device that the previous
bootstrap loaded us from.
1998-10-02 16:33:43 +00:00
Mike Smith
6b15efd961 aout_freebsd.c
Use bd_getdev() to work out a dev_t for the root device.
	Allow $rootdev to override $currdev as the root device.

biosdisk.c
	Save the slice table and disklabel when opening a disk.
	Add bd_getdev(), which attempts to return a dev_t corresponding
	to a given device.  Cases which it still doesn't get right:
	 - The inevitable da-when-wd-also-exists
	 - Disks with no slice table (the slice number is not set correctly)
	The first is difficult to get right, the second will be
	fixed in an upcoming commit.

comconsole.c
vidconsole.c
	getchar() should return an 8-bit value; some BIOSsen pack extra
	information in %eax.

libi386.h
	Remove some stale prototypes, add new ones.
1998-10-02 16:32:45 +00:00
Mike Smith
39de38225b Mark exit() as __attribute__((__noreturn__)) 1998-10-02 16:22:54 +00:00
Mike Smith
f9ba80b0e7 boot.c
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
1998-10-02 16:22:26 +00:00