tweaking installkernel

YONETANI Tomokazu qhwt+dragonfly-submit at les.ath.cx
Fri Aug 6 23:01:42 PDT 2004


Hello.
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 joy.sh
  sys/emulation/ibcs2 ibcs2.8 ibcs2.sh
  sys/emulation/linux linux.8 linux.sh
  sys/emulation/svr4 linux.8 svr4.sh
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.

Regards.
Attachment:
kernel-destdir.diff.gz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00000.bin
Type: application/octet-stream
Size: 5641 bytes
Desc: "Description: application/gunzip"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20040806/0d021e59/attachment-0016.bin>


More information about the Submit mailing list