mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-05 07:26:55 +00:00
The test is currently not hooked up, but it pulls the latest 4.9.x kernel image, builds a simple kernel module against it and then creates a test package containing the kernel module and a shell script. The shell script prints out the 'modinfo' and then tries to 'insmod' the module. It checks the output of 'dmesg' of the load succeeded. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
11 lines
241 B
Bash
Executable File
11 lines
241 B
Bash
Executable File
#! /bin/sh
|
|
|
|
# Make sure we have the latest kernel image
|
|
docker pull linuxkit/kernel:4.9.x
|
|
# Build a package
|
|
docker build -t kmod-test .
|
|
# Build a LinuxKit image with kernel module (and test script)
|
|
moby build kmod
|
|
# Run it
|
|
linuxkit run kmod
|