| 111 |
111 |
echo "You must build a kernel first." ; \
|
| 112 |
112 |
exit 1 ; \
|
| 113 |
113 |
fi
|
| 114 |
|
. if exists(${DESTDIR}/boot/${DESTKERNNAME})
|
|
114 |
. if exists(${DESTDIR}/${DESTKERNNAME}${POSTFIX})
|
| 115 |
115 |
.ifndef NOFSCHG
|
| 116 |
|
-chflags noschg ${DESTDIR}/boot/${DESTKERNNAME}
|
|
116 |
-chflags noschg ${DESTDIR}/${DESTKERNNAME}${POSTFIX}
|
| 117 |
117 |
.endif
|
| 118 |
118 |
. ifdef NO_KERNEL_OLD_STRIP
|
| 119 |
|
cp -p ${DESTDIR}/boot/${DESTKERNNAME} ${DESTDIR}/boot/${DESTKERNNAME}.old
|
|
119 |
cp -p ${DESTDIR}/${DESTKERNNAME}${POSTFIX} ${DESTDIR}/${DESTKERNNAME}${POSTFIX}.old
|
| 120 |
120 |
. else
|
| 121 |
|
${OBJCOPY} --strip-debug ${DESTDIR}/boot/${DESTKERNNAME} ${DESTDIR}/boot/${DESTKERNNAME}.old
|
|
121 |
${OBJCOPY} --strip-debug ${DESTDIR}/${DESTKERNNAME}${POSTFIX} ${DESTDIR}/${DESTKERNNAME}${POSTFIX}.old
|
| 122 |
122 |
. endif
|
| 123 |
123 |
. endif
|
| 124 |
124 |
.ifdef NOFSCHG
|
| 125 |
125 |
${INSTALL} -m 555 -o root -g wheel \
|
| 126 |
|
${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
|
|
126 |
${SELECTEDKERNEL} ${DESTDIR}/${DESTKERNNAME}${POSTFIX}
|
| 127 |
127 |
.else
|
| 128 |
128 |
${INSTALL} -m 555 -o root -g wheel -fschg \
|
| 129 |
|
${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
|
|
129 |
${SELECTEDKERNEL} ${DESTDIR}/${DESTKERNNAME}${POSTFIX}
|
| 130 |
130 |
.endif
|
| 131 |
131 |
|
| 132 |
132 |
kernel-reinstall: kernel-installable
|
| 133 |
133 |
.ifdef NOFSCHG
|
| 134 |
134 |
${INSTALL} -m 555 -o root -g wheel \
|
| 135 |
|
${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
|
|
135 |
${SELECTEDKERNEL} ${DESTDIR}/${DESTKERNNAME}${POSTFIX}
|
| 136 |
136 |
.else
|
| 137 |
137 |
${INSTALL} -m 555 -o root -g wheel -fschg \
|
| 138 |
|
${SELECTEDKERNEL} ${DESTDIR}/boot/${DESTKERNNAME}
|
|
138 |
${SELECTEDKERNEL} ${DESTDIR}/${DESTKERNNAME}${POSTFIX}
|
| 139 |
139 |
.endif
|
| 140 |
140 |
|
| 141 |
141 |
# Require DESTDIR to be manually specified when installing a
|
| ... | ... | |
| 143 |
143 |
#
|
| 144 |
144 |
kernel-installable:
|
| 145 |
145 |
.if ${P} == vkernel
|
| 146 |
|
.if !defined(DESTDIR)
|
|
146 |
.if ( !defined(DESTDIR) || ${DESTDIR} == /boot )
|
| 147 |
147 |
@echo "When installing a virtual kernel, DESTDIR must be manually specified"
|
| 148 |
148 |
@exit 1
|
| 149 |
149 |
.endif
|
| 150 |
150 |
.endif
|
| 151 |
|
@if [ -f ${DESTDIR}/${DESTKERNNAME} ]; then \
|
|
151 |
@if [ -f /${DESTKERNNAME} ]; then \
|
| 152 |
152 |
echo "You need to make buildworld, installworld, and upgrade"; \
|
| 153 |
153 |
echo "before you can install a new kernel, because the"; \
|
| 154 |
154 |
echo "kernel and modules have moved to /boot"; \
|
| ... | ... | |
| 199 |
199 |
modules-install:
|
| 200 |
200 |
.if !defined(NO_MODULES_OLD)
|
| 201 |
201 |
. ifdef NO_KERNEL_OLD_STRIP
|
| 202 |
|
set -- ${DESTDIR}/boot/modules/*; \
|
|
202 |
set -- ${DESTDIR}/modules${POSTFIX}/*; \
|
| 203 |
203 |
if [ -f "$$1" ]; then \
|
| 204 |
|
mkdir -p ${DESTDIR}/boot/modules.old; \
|
|
204 |
mkdir -p ${DESTDIR}/modules${POSTFIX}.old; \
|
| 205 |
205 |
for file; do \
|
| 206 |
|
cp -p $$file ${DESTDIR}/boot/modules.old; \
|
|
206 |
cp -p $$file ${DESTDIR}/modules${POSTFIX}.old; \
|
| 207 |
207 |
done; \
|
| 208 |
208 |
fi
|
| 209 |
209 |
. else
|
| 210 |
|
set -- ${DESTDIR}/boot/modules/*; \
|
|
210 |
set -- ${DESTDIR}/modules${POSTFIX}/*; \
|
| 211 |
211 |
if [ -f "$$1" ]; then \
|
| 212 |
|
mkdir -p ${DESTDIR}/boot/modules.old; \
|
|
212 |
mkdir -p ${DESTDIR}/modules${POSTFIX}.old; \
|
| 213 |
213 |
for file; do \
|
| 214 |
|
${OBJCOPY} --strip-debug $$file ${DESTDIR}/boot/modules.old/$${file##*/}; \
|
|
214 |
${OBJCOPY} --strip-debug $$file ${DESTDIR}/modules${POSTFIX}.old/$${file##*/}; \
|
| 215 |
215 |
done; \
|
| 216 |
216 |
fi
|
| 217 |
217 |
. endif
|
| 218 |
218 |
.endif
|
| 219 |
|
mkdir -p ${DESTDIR}/boot/modules # Ensure that the modules directory exists!
|
|
219 |
mkdir -p ${DESTDIR}/modules${POSTFIX} # Ensure that the modules directory exists!
|
| 220 |
220 |
cd $S ; env ${MKMODULESENV} ${MAKE} -f Makefile.modules install
|
| 221 |
221 |
|
| 222 |
222 |
modules-reinstall:
|