Kernel Linking

This chapter describes how a Kernel Application is linked.

Basically, a Kernel Application is linked as a Standalone Application. The main difference is that a Kernel Application defines Kernel APIs, and requires to embed additional information that will be used later to build a Sandboxed Application against this Kernel (by linking with the Kernel APIs). Such additional information is called the Kernel Metadata.

Kernel Metadata Generation

To build a Sandboxed Application on Device, the Kernel Metadata must be exported after the Firmware link from the .debug.soar section of the executable. This step is not necessary to build a Sandboxed Application Off Board.

The Kernel Metadata can be exported from an existing Firmware executable file by using the Kernel Metadata Generator tool. It produces a .kdat file that will be used to link the Sandboxed Applications on device.

Kernel Metadata Generator

Kernel Metadata Generator

The .kdat file is optimized for size. When linking a Sandboxed Application .fso file, only the required metadata will be loaded in Java heap. It will be loaded from a standard InputStream, so that it can be stored to a non byte-addressable memory.


The Kernel Metadata .kdat file can also be integrated in a Firmware executable file using post-link tools such as binutils objcopy, provided a dedicated section has been reserved by the third-party linker.

Firmware Linker

Firmware Linker is a tool that links a Feature within a Multi-Sandboxed Firmware.

It takes as input the Firmware executable (.out file) and the Feature binary code (.fo file) into which to be linked. It outputs a new executable application file, including the Installed Feature. This tool can be used to append multiple Features, by using as input file of each link pass the output file of the previous pass. Features linked this way are then called Installed Features.

The Kernel should have been linked for dimensioning the maximum size (code, data) for such Installed Features. See Installed Features options.

The Firmware Linker tool is automatically called when declaring System Applications to a Multi-Sandbox module description. It is also available as a MicroEJ Tool named Firmware Linker.

Firmware Linker using MicroEJ Launch

Firmware Linker using MicroEJ Launch


Features linked using the Firmware Linker tool cannot be dynamically uninstalled using Kernel.uninstall(Feature) method.