Skip to content

HelleBenjamin/Manux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manux
=====
Manux is a small UNIX-like operating system for the Z80 cpu. It supports monotasksing, ROM based kernel, and disk based userland programs. Currently there aren't much of programs, but it's going to be expanded in the future.


I'd recommend seeing the `doc/` folder for more information about the OS and its functions.

Main features
=============
- Monotasking
- ROM based kernel
- Disk based userland programs
- POSIX support(partial)
- Custom filesystem (see `doc/filesystem.md`)
- File descriptor support

Status
======
The kernel is currently under development.
Most of the features are working as intended, but there are still some bugs and missing features.

System calls
============
Programs can communicate with the kernel using system calls. The kernel preserves all general purpose registers, so the programmer shouldn't have to worry about them.

Syscall calling convention
- HL - Syscall argument 1
- DE - Syscall argument 2
- BC - Syscall argument 3
- A  - Syscall number

- HL - Return value if any

See `doc/syscalls.md` for more information

POSIX support
=============
Manux can run very simple POSIX programs. However, it's not fully POSIX-compliant, so it may not work with some programs.
See `include/sys/unistd.h` for currently supported functions.

Minimum system requirements
===========================
Manux supports bemu80(https://github.com/HelleBenjamin/bemu80) as the offical target machine. It's going to be ported to other machines in the future when the kernel becomes stable.

- A Z80 CPU
- 56K RAM
- 8K ROM
- a serial interface
- floppy disk or other disk interface

These requirements may change in the future. Lower ram requirement is planned.

To do
====
- [] Add more drivers
- [] Rework memory management
- [] More POSIX features
- [] More documentation
- [x] A filesystem
- [] Use only SDCC compiler, not the whole z88dk toolchain
- [] Port Manux to other machines
- [] Better configuration
- [] Clean legacy code

Programs
========
Manux can run POSIX-like with limited functionality. Some programs may not work as intended. 
Currently stdio is not supported, so use read/write from unistd instead.

Userland programs are located in `userland/` directory. See its README for more information.

Pre-requisites
==============
- z88dk 2.4(or newer)
- make
- kconfig-frontends-nox(for configuration)
- linux or other unix-like platform
- git

Building
========
Configure Manux using `kconfig-mconf Kconfig`.
To build Manux, run `make`. The kernel is build with z88dk. You need to have z88dk installed to build the kernel.

Here's the steps to build Manux:
1. `git clone https://github.com/HelleBenjamin/Manux.git`
2. `cd Manux`
3. `kconfig-mconf Kconfig` (optional)
4. `make kernel`, this build only the kernel
5. `make userland`, this builds the userland programs and the disk image
6. `make`, this builds the kernel and the userland
7. `make emulate`, run the OS in bemu80

Note that compilation can take a while due to SDCC's optimizer. 
Reduce `--max-allocs-per-node100000` to 10000 if you want to build faster at the cost of code size and speed.

You can always run `make clean` to clean the build directory

Contributing
============
Pull requests are welcome! Feel free to add new features or fix bugs.
Note that clearly vibe coded slop code isn't accepted.
You can use AI if you understand it well enough.

License
=======
Copyright (C) 2025-2026 Benjamin Helle

Manux is licensed under the GNU GPL v2. See `LICENSE` for details.

About

Simple kernel for Z80

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors