2001-10-15 10:36:35 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2009-02-21 15:04:31 +00:00
|
|
|
MK_SSP= no
|
2006-03-17 18:54:44 +00:00
|
|
|
|
2012-05-01 17:16:01 +00:00
|
|
|
PROG?= loader
|
|
|
|
NEWVERSWHAT?= "bootstrap loader" sparc64
|
2002-04-02 17:08:37 +00:00
|
|
|
INSTALLFLAGS= -b
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2002-05-28 23:09:59 +00:00
|
|
|
# Architecture-specific loader code
|
2002-07-07 18:23:10 +00:00
|
|
|
SRCS= locore.S main.c metadata.c vers.c
|
2002-02-23 04:35:28 +00:00
|
|
|
|
2002-04-02 17:08:37 +00:00
|
|
|
LOADER_DISK_SUPPORT?= yes
|
|
|
|
LOADER_UFS_SUPPORT?= yes
|
2002-06-21 22:34:51 +00:00
|
|
|
LOADER_CD9660_SUPPORT?= yes
|
2012-05-01 17:16:01 +00:00
|
|
|
LOADER_ZFS_SUPPORT?= no
|
2002-07-07 23:08:22 +00:00
|
|
|
LOADER_NET_SUPPORT?= yes
|
|
|
|
LOADER_NFS_SUPPORT?= yes
|
|
|
|
LOADER_TFTP_SUPPORT?= yes
|
2002-10-13 18:52:46 +00:00
|
|
|
LOADER_GZIP_SUPPORT?= yes
|
|
|
|
LOADER_BZIP2_SUPPORT?= no
|
2012-05-01 17:16:01 +00:00
|
|
|
LOADER_DEBUG?= no
|
2002-02-23 04:35:28 +00:00
|
|
|
|
2012-05-01 17:16:01 +00:00
|
|
|
.if ${LOADER_DEBUG} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_DEBUG
|
|
|
|
.endif
|
2002-02-23 04:35:28 +00:00
|
|
|
.if ${LOADER_DISK_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_DISK_SUPPORT
|
|
|
|
.endif
|
2002-04-01 23:28:35 +00:00
|
|
|
.if ${LOADER_UFS_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_UFS_SUPPORT
|
|
|
|
.endif
|
|
|
|
.if ${LOADER_CD9660_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_CD9660_SUPPORT
|
|
|
|
.endif
|
2012-05-01 17:16:01 +00:00
|
|
|
.if ${LOADER_ZFS_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_ZFS_SUPPORT
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../zfs
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
|
2012-05-12 20:27:33 +00:00
|
|
|
LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a
|
2012-05-01 17:16:01 +00:00
|
|
|
.endif
|
2002-10-13 18:52:46 +00:00
|
|
|
.if ${LOADER_GZIP_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_GZIP_SUPPORT
|
|
|
|
.endif
|
|
|
|
.if ${LOADER_BZIP2_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_BZIP2_SUPPORT
|
|
|
|
.endif
|
2002-02-23 04:35:28 +00:00
|
|
|
.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
|
2001-10-30 06:37:36 +00:00
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_FORTH} != "no"
|
2002-05-28 23:09:59 +00:00
|
|
|
# Enable BootForth
|
|
|
|
BOOT_FORTH= yes
|
2012-05-01 17:16:01 +00:00
|
|
|
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../ficl/sparc64
|
2002-05-28 23:09:59 +00:00
|
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|
|
|
.endif
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2010-01-09 21:23:39 +00:00
|
|
|
# Always add MI sources
|
2001-10-15 10:36:35 +00:00
|
|
|
.PATH: ${.CURDIR}/../../common
|
2004-02-09 14:17:02 +00:00
|
|
|
.include "${.CURDIR}/../../common/Makefile.inc"
|
2001-10-15 10:36:35 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
2004-02-09 14:17:02 +00:00
|
|
|
CFLAGS+= -I.
|
2010-01-09 21:23:39 +00:00
|
|
|
# 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
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2004-02-09 14:17:02 +00:00
|
|
|
CLEANFILES+= vers.c loader.help
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2004-02-09 14:17:02 +00:00
|
|
|
LDFLAGS= -static
|
2002-05-28 23:09:59 +00:00
|
|
|
|
2004-08-16 15:45:27 +00:00
|
|
|
# Open Firmware standalone support library
|
2002-05-28 23:09:59 +00:00
|
|
|
LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
|
2001-10-15 10:36:35 +00:00
|
|
|
|
|
|
|
# where to get libstand from
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
2002-05-28 23:09:59 +00:00
|
|
|
|
2012-05-12 20:27:33 +00:00
|
|
|
DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
|
|
|
|
LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
|
2002-05-28 23:09:59 +00:00
|
|
|
|
2012-05-01 17:16:01 +00:00
|
|
|
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
|
|
|
|
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
|
|
|
|
${NEWVERSWHAT}
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2004-02-09 14:17:02 +00:00
|
|
|
loader.help: help.common help.sparc64
|
2002-04-02 17:08:37 +00:00
|
|
|
cat ${.ALLSRC} | \
|
|
|
|
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2002-05-28 23:09:59 +00:00
|
|
|
.PATH: ${.CURDIR}/../../forth
|
2004-02-09 14:17:02 +00:00
|
|
|
FILES= loader.help loader.4th support.4th loader.conf
|
2011-05-30 04:23:33 +00:00
|
|
|
FILES+= screen.4th frames.4th
|
2011-05-28 08:50:38 +00:00
|
|
|
FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
|
2012-11-07 02:14:03 +00:00
|
|
|
FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
|
2002-05-28 23:09:59 +00:00
|
|
|
FILESDIR_loader.conf= /boot/defaults
|
|
|
|
|
2001-10-15 10:36:35 +00:00
|
|
|
.if !exists(${DESTDIR}/boot/loader.rc)
|
2002-05-28 23:09:59 +00:00
|
|
|
FILES+= loader.rc
|
2001-10-15 10:36:35 +00:00
|
|
|
.endif
|
|
|
|
|
2011-05-28 08:50:38 +00:00
|
|
|
.if !exists(${DESTDIR}/boot/menu.rc)
|
|
|
|
FILES+= menu.rc
|
|
|
|
.endif
|
|
|
|
|
2001-10-15 10:36:35 +00:00
|
|
|
.include <bsd.prog.mk>
|