-
Notifications
You must be signed in to change notification settings - Fork 4.9k
patches script for jetson - replacing uvcvideo in its relevant place #14442
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
patches script for jetson - replacing uvcvideo in its relevant place #14442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the uvcvideo kernel module installation path for Jetson devices by ensuring the compiled module is placed where the system actually loads it from. The script now dynamically detects the current uvcvideo module location instead of assuming a fixed path, preventing conflicts when the module exists in the /updates directory.
Key Changes:
- Dynamically determine uvcvideo module path using
modinfobefore installation - Reorganize kernel build preparation to occur after patch application
- Remove hardcoded module path assumptions
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
| #1. Prepares kernel headers for building external modules | ||
| #2. Generates Module.symvers if it doesn’t already exist. | ||
| LOCALVERSION='-tegra' | ||
| make ARCH=arm64 prepare modules_prepare LOCALVERSION='' -j$(($(nproc)-1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assign ${LOCALVERSION} to LOCALVERSION or remove the empty assignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks - forgot it
Kontra2B
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
| LINUX_HEADERS_NAME="linux-headers-${kernel_ver}-ubuntu24.04_aarch64" | ||
| fi | ||
|
|
||
| export KBUILD_EXTRA_SYMBOLS="/lib/modules/${kernel_ver}/build/Module.symvers" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does
LINUX_HEADERS_NAME
and
KBUILD_EXTRA_SYMBOLS removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to CoPilot:
Setting these variables makes sure your script:
References the right kernel headers for Ubuntu 22.04 ARM64.
Reuses existing symbol version information (Module.symvers) during external module builds to maintain compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LINUX_HEADERS_NAME not used - it was used by a code that has been removed in previous PR #14276 - so only removed dead code here
KBUILD_EXTRA_SYMBOLS - only moved to be initialized right before its use - see further in the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Without this PR, uvcvideo module that is compiled during the script is copied to:
/lib/modules/$(uname -r)/kernel/drivers/media/usb/uvc/
And when using our scripts for jetson d4xx drivers, the uvcvideo is copied to:
/lib/modules/$(uname -r)/updates
(ref: https://github.com/IntelRealSense/realsense_mipi_platform_driver/blob/838616396a43d4f5c9118c6ad23fc3a9ea015872/README_JP5.md?plain=1#L131)
When the OS sees that the module is in this folder, it does not consider the module in the "standard" folder.
So the script now checks first where is the uvcvideo module used by the system, and then copies the compiled module in the right place.