Commit Graph

81 Commits

Author SHA1 Message Date
garbled a3af60a95e s/prep_magic.h/magic.h/ 2007-12-19 19:47:08 +00:00
garbled 2f6e46a275 Change the prep bootloader to reach over into the
powerpc/stand/mkbootimage directory for the magic.h file.
2007-12-19 18:28:50 +00:00
garbled d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
tsutsui 2340b51076 Set DTR and RTS in NS16550_init().
Some terminal requires it even if hardware flow control is disabled.

XXX: should we sync bebox/stand with prep?
2007-05-19 14:26:08 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
pavel c1ebd304cc Replace wrong tests for character device (st.st_mode & S_IFCHR) by
S_ISCHR. Originally discovered by Paul Stoeber in OpenBSD.

OK elad@.
2006-09-23 20:10:14 +00:00
matt 7cac687e36 Generate an intermediate boot.elf with symbols. 2006-09-19 17:51:24 +00:00
garbled d0b840b1df General fixups:
1) Fix support for the powerstack E1.  This machine needs to use the 8259
directly, and cannot use the prep interrupt vector register.  Place a
quirk entry in the table for the machine.
2) Add a new com0_vreset boot image.  The vreset code only works on a few
machines, and breaks others like the 7025-F40.  Its only limitedly useful
when used with the com0, so just make it an optional image the user can
install by hand if they want.
3) Bump the bootloader to 1.8 with the above change.
2006-06-27 23:26:13 +00:00
garbled 1efe96e909 Basic prep timecounter support. This greatly increases the stability of
ntp on my 7248, however, my 7043-140 is still a bit flaky.  I suspect the
only way to fix the 7043 is going to be writing a timecounter driver for
the 8254 present on these machines.  Either way, this makes some of the
machines better, and the other machines are still about the same as they
were before, so it's a net gain for the port.
2006-06-20 05:49:09 +00:00
tsutsui 261274d592 Put newline if there is no input on Boot: prompt. 2006-06-10 07:49:29 +00:00
elad 8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
snj d97db3840b s/allready/already/ 2006-04-25 02:19:31 +00:00
garbled e8e7f1b118 Stop building installboot. I'm not sure if it works or not, but it looks
like it wouldn't.  Keep the sources around in case I get around to fixing it.
2006-04-13 19:02:19 +00:00
garbled 3869624bdd Fix a bug in the printing of the "image too big" message, and make it
stop printing when building standalone images.
2006-04-13 18:57:24 +00:00
garbled ccad384049 More major bootblock changes:
1) Rewrite vreset.c completely.  Saves about 1k, and now it sets the
screen up much better.  Previously the resulting video mode looked bad on
my CRT, and my LCD wouldn't even recognize it as a valid mode.  Now it
looks reasonably good and my LCD can talk to it.

2) Call vga_reset unconditionally in the setup process to fix the onboard
VGA.  If you have a VGA and use the serial console, this will allow you
to still use the VGA device for getty/wscons.  Tested on a 7248 with VGA
and a 7043 without VGA.

3) Change filesystem.c to use nullfs rather than ufs and cd9660.  We
don't actually need an fs at all, but it would take a major rewrite to
get rid of them completely.  This saves about 6KB on the bootloader.

4) Bump version to 1.7.
2006-04-13 18:46:46 +00:00
garbled 78fba760a5 de-__P, minor formatting nits, bump version. 2006-04-10 18:40:06 +00:00
garbled 6f63c9c5a1 Remove unused fd.c and video.c files. 2006-04-10 18:01:44 +00:00
garbled 7c00973093 Clean up the bootloader a little bit. Get rid of some unused code,
set the makefile to build the bootloader without the DB_MONITOR stuff by
default, as it is primarily for debugging.  Reduces bootloader size by
about 8k.
2006-04-10 17:58:59 +00:00
garbled cc608a20c4 Oops.. accidentally put a ! in front of a test that shouldn't have had
one and made all the bootfloppies unbootable. (unless of course, you
specified to make them unbootable)
2006-03-25 06:29:42 +00:00
garbled d3cf21af9e update this to match reality 2006-03-23 19:11:02 +00:00
garbled ec7599280c Add libz 2006-03-23 17:33:16 +00:00
garbled 7033707565 Significantly rewrite the bootimage maker:
It now handles three different cases:
1) if you have an old disk.. it reads the partition table, and writes the new
image with that.
2) if you are doing a new install, you can build an image w/o the table that
can be dd'd to any PReP boot partition.
3) it works the old way for making netboot or floppy images

Additionally, it now includes libz, and automatically compresses the
kernel image, rather than requiring an external step.
2006-03-23 17:32:56 +00:00
dsl 6f0f9f8763 Make almost everything #include <sys/bswap.h> instead of <machine/bswap.h>
The bswap.h and endian.h files are all rather incestuous, but I want to
get the constant folding stuff into one place - sys/bswap.h
2006-01-29 21:42:40 +00:00
skrll 227a982c5d More ro src breakage. 2005-12-28 09:10:26 +00:00
perry 50a256a3a0 __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
2005-12-24 23:23:59 +00:00
perry 2d65de2479 bare asm -> __asm 2005-12-24 22:45:33 +00:00
perry 5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
jmc a83267e9a2 Rework depends so this works w. -j after .BEGIN fixes 2005-05-11 20:19:24 +00:00
kleink 6075ea53ef In the delay loop, mark the scratch register as earlyclobber. 2004-06-29 16:26:05 +00:00
kleink 924e984b2b Move the HAVE_NBTOOL_CONFIG_H stanza to the top, unbreaking mkbootimage
again after this week's tools/compat overhaul.
2004-06-23 21:39:32 +00:00
kleink 3cd264f0f5 On the 601, simply supply the fixed RTC clocking information. 2004-06-23 17:28:24 +00:00
thorpej d07c23b31a Use the BFD ELF headers rather than simply including <elf.h>. This
tool compiles on non-NetBSD now.

Note: We're not actually using BFD, just two header files that are
more conveniently laid out than our native header.  There is no GPL
infection from using the BFD headers.
2004-05-09 01:31:27 +00:00
nonaka 4c2b0e6fe2 boot-loader can find attached kernel again. 2004-03-10 15:17:01 +00:00
nonaka d382cc6c5a Use memset() for "Clear all of BSS".
If (edata-address & 3) != (end-address & 3), my own code cause infinity loop.
Fixed it.
2004-01-05 15:31:03 +00:00
nonaka 62610dfbb2 reduce program size. 2004-01-05 15:17:54 +00:00
nonaka 227a19589a Use 32bit daddr_t. 2004-01-05 15:15:26 +00:00
jmc f3a436d0a1 Add a .WAIT after common so libs get built before they're needed 2003-12-12 23:00:09 +00:00
keihan 29c72c57f0 netbsd.org -> NetBSD.org
All "netbsd.org" is now gone from src/sys/arch.
2003-12-04 13:05:15 +00:00
tsutsui 4f9a822f1f sync with news68k:
> Make sure machine and ${MACHINE_ARCH} symlinks created before make depend.
2003-11-27 16:19:16 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
he 5e5a2bb96f Make this compile as a tool; we need to pick up the target's
sys/bootblock.h header in that case.
2003-10-19 11:34:27 +00:00
lukem 1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
simonb 970b12080e Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
2003-10-08 01:40:22 +00:00
he c50a79523e Include <string.h> for memset and memcmp prototypes. 2003-10-06 08:44:39 +00:00
he 557593445b Include libkern.h to get definitions for strcpy, strlen, and memset. 2003-10-06 06:41:45 +00:00
he a665876c87 Remove argument list from #undef of divrnd macro; fall-out from gcc3? 2003-10-06 00:04:55 +00:00
matt 8881697abd Add -ffreestanding 2003-09-30 18:58:39 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00