Skip to content

rt: netconsole (dynamic, configfs) and sysrq in the 7.2 kernel fragment - #140

Merged
mcfbytes merged 3 commits into
masterfrom
feat/rt-netconsole
Sep 3, 2026
Merged

rt: netconsole (dynamic, configfs) and sysrq in the 7.2 kernel fragment#140
mcfbytes merged 3 commits into
masterfrom
feat/rt-netconsole

Conversation

@mcfbytes

@mcfbytes mcfbytes commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Troubleshooting channels for the RT/7.2 variant only; the 6.18 stock-parity kernel is untouched. Leaves with the other debug options when a shipping 7.2 kernel is cut.

Why now. A whole-board reboot during a PSX session on 2026-09-02 left no trace anywhere: the serial console is disabled, the pstore backend the fragment already provisions has no RAM reservation in the device tree, and /tmp died with the reboot (kernel.panic=15 fired). Netconsole is the only path that gets kernel text off this board.

What changes in board/mister/de10nano/linux-rt.fragment: CONFIG_NETCONSOLE=y, CONFIG_NETCONSOLE_DYNAMIC=y (+ CONFIGFS_FS) so the target is set at RUNTIME through /sys/kernel/config/netconsole from the rig's out-of-band config — no listener address is baked into this tree; CONFIG_MAGIC_SYSRQ=y with a default mask of 1 for a live backtrace/state dump while a wedged board is still reachable.

Verified: make rt rc=0 on the 7.2.3 pin; the built .config carries all five symbols; zImage_dtb 9,305,438 B and a 3.6 MB 7.2.3 module tree produced. The kernel is staged on the DE10 for its first boot with netconsole armed toward the LAN collector.

🤖 Generated with Claude Code

https://claude.ai/code/session_012AZB1JmCKWaJt1ka22oex3

…nt — the board's only way to say why it rebooted

A whole-board reboot during a PSX session on 2026-09-02 left no trace: the
serial console is disabled, pstore has no RAM reservation, and /tmp died with
the reboot. NETCONSOLE=y with the DYNAMIC target so the listener address stays
in the rig's out-of-band config, never in this tree; MAGIC_SYSRQ for a live
dump while the board is wedged but reachable. RT/7.2 fragment only; the 6.18
stock-parity kernel is untouched. Leaves with the other debug options when a
shipping 7.2 kernel is cut.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012AZB1JmCKWaJt1ka22oex3
Copilot AI lite review requested due to automatic review settings September 3, 2026 02:39

Copilot AI 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.

🟡 Changes recommended

The SysRq default enable mask as set (0x1) enables all SysRq functionality and the fragment also duplicates symbols already inherited from the shared linux.config, both of which should be corrected/clarified before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds RT/7.2-only kernel troubleshooting facilities (netconsole via configfs and SysRq defaults) in the RT kernel config fragment to improve post-mortem/debug visibility when the board reboots or wedges and local logs are lost.

Changes:

  • Enable netconsole with dynamic (configfs) runtime target configuration in the RT/7.2 kernel fragment.
  • Enable SysRq and set a default SysRq enable mask in the RT/7.2 kernel fragment.
  • Add explanatory comments documenting the intended troubleshooting workflow and motivation.
File summaries
File Description
board/mister/de10nano/linux-rt.fragment Enables netconsole (dynamic/configfs) and SysRq defaults for RT/7.2 troubleshooting output.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread board/mister/de10nano/linux-rt.fragment Outdated
Comment thread board/mister/de10nano/linux-rt.fragment Outdated
Copilot review on #140: CONFIGFS_FS=y and MAGIC_SYSRQ=y already come
from the shared linux.config, and MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 is the
kernel default the stock-parity 6.18 kernel also has; restating them in
the RT fragment blurred what is RT-only. Dropped; the comment now says
they are inherited. Deliberately NOT narrowing the sysrq mask to 0x8:
0x1 (= all functions) is what stock ships, and diverging RT from stock
on a debug knob buys nothing. Merging old vs new fragment onto the
7.2.3 RT .config yields the same symbol values.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYjrnzEEu4HzJSPWNAaRvm

Copilot AI 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.

🟡 Changes recommended

The comments contradict the existing ramoops reservation, and several claimed RT-only settings are shared-config no-ops.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

board/mister/de10nano/linux-rt.fragment:165

  • These are not RT-fragment deltas: the shared linux.config already sets CONFIG_CONFIGFS_FS and CONFIG_MAGIC_SYSRQ (lines 525 and 565), and Linux 7.2 already defaults CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE to 0x1. Thus these three lines are no-ops and make the block's “RT/7.2 variant ONLY” claim misleading, contrary to this fragment's stated only-deltas convention. Keep only the netconsole deltas here; SysRq remains available through the shared config.
#                             stock-parity 6.18 kernel -- narrowing it here
#                             would make RT diverge from stock for no gain.
# Measured need: a whole-board reboot during a PSX session on 2026-09-02 left no
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread board/mister/de10nano/linux-rt.fragment Outdated
…visioned

Copilot review on #140: the comment claimed the pstore backend had no RAM
reservation, but the RT series carries 0046-dts-ramoops.patch (1 MiB at
0x1FE00000) and PSTORE_RAM=y. Reworded: ramoops is the on-board
post-mortem channel that needs a successful warm reboot to read back;
netconsole streams printk off the board live, which is what a hang or
power cycle leaves you.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYjrnzEEu4HzJSPWNAaRvm
@mcfbytes
mcfbytes merged commit 8f678fe into master Sep 3, 2026
4 checks passed
@mcfbytes
mcfbytes deleted the feat/rt-netconsole branch September 3, 2026 03:03
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.

2 participants