mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-21 18:44:01 +00:00
1.6 KiB
1.6 KiB
CLeonOS Stage12
Stage Goal
- Add user execution manager in CLKS (
userland manager) for shell launch lifecycle. - Connect user execution state to scheduler via a dedicated kernel task (
usrd). - Extend syscall ABI with user execution telemetry (
ready/requested/tries/ok/fail). - Expose userland status as a first-class kernel service (
CLKS_SERVICE_USER).
Acceptance Criteria
- Kernel boots and prints
CLEONOS STAGE12 START. - Userland logs include:
USERLAND FRAMEWORK ONLINESHELL ELF READYSHELL EXEC REQUESTED
- Scheduler task count increases by one (
usrdadded). - Service framework includes USER service (service count increases).
- Stage12 syscall probe logs include:
USER SHELL_READYUSER EXEC_REQUESTEDUSER LAUNCH_TRIESUSER LAUNCH_OKUSER LAUNCH_FAIL
- System remains stable in idle loop with periodic task dispatch logs.
Build Targets
make setupmake userappsmake isomake runmake debug
QEMU Command
qemu-system-x86_64 -M q35 -m 1024M -cdrom build/CLeonOS-x86_64.iso -serial stdio
Common Bugs and Debugging
- USER syscall counters always 0:
- Check syscall IDs 16..20 match in kernel and user headers.
- Service count did not increase:
- Confirm
CLKS_SERVICE_USERis registered inclks_service_init().
- Confirm
SHELL EXEC REQUEST FAILED:- Ensure
/shell/shell.elfexists in ramdisk and ELF inspect passes.
- Ensure
usrdtask missing:- Verify
clks_scheduler_add_kernel_task_ex("usrd", ...)inkmain.
- Verify
- Boot regression after Stage12 merge:
- Re-check init order: FS -> userland init -> driver/kelf/exec -> scheduler -> service -> interrupts.