From 5b8f9b1eec7c7c5dd7de6a5a1025dcedb09308cb Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 6 Oct 2010 20:35:50 +0200 Subject: [PATCH] vkernel - Fix installkernel target The recommended command to install a vkernel is ATM: make -DNO_MODULES installkernel KERNCONF=VKERNEL DESTDIR=/var/vkernel This installed the plain kernel into /var/vkernel. Due to the introduction of the new loader (dloader), the installkernel target refused to work, because it could not find a boot/ directory. Skip the error message about missing boot/ and skip the creation of the kernel.old/ backup directory when installing a vkernel kernel. --- sys/conf/kern.paths.mk | 2 ++ sys/conf/kern.post.mk | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/sys/conf/kern.paths.mk b/sys/conf/kern.paths.mk index c78a560d89..ad7c5a65ca 100644 --- a/sys/conf/kern.paths.mk +++ b/sys/conf/kern.paths.mk @@ -19,4 +19,6 @@ OLDMODULESDIR?= /boot/modules # not to shoot the real kernel installation. .if ${MACHINE_PLATFORM} == vkernel || ${MACHINE_PLATFORM} == vkernel64 DESTDIR?= /var/vkernel +# Unset DESTKERNDIR as we install the kernel directly into $DESTDIR +DESTKERNDIR= .endif diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 80cf7ca450..256c7e970d 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -123,7 +123,10 @@ kernel-install: kernel-installable @if [ -f ${DESTDIR}${DESTKERNDIR}.old ]; then \ rm -f ${DESTDIR}${DESTKERNDIR}.old; \ fi +# Skip this step for vkernels +.if ${MACHINE_PLATFORM} != vkernel && ${MACHINE_PLATFORM} != vkernel64 mkdir -p ${DESTDIR}${DESTKERNDIR}.old +.endif . if exists(${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME}) .ifndef NOFSCHG -chflags noschg ${DESTDIR}${DESTKERNDIR}/${DESTKERNNAME} @@ -164,6 +167,8 @@ kernel-installable: echo "kernel and modules have moved to /boot"; \ exit 1; \ fi +# Skip this step for vkernels +.if ${MACHINE_PLATFORM} != vkernel && ${MACHINE_PLATFORM} != vkernel64 @if [ ! -f ${DESTDIR}/boot/dloader.rc ]; then \ echo "You need to install a new ${DESTDIR}/boot before you"; \ echo "can install a new kernel, kernels are now installed"; \ @@ -172,6 +177,7 @@ kernel-installable: echo "sequence."; \ exit 1; \ fi +.endif @exit 0 .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) -- 2.41.0