Commit Graph

106 Commits

Author SHA1 Message Date
Robert Nordier 4d8eda2252 New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023;
multiple 0xa5 slices; etc.
1998-10-12 21:16:26 +00:00
Peter Wemm 2d636ab077 Only print kernel entry point during load.
Drastically quieten down the verbose load progress messages.  They were
more useful for debugging than anything, but are beyond a joke when loading
a few dozen modules.
Simplify the ELF extended symbol table load format.  Just take the main
symbol table and the string table that corresponds.  This is what we will
be getting local symbols from.  (needed for the alpha stack tracebacks).
Use the (optional) full symbol tables in lookups.  This means we have to
furhter distinguish between symbols that can come from the dynamic linking
table and the complete table.
The alpha boot code now needs to be adapted as ddb/db_elf.c cannot use
the simpler format.
I have not implemented loading the extended symbol tables from the syscall
interface yet, just for preloaded modules.
I am not sure about the symbol resolution.  I *think* it's possible that
a local symbol can be found in preference to a global, depending on the
search sequence and dependency tree.
1998-10-12 09:13:50 +00:00
Peter Wemm 55820fca35 Only print filename and entry address for the kernel itself. The rest
have a meaningless entry as they are relocatable.
1998-10-12 09:05:12 +00:00
Robert Nordier dfce019974 Drop .MAKEFLAGS: hack. 1998-10-12 02:05:44 +00:00
Robert Nordier 7870a52598 Do without head and tail: they're pretty unnecessary here anyway. 1998-10-12 01:44:15 +00:00
Robert Nordier 36e85d353d Use rather than for linking. This allows the new rather
than stale version of libstand.a to be found.

After this change, the new boot code is apparently building correctly
in a make world.
1998-10-12 01:03:00 +00:00
Robert Nordier 1339399694 Override for ELF. 1998-10-11 12:59:40 +00:00
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