Xinul is a Linux-inspired kernel designed for the RISC-V architecture. Developed as part of the PCSEA RISC-V academic project at Ensimag - Grenoble INP under the supervision of Mathieu Barbe and Frédéric Petrot.
- src/: Kernel and user-space code — see specific README inside
- exemple/: Small examples to verify the working environment
- docker/: Docker image for cross-compilation — see specific README inside
For more details, consult the specific READMEs or visit the wiki.
All specified syscalls are implemented and validated in supervisor and user modes.
We ported initial user-mode tests to supervisor mode to ease syscall implementation and added custom tests for Test Driven Development.
Note: Supervisor test numbering differs from user tests due to a different porting order.
Blocking I/O tests (test19 and shell) are disabled by default in CI; enable them by uncommenting lines 37-38 in src/kernel/tests/tests.c.
Run supervisor tests by adding this line in kernel_start() (src/kernel/start.c):
start_supervisor(kernel_tests_supervisor, 4000, 128, "tests", NULL);All user mode tests pass (including semaphore tests, see Semaphores), except test 22, which involves malicious access and is not required to be handled per the project specs. To run these tests, add the line
start("autotest", 4000, 128, NULL);in the function kernel_start() in src/kernel/start.c. This creates a dedicated process for running the tests. This line is commented out by default because test 22 fails and causes CI to fail.
Semaphore extension implemented. Enable semaphore tests by adding the WITH_SEM test option in src/user/Makefile line 79.
The console supports control codes 21 (Ctrl+U) and 23 (Ctrl+W) to clear the entire line or the last entered word, respectively.
We created a shell user application acting as a command interpreter. To launch the shell, add
start("shell", 4000, 128, NULL);to kernel_start() in src/kernel/start.c.
Type help to list available commands:
shell> helpExit with:
shell> q
# or
shell> exitImplemented commands include ps, sinfo, echo, and exit as specified, plus extra commands to better showcase kernel features.
Directly executes a syscall:
call [-h|--help]Examples:
shell> call sleep 5 # Runs sleep(5) syscall
shell> call start test1 4000 128 0 # Launches test1 using start syscall Runs a user program (equivalent to call start <prog> 4000 128 0):
shell> exec test1Clears the console:
shell> clearThis project is covered by a custom End User License Agreement (EULA). Please see the LICENSE file for full details on usage restrictions and intellectual property rights.
By using this software, you agree to comply with the terms outlined in the license.