Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Sep 2000 16:04:09 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        Donn Miller <dmmiller@cvzoom.net>
Cc:        current@freebsd.org
Subject:   Re: buildkernel broken?
Message-ID:  <20000921160409.A14651@mithrandr.moria.org>
In-Reply-To: <Pine.BSF.4.21.0009210959290.251-100000@acs-24-154-25-35.zoominternet.net>; from dmmiller@cvzoom.net on Thu, Sep 21, 2000 at 10:00:59AM -0400
References:  <20000921145439.A13769@mithrandr.moria.org> <Pine.BSF.4.21.0009210959290.251-100000@acs-24-154-25-35.zoominternet.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Thu 2000-09-21 (10:00), Donn Miller wrote:
> On Thu, 21 Sep 2000, Neil Blakey-Milner wrote:
> 
> > On Thu 2000-09-21 (08:48), Donn Miller wrote:
> > > An example of what I get when I try to do a make buildkernel.  I have set
> > > KERNEL=CUSTOM in /etc/make.conf, so I should be alright there.
> > > 
> > 
> > > {standard input}:2342: Error: Subtraction of two symbols in different sections ".data" {.data section} - "KERNBASE" {*UND* section} at file address 928.
> > 
> > Do you have a populated /usr/obj?  (ie, with nm)
> 
> I've been doing "make buildkernel installkernel" in /usr/src without doing
> a "make buildworld" first.  Is this OK?  I guess the buildkernel created a
> /usr/obj, but I deleted it and tried buildkernel again with the same
> results.

No, it's not ok.

I have patches awaiting some final decision from Marcel that'll make it
possible.  It mostly works, but OBJFORMAT_PATH doesn't have access to
the same PATH we're exporting during the kernel build, meaning 'nm'
won't work.  They look something like:

cvs diff: cannot find Makefile
Index: Makefile.inc1
===================================================================
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.167
diff -u -r1.167 Makefile.inc1
--- Makefile.inc1	2000/09/03 02:58:39	1.167
+++ Makefile.inc1	2000/09/06 21:10:53
@@ -193,6 +193,14 @@
 		PATH=${TMPPATH}
 WMAKE=		${WMAKEENV} ${MAKE} -f Makefile.inc1
 
+# kernel stage
+.if ${BUILD_ARCH} == ${MACHINE_ARCH}
+KMAKEENV=	${WMAKEENV} \
+		OBJFORMAT_PATH=${WORLDTMP}/usr/libexec:/usr/libexec
+.else
+KMAKEENV=	${WMAKEENV}
+.endif
+
 # install stage
 IMAKEENV=	${CROSSENV} \
 		PATH=${STRICTTMPPATH}:${INSTALLTMP}
@@ -383,6 +391,9 @@
 .if empty(INSTALLKERNEL)
 INSTALLKERNEL= ${_kernel}
 .endif
+.else
+.BEGIN:
+	@echo ">>> Kernel configuration ${_kernel} does not exist; not building"
 .endif
 .endfor
 
@@ -409,10 +420,10 @@
 		    ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/Makefile
 .if !defined(NO_KERNELDEPEND)
 	cd ${KRNLOBJDIR}/${_kernel}; \
-	    ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} depend
+	    ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} depend
 .endif
 	cd ${KRNLOBJDIR}/${_kernel}; \
-	    ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} all
+	    ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} all
 .endfor
 
 #

Neil
-- 
Neil Blakey-Milner
Sunesi Clinical Systems
nbm@mithrandr.moria.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000921160409.A14651>