Commit Graph

53 Commits

Author SHA1 Message Date
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
lukem 826a14607a Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
there's no need to special-case .include-ing it.
2003-05-18 07:57:31 +00:00
matt 7253b60a31 Cast daddr_t to long so to avoid
"cast to pointer from integer of different size" warning.
2003-01-30 00:36:32 +00:00
kleink c8493ced3c Appease GCC's warning after daddr_t having changed to 64 bits. 2003-01-27 01:39:36 +00:00
kleink 85e25e7fe2 While I'm here: <sys/exec_elf.h> -> <elf.h>. 2002-05-04 20:47:48 +00:00
kleink 23a8bf785e Provide MBR_PTYPE_PREP and MBR_FLAGS_ACTIVE locally, if not available. 2002-05-04 20:46:23 +00:00
kleink 07f08f3f5f Convert to use libsa byteorder interfaces. 2002-04-25 23:30:26 +00:00
kleink 7df1d60bab Bump version to note 601 support. 2002-03-26 00:11:54 +00:00
kleink ccf604db9e Adapt this to the 601's RTC. 2002-03-26 00:03:47 +00:00
nonaka 85b957a2b0 Already MBR_PTYPE_PREP is defined in sys/disklabel_mbr.h. 2002-03-17 23:45:57 +00:00
matt b7a4d57a9e Now all MBR_* definitions come from <sys/disklabel_mbr.h> 2002-03-02 07:05:30 +00:00
nonaka 5d557da31c s/asm/__asm__ volatile/ 2002-02-04 16:17:36 +00:00
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
kleink 4a41ec8583 In fdopen():
* Defer deref'ing of `un' until it's been initialized.
* Kludge around a false-positive uninitialized warning.
Brought to you by the graces of GCC 2.95.3.
2001-11-17 19:00:25 +00:00
kleink 117651c65e Can't pass temporary storage to an inline assembly statement as input
operand; debunked by GCC 2.95.3 as uninitialized.
2001-11-17 18:55:57 +00:00
tv 5489b30b60 ${MAKE} print-objdir -> ${PRINTOBJDIR} 2001-11-14 00:58:48 +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
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 fda9343e10 bcopy -> memmove 2001-07-22 14:57:50 +00:00
nonaka 595d6a40b4 Back out last changes. 2001-06-19 11:56:27 +00:00
nonaka b9c1984c7e Back out last changes. 2001-06-19 11:36:17 +00:00
nonaka b83f37566d identified prep model. (I missed it...) 2001-06-17 15:59:57 +00:00
nonaka 5098ff59f6 identified prep model. 2001-06-17 15:57:11 +00:00
kleink 7918542181 Need <lib/libkern/libkern.h>. 2001-05-28 15:53:51 +00:00
cgd 8a986b2e96 convert to use getprogname() 2001-02-19 22:48:57 +00:00
jdolecek 49c105ffdb add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
2000-09-24 12:32:31 +00:00
nonaka 0079d5e3ba Added installboot program. 2000-09-18 15:44:09 +00:00
nonaka d07d2e70be Fix link problem. 2000-08-14 17:51:41 +00:00