Commit Graph

16 Commits

Author SHA1 Message Date
lukem b0b0a32ad7 Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
2001-12-12 12:24:19 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
scw 45e7238a02 Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
2001-11-09 19:53:11 +00:00
simonb bc2ec5e553 Use a single ldscript instead of separate scripts for either endianness;
use command line parameters to ld(1) instead to set the endian format.
Clean up some endian decisions in mips/conf/Makefile.mips.
Wrap some long lines.
2001-10-05 05:03:27 +00:00
wiz 4c99916337 va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.
2001-09-24 13:22:25 +00:00
tv ab11c169b5 objcopy -> ${OBJCOPY}; remove redundant definitions of OBJCOPY?= (it is
now in bsd.own.mk).
2001-09-22 03:34:17 +00:00
bjh21 ad2c12a28d Bump version numbers of all bootloaders that use loadfile/ELF, to account for
my changes to symbol loading.  I should probably have done this at the time,
but it's better late than never.
2001-08-02 12:24:05 +00:00
wiz 20ab98b30f bcopy -> memcpy 2001-07-22 15:48:11 +00:00
wdk fa993060eb change b*() -> mem*() 2001-07-08 04:25:36 +00:00
cgd c2bdafab79 use getprogname() 2001-02-20 23:51:59 +00:00
wdk 7378a103a0 Much needed installboot utility. Manual page to follow.
Builds and installs from stand directories, but untested from higher
level makefiles.
2000-09-26 10:00:19 +00:00
wdk 50e120c13f Parse boot string intelligently to extract the boot device options.
This permits boot from any SCSI ID
2000-09-26 09:48:35 +00:00
wdk 7495cd76b1 Since we don't have a lseek function in the PROM firmware standalone libs
we have to poke the data structures directly to force the offset we need.

The open() function returns with the address of the IO control block in
register t0 so we take a copy of it for our brute-force lseek function.

This should be reasonably portable since the firmware writers closely
follow UNIX semantics and the open stubs should recompile and use the
same registers.   May break on the rebadged clones -- buyer beware.

The alternative is to use dummy reads to go forwards and reopen followed
by dummy reads to go backwards.  It takes around 60 seconds to boot
using this method if we use a clean filesystem.

Tested with firmware versions 5.40 and 5.43
2000-09-26 09:32:25 +00:00
wdk 9b4e50f624 Second stage bootstrap:
-  Rename from boot.mipsco -> boot to be consistant with other ports
  -  use ELF format
2000-09-26 09:11:04 +00:00
wdk 1eec339f4b First stage bootstrap is stored on boot sectors in ECOFF format. Ensure
entire file fits within the imposed limit.
2000-09-26 09:06:50 +00:00
wdk a3ec172607 Initial commit of a 2 stage bootloader for NetBSD/mipsco. Based on pmax
and alpha ports.

Uses PROM standalone I/O functions but due to the lack of a lseek function
it currently only works with version 5.40 of the firmware.  A more portable
solution is being worked on.

installboot utility requires several changes in order to correctly install
the bootstrap code - there is a "volume directory" which contains a list
of filenames, start sectors and length.  We need to add a "boot" entry of
the correct length starting at block 2.  The boot file has to be ecoff
which means we waste another 0.5k

Normally the Mips filesystem has a ~500k partition for this purpose but it
should be possible to squeeze it all into the first 7k "BSD Style" (1k is
required for 2 different copies of the partition table)

Only the bootxx_ffs first stage bootstrap has been tested via bootp() which
loads the second stage off disk and then boots the kernel.
2000-09-18 11:40:46 +00:00