Skip to content

How to get Kernel Headers into the image #84

@seidlplus

Description

@seidlplus

Hello there,

for being able to build External Kernel Modules for installing a certain Driver (OFED for Mellanox), the Kernel Headers (linux-headers) are necessary.
/lib/modules/'uname -r'/build/ and /usr/src/linux-headers-'uname -r'/ are missing in the image built from the docker
Note: I found https://kernelnewbies.org/KernelHeaders and https://docs.kernel.org/kbuild/headers_install.html helpful for background knowledge

It would be great, if there would be a way to get the Kernel Headers installed during the image build.
Unfortunately i couldn't figure out how to edit runme.sh to get this done.
Could someone help me here or give me a hint?

As a Fallback, is there a way to correctly install (with Symlinks) the Kernel Headers after the image build, on the running Linux?
Note: After the build of the image via the Docker, the folder build/linux/ is provided, which seems to contain the Kernel Headers.
I tried several things with it, but ran into several problems.

Thank you for providing this build environment which provides good running images!
And thanks for your attention on my question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions