Draft
Port Rockchip FIQ debugger driver to kernel 6.18 APIs for ttyFIQ0 console on NanoPC-T6#1
Conversation
Copilot
AI
changed the title
[WIP] Fix console access for ttyFIQ0 in mainline kernel
Enable serial console on NanoPC-T6 via ttyS2
Feb 9, 2026
Added nix flake update command before building Dogebox OS T6.
…access Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
edtubbs
force-pushed
the
copilot/fix-ttyfioq0-console-access
branch
from
February 9, 2026 21:11
74aa808 to
b3e5566
Compare
Backport the FIQ debugger driver from the Rockchip vendor kernel (armbian/linux-rockchip rk-6.1-rkr5.1) to enable ttyFIQ0 serial console. The driver is compiled without CONFIG_FIQ_DEBUGGER_TRUST_ZONE to avoid Rockchip SIP dependencies, using standard IRQ mode instead. Changes: - Add rockchip-fiq-debugger.patch: FIQ debugger driver source files - Update DT patch: add fiq-debugger node, disable uart2 - Update base.nix: kernel config, earlycon + ttyFIQ0 console params Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Enable serial console on NanoPC-T6 via ttyS2
Backport Rockchip FIQ debugger driver to enable ttyFIQ0 console on NanoPC-T6
Feb 10, 2026
The first hunk declared 6 original lines (-224,6) but contained 7
context lines (3 pre + 4 post), causing: patch: **** malformed patch
at line 40: &av1d_mmu {
Fix the first hunk count (-224,6 → -224,7) and correct the second
hunk offset (+801 → +800) to reflect 30 net additions.
Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Backport Rockchip FIQ debugger driver to enable ttyFIQ0 console on NanoPC-T6
Backport Rockchip FIQ debugger driver for ttyFIQ0 console on NanoPC-T6
Feb 10, 2026
The backported Rockchip FIQ debugger driver (from vendor kernel 6.1) fails to compile against mainline kernel 6.18.2 due to removed/changed APIs: - do_each_thread/while_each_thread -> for_each_process_thread - strlcpy -> strscpy (3 occurrences) - from_timer() -> container_of() (macro removed) - fiq_tty_write: int -> ssize_t return, int -> size_t count (TTY API) - wakeup_source embedded struct -> pointer with register/unregister API - Add static to dump_regs_aarch32/aarch64 (missing prototype warnings) Co-authored-by: edtubbs <84785904+edtubbs@users.noreply.github.com>
Copilot
AI
changed the title
Backport Rockchip FIQ debugger driver for ttyFIQ0 console on NanoPC-T6
Port Rockchip FIQ debugger driver to kernel 6.18 APIs for ttyFIQ0 console on NanoPC-T6
Feb 10, 2026
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.
The backported Rockchip FIQ debugger driver (from vendor kernel 6.1) fails to compile against mainline 6.18 due to removed/changed kernel APIs. The DT patch also had malformed hunk headers causing
patch: **** malformed patch at line 40.DT patch fix
-224,6) but body contained 7 → fixed to-224,7+801was off-by-one → corrected to+800Kernel API compat fixes in
fiq_debugger.cdo_each_thread/while_each_threadfor_each_process_threadstrlcpystrscpyfrom_timer(state, t, sleep_timer)container_of(t, struct fiq_debugger_state, sleep_timer)wakeup_source_add/wakeup_source_removewakeup_source_register/wakeup_source_unregister(pointer-based)struct wakeup_sourceembeddedstruct wakeup_source *(register returns pointer)TTY write callback signature updated to match 6.18:
Warning fixes in
fiq_debugger_arm64.cstatictofiq_debugger_dump_regs_aarch32/fiq_debugger_dump_regs_aarch64(only called within the file via thefiq_debugger_dump_regsdispatcher)💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.