I'm on an OSX Box and I'm trying to build the FreeBSD kernel source. I've downloaded it by running
sudo svn co https://svn0.us-east.FreeBSD.org/base/stable/10
and then to test it I run
make buildkernel
however I always get the error:
Makefile:136: *** missing separator. Stop.
I've tried using bsdmake but I get:
Unknown modifier 't'
Have I skipped a step or am missing something?
First of all, to the best of my knowledge, building FreeBSD on another OS is not supported. However, building the kernel seems to be doable, since there is a Debian variant with a GNU userland running on a FreeBSD kernel. And cross-building FreeBSD for another architecture is also supported.
If your make is GNU make
, that probably won't work. FreeBSD imported pmake
long ago. (which on FreeBSD systems is just called make
).
The build process depends on a couple of things;
/usr/src
(unless you set the make variable SRCDIR
)/usr/obj
(unless you set the environment variable MAKEOBJDIRPREFIX
)/usr/src/share/mk
. So you should probably add -I /usr/src/share/mk
to your make invocation.You will also need a cross-compiler and other tools configured to produce FreeBSD binaries!
Then you might start with make TARGET=machine xdev-build
to build cross-development tools. And then probably make TARGET=machine kernel-toolchain
. This builds the parts of the system necessary to produce a kernel.