Chapter 33. Crosscompiling NetBSD with

submited by
Style Pass
2023-11-21 12:00:05

NetBSD uses a framework,, to build both the operating system's kernel and the whole userland for either the same platform as the host machine, or for a different platform, using cross-compilation. will take care of creating all the tools required to build NetBSD for a given platform, and make them available ready to use for development work.

In this chapter, we will show how to use to first create a toolchain, including compiler, assembler, linker and so on, then use it to cross-compile a NetBSD kernel and userspace for AArch64 on an AMD64 host machine. While native kernel builds are covered in Chapter 34, Compiling the kernel, using the script is generally preferred for building the entire of NetBSD.

Before starting, we have placed the sources in a subdirectory of our user's home directory: /home/nia/cvs/src. While /usr/src is the traditional location for NetBSD sources, as described in Chapter 32, Obtaining the sources, we would like to build the operating system as an unprivileged (non-root) user.

Leave a Comment