Subject: Re: How to put Extra-Options in Xen 3.0
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Pavel Cahyna <pavel@netbsd.org>
List: tech-toolchain
Date: 09/13/2006 22:47:45
--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

(Moved from port-xen. Summary: I want to have the INSTALL* kernels with
symbols in i386/binary/kernel.)

On Thu, Aug 24, 2006 at 09:43:37AM +0200, Manuel Bouyer wrote:
> On Thu, Aug 24, 2006 at 12:07:13AM +0200, Pavel Cahyna wrote:
> > Could this be done for all the INSTALL kernels? They should be stripped
> > when being written to the floppy images, but to i386/binary/kernel they
> > should be put unstripped IMHO.
> 
> This is a more drastic change to the build infrastructure, I don't want to
> go into this :)

A diff is attached. Opinions?

Pavel

--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="nostrip.diff"

Index: common/Makefile.tarfloppy
===================================================================
RCS file: /cvsroot/src/distrib/common/Makefile.tarfloppy,v
retrieving revision 1.11
diff -u -r1.11 Makefile.tarfloppy
--- common/Makefile.tarfloppy	4 May 2004 02:52:05 -0000	1.11
+++ common/Makefile.tarfloppy	13 Sep 2006 20:43:16 -0000
@@ -45,10 +45,19 @@
 
 .if defined(FLOPPY_NETBSD)				# {
 CLEANFILES+=	netbsd
+.if ${FLOPPY_NETBSD:E}=="gz"
+COPY_CMD=	gunzip -c ${.ALLSRC} > ${.TARGET}
+COMPRESS_CMD=	gzip -9 ${.TARGET}; mv -f ${.TARGET}.gz ${.TARGET}
+.else
+COPY_CMD=	cp ${.ALLSRC} ${.TARGET}
+COMPRESS_CMD=	@true
+.endif
 netbsd: ${FLOPPY_NETBSD}
 	${_MKTARGET_CREATE} "(from: ${.ALLSRC})"
 	@rm -f ${.TARGET}
-	@cp ${.ALLSRC} ${.TARGET}
+	${COPY_CMD}
+	${STRIP} -R .comment -R .ident ${.TARGET}
+	${COMPRESS_CMD}
 .endif	# FLOPPY_NETBSD					# }
 
 
Index: i386/instkernel/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/i386/instkernel/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- i386/instkernel/Makefile	23 Aug 2006 19:02:37 -0000	1.3
+++ i386/instkernel/Makefile	13 Sep 2006 20:43:16 -0000
@@ -28,6 +28,7 @@
 # do not strip Xen kernels, there's no space constraints here.
 MDSET_NOSTRIP.netbsd-INSTALL_XEN2_DOMU=
 MDSET_NOSTRIP.netbsd-INSTALL_XEN3_DOMU=
+MDSET_NOSTRIP=
 MDSET_NOSYMBOLS.netbsd-INSTALL_XEN2_DOMU=
 MDSET_NOSYMBOLS.netbsd-INSTALL_XEN3_DOMU=
 

--jI8keyz6grp/JLjh--