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