PERFORCE change 128528 for review
Rafal Jaworowski
raj at FreeBSD.org
Fri Nov 2 11:58:00 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=128528
Change 128528 by raj at raj_mimi on 2007/11/02 18:57:11
Introduce UBOOT build option
Using WITH_UBOOT in src.conf now allows to differentiate the
underlying firmware we're building against, so only the specific
variant of loader(8) is created and installed. When this option
is unset (the default) the OF-based version of loader and its helper
libs are built.
Affected files ...
.. //depot/projects/e500/lib/libstand/Makefile#5 edit
.. //depot/projects/e500/share/mk/bsd.own.mk#5 edit
.. //depot/projects/e500/sys/boot/Makefile#3 edit
.. //depot/projects/e500/sys/boot/ficl/Makefile#4 edit
.. //depot/projects/e500/sys/boot/powerpc/Makefile#3 edit
.. //depot/projects/e500/sys/boot/powerpc/uboot/Makefile#3 edit
.. //depot/projects/e500/sys/boot/uboot/lib/Makefile#4 edit
Differences ...
==== //depot/projects/e500/lib/libstand/Makefile#5 (text+ko) ====
@@ -6,6 +6,8 @@
# quite large.
#
+.include <bsd.own.mk>
+
LIB= stand
NO_PROFILE=
NO_PIC=
@@ -26,7 +28,10 @@
CFLAGS+= -Os
.endif
.if ${MACHINE_ARCH} == "powerpc"
-CFLAGS+= -ffixed-r14 -ffixed-r29 -msoft-float -D_STANDALONE
+CFLAGS+= -msoft-float -D_STANDALONE
+. if ${MK_UBOOT} != "no"
+CFLAGS+= -ffixed-r14 -ffixed-r29
+. endif
.endif
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+= -m32 -I.
==== //depot/projects/e500/share/mk/bsd.own.mk#5 (text+ko) ====
@@ -263,6 +263,7 @@
SYSCONS \
TCSH \
TOOLCHAIN \
+ UBOOT \
USB \
WPA_SUPPLICANT_EAPOL
.if defined(NO_${var})
@@ -382,7 +383,8 @@
.for var in \
BIND_LIBS \
HESIOD \
- IDEA
+ IDEA \
+ UBOOT
.if defined(WITH_${var}) && defined(WITHOUT_${var})
.error WITH_${var} and WITHOUT_${var} can't both be set.
.endif
==== //depot/projects/e500/sys/boot/Makefile#3 (text+ko) ====
@@ -13,13 +13,18 @@
.endif
# Build Open Firmware library.
-.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
+.if ${MACHINE_ARCH} == "sparc64"
SUBDIR+= ofw
.endif
+.if ${MACHINE_ARCH} == "powerpc"
+. if ${MK_UBOOT} != "no"
# Build U-Boot library.
-.if ${MACHINE_ARCH} == "powerpc"
SUBDIR+= uboot
+. else
+# Build Open Firmware library.
+SUBDIR+= ofw
+. endif
.endif
# Pick the machine-dependent subdir based on the target architecture.
==== //depot/projects/e500/sys/boot/ficl/Makefile#4 (text+ko) ====
@@ -1,5 +1,8 @@
# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.45 2007/10/15 14:20:24 nyan Exp $
#
+
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/}
BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
prefix.c search.c stack.c tools.c vm.c words.c
@@ -15,13 +18,16 @@
CFLAGS+= -mno-sse3
.endif
.if ${MACHINE_ARCH} == "powerpc"
+CFLAGS+= -msoft-float
+. if ${MK_UBOOT} != "no"
#
# Important notice: registers dedicated for U-Boot must NOT be used by the
# loader code, as we are going to jump between loader(8) and U-Boot code back
# and forth safely. For PowerPC these are r14 and r29, but always make
# sure in the U-Boot cpu/{CPU}/config.mk, e.g. cpu/mpc85xx/config.mk
#
-CFLAGS+= -ffixed-r14 -ffixed-r29 -msoft-float
+CFLAGS+= -ffixed-r14 -ffixed-r29
+. endif
.endif
.if ${MACHINE} == "pc98"
CFLAGS+= -Os -DPC98
==== //depot/projects/e500/sys/boot/powerpc/Makefile#3 (text+ko) ====
@@ -1,5 +1,11 @@
# $FreeBSD: src/sys/boot/powerpc/Makefile,v 1.1 2000/10/16 10:46:10 obrien Exp $
-SUBDIR= ofw uboot
+.include <bsd.own.mk>
+
+.if ${MK_UBOOT} != "no"
+SUBDIR= uboot
+.else
+SUBDIR= ofw
+.endif
.include <bsd.subdir.mk>
==== //depot/projects/e500/sys/boot/powerpc/uboot/Makefile#3 (text+ko) ====
@@ -72,7 +72,7 @@
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
# XXX e500 specific - need to integrate it with the overall build settings...
-CFLAGS+= -Wa,-me500 -msoft-float
+#CFLAGS+= -Wa,-me500 -msoft-float
# Pull in common loader code
.PATH: ${.CURDIR}/../../uboot/common
==== //depot/projects/e500/sys/boot/uboot/lib/Makefile#4 (text+ko) ====
@@ -20,7 +20,8 @@
# sure in the U-Boot cpu/{CPU}/config.mk, e.g. cpu/mpc85xx/config.mk
#
# FIXME this should be integrated with the whole system build settings
-CFLAGS+= -msoft-float -Wa,-me500 -ffixed-r14 -ffixed-r29
+#CFLAGS+= -msoft-float -Wa,-me500 -ffixed-r14 -ffixed-r29
+CFLAGS+= -ffixed-r14 -ffixed-r29
.endif
.ifdef(BOOT_DISK_DEBUG)
More information about the p4-projects
mailing list