November 2013

Building a NetBSD Release

Having built FreeBSD numerous times, I thought it would be interesting to know how to build NetBSD.  The instructions from the NetBSD documentation are here. Firstly get the sources.  An easy way is to simply FTP them.  I got the NetBSD 6.1.2  sources from here.  These files are all tarballs, so they’ll need to be extracted. Once the sources are extracted, it’s necessary to build the toolchain.  This toolchain can be used to cross-compile for any architecture supported by NetBSD, however I decided to build for i386. cd usr/src/ ./build.sh -m i386 tools Once you’ve done this you can simply build a kernel: ./build.sh -u -m i386 kernel=GENERIC Or, you can build a release which includes the userland: ./build.sh -U -u -m i386 release The completed binaries will be in usr/src/obj/