From owner-p4-projects@FreeBSD.ORG Fri Nov 2 18:57:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 968CC16A469; Fri, 2 Nov 2007 18:57:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51A3016A418 for ; Fri, 2 Nov 2007 18:57:59 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3AFD713C448 for ; Fri, 2 Nov 2007 18:57:59 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lA2IvxXM075982 for ; Fri, 2 Nov 2007 18:57:59 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lA2IvwF2075979 for perforce@freebsd.org; Fri, 2 Nov 2007 18:57:58 GMT (envelope-from raj@freebsd.org) Date: Fri, 2 Nov 2007 18:57:58 GMT Message-Id: <200711021857.lA2IvwF2075979@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 128528 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2007 18:58:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=128528 Change 128528 by raj@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 + 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 + .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 + +.if ${MK_UBOOT} != "no" +SUBDIR= uboot +.else +SUBDIR= ofw +.endif .include ==== //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)