summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/boot/sparc64/loader/Makefile30
1 files changed, 21 insertions, 9 deletions
diff --git a/sys/boot/sparc64/loader/Makefile b/sys/boot/sparc64/loader/Makefile
index dec52e0..64e686b 100644
--- a/sys/boot/sparc64/loader/Makefile
+++ b/sys/boot/sparc64/loader/Makefile
@@ -1,17 +1,31 @@
# $FreeBSD$
-LOADERBASE= 0x100000
-
BASE= loader
PROG= ${BASE}
NEWVERSWHAT= "bootstrap loader" sparc64
-LOADER_DISK_SUPPORT?= yes
-LOADER_NET_SUPPORT?= yes
+CFLAGS= -mno-app-regs
+
+LOADER_DISK_SUPPORT?= no
+LOADER_NET_SUPPORT?= yes
+LOADER_NFS_SUPPORT?= yes
+LOADER_TFTP_SUPPORT?= yes
+
+.if ${LOADER_DISK_SUPPORT} == "yes"
+CFLAGS+= -DLOADER_DISK_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
# Architecture-specific loader code
SRCS= locore.s main.c metadata.c
-CFLAGS= -mno-app-regs
# Always add MI sources
.PATH: ${.CURDIR}/../../common
@@ -21,8 +35,8 @@ CFLAGS+= -I${.CURDIR}/../../.. -I.
CLEANFILES+= ${PROG}
-CFLAGS+= -W -Wall
-LDFLAGS= -X -Ttext ${LOADERBASE} -e _start -static
+CFLAGS+= -W -Wall -ffreestanding
+LDFLAGS= -X -static
# where to get libstand from
#XXX need a better way to do this
@@ -37,8 +51,6 @@ LIBOFW= ${.CURDIR}/../../ofw/libofw/libofw.a
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
-CFLAGS+= -elf -DLOADERBASE=${LOADERBASE}
-
# Debug me!
#CFLAGS+= -g
#LDFLAGS+= -g
OpenPOWER on IntegriCloud