Commit Graph

104 Commits

Author SHA1 Message Date
Paul Saab
c6fe53998a Don't set the gateway address if the netmask is zero or we're on
the same network.  PXE does not do netmask calculations, so if the
gateway is set it will use it.

Submitted by:	peter & FreeBSD cluster ACLs
2001-03-14 23:53:25 +00:00
Jeroen Ruigrok van der Werven
7c63796828 Preceed/preceeding are not english words. Use precede or preceding. 2001-02-18 10:25:42 +00:00
Paul Saab
3d122d8e2c Honor the ip address given in the root-path dhcp option.
PR:	21743
Submitted by:	Brian Candler <B.Candler@pobox.com>
2000-11-05 14:55:09 +00:00
John Baldwin
f251e6cfa1 The Number of Fixed Disks at memory location 0x475 is only 1 byte, not a
2 byte word.  This fixes machines that probe 30-odd hard drives during boot
in the loader.

Submitted by:	Helpful folks at Tyan via ps
2000-11-02 23:28:12 +00:00
Archie Cobbs
474afc4230 Add support for the "nullconsole" console type, for systems with
neither a video console nor a serial port. Use it if the RB_MUTE
flag is set.

Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
Reviewed by:	jhb
2000-09-20 18:13:36 +00:00
Mike Smith
bb65fdf6e0 Export the salient configuration items in a non-pxe-specific namespace
to allow commonality between varying platforms.  This is a step
towards parsing the diskless configuration information with MI code
inside the kernel.

Export the interface hardware address to the kernel, so that it is possible
to determine the boot interface with certainty.

Export the NFS filehandle for the root mount to the kernel, so that the
kernel does not need to perform a mount RPC call.
2000-09-05 22:32:31 +00:00
Paul Saab
646cf5017b Add support to send the string 'PXEClient' as the Vendor class
identifier to the DHCP server.  Now you can check for this string
in your dhcp configuration to decide whether you will hand out a
lease to the client or not.
2000-08-11 08:36:17 +00:00
Paul Saab
f6940c1842 Pass along the interesting variables we were given from DHCP so we
can utilize them in the kernel and with kenv.
2000-08-11 05:31:59 +00:00
John Baldwin
4ae4202e70 Cleanup warnings. Most of these are signed/unsigned warnings, as well as
some added const's.
2000-08-03 09:14:02 +00:00
John Baldwin
c2fa9f3e89 Fix several BDECFLAGS warnings. Also, actually use the 'verbose' parameter
for lsdev when printing out slice information.  Now, you only get the
sizes and LBA's of slices if you use 'lsdev -v'.
2000-08-03 09:09:49 +00:00
John Baldwin
335dd56674 - Add some more details to the 'lsdev' output for FAT file systems.
- Add in support for the EDD (Enhanced Disk Drive) BIOS extensions to
  use LBA mode for accessing drives past cylinder 1024.  This should allow
  us to load a kernel from anywhere on a newer drive up to 2 TB.  Part
  of this came from the PR below.

PR:		i386/13847
Submitted by:	Tor Egge <Tor.Egge@fast.no>
2000-06-19 17:44:40 +00:00
Paul Saab
cc3d937224 Delay calling the device cleanup routines until the absolute last
moment.  We were cleaning up after PXE too early and the module
dependancy code would not be able to load any files if it needed
too.
2000-06-14 10:34:29 +00:00
Paul Saab
482cb52dcb Wrap the failure warnings around PXE_DEBUG in the cleanup routine.
It does not matter if they fail, so dont print anything about it
unless we are debugging.
2000-05-01 17:55:05 +00:00
Boris Popov
801e789e01 Update loader logic to distinguish modules vs. files.
Add support for module metadata. The old way of dependancy
handling will be supported for a while.

Reviewed by:	peter
2000-05-01 17:41:25 +00:00
Paul Saab
95394e643f Fall back to /pxeroot as the location of the NFS exported directory
if we are not given one by dhcp.
Remove extra includes while I am here.

Reminded by:	jlemon
2000-04-29 23:08:49 +00:00
Jonathan Lemon
8e30378f89 Teach the loader about the ext2fs filesystem, extended partitions, and
the new readdir function.
2000-04-29 20:49:33 +00:00
Paul Saab
f14ad6978f Make PXE do a dhcp request to find out where its files are. The
DHCP server is no longer required to also act as the NFS/TFTP
server.
2000-04-27 12:30:28 +00:00
Paul Saab
e7fd6f003e Don't report errors when we UDP_WRITE fails with a status of 1. 2000-04-27 03:23:50 +00:00
Paul Saab
d08ae64b1d Bring support in for Intel Wired for Management 1.1 (PXE 0.99 and
below).  This did not work previously because interrupts were
disabled when PXE calls were being made, and they must be enabled.
This should also allow us to be compliant with all newer PXE rom's
from Intel.

For PXE 0.99, this has been tested using the Intel N440BX motherboard
and I am confident it will work on the Intel L440GX motherboard.

Lots of help/information from: jhb, peter

I would like to thank Michael Johnston <michael.johnston@intel.com>,
Mike Henry <mike.henry@intel.com>, and all the other PXE developers
at Intel for their help, and information in helping solve this
problem.
2000-04-26 07:38:40 +00:00
Paul Saab
43e797fd31 Move the building of the PXE module into libi386. 2000-04-21 22:06:02 +00:00
Paul Saab
2339dc037f Make the loader a little smarter about when it is and is not allowed
to call PXE.
2000-04-21 04:58:51 +00:00
Paul Saab
5d5b2077f1 Don't call the PXE cleanup routine if PXE is not enabled. This
should fix the "Invalid partition table" error people were seeing.
2000-04-21 03:04:16 +00:00
Paul Saab
6450dd3cb4 Add a cleanup function. This is needed for PXE where you should
shutdown the UNDI and unload the stack.
2000-04-20 00:06:15 +00:00
Paul Saab
e938899cc3 Use !PXE api over PXENV+ api.
Magic trampoline by: peter (at 4am and after a good whipping at airhockey)
Do a better job of returning and detecting errors.
2000-04-19 11:22:38 +00:00
Jordan K. Hubbard
4fbd258bcc Nuke duplicate struct declaration from somebody's paste-o 2000-04-08 22:50:18 +00:00
Paul Saab
d8af287caf Make PXE use the UDP API. This allows for both TFTP and NFS support.
You may specify TFTP or NFS via compile time options in the loader,
but not both at this time.

Also, remove a warning about not knowing how to boot from network
devices.  We can obviously do that now.
2000-04-08 01:22:14 +00:00
Paul Saab
dbe3e0f575 Add a missing PXE API call and structure. 2000-04-04 07:28:54 +00:00
Paul Saab
2efc827d19 Add all the PXE related structures from the 2.1 PXE spec from Intel.
Fix exsisting code to match the spec.
2000-04-04 00:38:59 +00:00
John Baldwin
48a0c4ea04 Mega i386 loader commit.
- Don't hard code 0x10000 as the entry point for the loader.  Instead add
  src/sys/boot/i386/Makefile.inc which defines a make variable with the
  entry point for the loader.  Move the loader's entry point up to
  0x20000, which makes PXE happy.
- Don't try to use cpp to parse btxldr for the optional BTXLDR_VERBOSE,
  instead use m4 to achieve this.  Also, add a BTXLDR_VERBOSE knob in the
  btxldr Makefile to turn this option on.
- Redo parts of cdldr's Makefile so that it now builds and installs cdboot
  instead of having i386/loader/Makefile do that.  Also, add in some more
  variables to make the pxeldr Makefile almost identical and thus to ease
  maintainability.
- Teach cdldr about the a.out format.  Cdldr now parsers the a.out header
  of the loader binary and relocates it based on that.  The entry point of
  the loader no longer has to be hardcoded into cdldr.  Also, the boot
  info table from mkisofs is no longer required to get a useful cdboot.
- Update the lsdev function for BIOS disks to parse other file systems
  (such as DOS FAT) that we currently support.  This is still buggy as
  it assumes that a floppy with a DOS boot sector actually has a MBR and
  parses it as such.  I'll be fixing this in the future.
- The biggie:  Add in support for booting off of PXE-enabled network
  adapters.  Currently, we use the TFTP API provided by the PXE BIOS.
  Eventually we will switch to using the low-level NIC driver thus
  allowing both TFTP and NFS to be used, but for now it's just TFTP.

Submitted by:	ps, alfred
Testing by:	Benno Rice <benno@netizen.com.au>
2000-03-28 01:19:53 +00:00
John Baldwin
7be31bb1b2 Remove some extra spammage that made it into this commit. This will be
revisited later with a better fix, or at least one that compiles. :)

Approved by:	dcs
2000-03-15 16:36:55 +00:00
Daniel C. Sobral
7b12e51659 Pass an unit number to bcache_strategy, so it can flush the cache when
necessary. Pass an absolute block number too, instead of receiving a
relative one in realstrategy(), as bcache_strategy() requires this.

The fix is sligthly different from the one in the PR.

PR:		17098
Submitted by:	John Hood <jhood@sitaranetworks.com>
2000-03-15 01:58:45 +00:00
Mike Smith
627249c7b1 Substantially revamp the way that we determine the amount of memory available
for our use.  Use the same search order for BIOS memory size functions
as the kernel will later use.

Allow the loader to use all of the detected physical memory (this will
greatly help people trying to load enormous memory disk images).

More correctly handle running out of memory when loading an object.

Use the end of base memory for the top of the heap, rather than
blindly hoping that there is 384k left.

Add copyrights to a couple of files I forgot.
1999-12-29 09:54:46 +00:00
Poul-Henning Kamp
7d5961670c Remove BAD144 support, it has already been disabled for some time. 1999-12-08 09:33:00 +00:00
Daniel C. Sobral
33ebc8c952 Make the "machine" target a prequisite to all source files.
Hinted-at by: bde
1999-10-19 03:53:59 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Mike Smith
73332890ea Walk around the end of all the silly guessing of device types and unit
numbers that we have been doing in the past, and read /etc/fstab off the
proposed root filesystem to determine the actual device name and vfs
type for the root filesystem.  These are then exported to the kernel
via the environment variable vfs.root.mountfrom.
1999-07-21 00:08:54 +00:00
Robert Nordier
f841485278 Fill in bi_bios_geom[] in the bootinfo structure passed to the kernel.
This should resolve the problem raised in PR 12315, and incidentally
makes it easier to determine what geometry the BIOS is actually using
(by way of boot -v and dmesg).
1999-06-21 18:27:02 +00:00
Guy Helmer
3d8993c197 Modify the boot loader to recognize the -C flag and pass the RB_CDROM
flag to the kernel to mount a CDROM as the root filesystem.  Alternatively,
the boot_cdrom env var can be set.

As Mike Smith noted, "-C is the "wrong" way to do this", but this is
an acceptable stopgap in lieu of a better way.

PR:		bin/11884
Reviewed by:	msmith@freebsd.org
1999-06-04 03:18:28 +00:00
Daniel C. Sobral
76bd51f729 Avoid copying m_args if none exists. (Perhaps this is a better solution,
Doug?)
1999-03-18 14:36:22 +00:00
Daniel C. Sobral
445a035707 Add MODINFO_ARGS, parameters passed to a module at load time.
VS: ----------------------------------------------------------------------
1999-03-08 11:05:52 +00:00
Robert Nordier
ab19eb8230 Fix a couple of further bugs: missing argument to sprintf() and
"==" used for "=".
1999-01-25 23:07:02 +00:00
Mike Smith
84ef5a8f66 Bleh. Missing 'unit =' doesn't help legacy num_ide_disks code.
PR:		bin/9651
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 06:03:44 +00:00
Mike Smith
c679ae39a8 biosdisk.c
Implement a new variable 'root_disk_unit' which supersedes
	'num_ide_disks' and makes it possible to explicitly set the
	root device unit number regardless of type considerations.

bootinfo.c
	If we can't calculate a dev_t for the root disk, complain and
	don't proceed to boot with an invalid boot device.
1999-01-24 00:12:04 +00:00
Robert Nordier
d0a4f5ea63 Fix read error not being detected. 1999-01-22 18:32:52 +00:00
Steve Price
24d156f499 Remove redundant line of code.
PR:		9364
Submitted by:	Daniel C. Sobral <dcs@newsguy.com>
1999-01-10 18:22:23 +00:00
Robert Nordier
c03fa7f977 Use etc/make.conf settings for serial port and speed.
Submitted by: rvb
Reviewed by: bde
1999-01-10 14:48:05 +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
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
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