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.
This commit is contained in:
parent
af7d74f692
commit
465d2fa6dc
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue