Tech Preview

SLE BCI SLE 15 SP6 Kernel Module Development

SLE 15 Kernel module development container based on the SLE Base Container Image.

Get Image
Digest:
sha256:fff01559e7f05535670b85a2139583f202b2c67a075ff6446fe28dff13fdebd3
fff01559e
Repository:
registry.suse.com/bci/bci-sle15-kernel-module-devel:15.6

SLE 15 SP6 Kernel Module Development Container

RedistributableSupport LevelSLSA Provenance: Available

Description

The SLE 15 SP6 Kernel Module Development Container Image includes all necessary tools to build kernel modules for SLE and SLE Micro. It is intended to be used for building out-of-tree kernel modules in restricted environments for the SLE kernel.

Usage

The image can be used to launch a container and build a kernel module. The following example below shows how to do this for the DRBD kernel module:

$ podman run --rm -it --name drbd-build registry.suse.com/bci/bci-sle15-kernel-module-devel:15.6
# zypper -n in coccinelle tar
# curl -Lsf -o - https://pkg.linbit.com/downloads/drbd/9/drbd-9.2.11.tar.gz | tar xzf -
# cd drbd-9.2.11/
# make -C drbd all KDIR=/usr/src/linux-obj/$(uname -m)/default

The built kernel module is then available in /drbd-9.2.11/drbd/build-current/drbd.ko. It can be copied to the host system as follows:

$ podman cp drbd-build:/drbd-9.2.11/drbd/build-current/drbd.ko .
$ sudo modprobe drbd.ko

Alternatively, the kernel module can be built as part of a container build using a Dockerfile:

FROM registry.suse.com/bci/bci-sle15-kernel-module-devel:15.6
ENV DRBD_VERSION=9.2.11
WORKDIR /src/
RUN zypper -n in coccinelle tar

RUN set -euxo pipefail; \
    curl -Lsf -o - https://pkg.linbit.com/downloads/drbd/9/drbd-${DRBD_VERSION}.tar.gz | tar xzf - ; \
    cd drbd-${DRBD_VERSION}; \
    make -C drbd all KDIR=/usr/src/linux-obj/$(uname -m)/default

Build the container image, launch the container, and copy the kernel module to the local machine:

$ buildah bud --layers -t drbd-ko .
$ podman run --name drbd drbd-ko
$ podman cp drbd:/src/drbd-9.2.11/drbd/build-current/drbd.ko .
$ podman rm drbd

Licensing

SPDX-License-Identifier: MIT

This documentation and the build recipe are licensed as MIT. The container itself contains various software components under various open source licenses listed in the associated Software Bill of Materials (SBOM).

This image is a tech preview. Do not use it for production. Your feedback is welcome. Please report any issues to the SUSE Bugzilla.

  • Image Data

    Last Built: 18 Nov 16:42 UTC

    Compressed Size: 214.7 MB

    Uncompressed Size: 700.4 MB

    Support Level: Techpreview


  • Health Index
    A

    No vulnerabilities found

    Last Scan:

    about 3 hours ago