Skip to content

Automate regular x86-64 stable RT kernel Upgrade#345

Open
jatinjb444 wants to merge 3 commits into
ni:nilrt/master/scarthgapfrom
jatinjb444:dev
Open

Automate regular x86-64 stable RT kernel Upgrade#345
jatinjb444 wants to merge 3 commits into
ni:nilrt/master/scarthgapfrom
jatinjb444:dev

Conversation

@jatinjb444
Copy link
Copy Markdown

@jatinjb444 jatinjb444 commented Apr 9, 2026

Changes

#work item - 3181494
https://dev.azure.com/ni/DevCentral/_workitems/edit/3181494

This PR automates fetching and merging the latest stable‑RT kernel tags into the NI Linux Real‑Time branch. It includes clean repository setup, RT merge, kernel build, deployment, and driver rebuild integration using SSHFS and DKMS. Additionally it also include defconfig regeneration and PR creation automatically once the script ran sucessfully and also sends an email to notify the user about the result status.

Justification

The RT kernel upgrade process involves multiple manual steps and is error-prone. This automation streamlines the workflow, improves reliability, and ensures consistent execution across runs.

Testing

  • Verified RT tag detection and merge
  • Successfully built and installed kernel on target
  • Confirmed reboot and kernel update using uname -r
  • Validated network functionality post-reboot
  • Verified SSHFS mount, header preparation, and DKMS rebuild
  • Confirmed driver status using dkms status

Process

Suggested Reviewers:
@rajendra-desai-ni
@Shreejit-03
@ni/rtos

@Shreejit-03
Copy link
Copy Markdown
Contributor

Please run flake8 ( python3 -m flake8 ) on all the python files and fix all the issues we can. Some of them could be fixed by running black (python3 -m black ).

@jatinjb444 jatinjb444 force-pushed the dev branch 6 times, most recently from dbeefde to e0fcb85 Compare May 5, 2026 05:45
@jatinjb444 jatinjb444 changed the title Finalized fetch and merge script for rt-tags Finalized Automation scripts for x86-64 RT kernel Upgrade May 7, 2026
@jatinjb444 jatinjb444 force-pushed the dev branch 4 times, most recently from 4709c45 to 34fd7ec Compare May 11, 2026 05:59
Comment thread scripts/dev/upstream_merge/json_config.py
Comment thread scripts/dev/upstream_merge/json_config.py
Comment thread scripts/dev/upstream_merge/json_config.py Outdated
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py Outdated
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py Outdated
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py Outdated
@jatinjb444 jatinjb444 marked this pull request as ready for review May 21, 2026 09:27
@jatinjb444 jatinjb444 requested a review from a team as a code owner May 21, 2026 09:27
Copy link
Copy Markdown
Contributor

@rajendra-desai-ni rajendra-desai-ni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This commit doesn't have a proper title.
  • Remove "Finalized" word from the PR title.
  • Add AB work item in the PR description.
  • You don't have to add 'Updates' section in the PR description. All the updates should go into their respective work items.
  • Try to follow 'Summary', 'Justification', and 'Testing' section in the PR description which is cleaner compared to existing sections.

Comment thread scripts/dev/upstream_merge/utils/build.py Outdated
Comment thread scripts/dev/upstream_merge/utils/build.py
Comment thread scripts/dev/upstream_merge/automation_conf.json Outdated
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py Outdated
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py Outdated
Comment thread scripts/dev/upstream_merge/copy_toolchain_from_server.py
Comment thread scripts/dev/upstream_merge/copy_toolchain_from_server.py
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py
Comment thread scripts/dev/upstream_merge/kernel_build_and_test.py
- Merge patches,build x64 kernel
- Install kernel on target with reboot and SSH readiness checks.
- Rebuild out-of-tree drivers automatically using DKMS.
- Kernel source is mounted via SSHFS to avoid local copy.
- Fix build/source symlinks and prepare kernel headers.

Verified on real NI RT target with DKMS-managed drivers.
Signed-off-by: Jatin Bharti <jatin.bharti@emerson.com>
- Automated defconfig regeneration process
- Integrated gated kernel PR creation workflow
- Pulled latest upstream changes for consistency
- Improved SSH connection handling logic
- Cleaned and formatted json.config structure
- Enhanced overall script reliability and clarity

Signed-off-by: Jatin Bharti <jatin.bharti@emerson.com>
@jatinjb444 jatinjb444 changed the title Finalized Automation scripts for x86-64 RT kernel Upgrade Automate regular x86-64 stable RT kernel Upgrade May 23, 2026
- Moved build functions into build.py module
- Centralized reusable build utilities
- Removed redundant code across scripts
- Cleaned up unused and inconsistent files
- Improved modularity and maintainability

Signed-off-by: Jatin Bharti <jatin.bharti@emerson.com>
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

Successfully merging this pull request may close these issues.

3 participants