Commit Graph

183 Commits

Author SHA1 Message Date
Brian Somers
63e13c80ea Back the last change out.
It upsets the calculations in sys.c (switch(maj)).
1999-05-25 10:30:52 +00:00
Brian Somers
cd956c3bc1 Allow booting from "ad"
Reviewed by: Søren
1999-05-25 09:32:00 +00:00
John Polstra
607c815bef Update #include statements to reflect the new location of "sioreg.h".
With these changes plus the egcs fix I committed a few minutes ago,
"make -DWANT_AOUT world" works again.  Most likely, "make upgrade"
is fixed too, though I haven't tested that.
1999-04-22 21:02:44 +00:00
Kazutaka YOKOTA
e9f2a6a839 Don't refer to i386/isa/kbdio.h anymore. Use dev/kbd/atkbdcreg.h instead. 1999-01-11 03:50:01 +00:00
Bruce Evans
d389c929de Rely on ../Makefile.inc to set the object format in CFLAGS and the
default for BINDIR.  The default BINDIR of /usr/mdec can't be overridden
yet because libdisk still uses /usr/mdec and installing in /boot might
clobber the new boot blocks.

Don't install links to bootxx or xxboot.

Install boot1 and boot2 in 1 step.

Don't delete the boot.help source file on installing it when ${COPY} is
null.
1998-12-30 10:21:37 +00:00
Andrey A. Chernov
468b3a66d9 add -aout key to cc, size, strip - it not work for elf system 1998-11-21 21:07:17 +00:00
Bruce Evans
291adf9b21 Removed all `vector xxxintr' specifications. Interrupt handlers are now
configured in drivers.
1998-10-22 15:31:33 +00:00
Bruce Evans
7934b2cd38 Don't pretend to support ix86's with 16-bit ints by using longs just
to ensure 32-bit variables.  Doing so broke i386's with 64-bit longs.

This also fixes printf format errors.
1998-10-10 14:30:05 +00:00
Bruce Evans
8a8a7f91ae Fixed warnings for pointer versus int type mismatches. Addresses must
be converted to fixed-sized integers when they are passed across the
binary interface to the kernel.
1998-10-10 14:02:07 +00:00
Mike Smith
c2316d3e9a Pass the BIOS unit number from which the kernel/loader was obtained in
the bootinfo struct so that it can be reused later.
1998-10-01 18:22:52 +00:00
Kazutaka YOKOTA
3cd3a6936b Remove the -b boot option. It is no longer necessary now that the VESA
BIOS support is optionally available for syscons.
1998-09-23 06:50:45 +00:00
Justin T. Gibbs
a9c5dbb88d Adjust for sd->da and the loss of od. 1998-09-15 09:59:58 +00:00
Mike Smith
194b64e83d Correct an irritating documentation error.
(get_diskinfo is unnecessarily obfuscated)
1998-08-04 00:39:45 +00:00
Alexander Langer
f7aad78d24 Typo fix: teh --> (the|they) 1998-07-30 02:27:41 +00:00
Bill Paul
ab48ff6913 Add workaround to allow the FreeBSD boot block to work on
Kapok Computer Co. notebook with AMI 'WinBIOS' which seems to insist
on having a short jump and nop as the first instructions in the
boot sector code. The prevailing theory is that the BIOS is doing
some sort of boot sector virus detection and refusing to run any
boot block that doesn't start with the same instruction sequence as
MS-DOG boot sector code. If this is the case, it would be nice if it
actually printed an error message to this effect instead of just
saying 'FAILED.'

This workaround has no effect on the boot sector code other than to
increase its size by three bytes.
1998-07-02 15:36:35 +00:00
Joseph Koshy
dce52a9c00 Install ${DESTDIR}/boot.help during `make distribution'.
PR: 6063
Submitted by: Doug <Studded@dal.net>
1998-05-27 12:13:18 +00:00
Eivind Eklund
22263dd149 Make this handle -j<large>, and avoid .depend pointing at /usr/include. 1998-03-07 10:48:15 +00:00
Eivind Eklund
5b4636a600 Make bootblock building independent of /usr/include if relative
includes are available.
1998-02-15 21:38:19 +00:00
Bruce Evans
b8c7cb30ab Don't set even parity uselessly in the line control register (parity
is not enabled).

Saved a few bytes by reusing the line control register bits and not
loading the speed in the wrong (cpu) register.
1998-02-01 22:39:24 +00:00
Kazutaka YOKOTA
2c2491393e Make RAWBOOT functional again; don't read boot.config' and boot.help'
if RAWBOOT is defined.
Reviewed by: bde
Submitted by: Takeshi Amaike <amaike@iri.co.jp>
1998-02-01 05:24:24 +00:00
Mike Smith
0b771fd153 Symlink bootblocks for 'wfd' disks as well. 1998-01-27 16:56:43 +00:00
Bruce Evans
d92b2035e3 Fixed cosmetic bugs:
- wrong name in .file statement.
- stale comment about CONSPEED.
- style bugs in comments.
- inconsistent defaulting of operand sizes (should never depend on default).
- inconsistent choosing between je and jz (should always use je).
1998-01-01 13:01:31 +00:00
Joerg Wunsch
3bb99eb225 Finally, implement a mini-parser for RockRidge alternative filenames,
so the filenames can be displayed and selected in full beauty.  If RR
is present, the match is now case-sensitive, if RR is missing, the
match is case-insensitive (as it used to be before).
1997-12-04 21:52:47 +00:00
Poul-Henning Kamp
e1fa905ad4 Add a missing prototype.
Nagged about by:	joerg
1997-09-24 07:44:34 +00:00
Poul-Henning Kamp
e6dcdf4dd1 Remove pbzero(), things we load zero their own bss.
Make VESA_SUPPORT default
1997-08-31 06:11:26 +00:00
Poul-Henning Kamp
dd9346ce01 Oops, boot2 got too big. make VESA_SUPPORT nondefault. 1997-07-31 11:30:30 +00:00
Poul-Henning Kamp
d9f5f52664 Add support for booting in VESA 0x102 videomode. Corresponding patches to
syscons are being reviewed by sos.
1997-07-31 08:07:54 +00:00
Bruce Evans
5f0539ec6c Saved a few bytes by omitting frame pointers, using byte-sized
instructions more (many cases were already intended to be byte-sized
but were missing prefixes so gas assembled them bogusly), and
rearranging a loop to test at the end.
1997-07-13 15:24:15 +00:00
Joerg Wunsch
f88ef34060 Make this compile again under -current. The modifications to io.c
and bios.S were small enough and have been merged back into their
respective files in biosboot/, conditionalized on CDBOOT.  Other
files might be merged at a later stage.

Caveat emptor: i cannot test this right now.
1997-07-12 10:23:31 +00:00
Bruce Evans
080cec3cc4 Fixed description of -cv. 1997-07-05 02:08:09 +00:00
Philippe Charnier
91463ae299 Fix 2 typos. 1997-06-16 06:32:51 +00:00
Bruce Evans
fec712543d Load the kernel config file where userconfig (with option USERCONFIG_BOOT)
will see it.  The name of the file is obtained by appending ".config"
to the name of the kernel file.  If the file doesn't exist, then an
annoying message is printed.

Reduced the command line buffer size yet again from 4096 to 1024.  It is
oversized to defend against overrun in gets(), but data space is starting
to run out so the buffer size can't be as grossly oversized as before.
1997-06-14 10:00:42 +00:00
Bruce Evans
e49dd0c779 This should have been committed with the changes to boot.c yesterday.
- Added support for "dual" internal/serial consoles (-D flag).  If -D is set,
  then all i/o from the boot blocks is to and from both the internal console
  and the serial console.  -D has no effect on the kernel (-h decides the
  kernel serial console as usual).  -D should normally be set in /boot.config.
- Get help messages from /boot.help.  You should copy boot.help from the
  biosboot directory to the root directory on the boot drive when you
  install new boot blocks.
- New, less invasive keyboard probe.  Enable keyboard probe dynamically (-P
  flag).  Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config.  It didn't interact correctly
  with the NAMEBLOCK option, and the initialization of the drive/unit/partition
  didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag.  This flag is only used for reboots.
Submitted by:	about 2/3 by yokota
1997-06-10 01:40:32 +00:00
Bruce Evans
de2cf96615 - Added support for "dual" internal/serial consoles (-D flag). If -D is set,
then all i/o from the boot blocks is to and from both the internal console
  and the serial console.  -D has no effect on the kernel (-h decides the
  kernel serial console as usual).  -D should normally be set in /boot.config.
- Get help messages from /boot.help.  You should copy boot.help from the
  biosboot directory to the root directory on the boot drive when you
  install new boot blocks.
- New, less invasive keyboard probe.  Enable keyboard probe dynamically (-P
  flag).  Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config.  It didn't interact correctly
  with the NAMEBLOCK option, and the initialization of the drive/unit/partition
  didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag.  This flag is only used for reboots.
Submitted by:	about 2/3 by yokota
1997-06-09 05:10:56 +00:00
Bruce Evans
f79e6ee387 Staticize. 1997-05-27 16:26:39 +00:00
Bruce Evans
906265bada Removed some useless code:
- gcc assumes that %ecx and %edx are clobbered (due to calling
  conventions), thus there is no need for saving/restoring those two
  registers.
- %es is reset to default value by real_to_prot, thus there is no need
  for saving/restorig that register.
Submitted by:	tegge
1997-05-16 10:40:00 +00:00
Bruce Evans
72fa3798b4 Removed LDADD=-lc and associated DPADD. libc would probably break
things if it were actually used.
1997-04-25 19:38:01 +00:00
Bruce Evans
c24b67b188 Don't attempt to read past EOF.
Saved enough bytes to make room for this bloat (testing poff < inode.i_size
takes 56 bytes!) by copying fs to a local variable.
1997-03-15 16:49:51 +00:00
Bruce Evans
051fc6fab1 Fixed setting of default kernel name when there is no boot.config file.
Didn't fix a more serious problem when boot.config is empty - read()
can't handle empty files.

Reported by:	Chris Timmons <skynyrd@opus.cts.cwu.edu>
1997-03-12 18:48:31 +00:00
Bruce Evans
bdca44f670 Added -mno-486 to CFLAGS to force smaller code in case someone compiles
with CC="cc -m486".  This doesn't fix PR2381, since PR2381 is for 2.1.x.
1997-03-05 15:43:03 +00:00
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Bruce Evans
b0a5b85d06 Fixed biosboot to compile with Lite2. <sys/lock.h> is now a prerequisite
for <ufs/ufs/inode.h>.
1997-02-18 15:09:39 +00:00
Bruce Evans
8363c19687 Get defaults for the boot device (and flags) from the file
"boot.config" (relative to the root directory on the 'a' partition
on the first BSD slice) if it exists.  If it doesn't exist, then
the only visible changes should be that the kernel name isn't reset
to "/kernel" after looking it up fails and that the default name
is now "kernel".

The new function readfile() can be used for other things:
- reading help messages.
- reading splash screens.
- reading userconfig info.
1997-02-13 13:15:47 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
07addd421e Initialize the upper 16 bits of the memory sizes properly (to 0).
They were garbage that happened to be 0 in many cases.  (real_to_prot()
happens to leave the value of the real-mode %cr0 in %eax and the
memory-size BIOS calls usually don't touch the upper bits of %eax.
The upper 16 bits of %cr0 are usually 0 at boot time, at least on
486's.

Should be in 2.2.
1996-12-18 15:38:23 +00:00
Bruce Evans
9d12c4da86 Give up early for empty partitions. The offset for an empty
partition is 0, which is outside the slice unless the disk is
dangerously dedicated.  There is little error checking later, and
following garbage metadata outside the slice usually caused crashes,
Empty 'a' partitions are fairly easy to create by cloning the label
for the whole disk.

Fixed a missing newline in a related error message.
1996-12-10 14:07:42 +00:00
Nate Williams
c80383505d Update the bootblocks to use the new definitions that changed in the
recent psm/syscons/kbdio code update.

Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1996-12-03 03:32:15 +00:00
Peter Wemm
34429f3d2d Fix my previous (untested) commit. The probe routine now appears to work
again.

Something needs to be done about this in 2.2, since the code there doesn't
even compile anymore since the syscons/kbdio/psm merge into 2.2.
1996-11-24 08:06:01 +00:00
Peter Wemm
f2a58aec0a Make this compile again after the syscons/psm/kbdio changes that removed
the keyboard IO port definitions from <machine/console.h>.

Note: I do not have a machine available to test this yet,  I sent this
for review to several people who have not replied.

This is also totally busted in 2.2, which has half of the syscons/psm/kbdio
changes in it.  This really desperately needs to be tested and fixed
in 2.2 as well.
1996-11-23 07:38:25 +00:00
Bruce Evans
2e2d9bc760 Preserve %esi and %edi for all BIOS calls. This is probably only necessary
for get_diskinfo(), whose BIOS call sets %es:%edi in some cases, although
most documentation says that it doesn't change %edi in the cases that
happened to matter (for hard disks).

This shall be in 2.1.6 and 2.2.

Submitted by:	Tor.Egge@idt.ntnu.no
		(except I kept the unnecessary preservation of %edx and %ecx)
1996-11-11 14:03:33 +00:00