kernel: alternative configuration#80
Open
tzafrir-mellanox wants to merge 1 commit intoopenucx:masterfrom
Open
Conversation
2593cd2 to
6941f82
Compare
6941f82 to
dd6ce66
Compare
Kernel is configured by querying the kernel build system directly, and
kernel directory can be built independetly of autoconf.
This solves several separate issues:
* Having to carry all of autoconf to the DKMS directory
* The compiler that autoconf detects by default may not be the one
that the kernel needs.
- It is even OK to not have "gcc" and have "gcc-14" if that is what
the kernel needs, but autoconf will still be picky.
* Various other issues are best detected by the kernel build system
directly, and not trying ot second-guess it, as this occasionally
changes.
- One exception: clang support requires explicitly setting
LLVM=1 . Not done automatically for now.
Changes:
* m4/ac_kernel_checks.m4 has mostly been replaced by the script
kernel/config_kernel
- This script can also be run manually. See dkms.conf .
- The script does not include tests. They are in files under
kernel/test_cases/
- kernel/ can be run without autoconf: kernel/Kbuild was simplified.
- And alternative Makefile for it is provided as kernel/Makefile.dkms
* Using relative path to generated include file rather than path
in a generated file from autoconf
The test works by creating a kernel module for each test and
building all of them with the kernel build system and with the -k
option of make and check which of them built successfully.
As an initial stage, we run a test build of a single empty module
just to be sure that the build system works.
To simplify debugging, kernel tests can be re-run separately (after
main script was run) using e.g.:
kernel/config_kernel HAVE_PUD_LEAF_MACRO
dd6ce66 to
ebe2706
Compare
Author
|
Some notes:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kernel is configured by querying the kernel build system directly, and
kernel directory can be built independetly of autoconf.
This solves several separate issues:
that the kernel needs.
the kernel needs, but autoconf will still be picky.
directly, and not trying ot second-guess it, as this occasionally
changes.
LLVM=1 . Not done automatically for now.
Changes:
kernel/config_kernel
kernel/test_cases/
in a generated file from autoconf
The test works by creating a kernel module for each test and
building all of them with the kernel build system and with the -k
option of make and check which of them built successfully.
As an initial stage, we run a test build of a single empty module
just to be sure that the build system works.
To simplify debugging, kernel tests can be re-run separately (after
main script was run) using e.g.:
kernel/config_kernel HAVE_PUD_LEAF_MACRO