28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

195<br />

4.3.1 Non-native Hosting<br />

When hosting NetBSD kernel code in a foreign environment, <strong>the</strong>re are a number <strong>of</strong><br />

practical issues to consider:<br />

1. Building <strong>the</strong> source code for <strong>the</strong> target system.<br />

2. Accessing <strong>the</strong> host services from a rump kernel.<br />

3. Interfacing with <strong>the</strong> rump kernel from clients.<br />

For each subpoint, we <strong>of</strong>fer fur<strong>the</strong>r discussion based on experiences. We have had<br />

success with non-native hosting <strong>of</strong> NetBSD rump kernels on Linux, FreeBSD <strong>and</strong><br />

various versions <strong>of</strong> NetBSD, including <strong>the</strong> NetBSD 4 <strong>and</strong> NetBSD 5 branches.<br />

Building<br />

First, we define <strong>the</strong> build host <strong>and</strong> <strong>the</strong> build target. <strong>The</strong> build host is <strong>the</strong> system <strong>the</strong><br />

build is happening on. <strong>The</strong> build target is <strong>the</strong> system that <strong>the</strong> build is happening<br />

for, i.e. which system will be able to run <strong>the</strong> resulting binaries. For a kernel, <strong>the</strong><br />

target involves having a compiler targeted at <strong>the</strong> correct CPU architecture. For a<br />

userspace program, it additionally requires having access to <strong>the</strong> target headers <strong>and</strong><br />

libraries for compiling <strong>and</strong> linking, respectively.<br />

<strong>The</strong> build tool build.sh we already mentioned in Section 4.1.2 <strong>and</strong> Section 4.2.2<br />

automatically builds <strong>the</strong> right tools <strong>and</strong> compiler so that <strong>the</strong> NetBSD source tree can<br />

be built for a NetBSD target architecture on any given host. What we want is slightly<br />

different: a compilation targeted for a non-NetBSD system. Having build.sh provide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!