Skip to content

nilrt-debug: fix debug kernel missing debug symbols#1042

Draft
jatinjb444 wants to merge 1 commit into
ni:nilrt/master/scarthgapfrom
jatinjb444:debug-info-fix
Draft

nilrt-debug: fix debug kernel missing debug symbols#1042
jatinjb444 wants to merge 1 commit into
ni:nilrt/master/scarthgapfrom
jatinjb444:debug-info-fix

Conversation

@jatinjb444

@jatinjb444 jatinjb444 commented Jul 2, 2026

Copy link
Copy Markdown

Summary of Changes

Work Item - https://dev.azure.com/ni/DevCentral/_boards/board/t/RTOS/Work%20Items?System.AssignedTo=%40me&workitem=3858245

Updated the debug kernel configuration fragment to explicitly disable CONFIG_DEBUG_INFO_NONE and select CONFIG_DEBUG_INFO_DWARF5. Newer kernel configuration behavior can result in CONFIG_DEBUG_INFO_NONE remaining enabled, preventing debug symbol generation even when CONFIG_DEBUG_INFO=y is configured.
This change ensures that the NILRT debug kernel is built with DWARF debug information required for vmcore analysis and symbolized crash debugging.

Justification

A user reported that after installing packagegroup-ni-debug-kernel, the running debug kernel still had:

CONFIG_DEBUG_INFO_NONE=y

which prevented generation of kernel debug symbols and limited vmcore/crash analysis.
Investigation confirmed that the debug kernel configuration fragment did not explicitly disable CONFIG_DEBUG_INFO_NONE or select a DWARF debug format. Updating the fragment restores generation of debug information in the resulting debug kernel build.

Testing

Reproduced the issue on PXI and cRIO targets where the released debug kernel reported CONFIG_DEBUG_INFO_NONE=y, preventing generation of kernel debug symbols. Rebuilt linux-nilrt-debug with the updated configuration and verified that the resulting kernel enables CONFIG_DEBUG_INFO=y, disables CONFIG_DEBUG_INFO_NONE, and selects CONFIG_DEBUG_INFO_DWARF5=y. Booted the rebuilt debug kernel on a cRIO target and confirmed the updated configuration is present on the running system.

Additional validation screenshots are attached below showing the rebuilt debug kernel running on target with CONFIG_DEBUG_INFO enabled and verification that the generated vmlinux contains debug information.

Screenshot 2026-07-03 105940 Screenshot 2026-07-03 110134
  • I have built the core package feed with this PR in place. (bitbake packagefeed-ni-core)

Procedure

Copilot AI review requested due to automatic review settings July 2, 2026 16:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the NILRT debug kernel config fragment to reliably produce kernel debug symbols by explicitly disabling CONFIG_DEBUG_INFO_NONE and selecting DWARF5 debug info, addressing newer kernel config behaviors that can otherwise suppress debug symbol generation.

Changes:

  • Explicitly disables CONFIG_DEBUG_INFO_NONE in the debug kernel fragment.
  • Forces DWARF5 debug info selection (and disables DWARF4/toolchain default format options).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread recipes-kernel/linux/nilrt-debug/debug.cfg Outdated
Explicitly disable CONFIG_DEBUG_INFO_NONE which defaults
to enabled in newer kernels, preventing debug info.
Enable CONFIG_DEBUG_INFO_DWARF5 to select valid debug
format required for symbol generation in 6.x kernels.

- Update debug.cfg to align with new Kconfig behavior
- Ensure debug symbols are generated in vmlinux binary
- Verified using file and readelf for debug sections

Signed-off-by: Jatin Bharti <jatin.bharti@emerson.com>
@jatinjb444 jatinjb444 marked this pull request as ready for review July 3, 2026 05:37
@jatinjb444 jatinjb444 requested review from a team and Copilot July 3, 2026 05:37

Copilot AI left a comment

Copy link
Copy Markdown

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 1 comment.

Comment thread recipes-kernel/linux/nilrt-debug/debug.cfg

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Work item is not linked
  • Did you build the kernel using packagegroup-ni-debug-kernel and verified the installation with packagegroup IPK? If so, can you also add this it in the testing section?
  • Update commit title to nilrt-debug: fix missing debug kernel symbols or something since the changes are specific to debug kernel.

@jatinjb444 jatinjb444 changed the title kernel: fix debug kernel missing debug symbols nilrt-debug: fix debug kernel missing debug symbols Jul 6, 2026
Comment thread recipes-kernel/linux/nilrt-debug/debug.cfg
CONFIG_EARLY_PRINTK=y
CONFIG_HARDLOCKUP_DETECTOR=y
# Debug info for new built kernel
CONFIG_DEBUG_INFO_NONE=n

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How did you obtain the new configs? The right way to do this is to append this to nati_x86_64_defconfig in kernel sources, run make nati_x86_64_defconfig, make savedefconfig, then diff the generated defconfig with the original nati_x86_64_defconfig and add new symbols here. Was this process followed?

@jatinjb444 jatinjb444 marked this pull request as draft July 9, 2026 09:15
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.

4 participants