head	1.29;
access;
symbols
	RELENG_8_4:1.29.0.2
	RELENG_9_1_0_RELEASE:1.25.2.3.2.2
	RELENG_9_1:1.25.2.3.0.2
	RELENG_9_1_BP:1.25.2.3
	RELENG_8_3_0_RELEASE:1.22.2.2.6.1
	RELENG_8_3:1.22.2.2.0.6
	RELENG_8_3_BP:1.22.2.2
	RELENG_9_0_0_RELEASE:1.25.2.1.2.1
	RELENG_9_0:1.25.2.1.0.2
	RELENG_9_0_BP:1.25.2.1
	RELENG_9:1.25.0.2
	RELENG_9_BP:1.25
	RELENG_7_4_0_RELEASE:1.20.2.1.4.1
	RELENG_8_2_0_RELEASE:1.22.2.2.4.1
	RELENG_7_4:1.20.2.1.0.4
	RELENG_7_4_BP:1.20.2.1
	RELENG_8_2:1.22.2.2.0.4
	RELENG_8_2_BP:1.22.2.2
	RELENG_8_1_0_RELEASE:1.22.2.2.2.1
	RELENG_8_1:1.22.2.2.0.2
	RELENG_8_1_BP:1.22.2.2
	RELENG_7_3_0_RELEASE:1.20.2.1.2.1
	RELENG_7_3:1.20.2.1.0.2
	RELENG_7_3_BP:1.20.2.1
	RELENG_8_0_0_RELEASE:1.22.2.1.2.1
	RELENG_8_0:1.22.2.1.0.2
	RELENG_8_0_BP:1.22.2.1
	RELENG_8:1.22.0.2
	RELENG_8_BP:1.22
	RELENG_7_2_0_RELEASE:1.20.8.1
	RELENG_7_2:1.20.0.8
	RELENG_7_2_BP:1.20
	RELENG_7_1_0_RELEASE:1.20.6.1
	RELENG_6_4_0_RELEASE:1.19.12.1
	RELENG_7_1:1.20.0.6
	RELENG_7_1_BP:1.20
	RELENG_6_4:1.19.0.12
	RELENG_6_4_BP:1.19
	RELENG_7_0_0_RELEASE:1.20
	RELENG_6_3_0_RELEASE:1.19
	RELENG_7_0:1.20.0.4
	RELENG_7_0_BP:1.20
	RELENG_6_3:1.19.0.10
	RELENG_6_3_BP:1.19
	RELENG_7:1.20.0.2
	RELENG_7_BP:1.20
	RELENG_6_2_0_RELEASE:1.19
	RELENG_6_2:1.19.0.8
	RELENG_6_2_BP:1.19
	RELENG_5_5_0_RELEASE:1.18
	RELENG_5_5:1.18.0.8
	RELENG_5_5_BP:1.18
	RELENG_6_1_0_RELEASE:1.19
	RELENG_6_1:1.19.0.6
	RELENG_6_1_BP:1.19
	RELENG_6_0_0_RELEASE:1.19
	RELENG_6_0:1.19.0.4
	RELENG_6_0_BP:1.19
	RELENG_6:1.19.0.2
	RELENG_6_BP:1.19
	RELENG_5_4_0_RELEASE:1.18
	RELENG_5_4:1.18.0.6
	RELENG_5_4_BP:1.18
	RELENG_5_3_0_RELEASE:1.18
	RELENG_5_3:1.18.0.4
	RELENG_5_3_BP:1.18
	RELENG_5:1.18.0.2
	RELENG_5_BP:1.18
	RELENG_5_2_1_RELEASE:1.15
	RELENG_5_2_0_RELEASE:1.15
	RELENG_5_2:1.15.0.4
	RELENG_5_2_BP:1.15
	RELENG_5_1_0_RELEASE:1.15
	RELENG_5_1:1.15.0.2
	RELENG_5_1_BP:1.15
	RELENG_5_0_0_RELEASE:1.14
	RELENG_5_0:1.14.0.2
	RELENG_5_0_BP:1.14;
locks; strict;
comment	@# @;


1.29
date	2012.11.17.01.51.20;	author svnexp;	state Exp;
branches
	1.29.2.1;
next	1.28;

1.28
date	2012.11.07.02.14.03;	author dteske;	state Exp;
branches;
next	1.27;

1.27
date	2012.05.12.20.27.33;	author avg;	state Exp;
branches;
next	1.26;

1.26
date	2012.05.01.17.16.01;	author marius;	state Exp;
branches;
next	1.25;

1.25
date	2011.05.30.04.23.33;	author julian;	state Exp;
branches
	1.25.2.1;
next	1.24;

1.24
date	2011.05.28.08.50.38;	author julian;	state Exp;
branches;
next	1.23;

1.23
date	2010.01.09.21.23.39;	author marius;	state Exp;
branches;
next	1.22;

1.22
date	2009.02.21.15.04.31;	author ru;	state Exp;
branches
	1.22.2.1;
next	1.21;

1.21
date	2008.06.25.21.33.28;	author ru;	state Exp;
branches;
next	1.20;

1.20
date	2006.03.17.18.54.36;	author ru;	state Exp;
branches
	1.20.2.1
	1.20.6.1
	1.20.8.1;
next	1.19;

1.19
date	2004.12.21.12.32.15;	author ru;	state Exp;
branches
	1.19.2.1
	1.19.12.1;
next	1.18;

1.18
date	2004.08.16.15.45.25;	author marius;	state Exp;
branches;
next	1.17;

1.17
date	2004.02.10.22.11.36;	author ru;	state Exp;
branches;
next	1.16;

1.16
date	2004.02.09.14.17.02;	author ru;	state Exp;
branches;
next	1.15;

1.15
date	2002.12.20.04.32.10;	author jake;	state Exp;
branches;
next	1.14;

1.14
date	2002.11.10.19.17.36;	author jake;	state Exp;
branches;
next	1.13;

1.13
date	2002.10.13.18.52.46;	author jake;	state Exp;
branches;
next	1.12;

1.12
date	2002.09.02.01.11.46;	author jake;	state Exp;
branches;
next	1.11;

1.11
date	2002.07.07.23.08.22;	author jake;	state Exp;
branches;
next	1.10;

1.10
date	2002.07.07.18.23.10;	author jake;	state Exp;
branches;
next	1.9;

1.9
date	2002.06.21.22.34.51;	author jake;	state Exp;
branches;
next	1.8;

1.8
date	2002.05.28.23.09.59;	author jake;	state Exp;
branches;
next	1.7;

1.7
date	2002.05.10.09.26.35;	author obrien;	state Exp;
branches;
next	1.6;

1.6
date	2002.04.02.17.08.37;	author tmm;	state Exp;
branches;
next	1.5;

1.5
date	2002.04.01.23.28.34;	author tmm;	state Exp;
branches;
next	1.4;

1.4
date	2002.02.23.04.35.28;	author jake;	state Exp;
branches;
next	1.3;

1.3
date	2001.12.28.22.12.38;	author robert;	state Exp;
branches;
next	1.2;

1.2
date	2001.10.30.06.37.36;	author jake;	state Exp;
branches;
next	1.1;

1.1
date	2001.10.15.10.36.35;	author robert;	state Exp;
branches;
next	;

1.29.2.1
date	2012.11.17.01.51.20;	author svnexp;	state dead;
branches;
next	1.29.2.2;

1.29.2.2
date	2013.03.28.13.04.03;	author svnexp;	state Exp;
branches;
next	;

1.25.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.25.2.1.2.1;
next	1.25.2.2;

1.25.2.2
date	2012.05.26.08.54.26;	author marius;	state Exp;
branches;
next	1.25.2.3;

1.25.2.3
date	2012.06.29.10.19.15;	author avg;	state Exp;
branches
	1.25.2.3.2.1;
next	1.25.2.4;

1.25.2.4
date	2012.11.17.11.36.48;	author svnexp;	state Exp;
branches;
next	1.25.2.5;

1.25.2.5
date	2013.08.09.15.01.43;	author svnexp;	state Exp;
branches;
next	;

1.25.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.25.2.1.2.2;

1.25.2.1.2.2
date	2012.11.17.08.36.46;	author svnexp;	state Exp;
branches;
next	;

1.25.2.3.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.25.2.3.2.2;

1.25.2.3.2.2
date	2012.11.17.08.47.37;	author svnexp;	state Exp;
branches;
next	;

1.22.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.22.2.1.2.1;
next	1.22.2.2;

1.22.2.2
date	2010.01.15.19.06.33;	author marius;	state Exp;
branches
	1.22.2.2.2.1
	1.22.2.2.4.1
	1.22.2.2.6.1;
next	1.22.2.3;

1.22.2.3
date	2012.05.26.08.54.44;	author marius;	state Exp;
branches;
next	1.22.2.4;

1.22.2.4
date	2012.06.29.10.18.36;	author avg;	state Exp;
branches;
next	1.22.2.5;

1.22.2.5
date	2012.11.17.10.36.28;	author svnexp;	state Exp;
branches;
next	;

1.22.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.22.2.2.2.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.22.2.2.4.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.22.2.2.6.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.22.2.2.6.2;

1.22.2.2.6.2
date	2012.11.17.08.25.08;	author svnexp;	state Exp;
branches;
next	;

1.20.2.1
date	2010.01.15.19.06.47;	author marius;	state Exp;
branches
	1.20.2.1.2.1
	1.20.2.1.4.1;
next	1.20.2.2;

1.20.2.2
date	2012.11.17.08.04.56;	author svnexp;	state Exp;
branches;
next	;

1.20.2.1.2.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.20.2.1.4.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.20.2.1.4.2;

1.20.2.1.4.2
date	2012.11.17.08.17.05;	author svnexp;	state Exp;
branches;
next	;

1.20.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.20.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.19.2.1
date	2012.11.17.07.42.42;	author svnexp;	state Exp;
branches;
next	;

1.19.12.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;


desc
@@


1.29
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/sys/boot/sparc64/loader/Makefile 242688 2012-11-07 02:14:03Z dteske $

.include <bsd.own.mk>
MK_SSP=		no

PROG?=		loader
NEWVERSWHAT?=	"bootstrap loader" sparc64
INSTALLFLAGS=	-b

# Architecture-specific loader code
SRCS=		locore.S main.c metadata.c vers.c

LOADER_DISK_SUPPORT?=	yes
LOADER_UFS_SUPPORT?=	yes
LOADER_CD9660_SUPPORT?=	yes
LOADER_ZFS_SUPPORT?=	no
LOADER_NET_SUPPORT?=	yes
LOADER_NFS_SUPPORT?=	yes
LOADER_TFTP_SUPPORT?=	yes
LOADER_GZIP_SUPPORT?=	yes
LOADER_BZIP2_SUPPORT?=	no
LOADER_DEBUG?=		no

.if ${LOADER_DEBUG} == "yes"
CFLAGS+=	-DLOADER_DEBUG
.endif
.if ${LOADER_DISK_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_DISK_SUPPORT
.endif
.if ${LOADER_UFS_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_UFS_SUPPORT
.endif
.if ${LOADER_CD9660_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_CD9660_SUPPORT
.endif
.if ${LOADER_ZFS_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_ZFS_SUPPORT
CFLAGS+=	-I${.CURDIR}/../../zfs
CFLAGS+=	-I${.CURDIR}/../../../cddl/boot/zfs
LIBZFSBOOT=	${.OBJDIR}/../../zfs/libzfsboot.a
.endif
.if ${LOADER_GZIP_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_GZIP_SUPPORT
.endif
.if ${LOADER_BZIP2_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_BZIP2_SUPPORT
.endif
.if ${LOADER_NET_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_NET_SUPPORT
.endif
.if ${LOADER_NFS_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_NFS_SUPPORT
.endif
.if ${LOADER_TFTP_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_TFTP_SUPPORT
.endif

.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH=	yes
CFLAGS+=	-DBOOT_FORTH -I${.CURDIR}/../../ficl
CFLAGS+=	-I${.CURDIR}/../../ficl/sparc64
LIBFICL=	${.OBJDIR}/../../ficl/libficl.a
.endif

# Always add MI sources
.PATH:		${.CURDIR}/../../common
.include	"${.CURDIR}/../../common/Makefile.inc"
CFLAGS+=	-I${.CURDIR}/../../common
CFLAGS+=	-I.
# Avoid the open-close-dance for every file access as some firmwares perform
# an auto-negotiation on every open of the network interface and thus causes
# netbooting to take horribly long.
CFLAGS+=	-DNETIF_OPEN_CLOSE_ONCE

CLEANFILES+=	vers.c loader.help

LDFLAGS=	-static

# Open Firmware standalone support library
LIBOFW=		${.OBJDIR}/../../ofw/libofw/libofw.a
CFLAGS+=	-I${.CURDIR}/../../ofw/libofw/

# where to get libstand from
CFLAGS+=	-I${.CURDIR}/../../../../lib/libstand/

DPADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
LDADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand

vers.c:	${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
	    ${NEWVERSWHAT}

loader.help: help.common help.sparc64
	cat ${.ALLSRC} | \
	    awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}

.PATH: ${.CURDIR}/../../forth
FILES=	loader.help loader.4th support.4th loader.conf
FILES+=	screen.4th frames.4th
FILES+=	beastie.4th brand.4th check-password.4th color.4th delay.4th
FILES+=	menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
FILESDIR_loader.conf=	/boot/defaults

.if !exists(${DESTDIR}/boot/loader.rc)
FILES+= loader.rc
.endif

.if !exists(${DESTDIR}/boot/menu.rc)
FILES+= menu.rc
.endif

.include <bsd.prog.mk>
@


1.29.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:04:03 +0000
@
text
@d1 113
@


1.29.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 106
# $FreeBSD: releng/8.4/sys/boot/sparc64/loader/Makefile 237765 2012-06-29 10:18:36Z avg $

.include <bsd.own.mk>
MK_SSP=		no

PROG?=		loader
NEWVERSWHAT?=	"bootstrap loader" sparc64
INSTALLFLAGS=	-b

# Architecture-specific loader code
SRCS=		locore.S main.c metadata.c vers.c

LOADER_DISK_SUPPORT?=	yes
LOADER_UFS_SUPPORT?=	yes
LOADER_CD9660_SUPPORT?=	yes
LOADER_ZFS_SUPPORT?=	no
LOADER_NET_SUPPORT?=	yes
LOADER_NFS_SUPPORT?=	yes
LOADER_TFTP_SUPPORT?=	yes
LOADER_GZIP_SUPPORT?=	yes
LOADER_BZIP2_SUPPORT?=	no
LOADER_DEBUG?=		no

.if ${LOADER_DEBUG} == "yes"
CFLAGS+=	-DLOADER_DEBUG
.endif
.if ${LOADER_DISK_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_DISK_SUPPORT
.endif
.if ${LOADER_UFS_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_UFS_SUPPORT
.endif
.if ${LOADER_CD9660_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_CD9660_SUPPORT
.endif
.if ${LOADER_ZFS_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_ZFS_SUPPORT
CFLAGS+=	-I${.CURDIR}/../../zfs
CFLAGS+=	-I${.CURDIR}/../../../cddl/boot/zfs
LIBZFSBOOT=	${.OBJDIR}/../../zfs/libzfsboot.a
.endif
.if ${LOADER_GZIP_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_GZIP_SUPPORT
.endif
.if ${LOADER_BZIP2_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_BZIP2_SUPPORT
.endif
.if ${LOADER_NET_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_NET_SUPPORT
.endif
.if ${LOADER_NFS_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_NFS_SUPPORT
.endif
.if ${LOADER_TFTP_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_TFTP_SUPPORT
.endif

.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH=	yes
CFLAGS+=	-DBOOT_FORTH -I${.CURDIR}/../../ficl
CFLAGS+=	-I${.CURDIR}/../../ficl/sparc64
LIBFICL=	${.OBJDIR}/../../ficl/libficl.a
.endif

# Always add MI sources
.PATH:		${.CURDIR}/../../common
.include	"${.CURDIR}/../../common/Makefile.inc"
CFLAGS+=	-I${.CURDIR}/../../common
CFLAGS+=	-I.
# Avoid the open-close-dance for every file access as some firmwares perform
# an auto-negotiation on every open of the network interface and thus causes
# netbooting to take horribly long.
CFLAGS+=	-DNETIF_OPEN_CLOSE_ONCE

CLEANFILES+=	vers.c loader.help

LDFLAGS=	-static

# Open Firmware standalone support library
LIBOFW=		${.OBJDIR}/../../ofw/libofw/libofw.a
CFLAGS+=	-I${.CURDIR}/../../ofw/libofw/

# where to get libstand from
CFLAGS+=	-I${.CURDIR}/../../../../lib/libstand/

DPADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
LDADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand

vers.c:	${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
	    ${NEWVERSWHAT}

loader.help: help.common help.sparc64
	cat ${.ALLSRC} | \
	    awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}

.PATH: ${.CURDIR}/../../forth
FILES=	loader.help loader.4th support.4th loader.conf
FILESDIR_loader.conf=	/boot/defaults

.if !exists(${DESTDIR}/boot/loader.rc)
FILES+= loader.rc
.endif

.include <bsd.prog.mk>
@


1.28
log
@SVN rev 242688 on 2012-11-07 02:14:03Z by dteske

Hook in new files menusets.4th and manual.

Approved by:	adrian (co-mentor) (implicit)
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.27
log
@SVN rev 235364 on 2012-05-12 20:27:33Z by avg

sparc64/zfs boot: take advantage of new libzfsboot capabilities

Also drop the now unneeded compatibility shims.

Tested by:	marius
MFC after:	1 month
@
text
@d102 1
a102 1
FILES+=	menu.4th menu-commands.4th shortcuts.4th version.4th
@


1.26
log
@SVN rev 234898 on 2012-05-01 17:16:01Z by marius

Add initial support for booting from ZFS on sparc64. At least on Sun Fire
V100, the firmware is known to be broken and not allowing to simultaneously
open disk devices, causing attempts to boot from a mirror or RAIDZ to cause
a crash. This will be worked around later. The firmwares of newer sun4u models
don't seem to exhibit this problem though.

Steps for ZFS booting:

1. create VTOC8 label
# gpart create -s vtoc8 da0

2. add partitions, f.e.:
# gpart add -t freebsd-zfs -s 60g da0
# gpart add -t freebsd-swap da0
resulting in something like:
# gpart show
=>        0  143331930  da0  VTOC8  (68G)
          0  125821080    1  freebsd-zfs  (60G)
  125821080   17510850    2  freebsd-swap  (8.4G)

3. create zpool
# zpool create bunker da0a
or for mirror/RAIDZ (after preparing additional disks as in steps 1. + 2.):
# zpool create bunker mirror da0a da1a
# zpool create bunker raidz da0a da1a da2a ...

4. set bootfs
# zpool set bootfs=bunker bunker

5. install zfsboot
# zpool export bunker
# gpart bootcode -p /boot/zfsboot da0

6. write zfsloader to the ZFS Boot Block (so far, there's no dedicated tool
for this, so dd(1) has to be used for this purpose)
When using mirror/RAIDZ, step 4. and the dd(1) invocation should be repeated
for the additional disks in order to be able to boot from another disk in
case of failure.
# sysctl kern.geom.debugflags=0x10
# dd if=/boot/zfsloader of=/dev/da0a bs=512 oseek=1024 conv=notrunc
# zpool import bunker

7. install system on ZFS filesystem
Don't forget to set 'zfs_load="YES"' and vfs.root.mountfrom="zfs:bunker" in
loader.conf as well as 'zfs_enable="YES"'in rc.conf.

8. copy zpool.cache to the ZFS filesystem
cp -p /boot/zfs/zpool.cache /bunker/boot/zfs/zpool.cache

9. set mountpoint
# zfs set mountpoint=/ bunker

10. Now, given that aliases for all disks in the zpool exists (check with
the `devalias` command on the boot monitor prompt) and disk0 corresponds
to da0 (likewise for additional disks), the system can be booted from the
ZFS with:
{1} ok boot disk0

PR:             165025
Submitted by:   Gavin Mu
@
text
@d40 1
d87 2
a88 2
DPADD=		${LIBFICL} ${LIBOFW} ${LIBSTAND}
LDADD=		${LIBFICL} ${LIBOFW} -lstand
@


1.25
log
@SVN rev 222472 on 2011-05-30 04:23:33Z by julian

Include forgotten framework changes to get some of the new menu files installed correctly  on non x86/amd systems.
pointy-hut to  devin
@
text
@d6 2
a7 2
PROG=		loader
NEWVERSWHAT=	"bootstrap loader" sparc64
d16 1
d22 1
d24 3
d36 5
d60 2
a61 1
CFLAGS+=	-DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/sparc64
d89 3
a91 2
vers.c:	${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
@


1.25.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.25.2.2
log
@SVN rev 236076 on 2012-05-26 08:54:26Z by marius

MFC: r234898, r235207

Add initial support for booting from ZFS on sparc64. At least on Sun Fire
V100, the firmware is known to be broken and not allowing to simultaneously
open disk devices, causing attempts to boot from a mirror or RAIDZ to cause
a crash. This will be worked around later. The firmwares of newer sun4u models
don't seem to exhibit this problem though.

PR:             165025
Submitted by:   Gavin Mu
@
text
@d6 2
a7 2
PROG?=		loader
NEWVERSWHAT?=	"bootstrap loader" sparc64
a15 1
LOADER_ZFS_SUPPORT?=	no
a20 1
LOADER_DEBUG?=		no
a21 3
.if ${LOADER_DEBUG} == "yes"
CFLAGS+=	-DLOADER_DEBUG
.endif
a30 5
.if ${LOADER_ZFS_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_ZFS_SUPPORT
CFLAGS+=	-I${.CURDIR}/../../zfs
CFLAGS+=	-I${.CURDIR}/../../../cddl/boot/zfs
.endif
d50 1
a50 2
CFLAGS+=	-DBOOT_FORTH -I${.CURDIR}/../../ficl
CFLAGS+=	-I${.CURDIR}/../../ficl/sparc64
d78 2
a79 3
vers.c:	${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
	    ${NEWVERSWHAT}
@


1.25.2.3
log
@SVN rev 237766 on 2012-06-29 10:19:15Z by avg

MFC r235329,235343,235361,235364: zfsboot/zfsloader: support accessing
filesystems within a pool
@
text
@a39 1
LIBZFSBOOT=	${.OBJDIR}/../../zfs/libzfsboot.a
d86 2
a87 2
DPADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
LDADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
@


1.25.2.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/sparc64/loader/Makefile 237766 2012-06-29 10:19:15Z avg $
@


1.25.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/254146
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/sparc64/loader/Makefile 254146 2013-08-09 14:17:47Z dteske $
d102 1
a102 1
FILES+=	menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
@


1.25.2.3.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.25.2.3.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sys/boot/sparc64/loader/Makefile 237766 2012-06-29 10:19:15Z avg $
@


1.25.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.25.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sys/boot/sparc64/loader/Makefile 222472 2011-05-30 04:23:33Z julian $
@


1.24
log
@SVN rev 222417 on 2011-05-28 08:50:38Z by julian

New boot loader menus from Devin Teske.
Discussed on hackers and recommended for inclusion into 9.0 at the devsummit.
All support email to devin   dteske at vicor dot ignoreme dot com .

Submitted by:	dteske at vicor dot ignoreme dot com
Reviewed by:	me and many others
@
text
@d87 1
d89 1
a89 1
FILES+= menu.4th menu-commands.4th shortcuts.4th version.4th
@


1.23
log
@SVN rev 201932 on 2010-01-09 21:23:39Z by marius

- Add code allowing a network device to only be open and closed once
  by keeping it opened after the first open and closing it via the
  cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to
  avoid the open-close-dance on every file access which with firmware
  that for example performs an auto-negotiation on every open causes
  netbooting to take horribly long. Basically the behavior with this
  knob enabled resembles the one employed between r60506 and r177108
  (and for sparc64 also again since r182919) with the addition that
  the network device now is closed eventually before entering the
  kernel and before rebooting. Actually I think this should be the
  desired MI behavior, however the U-Boot loader actually requires
  net_close() to be called after every transaction in order for some
  local shutdown operations to be performed (and which I think thus
  will break on concurrent opens, i.e. when netdev_opens is > 1, like
  the loader does at least for disks when LOADER_GZIP_SUPPORT is
  enabled).
- Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially
  increased netdev_opens for sparc64 in order to keep the network
  device opened forever, as at least some firmware versions require
  the network device to be closed eventually before entering the
  kernel or otherwise will DMA received packets to stale memory.
  The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be
  set as well for the same reasons.
@
text
@d87 2
d95 4
@


1.22
log
@SVN rev 188895 on 2009-02-21 15:04:31Z by ru

Fix build when WITH_SSP is set explicitly.

Submitted by:	Jeremie Le Hen
@
text
@d54 1
a54 1
# Always add MI sources 
d59 4
@


1.22.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.22.2.2
log
@SVN rev 202408 on 2010-01-15 19:06:33Z by marius

MFC: r201932

- Add code allowing a network device to only be open and closed once
  by keeping it opened after the first open and closing it via the
  cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to
  avoid the open-close-dance on every file access which with firmware
  that for example performs an auto-negotiation on every open causes
  netbooting to take horribly long. Basically the behavior with this
  knob enabled resembles the one employed between r60506 and r177108
  (and for sparc64 also again since r182919) with the addition that
  the network device now is closed eventually before entering the
  kernel and before rebooting. Actually I think this should be the
  desired MI behavior, however the U-Boot loader actually requires
  net_close() to be called after every transaction in order for some
  local shutdown operations to be performed (and which I think thus
  will break on concurrent opens, i.e. when netdev_opens is > 1, like
  the loader does at least for disks when LOADER_GZIP_SUPPORT is
  enabled).
- Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially
  increased netdev_opens for sparc64 in order to keep the network
  device opened forever, as at least some firmware versions require
  the network device to be closed eventually before entering the
  kernel or otherwise will DMA received packets to stale memory.
  The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be
  set as well for the same reasons.
@
text
@d54 1
a54 1
# Always add MI sources
a58 4
# Avoid the open-close-dance for every file access as some firmwares perform
# an auto-negotiation on every open of the network interface and thus causes
# netbooting to take horribly long.
CFLAGS+=	-DNETIF_OPEN_CLOSE_ONCE
@


1.22.2.3
log
@SVN rev 236077 on 2012-05-26 08:54:44Z by marius

MFC: r234898, r235207

Add initial support for booting from ZFS on sparc64. At least on Sun Fire
V100, the firmware is known to be broken and not allowing to simultaneously
open disk devices, causing attempts to boot from a mirror or RAIDZ to cause
a crash. This will be worked around later. The firmwares of newer sun4u models
don't seem to exhibit this problem though.

PR:             165025
Submitted by:   Gavin Mu
@
text
@d6 2
a7 2
PROG?=		loader
NEWVERSWHAT?=	"bootstrap loader" sparc64
a15 1
LOADER_ZFS_SUPPORT?=	no
a20 1
LOADER_DEBUG?=		no
a21 3
.if ${LOADER_DEBUG} == "yes"
CFLAGS+=	-DLOADER_DEBUG
.endif
a30 5
.if ${LOADER_ZFS_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_ZFS_SUPPORT
CFLAGS+=	-I${.CURDIR}/../../zfs
CFLAGS+=	-I${.CURDIR}/../../../cddl/boot/zfs
.endif
d50 1
a50 2
CFLAGS+=	-DBOOT_FORTH -I${.CURDIR}/../../ficl
CFLAGS+=	-I${.CURDIR}/../../ficl/sparc64
d78 2
a79 3
vers.c:	${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
	    ${NEWVERSWHAT}
@


1.22.2.4
log
@SVN rev 237765 on 2012-06-29 10:18:36Z by avg

MFC r235329,235343,235361,235364: zfsboot/zfsloader: support accessing
filesystems within a pool
@
text
@a39 1
LIBZFSBOOT=	${.OBJDIR}/../../zfs/libzfsboot.a
d86 2
a87 2
DPADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
LDADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
@


1.22.2.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/boot/sparc64/loader/Makefile 237765 2012-06-29 10:18:36Z avg $
@


1.22.2.2.6.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.22.2.2.6.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sys/boot/sparc64/loader/Makefile 202408 2010-01-15 19:06:33Z marius $
@


1.22.2.2.4.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.22.2.2.2.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.22.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.21
log
@SVN rev 180012 on 2008-06-25 21:33:28Z by ru

Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
  turned opt-in for stable branches depending on the consensus.  You
  can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
  It is harmless to steal the knob as SSP symbols have been provided
  by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
  (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
  libc will be automatically downgraded to -fstack-protector because it
  breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by:	Jeremie Le Hen <jeremie@@le-hen.org>
@
text
@a2 2
WITHOUT_SSP=

d4 1
@


1.20
log
@Reimplementation of world/kernel build options.  For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
@
text
@d3 2
@


1.20.2.1
log
@SVN rev 202409 on 2010-01-15 19:06:47Z by marius

MFC:  r201932

- Add code allowing a network device to only be open and closed once
  by keeping it opened after the first open and closing it via the
  cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined. Note that
  due to the fact that the part of r177108 which reverts r60506 and
  causes the open-close-dance on every file access as the remaining
  problems with powerpc should be sorted out first, in stable/7 the
  only difference in behavior between when NETIF_OPEN_CLOSE_ONCE is
  defined and not currently is that with that macro defined the
  network device is eventually closed before entering the kernel and
  before rebooting.
- Define NETIF_OPEN_CLOSE_ONCE on sparc64 in order to not keep the
  network device opened forever, as at least with some firmware
  versions received packets are DMA'ed to stale memory otherwise.
@
text
@d53 1
a53 1
# Always add MI sources
a57 4
# Avoid the open-close-dance for every file access as some firmwares perform
# an auto-negotiation on every open of the network interface and thus causes
# netbooting to take horribly long.
CFLAGS+=	-DNETIF_OPEN_CLOSE_ONCE
@


1.20.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/sys/boot/sparc64/loader/Makefile 202409 2010-01-15 19:06:47Z marius $
@


1.20.2.1.4.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.20.2.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/sys/boot/sparc64/loader/Makefile 202409 2010-01-15 19:06:47Z marius $
@


1.20.2.1.2.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.20.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.20.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.19
log
@NOFORTH -> NO_FORTH
@
text
@d3 2
d46 1
a46 1
.if !defined(NO_FORTH)
@


1.19.2.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/sys/boot/sparc64/loader/Makefile 139123 2004-12-21 12:32:15Z ru $
@


1.19.12.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.18
log
@Instead of "OpenFirmware", "openfirmware", etc. use the official spelling
"Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).

Ok'ed by:	tmm
@
text
@d44 1
a44 1
.if !defined(NOFORTH)
@


1.17
log
@Since loader(8) on SPARC64 is a pure ELF executable (as opposed
to other architectures), there is no reason not to strip(1) it.

Tested by:	kensmith
@
text
@d61 1
a61 1
# Openfirmware standalone support library
@


1.16
log
@MFi386.

- Factor out common settings and put them in an upper level Makefile.inc.
- Properly use PROG for real programs, not their products.
- Further reduce diffs to i386 versions.

Tested on:	sparc64 (panther)
@
text
@a3 1
STRIP=
@


1.15
log
@Fix breakage from earlier inadvertant changes.
@
text
@d3 1
a3 2
BASE=		loader
PROG=		${BASE}
a5 1
BINDIR?=	/boot
a48 1
.if exists(${.OBJDIR}/../../ficl/libficl.a)
a49 3
.else
LIBFICL=	${.CURDIR}/../../ficl/libficl.a
.endif
d54 1
a54 1
.include	<${.CURDIR}/../../common/Makefile.inc>
d56 1
a56 1
CFLAGS+=	-I${.CURDIR}/../../.. -I.
d58 1
a58 1
CLEANFILES+=	vers.c ${BASE}.help
d60 1
a60 2
CFLAGS+=	-ffreestanding
LDFLAGS=	-nostdlib -static
a66 8
#XXX need a better way to do this
LIBSTAND=	${.CURDIR}/../../../../lib/libstand/libstand.a
.if !exists(${LIBSTAND})
LIBSTAND=	${.OBJDIR}/../../../../lib/libstand/libstand.a
.if !exists(${LIBSTAND})
LIBSTAND=	-lstand
.endif
.endif
d69 2
a70 1
LDADD=		${LIBFICL} ${LIBOFW} ${LIBSTAND}
d75 1
a75 1
${BASE}.help: help.common help.sparc64
d80 1
a80 1
FILES=	${BASE}.help loader.4th support.4th loader.conf
a86 3
# There are no things relevant to all boot parts of FreeBSD/sparc64 yet.
#.include <${.CURDIR}/../Makefile.inc>

a87 9

.if exists(${.CURDIR}/../../../sparc64/include)
beforedepend ${OBJS}: machine

machine:
	ln -sf ${.CURDIR}/../../../sparc64/include machine
.endif

CLEANFILES+=	machine
@


1.14
log
@Change the device path representation in libofw to use the full firmware
path, instead of an internal i386 specific one.  Don't try to interpret
a disklabel in ofw_disk.c, open the partition's device node directly and
let the firmware do it.  This fixes booting from a partition other than 'a'
on sparc64, which is needed to support more installation methods.

No objection:	ppc
@
text
@a18 1
LOADER_ZIP_SUPPORT?=	yes
a29 3
.endif
.if ${LOADER_ZIP_SUPPORT} == "yes"
CFLAGS+=	-DLOADER_ZIP_SUPPORT
@


1.13
log
@Compile in support for zipfs and bzipfs so we can load the gzipped mfsroot
that releases use.
@
text
@d19 1
d32 3
d88 1
a88 1
LDADD=		${LIBFICL} ${LIBSTAND} ${LIBOFW}
@


1.12
log
@Remove NOFORTH=yes, it seems to work now thanks to scottl.
@
text
@d19 2
d30 6
@


1.11
log
@Enable netboot support by default, since it can now coexist with disk and
cdrom support.  This avoids having to distribute separate loaders.
@
text
@a8 1
NOFORTH=	yes
@


1.10
log
@Make building with ficl work.  Unfortunately booting with it doesn't.
@
text
@d17 3
a19 3
LOADER_NET_SUPPORT?=	no
LOADER_NFS_SUPPORT?=	no
LOADER_TFTP_SUPPORT?=	no
@


1.9
log
@Enable cd9660 support by default.
@
text
@d12 1
a12 1
SRCS=		locore.S main.c metadata.c
d57 1
a57 1
CLEANFILES+=	vers.c vers.o ${BASE}.help
d77 1
a77 1
LDADD=		${LIBSTAND} ${LIBOFW}
d79 1
a79 1
vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
a80 1
	${CC} -c vers.c
@


1.8
log
@Sync with i386.  The loader was being installed before the beforeinstall
target, which conventiently moved it to loader.old, leaving no loader.
@
text
@d16 1
a16 1
LOADER_CD9660_SUPPORT?=	no
@


1.7
log
@-ffreestanding is the word.
(also resort some CFLAGS such that the more "important" value are first so
they are easier to see)
@
text
@d5 1
d9 1
d11 2
a12 1
CFLAGS=		-mno-app-regs 
d40 10
a49 2
# Architecture-specific loader code
SRCS=		locore.S main.c metadata.c
d57 1
a57 1
CLEANFILES+=	${PROG}.help
d61 4
a64 1
LDADD=		${LIBSTAND} ${LIBOFW}
a74 1
LIBOFW=		${.OBJDIR}/../../ofw/libofw/libofw.a
d76 6
a81 1
CFLAGS+=	-I${.CURDIR}/../../ofw/libofw/
d87 4
a90 11
beforeinstall: ${PROG}.help
.if exists(${DESTDIR}/boot/loader)
	mv ${DESTDIR}/boot/loader ${DESTDIR}/boot/loader.old
.endif
#.if exists(${.OBJDIR}/loader.help)
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
		${.OBJDIR}/${BASE}.help ${DESTDIR}/boot
#.else
#	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
#		${.CURDIR}/${BASE}.help ${DESTDIR}/boot
#.endif
d92 1
a92 2
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
		${.CURDIR}/../../forth/loader.rc ${DESTDIR}/boot
a93 6
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
		${.CURDIR}/../../forth/loader.4th ${DESTDIR}/boot
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
		${.CURDIR}/../../forth/support.4th ${DESTDIR}/boot
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
		${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults
d99 9
@


1.6
log
@1.) Rename locore.s to locore.S (by repocopy), to be able to remove
    special-case make rule
2.) Cleanups, remove superfluous expicit rules, add -nostdlib to LDFLAGS,
    remove -X and -g, remove -g from CFLAGS
3.) Add BINDIR
4.) Build install the loader help file, add an empty help.sparc64
5.) Change the default configuration to only support booting from disk
6.) Get libofw.a from a path relative ${.OBJDIR}, not ${.CURDIR}

Submitted by:	jake (1 - 5), obrien (6)
@
text
@d48 1
a48 1
CFLAGS+=	-W -Wall -ffreestanding
@


1.5
log
@Add support for booting from CD-ROM. Make it possible to enable UFS
support using make arguments.
@
text
@d6 2
d11 2
a12 2
LOADER_DISK_SUPPORT?=	no
LOADER_UFS_SUPPORT?=	no
d14 3
a16 3
LOADER_NET_SUPPORT?=	yes
LOADER_NFS_SUPPORT?=	yes
LOADER_TFTP_SUPPORT?=	yes
d38 1
a38 1
SRCS=		locore.s main.c metadata.c
d46 1
a46 1
CLEANFILES+=	${PROG}
d49 2
a50 1
LDFLAGS=	-X -static
d61 1
a61 1
LIBOFW=		${.CURDIR}/../../ofw/libofw/libofw.a
d65 3
a67 11
# Debug me!
#CFLAGS+=	-g
#LDFLAGS+=	-g

${PROG}:	${OBJS}
	${LD} -o ${.TARGET} ${OBJS} ${LIBOFW} ${LIBSTAND} ${LDFLAGS}

locore.o:	locore.s
	${CC} ${CFLAGS} -D_LOCORE -xassembler-with-cpp -c locore.s -o locore.o
main.o:		main.c
	${CC} ${CFLAGS} -c main.c -o main.o
d69 1
a69 1
beforeinstall:
d73 1
a73 1
.if exists(${.OBJDIR}/loader.help)
d76 4
a79 4
.else
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
		${.CURDIR}/${BASE}.help ${DESTDIR}/boot
.endif
@


1.4
log
@Add make variables for fs support and propagate them to CFLAGS.  Put
-ffreestanding in CFLAGS.  Remove unnecessary LDFLAGS.
@
text
@d10 2
d18 6
@


1.3
log
@Avoid having the text and data sections merged into one program
header table entry by removing the -N flag from the LDFLAGS.
@
text
@a2 2
LOADERBASE=	0x100000

d7 19
a25 2
LOADER_DISK_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
a28 1
CFLAGS=		-mno-app-regs 
d38 2
a39 2
CFLAGS+=	-W -Wall
LDFLAGS=	-X -Ttext ${LOADERBASE} -e _start -static
a52 2

CFLAGS+=	-elf -DLOADERBASE=${LOADERBASE}
@


1.2
log
@Add code to copy the enironment and loader metadata into kernel space.
@
text
@d25 1
a25 1
LDFLAGS=	-X -N -Ttext ${LOADERBASE} -e _start -static
@


1.1
log
@Add a Makefile for the sparc64 boot loader.
@
text
@d9 3
d13 2
a14 2
SRCS=		locore.s main.c
CFLAGS=		-mno-app-regs -nostdinc
@

