tweaking installkernel

Matthew Dillon dillon at
Sat Aug 7 10:11:37 PDT 2004

    Hmm.  Well, I like the directory creation part but I do not want to
    move the manual pages out of the context of their related module build.


:Have you ever created a single file named /modules and made your
:system unbootable? Have you tried installing your kernel and modules
:under $DESTDIR and installkernel suddenly stopped because it tried to
:install stupid scripts and manpages no matter what options you specified?
:Well, you're not alone, and here's the patch to fix that.
:The patch removes four scripts and four manpages,
:  sys/dev/misc/joy joy.8
:  sys/emulation/ibcs2 ibcs2.8
:  sys/emulation/linux linux.8
:  sys/emulation/svr4 linux.8
:moves ef.4 into share/man/man4, and disconnect them from module build
:(moving ef.4 should probably be a repo-copy to preserve revisions).
:The patch also takes care of creating ${DESTDIR} and ${KMODDIR} before
:installing the kernel and the modules. With this patch applied (note:
:you need to apply the patch before {build,native}world, because
:${KRNLOBJDIR}/${KERNCONF}/Makefile should be generated from patched
:/sys/conf/Makefile.${ARCH}), you can do
:# make DESTDIR=/test installkernel
:to install kernel as /test/kernel and modules as /test/modules/*.ko, and
:# make KMODDIR='' DESTDIR=/test installkernel
:to install kernel and modules into a directory. In this case, multiple
:runs of installkernel creates a backup directory named /test.old and
:copy the previous version(including the kernel) into it.

More information about the Submit mailing list