Commit Graph

91 Commits

Author SHA1 Message Date
joerg
4ca7de0cb3 Put GCC/GAS specific options under ACTIVE_CC == "gcc". 2014-08-10 17:44:26 +00:00
joerg
0c7d9d4853 Don't set -mmultiple or -mno-string for PowerPC, the difference is too
small to really matter and it sometimes even increases the size.
2014-08-08 16:56:30 +00:00
tsutsui
8c436a9898 Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.
XXX: probabry we should have bsd.saprog.mk or something.
2014-01-12 15:26:28 +00:00
matt
74e5ca236b Use <bsd.klinks.mk>
Add ${_MKTARGET_LINK}
2013-08-21 06:46:26 +00:00
phx
3290da69bf Fixed writing of MBR disklabel. It was written by disklabel(8) -r directly
into sector 0, corrupting the MBR. Moved to sector 1.
Removed MBR_LABELSECTOR, which is no longer needed.
2012-02-02 21:54:34 +00:00
phx
bdcee66bdc Fixed booting from disks without a valid disklabel (e.g. CDROM). This
became broken with my last changes in rev.1.18..
2011-08-21 13:12:48 +00:00
phx
6c0f30bcde When there is no NetBSD MBR partition with a valid disklabel, look for
the first FAT partition and construct a disklabel with an MSDOS filesystem
in partition 'a'.
2011-08-21 13:08:57 +00:00
phx
e7925f6977 Finding the disklabel on MBR partitioned disks did no longer work since RDB
support was added. Fixed that and bumped the version to 1.12.
2011-08-18 09:03:28 +00:00
joerg
c7d2d6685d Ensure that NOMAN is defined earlier. 2011-01-24 19:27:18 +00:00
joerg
3c550524b5 Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh.  Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
2011-01-22 19:19:14 +00:00
kiyohara
a3f576d5c4 Support load from FAT. 2010-06-19 08:48:33 +00:00
phx
ad12935328 Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
2009-09-11 12:00:12 +00:00
he
9dbb63534c Follow up the time_t -> saseconds_t or satime_t type changes by
changing the signatures of netif_get() and getsecs() appropriately.
2009-01-17 12:34:25 +00:00
tsutsui
e7cdb2297e WARNSfy 2009-01-12 07:49:57 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
garbled
dc6a7fd211 Add support to ofwboot for booting on the 7046-B50. Also likely to work
on the 7043-150.  The B50 wants not only a note at the head of the
binary, like the 7044 did, but it also wants a PHDR that points at it.
Because the IBM firmware doesn't like the real note section that ld
generates (it puts it at the end of the file), we instead point PT_NOTE
at the text section.  This works, because at the top of the text section,
there is a note hacked in, which was required for the 7044.

Also, change the mode from virtual mode to real mode in the note, because
the B50 hangs if you load it in virtual.  Tested to work on a B50, 7044,
and Pegasos2.

Yay IBM.
2008-02-13 20:11:38 +00:00
garbled
ddf7aaf7e5 Add a very quick and simple hack to allow ofwboot to be compiled into a
program that dumps the entire ofw device tree automatically.  I needed
this functionality to collect ofw dumps from users, and it doesn't hurt
to just commit it, as it's all protected inside a #ifdef OFWDUMP.
2008-02-12 04:27:46 +00:00
garbled
2849d0b8df Add padding to align the rodata section. This fixes a strange bug
where the bootloader would freak out if various printfs were enabled or
disabled.

Add code to autodetect a 64bit cpu, and attempt to load a different set
of kernels if they exist.

Bump version to 1.9
2008-01-24 19:52:53 +00:00
garbled
0beb82c81b Add another optional argument to mkbootinfo.sh, the location of the bitmap. 2008-01-24 01:12:57 +00:00
garbled
ad9b9c40d6 Add a new mkbootinfo.sh script that builds a bootinfo.txt file. Remove a
printf in ofwboot.
2008-01-23 23:09:42 +00:00
garbled
0d31ffa76d Remove alloc.h too, no longer needed. 2008-01-09 19:39:07 +00:00
garbled
dc535894e1 Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270.  Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
2008-01-09 19:34:44 +00:00
mrg
9c1261344f support FS_RAID partitions, and increase the offset by
RF_PROTECTED_SECTORS (64) if so.
2008-01-03 06:40:02 +00:00
perry
970ad9314d Remove __attribute__((__noreturn__)) from things already marked __dead
Found by the department of redundancy department.
2007-12-24 15:46:45 +00:00
jmmv
ffc43e2cd8 Fix a typo in a comment, and while here also drop trailing whitespace. 2007-11-24 15:49:32 +00:00
garbled
30dc55f8a8 Bump version 2007-10-18 19:59:32 +00:00
garbled
9898e70302 Update the bootloader to work with the ofwoea_initppc code used by macppc 2007-10-18 19:58:54 +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
b69e9377c9 - convert to register prefixes
- zero out BSS before we start calling into C code instead of memset()
  (pulled from macppc/stand/ofwboot/Locore.c rev 1.16)
2007-05-21 13:20:03 +00:00
tsutsui
29070a7e6e Add src/common/include to -I include path so that ofwboot build
without installed headers in DESTDIR.
2007-05-21 13:14:51 +00:00
he
34485a4327 Make devsw non-static to match libsa/stand.h. 2006-06-28 22:22:50 +00:00
uwe
257b602df3 Sync with macppc version. Cosmetic changes mostly. 2006-01-27 04:18:39 +00:00
uwe
3182891154 Tell gcc that startup and stack are used. 2006-01-27 04:11:41 +00:00
christos
606bb2caed free -> dealloc
unsigned -> size_t for alloc/dealloc
2006-01-25 18:28:25 +00:00
perry
2d65de2479 bare asm -> __asm 2005-12-24 22:45:33 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
junyoung
17670568fe Use FS_OPS() macro. 2005-06-23 19:44:00 +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
matt
f6dce1d311 Make this work with R/O source trees. 2003-10-24 04:49:31 +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
fe200beac4 Use -ffreestanding.
Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
2003-10-08 01:38:49 +00:00
simonb
27fbee2ad2 Don't use multi-line strings (keeps gcc331 happy). 2003-10-08 01:35:49 +00:00
simonb
605b20c064 Use <lib/libkern/libkern.h> for str*() prototypes instead of the userland
header <string.h>.
2003-10-08 01:30:40 +00:00
aymeric
2b846f3e47 . ANSIfy a bit more
. use the boot_entry_t type for the entry point

Makes ofwboot compile with -Wmissing-prototypes -Wstrict-prototypes, as
suggested by Chuck Silvers in a private e-mail.
2003-07-14 09:46:06 +00:00
aymeric
db875b067a . prototype for main()
. typedef boot_entry_t to be the prototype of the kernel entry point
2003-07-14 09:42:58 +00:00
aymeric
3d58c2238e include <sys/types.h> so that this file can be included first/alone 2003-06-26 20:47:51 +00:00
aymeric
003fd1df25 . ANSIfy
. include needed headers
. fix a couple of warnings
2003-06-26 20:47:10 +00:00
aymeric
98e0168f0a . ANSIfy
. include the needed headers
. net_mountroot() becomes static
2003-06-26 20:46:31 +00:00
aymeric
ee20410a5e ANSIfy 2003-06-26 20:45:29 +00:00
aymeric
b0c4d54ee9 . ANSIfy
. include alloc.h
. while there, fix a bug in prom2boot() introduced in rev. 1.11
2003-06-26 20:44:51 +00:00