Subject: Re: port-shark/35563 - A fix for instkernel
To: None <gnats-bugs@NetBSD.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: port-arm
Date: 03/09/2007 17:34:11
--Apple-Mail-3--270160800
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
Hi,
The attached patch fixes shark's release process to properly generate
an a.out installation kernel and place it in the "installation/
instkernel" subdirectory of the release tree.
What do you think about this?
Is it there any way to avoid the 'release-arch' target added to the
common files?
INSTALL notes will need to be adjusted once committed as they refer
to a "netbsd.gz" file inside instkernel, but this patch leaves it as
netbsd-INSTALL.aout.gz. I did that just in case we want to provide
more than one install kernel. But... do we really need to take care
of this? Or could the patch be simplified to handle a single install
kernel?
--Apple-Mail-3--270160800
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name=patch.diff
Content-Disposition: attachment;
filename=patch.diff
? shark/instkernel/instkernel/.Makefile.swp
Index: common/Makefile.mdset
===================================================================
RCS file: /cvsroot/src/distrib/common/Makefile.mdset,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile.mdset
--- common/Makefile.mdset 23 Aug 2006 19:01:26 -0000 1.28
+++ common/Makefile.mdset 9 Mar 2007 16:29:06 -0000
@@ -152,10 +152,14 @@ CLEANFILES+= ${KERNELS} ${KERNELSYMS}
realall: ${KERNELS}
.if defined(MDSET_RELEASEDIR)
-release:: check_RELEASEDIR .WAIT ${KERNELS}
+release:: check_RELEASEDIR .WAIT ${KERNELS} release-arch
${RELEASE_INSTALL} ${KERNELS} ${KERNELSYMS} \
${RELEASEDIR}/${MACHINE}/${MDSET_RELEASEDIR}
.endif
+.if !target(release-arch)
+release-arch:
+.endif
+
.endif # _MAKEFILE_MDSET_
Index: shark/instkernel/instkernel/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/shark/instkernel/instkernel/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- shark/instkernel/instkernel/Makefile 21 Sep 2003 00:19:31 -0000 1.14
+++ shark/instkernel/instkernel/Makefile 9 Mar 2007 16:29:06 -0000
@@ -9,10 +9,31 @@ RAMDISK= ${RAMDISKDIR}/ramdisk.fs
MDSETTARGETS= INSTALL ${RAMDISK} -
MDSET_RELEASEDIR= binary/kernel
-MDSET_POST.-= \
+.include "${DISTRIBDIR}/common/Makefile.mdset"
+
+.for _K _I _F in ${MDSETTARGETS}
+
+_FILENAME:=${_F} # (work around obscure issue in make(1))
+.if ${_FILENAME} == "-"
+_FILENAME:= ${_KERNEL.${_K}.${_F}}
+.endif
+
+dependall: ${_FILENAME}.aout.gz
+release-arch: release-arch-${_K}-aout
+
+${_FILENAME}.aout: ${_FILENAME}
${OBJCOPY} -O a.out-arm-netbsd -R .ident -R .arm.atpcs -R .comment \
- ${.TARGET} ${.TARGET}
+ ${_FILENAME} ${_FILENAME}.aout
-.include "${DISTRIBDIR}/common/Makefile.mdset"
+${_FILENAME}.aout.gz: ${_FILENAME}.aout
+ gzip -9c ${_FILENAME}.aout >${_FILENAME}.aout.gz
+
+release-arch-${_K}-aout: ${_FILENAME}.aout.gz
+ ${RELEASE_INSTALL} ${_FILENAME}.aout.gz \
+ ${RELEASEDIR}/${MACHINE}/installation/instkernel/${_FILENAME}.aout.gz
+
+CLEANFILES+= ${_FILENAME}.aout ${_FILENAME}.aout.gz
+
+.endfor
.include <bsd.prog.mk>
--Apple-Mail-3--270160800
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Thanks.
--
Julio M. Merino Vidal <jmmv84@gmail.com>
--Apple-Mail-3--270160800--