From 465d2fa6dc94cb299fdafffae3981305acaf872c Mon Sep 17 00:00:00 2001 From: jmmv Date: Mon, 12 Mar 2007 15:09:01 +0000 Subject: [PATCH] Add the ability for platform-specific Makefiles to indicate which kernel images to install into / (which might be more than just "netbsd"). Addresses PR port-shark/17569. --- sys/conf/Makefile.kern.inc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sys/conf/Makefile.kern.inc b/sys/conf/Makefile.kern.inc index 46e441f2534b..e38dea7a4d64 100644 --- a/sys/conf/Makefile.kern.inc +++ b/sys/conf/Makefile.kern.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.99 2007/01/27 01:37:57 christos Exp $ +# $NetBSD: Makefile.kern.inc,v 1.100 2007/03/12 15:09:01 jmmv Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -373,6 +373,11 @@ lint: ${LOBJS} ${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} ${LOBJS} .endif +# List of kernel images that will be installed into the root file system. +# Some platforms may need to install more than one (e.g. a netbsd.aout file +# to be loaded directly by the firmware), so this can be overriden by them. +KERNIMAGES?= netbsd + .if !target(install) # The install target can be redefined by putting a # install-kernel-${MACHINE_NAME} target into /etc/mk.conf @@ -380,10 +385,12 @@ MACHINE_NAME!= uname -n install: install-kernel-${MACHINE_NAME} .if !target(install-kernel-${MACHINE_NAME}) install-kernel-${MACHINE_NAME}: - rm -f ${DESTDIR}/onetbsd - ln ${DESTDIR}/netbsd ${DESTDIR}/onetbsd - cp netbsd ${DESTDIR}/nnetbsd - mv ${DESTDIR}/nnetbsd ${DESTDIR}/netbsd +.for _K in ${KERNIMAGES} + rm -f ${DESTDIR}/o${_K} + ln ${DESTDIR}/${_K} ${DESTDIR}/o${_K} + cp ${_K} ${DESTDIR}/n${_K} + mv ${DESTDIR}/n${_K} ${DESTDIR}/${_K} +.endfor .endif .endif