This skill should be used when performing fast iterative kernel debugging, running time-bound kernel sessions to detect specific log signals or test kernel behavior...
Fast iterative kernel debugging with signal detection and time-bounded execution.
This skill provides a rapid feedback loop for kernel development by running the Breenix kernel for short, time-bounded sessions (default 15 seconds) while monitoring logs in real-time for specific signals. The kernel terminates immediately when the expected signal is detected, or when the timeout expires, enabling fast iteration cycles during debugging.
Use this skill when:
The skill provides the quick_debug.py script for time-bounded kernel runs with optional signal detection.
Run kernel with signal detection:
kernel-debug-loop/scripts/quick_debug.py --signal "KERNEL_INITIALIZED"
This runs the kernel for up to 15 seconds, terminating immediately when "KERNEL_INITIALIZED" appears in the logs.
Run kernel with custom timeout:
kernel-debug-loop/scripts/quick_debug.py --timeout 30
Runs the kernel for up to 30 seconds without specific signal detection.
Run in BIOS mode:
kernel-debug-loop/scripts/quick_debug.py --signal "Boot complete" --mode bios
Quiet mode (kernel output only):
kernel-debug-loop/scripts/quick_debug.py --signal "READY" --quiet
Suppresses progress messages, showing only kernel output.
Based on Breenix's test infrastructure, common signals include:
🎯 KERNEL_POST_TESTS_COMPLETE 🎯 - All runtime tests completedKERNEL_INITIALIZED - Basic kernel initialization completeUSER_PROCESS_STARTED - User process execution beganMEMORY_MANAGER_READY - Memory management subsystem initializedWhen making changes to kernel initialization:
kernel-debug-loop/scripts/quick_debug.py --signal "TARGET_CHECKPOINT" --timeout 10This provides feedback in ~10-15 seconds instead of waiting for full kernel execution or manual termination.
When debugging boot issues:
When verifying fixes:
When optimizing boot time:
When assisting with kernel debugging:
The script provides:
After a debug session, the entire kernel output is available for analysis:
Multiple checkpoint verification:
Run sequential sessions to verify a series of checkpoints:
for signal in "PHASE1" "PHASE2" "PHASE3"; do
kernel-debug-loop/scripts/quick_debug.py --signal "$signal" --quiet || break
done
Capture output for analysis:
kernel-debug-loop/scripts/quick_debug.py --signal "READY" > kernel_output.log 2>&1
Integration with test scripts:
import subprocess
result = subprocess.run(
['kernel-debug-loop/scripts/quick_debug.py', '--signal', 'TEST_COMPLETE'],
capture_output=True,
text=True
)
if result.returncode == 0:
print("Test passed!")
else:
print("Test failed or timed out")
analyze_output(result.stdout)
--timeoutVerify kernel reaches user mode:
kernel-debug-loop/scripts/quick_debug.py --signal "USER_PROCESS_STARTED" --timeout 20
Quick sanity check after changes:
kernel-debug-loop/scripts/quick_debug.py --timeout 5
Debug memory initialization:
kernel-debug-loop/scripts/quick_debug.py --signal "MEMORY_MANAGER_READY" --quiet > mem_init.log
Test both UEFI and BIOS modes:
kernel-debug-loop/scripts/quick_debug.py --signal "BOOT_COMPLETE" --mode uefi
kernel-debug-loop/scripts/quick_debug.py --signal "BOOT_COMPLETE" --mode bios
