Commit Graph

59 Commits

Author SHA1 Message Date
simonb 215a3a5491 Add support for booting off RAIDframe RAID1 mirrors.
Check the first partition type in devopen(), and if it is of type
FS_RAID, add 64 to blkdev_part_offset.

NOTE: This brings the size of the alpha first-stage bootblocks up to
      close to the maximum.  RAID1 support is controlled by the
      BOOTXX_RAID1_SUPPORT define, and is easy to disable if size
      becomes an issue.
2000-09-26 05:13:36 +00:00
jdolecek 911d661dad switch to sys/conf/newvers_stand.sh for generation of version files
move the vers.c depend/build goo to Makefile.bootprogs and remove
	explicit rules in other Makefiles
sync the message in */version files with other ports using newvers_stand.sh

XXX the new depend rules were tested to limited extend (also with obj dirs)
XXX on i386 and should be ok; the changes should not otherwise influence build
2000-07-21 21:25:18 +00:00
matt 58ca6aac15 Add netbsd.alpha & netbsd.alpha.gz for installation cds. 2000-06-12 23:38:03 +00:00
thorpej 12f7832ebc don't need private `imb' inline anymore. 1999-11-30 22:32:08 +00:00
thorpej 728d672378 Backout my libsa changes. 1999-11-13 21:33:12 +00:00
simonb 2b6e59dd39 Don't include <lib/libkern/libkern.h> for prototypes that are also in
<lib/libsa/stand.h>.  The alpha still needs libkern for the division
and remainder support.
1999-11-12 13:11:40 +00:00
ross e66e48676c Nuke the alpha ecoff/elf bootloader and use the libsa/ one instead. 1999-09-10 07:31:16 +00:00
cgd b28ae57077 add a gross putulong() function which can be useful for debugging.
It's not normally included.
1999-08-18 20:00:27 +00:00
cgd 5dd4815be9 uh, get the port name consistently correct (NetBSD/alpha, not NetBSD/Alpha) 1999-05-26 06:22:03 +00:00
cgd 7f28b25d23 add support for 'standalone programs', like kernels but not the kernel. 1999-04-11 03:36:21 +00:00
cgd f262e02775 constify bootprog_*, move their definitions into common.h, and have
the generated vers.c include common.h to check against definitions.
1999-04-09 17:50:15 +00:00
cgd 587e1ba75e save 4.3 bytes on the date string! 4 == day of week plus space,
.3 == a space on days of the month 1-9.
1999-04-07 06:30:34 +00:00
cgd 1fddfb80a5 consistency in boot message printouts 1999-04-05 22:03:56 +00:00
cgd ba10f0ca12 now that boot.c does the bootstrap name with a -D, the newvers scripts
are all the same, so eliminate the redundancy.  also, use mrg's
"Version:" trick to find the version rather than using the RCS ID.
(I must have been having a ... bad day.)  Also, bump boot and netboot
versions for all the changes that have been happening lately.
1999-04-05 06:56:23 +00:00
cgd d4e15df542 don't get the name from newvers, get it from a bootstrap-specific -D
in the Makefile.  also, print the banner before we do things that
might cause us to print error messages.
1999-04-05 06:42:14 +00:00
cgd ebca60d395 come a little closer to compiling with warnings turned on 1999-04-05 04:39:42 +00:00
cgd 47acf988d7 add a template for a filesystem-using primary boot block, just like
'boot' is a template for secondary and unified boot blocks.
1999-04-02 03:24:53 +00:00
cgd 1fe5f90d85 add a common putstr() function which just puts()'s the chars in
its argument string.  implement a broken version of panic() in terms
of it, for cases where we need panic() but can't affort printf().
1999-04-02 03:23:49 +00:00
cgd f0bdf50326 abstract the prom device open/close into a separate module, which
provides the correct functions for primary, secondary, and unified
boot blocks.  actually behave correctly (e.g. expect correct arguments,
perform correct operations) depending on which you are.  also
some minor cleanup.
1999-04-02 03:19:08 +00:00
cgd 39ea91226c move the boot/disk.* code to common/blkdev.*, and gut it. The previous
guts were actually functionally equivalent to the current guts, but were
much larger, filled with bugs, and indeed poked around at the disklabel
when some of those bugs prevented them from ever using the disklabel!
1999-04-02 03:17:28 +00:00
cgd 7c4cd2bb56 unrevert the changes made last night, now that 'installboot' has
had a few bugs fixed that let the problem slip in, and since bootxx's
Makefile now goes out of its way to satisfy installboot's undocumented
and totally unreasonable assumptions about the bootxx file it's operating
on.  No point in fixing the assumptions, because sooner rather than later
this incarnation of installboot is going to die.
1999-04-02 03:11:57 +00:00
ross 9c323a2d8b Revert recent changes, which either don't work, or can't be built
successfully by ordinary mortals.
1999-04-01 11:08:39 +00:00
cgd bd44d9c286 as pointed out by simonb, since we've moved to ELF __main() calls
aren't emittid anymore.
1999-03-31 16:12:51 +00:00
cgd be6a1d529a separate defns for primary and unified boot blocks 1999-03-31 06:28:41 +00:00
cgd 77a9cb81ff implement NO_GETCHAR, to remove getchar(), and NO_PUTCHAR_HALT to remove
the check in putchar() for character input (specifically control-c, which
causes a halt).
1999-03-31 03:34:21 +00:00
cgd c5fa912232 no point in passing &ret to test_getchar(); nobody cares! also, no
point in doing the check-for-abort functionality twice in putchar()
(once with a call to test_getchar(), once open coded).
1999-03-31 03:22:57 +00:00
cgd 98f67b8238 In putchar(), don't open-code two calls to the prom puts routine. Instead,
call a helper function (putonechar()).  Savings: 64 bytes.  Cha-ching!
1999-03-31 03:10:00 +00:00
cgd 3665d82d1a GC cpu_number() and turn alpha_pal_imb() into inline assembler. 1999-03-31 03:04:21 +00:00
cgd 51a85dabbb rename the C main() function to main_(). this avoids gcc's implicit
call to __main(), and therefore saves the size of the call and the
  size of a stub implementation of __main().
in the primary boot block, don't bother saving/restoring the argument
  passed in from the caller.  There is no such argument (that we care
  about, at least) to the primary.  (for secondary, it's the firmware
  FD being used.)
1999-03-31 03:03:01 +00:00
cgd 4a209e30f8 Compile with -Os (optimize for size).
Clean up the "Region 1" related definitions, and define load addresses,
  max load size, and max total size for as many boot block types as we can.
  (types = unified, primary, secondary).  We can't always define all
  values for all boot blocks, though.
Make CPP flags selection less gross.
Use objcopy rather than headersize (yay, evil gets a stake to the heart!).
Use a little shell script to verify that the sizes of the boot blocks are OK.
Do not compile too much more of libsa than we actually have to.
1999-03-31 02:52:11 +00:00
ross 5bc91073ce Bug fix for the bug fix. Be sure to prom_close() in bootxx and boot, but not
in netboot, and not in diskclose(), but after trying all kernelnames[].
1999-03-27 09:01:27 +00:00
ross 16bf3552bb Save a0 during bss clear. 1998-10-15 01:02:55 +00:00
ross 9f7ca48f3b Delete prom_open() wrapper routine. Other clients of prom_open
can use the prom.h dispatch macros instead, especially since they
all presently expect the raw return bits.
1998-10-15 01:02:15 +00:00
ross c84b7f501e Delete bogus prom_open() prototype. 1998-10-15 01:00:56 +00:00
ross 412f6ae85b Grab booted_dev_fd parameter from bootxx. It won't be there for netboot
but there should be no harm done.
1998-10-15 01:00:07 +00:00
thorpej 34a8ac8484 Set the primary CPU's PAL revision to the OSF/1 PAL revision after switching
to it, per the Green Book (pointed out by Chris Demetriou).
1998-09-28 21:21:55 +00:00
ross 5fb9c16f05 While we are here in alpha/stand, bail out on ^C during boot. 1998-09-22 00:41:13 +00:00
thorpej d5df55112a vm_offset_t -> {paddr_t,vaddr_t}, vm_size_t -> vsize_t 1998-08-14 16:50:00 +00:00
drochner dabc8eb436 Implement the 'i' flag which makes the bootloader ask for the file to
load (as in OSF/1).
Useful for netboot where "-file" doesn't work as needed.
1998-08-07 10:38:37 +00:00
ross de27f1befc Don't bother reading the ELF string table out of a stripped /netbsd[.gz].
In this case, all it has in it are the never-referenced printable names
for the ELF sections themselves. It's located at the end of the (ramdisk)
netbsd.gz file, so it is a very expensive seek and read for only 85 bytes.

Boot floppy load time:

	before:	5 minutes
	now:	3 minutes
1998-06-25 06:45:46 +00:00
ross 6c1e8f5b20 Use the new LOCATE_PCS() macro. 1998-06-24 01:33:19 +00:00
cgd c0ac8bae67 GC alpha's ECOFF_TOOLCHAIN make variable, and related bits. Nobody
should be using an ECOFF toolchain on NetBSD/alpha any more.
1998-03-28 00:50:41 +00:00
ross 2170c2a46d Force elf symbol sections to an addressable boundary. 1998-02-28 10:38:55 +00:00
cgd 92d17b5b50 clean up the way bootinfo information is passed and used: move the version
number passed by the boot block into a register, change the kernel's
bootinfo handing so that it always uses bootinfo to get bootinfo-ish values
(filling them in if the boot blocks didn't pass them), and make versioning
a small bit more sane.
1998-02-12 01:53:18 +00:00
ross 43a3471986 While here in alpha/stand, add a technically required imb coherency op
just before transferring to the kernel entry point.
1998-01-29 22:13:25 +00:00
ross c1972a428c Avoid VMS palcode ops by using a different technique for cpu_number(),
and don't execute the VMS->OSF palcode switch if the OSF palcode
is already running...which will be the case if the console is not
the venerable SRM.
1998-01-29 22:09:37 +00:00
perry 015e898c02 RCSID Police. 1998-01-05 07:02:46 +00:00
cjs bcced1d9be Check return values from lseek; use SEEK_SET instead of 0. 1997-10-18 22:27:46 +00:00
drochner 80d9738db8 -Wall fixes 1997-09-06 14:03:55 +00:00
drochner d99aa8efc0 Collect prototypes here. 1997-09-06 14:02:51 +00:00