# RPI2 cross compiling the kernel



## rican-bsd (Jul 26, 2016)

I am wanting to build a custom kernel of my rpi2. I have FreeBSD current in a VM and followed these instructions *here*. The instuctions tell me I should see a bunch of .ko files in the kernel directory but I see only .o, .c, and .h files. Am I missing something?


----------



## tobik@ (Jul 26, 2016)

The last step in these instruction is needlessly complicated. Copying files manually? Why? *.ko are also not located in a single directory (anymore?) but spread across the whole MAKEOBJDIRPREFIX.

You can copy the new kernel and kernel modules with `sudo -E make DESTDIR=/mnt installkernel`. They'll be in /mnt/boot/kernel.


----------

