{"id":13489569,"url":"https://github.com/halfer53/winix","last_synced_at":"2026-03-12T21:14:03.591Z","repository":{"id":19827268,"uuid":"88021715","full_name":"halfer53/winix","owner":"halfer53","description":"A UNIX-style Operating System for the Waikato RISC Architecture Microprocessor (WRAMP)","archived":false,"fork":false,"pushed_at":"2025-02-07T04:04:28.000Z","size":13713,"stargazers_count":944,"open_issues_count":6,"forks_count":49,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-02-07T05:18:29.025Z","etag":null,"topics":["c","filesystem","kernel","linux","operating-system","os","unix","unix-like"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halfer53.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-12T07:16:23.000Z","updated_at":"2025-02-07T04:04:31.000Z","dependencies_parsed_at":"2022-07-13T15:59:23.885Z","dependency_job_id":"7ce4f995-237d-4aef-9ee2-908a3ef85e4a","html_url":"https://github.com/halfer53/winix","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfer53%2Fwinix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfer53%2Fwinix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfer53%2Fwinix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfer53%2Fwinix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halfer53","download_url":"https://codeload.github.com/halfer53/winix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978200,"owners_count":20703675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","filesystem","kernel","linux","operating-system","os","unix","unix-like"],"created_at":"2024-07-31T19:00:31.149Z","updated_at":"2026-03-12T21:14:03.548Z","avatar_url":"https://github.com/halfer53.png","language":"C","readme":"# WINIX OS\n\n[![C/C++ CI](https://github.com/halfer53/winix/actions/workflows/ccpp.yml/badge.svg)](https://github.com/halfer53/winix/actions/workflows/ccpp.yml) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![CodeFactor](https://www.codefactor.io/repository/github/halfer53/winix/badge/master)](https://www.codefactor.io/repository/github/halfer53/winix/overview/master)\n\nWinix is a minimal, hobbyistic, educational and UNIX-style Operating System for the Waikato RISC Architecture Microprocessor (WRAMP).\n\nInspired by the Minix1 operating system, Winix includes a full-featured kernel with features such as process and memory management, in-memory file system, exception control, and a user space bourne shell with interactive command line. And, for a bit of fun, you can even play the classic game of snake by simply typing `snake` in the command line.\n\n## Demo\n\n### Playing Snake\n\n![play snake](demo/snake.gif)\n\n### Using Pipe in shell\n\n![shell pipe](demo/bash_pipe_ls.gif)\n\n## Features\n\n- Kernel Memory Management: virtual memory, page mapping\n- Process Management: Kernel thread, process creation\n- Exception control and interrupt handler\n- In-memory file system that supports most of the POSIX api\n- A Bourne shell supporting multiple pipes and redirection\n- User memory management: malloc() free()\n- User coroutine with `ucontext.h` support\n- Stacktrace dump, segfault analysis\n\n## Supported Commands\n\n- [snake](user/commands/snake.c)\n- [shell](user/wsh/wsh.c)\n- [cat](user/commands/cat.c)\n- [cp](user/commands/cp.c)\n- [echo](user/commands/echo.c)\n- [grep](user/commands/grep.c)\n- [history](user/commands/history.c)\n- [ls](user/commands/ls.c)\n- [mkdir](user/commands/mkdir.c)\n- [mv](user/commands/mv.c)\n- [ps](user/commands/ps.c)\n- [pwd](user/commands/pwd.c)\n- [rm](user/commands/rm.c)\n- [stat](user/commands/stat.c)\n- [test](user/commands/test.c)\n- [touch](user/commands/touch.c)\n- [uptime](user/commands/uptime.c)\n- [wc](user/commands/wc.c)\n- [df](user/commands/df.c)\n- [du](user/commands/du.c)\n- [ln](user/commands/ln.c)\n- [tail](user/commands/tail.c)\n\n## Unit Test\n\n[tests](tests)\n\n## How to Run\n\nDownload the latest Rexsimulator from [Here](https://github.com/halfer53/rexsimulator/releases)\n\nN.B. `mono` is required to run in Linux/MacOS environment, [Download Instruction](https://www.mono-project.com/download/stable/#download-lin)\n\nDownload the latest WINIX binary `winix.srec` from [Here](https://github.com/halfer53/winix/releases)\n\nRun `Rexsimulator.exe`\n\nClick `Quick Load`, select `winix.srec`\n\n### Loading Winix\n\n![load winix](demo/load_winix.gif)\n\n## How to Compile\n\nN.B. Linux environment is required for compilation\n\n### Prerequisite\n\nDebian / Ubuntu\n\n```shell\nsudo apt-get install xutils-dev gcc libbsd-dev\n```\n\n### Clone and Compile\n\n```shell\ngit clone https://github.com/halfer53/winix.git\ncd winix\nmake -j$((`nproc`+2))\n```\n\n## Debug tips\n\n### Debug Makefile\n\nSimilar to linux kbuild, **Winix** supports verbose option, you can debug Makefile by setting verbose to 1\n\n```shell\nmake V=1\n```\n\n### Debug Kernel\n\n`kprintf()`: is your friend.\n\n`trace`: type trace in shell to print all the syscalls in serial port 2\n\n## Supported System Call\n\n- [times](kernel/system/do_times.c#L23)\n- [exit](kernel/system/do_exit_wait.c#L249)\n- [fork](kernel/system/do_fork.c#L135)\n- [vfork](kernel/system/do_fork.c#L152)\n- [execve](kernel/system/do_execve.c#L48)\n- [brk](kernel/system/do_brk.c#L94)\n- [alarm](kernel/system/do_timer_nanosleep.c#L108)\n- [sigaction](kernel/system/do_sigaction.c#L44)\n- [sigret](kernel/system/do_sigreturn.c#L19)\n- [waitpid](kernel/system/do_exit_wait.c#L36)\n- [kill](kernel/system/do_kill.c#L57)\n- [getpid](kernel/system/do_getpid.c#L20)\n- [winfo](kernel/system/do_winfo.c#L19)\n- [strerror](kernel/system/do_dprintf.c#L21)\n- [dprintf](kernel/system/do_dprintf.c#L52)\n- [sysconf](kernel/system/do_sysconf.c#L4)\n- [sigsuspend](kernel/system/do_sigsuspend.c#L18)\n- [sigpending](kernel/system/do_sigpending.c#L17)\n- [sigprocmask](kernel/system/do_sigprocmask.c#L20)\n- [setpgid](kernel/system/do_setpgid.c#L3)\n- [getpgid](kernel/system/do_getpgid.c#L4)\n- [open](fs/system/open_close.c#L119)\n- [read](fs/system/read_write.c#L28)\n- [write](fs/system/read_write.c#L35)\n- [close](fs/system/open_close.c#L137)\n- [creat](fs/system/open_close.c#L128)\n- [pipe](fs/system/pipe.c#L39)\n- [mknod](fs/system/mknod.c#L44)\n- [chdir](fs/system/chdir_mkdir.c#L68)\n- [chown](fs/system/chown_chmod.c#L11)\n- [chmod](fs/system/chown_chmod.c#L33)\n- [stat](fs/system/stat.c#L47)\n- [fstat](fs/system/stat.c#L56)\n- [dup](fs/system/dup.c#L50)\n- [dup2](fs/system/dup.c#L54)\n- [link](fs/system/link_unlink.c#L72)\n- [unlink](fs/system/link_unlink.c#L81)\n- [getdent](fs/system/getdent.c#L58)\n- [access](fs/system/umask_access.c#L38)\n- [mkdir](fs/system/chdir_mkdir.c#L75)\n- [sync](fs/system/sync.c#L6)\n- [lseek](fs/system/lseek.c#L58)\n- [umask](fs/system/umask_access.c#L14)\n- [fcntl](fs/system/fcntl.c#L26)\n- [ioctl](fs/system/ioctl.c#L15)\n- [setsid](/kernel/system/do_setsid.c#L3)\n- [nanosleep](kernel/system/do_timer_nanosleep.c#L128)\n- [getppid](kernel/system/do_getpid.c#L25)\n- [signal](kernel/system/do_sigaction.c#L70)\n- [sbrk](kernel/system/do_brk.c#L85)\n- [statfs](fs/system/statfs.c#L43)\n- [getcwd](fs/system/getcwd.c#L4)\n- [tfork](kernel/system/do_fork.c#L172)\n- [setitimer](kernel/system/do_timer_nanosleep.c#L89)\n\n## Credits\n\n[Paul Monigatti](https://nz.linkedin.com/in/paulmonigatti)\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalfer53%2Fwinix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalfer53%2Fwinix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalfer53%2Fwinix/lists"}