Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get Kernel Headers into the image #84

Open
seidlplus opened this issue Jan 23, 2024 · 1 comment
Open

How to get Kernel Headers into the image #84

seidlplus opened this issue Jan 23, 2024 · 1 comment

Comments

@seidlplus
Copy link

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.

@kotocom
Copy link

kotocom commented Jan 30, 2024

FYI: you can copycat the solution from line 570+
ef55ac6

Although, as reported, the system won't respect the headers due to version misalignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants