Provides an example of a multi-container application with a service that builds an out-of-tree kernel module, loads it and runs it alongside an example service.
-
The
loadservice builds the kernel module source located inmodule/srcusing module headers provided for balena devices using a multi-stage build and then loads the kernel module. -
The
checkservice runs a simple entry script that checks for the output of the example module and depends on theloadservice above.
This project is prepared to build in the balenaCloud builders. To use it as is install the balenaCLI and build with:
balena push <fleet>
The device type will be automatically retrieved from the specified fleet.
-
Replace the
OS_VERSIONargument in theloadservice in thedocker-compose.ymlfile to match the balenaOS version of the target device. -
Replace the contents of the
module/srcdirectory with the module source to build. -
Replace the
checkservice by your own service. -
Optionally, kernel header files can be provided under
module/kernel-module-headers.tar.gz. This is only required for private device types that do not have the header files publicly available.