Building the FreeBSD kernel on another OS

Polytropon freebsd at
Sat Mar 16 12:29:28 UTC 2019

On Fri, 15 Mar 2019 20:11:09 -0400, Jonathan Moore wrote:
> I'm trying to build FreeBSD on Windows, is it possible all I could find is
> this:

As "Windows" does lack native development tools (immediately
available to the user, that is), you'd have to install them
first. And even if you did, they are probably not compatible
with the FreeBSD sources and requirements. The kernel build
process expects C compiler, assembler, linker, and several
other tools to work in a specific way.

Sure, there is WSL available nowadays, but the L in there
means Linux, and the problem would shift to building the
FreeBSD kernel (or userland) on Linux.

I'm not saying this is entirely impossible, but it seems to be
an incredible waste of time to get "Windows" to do something
it is not designed to do. ;-)

The easiest way to build the FreeBSD is to install a free virtual
machine product for "Windows", and run a FreeBSD instance inside
it. This makes sure you will have all the tools required to build
the build chain (!), the OS and kernel. You can then transfer the
results out of the VM using virtual storage or virtual network,
in case you want to use them on "Windows"...

Check the comment header of /usr/src/Makefile for details, as
well as "man 7 build".

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list