kernel-open: fix BTF generation on kernel 6.15+#1038
Closed
coleleavitt wants to merge 1 commit intoNVIDIA:mainfrom
Closed
kernel-open: fix BTF generation on kernel 6.15+#1038coleleavitt wants to merge 1 commit intoNVIDIA:mainfrom
coleleavitt wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
Kernel 6.15+ replaced scripts/pahole-flags.sh with scripts/Makefile.btf and scripts/gen-btf.sh for BTF generation. The existing check only looks for pahole-flags.sh, causing the PAHOLE_AWK_PROGRAM wrapper to be used unnecessarily on newer kernels. This wrapper has shell quoting issues that result in awk parse errors during module build. Update the condition to also check for Makefile.btf, allowing the kernel's native BTF infrastructure to handle generation without the awk wrapper. Signed-off-by: Cole Leavitt <cole@unwrap.rs>
Collaborator
|
Hi @coleleavitt, #1041 has a more accurate version of this fix related to the changes in kernel 7.0. Will work on top of there. |
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.
Summary
On kernel 6.15+,
Makefile.btfwas introduced upstream which setsPAHOLEand other BTF-related variables, making the separate assignment in the NVIDIA Makefile redundant and causing build warnings.This patch uses
$(or ...)to conditionally setPAHOLE,BTF_PAHOLE_FLAGS_EXTRA,HOLEPUNCH, andBTF_IDS_FLAGS_EXTRAonly when they are not already defined by the kernel build system.Split from #1025 per reviewer request — this change is independent of the DisplayPort MST fix.