Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: src/BUILDING doesn't document installing kernel
> I suspect as simple as
>
> installkernel()
> {
> getkernelconf $1
> ${runcmd} cd "${kernelbuildpath}"
> ${runcmd} "${makewrapper}" install ||
> bomb "Failed to make install in ${kernelbuildpath}"
> ${runcmd} cd "${TOP}"
> }
>
> would do the job..
Without setting -D to define DESTDIR, it will fail when trying to link the
nonexistent "netbsd" to onetbsd. So I modified the
sys/conf/Makefile.kern.inc also.
This is what I have tested some on amd64:
Index: sys/conf/Makefile.kern.inc
===================================================================
RCS file: /cvsroot/src/sys/conf/Makefile.kern.inc,v
retrieving revision 1.110
diff -u -r1.110 Makefile.kern.inc
--- sys/conf/Makefile.kern.inc 25 Feb 2008 05:56:13 -0000 1.110
+++ sys/conf/Makefile.kern.inc 17 Mar 2008 18:58:21 -0000
@@ -398,8 +398,10 @@
.if !target(install-kernel-${MACHINE_NAME})
install-kernel-${MACHINE_NAME}:
.for _K in ${KERNIMAGES}
- rm -f ${DESTDIR}/o${_K}
- ln ${DESTDIR}/${_K} ${DESTDIR}/o${_K}
+ if [ -e "${DESTDIR}/${_K}" ] ; then \
+ rm -f ${DESTDIR}/o${_K} ; \
+ ln ${DESTDIR}/${_K} ${DESTDIR}/o${_K} ; \
+ fi
cp ${_K} ${DESTDIR}/n${_K}
mv ${DESTDIR}/n${_K} ${DESTDIR}/${_K}
.endfor
Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.186
diff -u -r1.186 build.sh
--- build.sh 16 Mar 2008 07:52:59 -0000 1.186
+++ build.sh 17 Mar 2008 18:58:21 -0000
@@ -225,6 +225,7 @@
do_release=false
do_kernel=false
do_releasekernel=false
+ do_installkernel=false
do_install=false
do_sets=false
do_sourcesets=false
@@ -515,6 +516,7 @@
except \`etc'. Useful after "distribution" or "release"
kernel=conf Build kernel with config file \`conf'
releasekernel=conf Install kernel built by kernel=conf to RELEASEDIR.
+ installkernel=conf Install kernel built by kernel=conf to /.
sets Create binary sets in
RELEASEDIR/RELEASEMACHINEDIR/binary/sets.
DESTDIR should be populated beforehand.
@@ -779,7 +781,7 @@
op=iso_image_source # used as part of a variable name
;;
- kernel=*|releasekernel=*)
+ kernel=*|releasekernel=*|installkernel=*)
arg=${op#*=}
op=${op%%=*}
[ -n "${arg}" ] ||
@@ -1265,6 +1267,17 @@
done
}
+installkernel()
+{
+ getkernelconf $1
+ statusmsg "Installing kernel: ${kernelconf}"
+ statusmsg "Build directory: ${kernelbuildpath}"
+ ${runcmd} cd "${kernelbuildpath}"
+ ${runcmd} "${makewrapper}" install ||
+ bomb "Failed to make install in ${kernelbuildpath}"
+ ${runcmd} cd "${TOP}"
+}
+
installworld()
{
dir="$1"
@@ -1339,6 +1352,11 @@
releasekernel "${arg}"
;;
+ installkernel=*)
+ arg=${op#*=}
+ installkernel "${arg}"
+ ;;
+
install=*)
arg=${op#*=}
if [ "${arg}" = "/" ] && \
Sorry I don't have reply for your reported issues related to the build.sh
and kernels.
Jeremy C. Reed
Home |
Main Index |
Thread Index |
Old Index